diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-03-23 15:09:42 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-24 16:10:07 -0400 |
commit | 60127035e2d7c649ac7fd312cded240d5f46e98d (patch) | |
tree | 03ec425580adc67d86737b2f7b6ed7fcde32884c /compiler/GHC/Stg/Syntax.hs | |
parent | 23f4bc89406de24ec77ced45aa267f9a8f8aaa60 (diff) | |
download | haskell-60127035e2d7c649ac7fd312cded240d5f46e98d.tar.gz |
STG AST - Make ConstructorNumber always a field.
It's used by all passes and already used as a regular field.
So I figured it would be both more consistent and performant
to make it a regular field for all constructors.
I also added a few bangs in the process.
Diffstat (limited to 'compiler/GHC/Stg/Syntax.hs')
-rw-r--r-- | compiler/GHC/Stg/Syntax.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/GHC/Stg/Syntax.hs b/compiler/GHC/Stg/Syntax.hs index 6e2107e9d6..972efc5f44 100644 --- a/compiler/GHC/Stg/Syntax.hs +++ b/compiler/GHC/Stg/Syntax.hs @@ -25,7 +25,7 @@ module GHC.Stg.Syntax ( GenStgTopBinding(..), GenStgBinding(..), GenStgExpr(..), GenStgRhs(..), GenStgAlt, AltType(..), - StgPass(..), BinderP, XRhsClosure, XLet, XLetNoEscape, XConApp, + StgPass(..), BinderP, XRhsClosure, XLet, XLetNoEscape, NoExtFieldSilent, noExtFieldSilent, OutputablePass, @@ -246,7 +246,7 @@ literals. -- StgConApp is vital for returning unboxed tuples or sums -- which can't be let-bound | StgConApp DataCon - (XConApp pass) + ConstructorNumber [StgArg] -- Saturated [Type] -- See Note [Types in StgConApp] in GHC.Stg.Unarise @@ -485,10 +485,6 @@ type family XLet (pass :: StgPass) type instance XLet 'Vanilla = NoExtFieldSilent type instance XLet 'CodeGen = NoExtFieldSilent -type family XConApp (pass :: StgPass) -type instance XConApp 'Vanilla = ConstructorNumber -type instance XConApp 'CodeGen = ConstructorNumber - -- | When `-fdistinct-constructor-tables` is turned on then -- each usage of a constructor is given an unique number and -- an info table is generated for each different constructor. @@ -669,7 +665,6 @@ likes terminators instead... Ditto for case alternatives. type OutputablePass pass = ( Outputable (XLet pass) - , Outputable (XConApp pass) , Outputable (XLetNoEscape pass) , Outputable (XRhsClosure pass) , OutputableBndr (BinderP pass) |