Adding Kavon.
It would be good to record the outcome of this discussion in a 'Note' with the
cml_cont declaration, explaining what it is for.
Simon
| -Original Message-
| From: ghc-devs On Behalf Of Ömer Sinan
| Agacan
| Sent: 18 March 2018 07:32
|
> Is the "cml_cont" field of the CmmCall variant is really used in practice?
Seconding what Michal has already said, yes, the `cml_cont` field is used quite
a bit in Cmm.
Any non-tail call in the program will have this field populated with
information about where control-flow continues after
On Sun, Mar 18, 2018 at 6:38 AM Shao, Cheng wrote:
> Hi all,
>
> Is the "cml_cont" field of the CmmCall variant is really used in practice?
> I traversed the output of raw Cmm produced by ghc compiling the whole base
> package, but the value of cml_cont is always Nothing.
>
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
Hi Shao,
Perhaps not in the Cmm output generated for your programs, but it's definitely
used in the code generator. 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.