diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2022-02-25 14:51:47 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-28 19:17:12 -0500 |
commit | 4f0208e53444d32c7f3795b3ac15acbfc75bf58c (patch) | |
tree | d06a70f2bd3b00503ba87666fcbe12cc525aa462 /compiler/GHC/Cmm/CLabel.hs | |
parent | adfddf7de3a9c1f757cbf027815a4b4f6ee86a7e (diff) | |
download | haskell-4f0208e53444d32c7f3795b3ac15acbfc75bf58c.tar.gz |
CLabel cleanup:
Remove these smart constructors for these reasons:
* mkLocalClosureTableLabel : Does the same as the non-local variant.
* mkLocalClosureLabel : Does the same as the non-local variant.
* mkLocalInfoTableLabel : Decide if we make a local label based on the name
and just use mkInfoTableLabel everywhere.
Diffstat (limited to 'compiler/GHC/Cmm/CLabel.hs')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index dd7e1f14f5..933151a679 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -33,9 +33,6 @@ module GHC.Cmm.CLabel ( mkBytesLabel, mkLocalBlockLabel, - mkLocalClosureLabel, - mkLocalInfoTableLabel, - mkLocalClosureTableLabel, mkBlockInfoTableLabel, @@ -587,14 +584,6 @@ mkRednCountsLabel name = IdLabel name NoCafRefs (IdTickyInfo TickyRednCounts) mkTagHitLabel :: Name -> Unique -> CLabel mkTagHitLabel name !uniq = IdLabel name NoCafRefs (IdTickyInfo (TickyInferedTag uniq)) --- These have local & (possibly) external variants: -mkLocalClosureLabel :: Name -> CafInfo -> CLabel -mkLocalInfoTableLabel :: Name -> CafInfo -> CLabel -mkLocalClosureTableLabel :: Name -> CafInfo -> CLabel -mkLocalClosureLabel !name !c = IdLabel name c Closure -mkLocalInfoTableLabel name c = IdLabel name c LocalInfoTable -mkLocalClosureTableLabel name c = IdLabel name c ClosureTable - mkClosureLabel :: Name -> CafInfo -> CLabel mkInfoTableLabel :: Name -> CafInfo -> CLabel mkEntryLabel :: Name -> CafInfo -> CLabel @@ -602,7 +591,10 @@ mkClosureTableLabel :: Name -> CafInfo -> CLabel mkConInfoTableLabel :: Name -> ConInfoTableLocation -> CLabel mkBytesLabel :: Name -> CLabel mkClosureLabel name c = IdLabel name c Closure -mkInfoTableLabel name c = IdLabel name c InfoTable +-- | Decicdes between external and local labels based on the names externality. +mkInfoTableLabel name c + | isExternalName name = IdLabel name c InfoTable + | otherwise = IdLabel name c LocalInfoTable mkEntryLabel name c = IdLabel name c Entry mkClosureTableLabel name c = IdLabel name c ClosureTable -- Special case for the normal 'DefinitionSite' case so that the 'ConInfoTable' application can be floated to a CAF. |