Is "cml_cont" of CmmCall used in practice?

2018-03-17 Thread Shao, Cheng
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. Regards, Shao Cheng ___ ghc-devs mailing

Re: Is "cml_cont" of CmmCall used in practice?

2018-03-18 Thread Ömer Sinan Ağacan
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. `CmmLayoutS

Re: Is "cml_cont" of CmmCall used in practice?

2018-03-18 Thread Cheng Shao
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'

Re: Is "cml_cont" of CmmCall used in practice?

2018-03-18 Thread Michal Terepeta
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. > > Regards, > Shao Chen

Re: Is "cml_cont" of CmmCall used in practice?

2018-03-18 Thread Kavon Farvardin
> 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 t

RE: Is "cml_cont" of CmmCall used in practice?

2018-03-19 Thread Simon Peyton Jones via ghc-devs
| Cc: ghc-devs | Subject: Re: Is "cml_cont" of CmmCall used in practice? | | 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 `J