[commit: ghc] newcg: re-enable constant folding in the NCG, while cmmRewriteAssignments is off (06b8b97)
Simon Marlow
marlowsd at gmail.com
Wed Feb 15 14:02:34 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : newcg
http://hackage.haskell.org/trac/ghc/changeset/06b8b9733fd446e7ee9e2cd2fbde2e8674194579
>---------------------------------------------------------------
commit 06b8b9733fd446e7ee9e2cd2fbde2e8674194579
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Feb 15 11:11:18 2012 +0000
re-enable constant folding in the NCG, while cmmRewriteAssignments is off
>---------------------------------------------------------------
compiler/nativeGen/AsmCodeGen.lhs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs
index b818b01..a8fd604 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -948,7 +948,8 @@ cmmExprConFold referenceKind expr = do
dflags <- getDynFlags
-- Skip constant folding if new code generator is running
-- (this optimization is done in Hoopl)
- let expr' = if dopt Opt_TryNewCodeGen dflags
+ -- SDM: re-enabled for now, while cmmRewriteAssignments is turned off
+ let expr' = if False -- dopt Opt_TryNewCodeGen dflags
then expr
else cmmExprCon (targetPlatform dflags) expr
cmmExprNative referenceKind expr'
More information about the Cvs-ghc
mailing list