re-enable constant folding in the NCG, while cmmRewriteAssignments is off
authorSimon Marlow <marlowsd@gmail.com>
Wed, 15 Feb 2012 11:11:18 +0000 (11:11 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 15 Feb 2012 11:11:18 +0000 (11:11 +0000)
compiler/nativeGen/AsmCodeGen.lhs

index b818b01..a8fd604 100644 (file)
@@ -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'