StgCase - are LiveVars and SRT fields going to be used?

Ömer Sinan Ağacan omeragacan at gmail.com
Tue Feb 2 01:19:07 UTC 2016


https://phabricator.haskell.org/D1880

2016-02-01 18:04 GMT-05:00 Simon Peyton Jones <simonpj at microsoft.com>:
> Those fields are dead, now that the Cmm pass deals with it.  We left it in while making the transition, but they can go now.  Go ahead!
>
> (Lots of code should disappear along with them!)
>
> Simon
>
> | -----Original Message-----
> | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Ömer Sinan
> | Agacan
> | Sent: 01 February 2016 22:06
> | To: ghc-devs <ghc-devs at haskell.org>
> | Subject: StgCase - are LiveVars and SRT fields going to be used?
> |
> | Hi all,
> |
> | This is how case expression in STG currently defined:
> |
> |
> |   | StgCase
> |         (GenStgExpr bndr occ)
> |         (GenStgLiveVars occ)
> |         (GenStgLiveVars occ)
> |         bndr
> |         SRT
> |         AltType
> |         [GenStgAlt bndr occ]
> |
> |
> | The GenStgLiveVars and SRT fields are never used anywhere in the compiler
> | (except the printer). So the question is, I'm assuming those were used at
> | some
> | point, but are they going to be used in the future? Or can I just delete
> | those?
> |
> | As a proof of concept, I just compiled GHC using this:
> |
> |
> |   | StgCase
> |         (GenStgExpr bndr occ)
> |         bndr
> |         AltType
> |         [GenStgAlt bndr occ]
> |
> |
> | Normally this is not a big deal, but I'm doing lots of STG-to-STG
> | transformations nowadays, and I have to keep those field updated which is
> | annoying as those are never going to be used (I can't even know if I'm doing
> | it
> | right), or leave those `undefined` which is not a good practice.
> | _______________________________________________
> | ghc-devs mailing list
> | ghc-devs at haskell.org
> | https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.haskell.
> | org%2fcgi-bin%2fmailman%2flistinfo%2fghc-
> | devs&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c12ca56c8fc514f477f7f08
> | d32b53f4bc%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=LPiupNbUJ9OGL9cmbP%2f
> | PAs2JSdxqlxk%2bGbXuYTHFbzg%3d


More information about the ghc-devs mailing list