Is "cml_cont" of CmmCall used in practice?

Cheng Shao cheng.shao at
Sun Mar 18 07:50:19 UTC 2018

Hi Ă–mer,

See e.g. `lowerSafeForeignCall` and `blockCode`
> which set the field with `Just`. The former seems to be related with
> foreign
> calls so perhaps try compiling a FFI package.

I tried compiling a module with a `foreign import ccall safe` declaration,
yet the output raw Cmm still doesn't use `cml_cont`.

`CmmLayoutStack` uses that field
> for code generation (I don't understand the details yet).

Thanks for pointing that out, I'll check its implementation.

I also found another evidence of the field not used by codegens: in `PprC`
which is used by unregisterised builds, only the `cml_target` field is
used. So for now I assume that the assertion of `cml_cont = Nothing` holds
for final Cmm output, and backend writers need not be concerned with it.

Shao Cheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list