[commit: ghc] wip/T13861: WIP: more debugging, reduce to nullary, no compex (8e74002)

git at git.haskell.org git at git.haskell.org
Fri Dec 22 00:03:10 UTC 2017


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

On branch  : wip/T13861
Link       : http://ghc.haskell.org/trac/ghc/changeset/8e740024219bbd888d3b408c19b0312d9e8681ff/ghc

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

commit 8e740024219bbd888d3b408c19b0312d9e8681ff
Author: Gabor Greif <ggreif at gmail.com>
Date:   Tue Aug 29 11:44:56 2017 +0200

    WIP: more debugging, reduce to nullary, no compex


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

8e740024219bbd888d3b408c19b0312d9e8681ff
 compiler/simplStg/StgCse.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs
index bfa02b2..0842a4f 100644
--- a/compiler/simplStg/StgCse.hs
+++ b/compiler/simplStg/StgCse.hs
@@ -127,7 +127,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 = True -- length (dataConOrigArgTys dc) > 0
+          long = null $ dataConOrigArgTys dc -- True -- length (dataConOrigArgTys dc) > 0
   getName (Lax dc) = getName dc
 
 
@@ -340,11 +340,11 @@ stgCseExpr env (StgCase scrut bndr ty alts)
 
 -- A constructor application.
 -- To be removed by a variable use when found in the CSE environment
-stgCseExpr env (StgConApp dataCon args tys)
+stgCseExpr env orig@(StgConApp dataCon args tys)
     | Just bndr' <- envLookup dc args' env
     = (if getKey u < 0 then pprTrace "stgCseExpr" (ppr dataCon <+> text (show $ length (dataConOrigArgTys dataCon))) else id) $ StgApp bndr' []
     | otherwise
-    = StgConApp dataCon args' tys
+    = orig -- StgConApp dataCon args' tys
   where args' = substArgs env args
         dc = Lax dataCon
         u = getUnique (getName dc)



More information about the ghc-commits mailing list