Did you ever get a reply to this? In the output of the codegen, CmmProcs should have no live registers apart from those used to pass args, and the standard ones.
Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Moritz | Angermann | Sent: 22 September 2017 07:33 | To: GHC developers <ghc-devs@haskell.org> | Subject: In C--: should CmmCall and CmmProc agree on their live registers? | | Hi, | | apologies for writing so many emails recently. This is a minor spinoff from | the "The Curious Case of T6084" email. | | While digging into it, I keep asking myself if CmmProc’s live registers | should match those of the CmmCall that is calling it? | | Is there any invariant we try to enforce or would want to enforce? | | - Can the CmmProcs live registers be a strict superset of | the corresponding CmmCalls? | | From the source comments in `compiler/cmm/Cmm.hs`: | > Registers live on entry. Note that the set of live | > registers will be correct in generated C-- code, but | > not in hand-written C-- code. However, | > splitAtProcPoints calculates correct liveness | > information for CmmProcs. | | I would assume that this is an invalid case? | | - Can the CmmProcs live registers be a strict subset of | the corresponding CmmCalls? | | This case however seems to be valid case. However, this | makes me wonder if we can, and should(?) propagate the | live register info from the CmmProc to the CmmCall so | that they match up, and the registers are not kept live | at the origin of the CmmCall if they aren’t needed? And | as such potentially compute anything to put into the | registers the CmmCall considers live, but the CmmProc | would ignore anyway? | | Cheers, | Moritz | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell | .org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc- | devs&data=02%7C01%7Csimonpj%40microsoft.com%7C6009bb0f47a447a4217708d50183ce | fa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636416587981602708&sdata=vII | rlKVJa6E%2FBvVz5Sod1c544nw6gsGp54Mlhr7bQ8g%3D&reserved=0 _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs