[commit: ghc] wip/T13861: take out the doorstops (4ddb842)

git at git.haskell.org git at git.haskell.org
Fri Dec 22 11:38:11 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T13861
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ddb8421ef34ad9c15492ec894d554c9083b9045/ghc

>---------------------------------------------------------------

commit 4ddb8421ef34ad9c15492ec894d554c9083b9045
Author: Gabor Greif <ggreif at gmail.com>
Date:   Fri Dec 22 12:23:07 2017 +0100

    take out the doorstops
    
    consider everything for CSE


>---------------------------------------------------------------

4ddb8421ef34ad9c15492ec894d554c9083b9045
 compiler/simplStg/StgCse.hs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs
index 670a3ad..9b3bb26 100644
--- a/compiler/simplStg/StgCse.hs
+++ b/compiler/simplStg/StgCse.hs
@@ -128,7 +128,7 @@ instance NamedThing LaxDataCon where
     where uniq = mkUniqueGrimily . negate $ dataConTag dc * 1048576 + length (dataConOrigArgTys dc) -- FIXME
           hasStrict = any (\case HsLazy -> False; _ -> True) (dataConImplBangs dc)
           unpacked = isUnboxedTupleCon dc || isUnboxedSumCon dc
-          long = dataConTag dc < 7 && (null $ dataConOrigArgTys dc) -- True -- length (dataConOrigArgTys dc) > 0
+          long = True -- length (dataConOrigArgTys dc) > 0
   getName (Lax dc) = getName dc
 
 
@@ -209,10 +209,8 @@ envLookup dataCon args env = lookupTM (dataCon, args') (ce_conAppMap env)
         go (StgLitArg lit) = StgLitArg lit
 
 addDataCon :: OutId -> LaxDataCon -> [OutStgArg] -> CseEnv -> CseEnv
--- do not bother with nullary data constructors, they are static anyways
 addDataCon bndr dataCon [] env = env { ce_conAppMap = new_env }
   where new_env = alterTM (dataCon, []) (\case Nothing -> pure bndr; p -> p) (ce_conAppMap env)
---addDataCon _ _ [] env = env
 addDataCon bndr dataCon args env = env { ce_conAppMap = new_env }
   where
     new_env = insertTM (dataCon, args) bndr (ce_conAppMap env)



More information about the ghc-commits mailing list