Is "cml_cont" of CmmCall used in practice?

Cheng Shao cheng.shao at tweag.io
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.

Regards,
Shao Cheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180318/1501c8c8/attachment.html>


More information about the ghc-devs mailing list