rts: Compile with gcc -Og
authorBen Gamari <bgamari.foss@gmail.com>
Sun, 13 May 2018 22:34:48 +0000 (18:34 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 14 May 2018 02:22:42 +0000 (22:22 -0400)
This optimisation level is specifically designed to provide the benefits
of optimisation without the obfuscation that sometimes results.

Test Plan: Validate

Reviewers: simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4675

rts/ghc.mk
rts/sm/Sanity.c

index e96e147..2976b0a 100644 (file)
@@ -153,7 +153,7 @@ rts_dist_$1_CC_OPTS := $$(GhcRtsCcOpts)
 # The per-way CC_OPTS
 ifneq "$$(findstring debug, $1)" ""
 rts_dist_$1_HC_OPTS += -O0
-rts_dist_$1_CC_OPTS += -fno-omit-frame-pointer -g -O0
+rts_dist_$1_CC_OPTS += -fno-omit-frame-pointer -g -Og
 endif
 
 ifneq "$$(findstring dyn, $1)" ""
index 7a0ad16..23a20b2 100644 (file)
@@ -481,7 +481,7 @@ checkCompactObjects(bdescr *bd)
     // before the actual closure
 
     for ( ; bd != NULL; bd = bd->link) {
-        StgCompactNFDataBlock *block, *last;
+        StgCompactNFDataBlock *block, *last = NULL;
         StgCompactNFData *str;
         StgWord totalW;