Remove an #ifdef DEBUG
authorIan Lynagh <igloo@earth.li>
Sat, 29 Mar 2008 14:48:44 +0000 (14:48 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 29 Mar 2008 14:48:44 +0000 (14:48 +0000)
compiler/stgSyn/CoreToStg.lhs

index 529de77..d03412a 100644 (file)
@@ -39,6 +39,7 @@ import StaticFlags    ( opt_RuntimeTypes )
 import Module
 import Outputable
 import MonadUtils
 import Module
 import Outputable
 import MonadUtils
+import Util
 \end{code}
 
 %************************************************************************
 \end{code}
 
 %************************************************************************
@@ -636,16 +637,12 @@ coreToStgLet let_no_escape bind body = do
 
        no_binder_escapes = isEmptyVarSet (set_of_binders `intersectVarSet` all_escs)
 
 
        no_binder_escapes = isEmptyVarSet (set_of_binders `intersectVarSet` all_escs)
 
-#ifdef DEBUG
        -- Debugging code as requested by Andrew Kennedy
        checked_no_binder_escapes
        -- Debugging code as requested by Andrew Kennedy
        checked_no_binder_escapes
-               | not no_binder_escapes && any is_join_var binders
+               | debugIsOn && not no_binder_escapes && any is_join_var binders
                = pprTrace "Interesting!  A join var that isn't let-no-escaped" (ppr binders)
                  False
                | otherwise = no_binder_escapes
                = pprTrace "Interesting!  A join var that isn't let-no-escaped" (ppr binders)
                  False
                | otherwise = no_binder_escapes
-#else
-       checked_no_binder_escapes = no_binder_escapes
-#endif
                            
                -- Mustn't depend on the passed-in let_no_escape flag, since
                -- no_binder_escapes is used by the caller to derive the flag!
                            
                -- Mustn't depend on the passed-in let_no_escape flag, since
                -- no_binder_escapes is used by the caller to derive the flag!