diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 1e5e6e959cffd6ce2586e95592dcde827a5ce444..1de6c6dcaeed08f23951b46e19e0a7bdd3ec5307 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -1449,11 +1449,11 @@ isAliasToLocalOrIntoThisModule alias lab = thismod == mod | Just nam <- hasHaskellName lab - , staticClosureLabel || pprTrace "isAliasToLocal?" (ppr lab) False + , staticClosureLabel , isInternalName nam = True - | otherwise = pprTrace "isAliasToLocal" (ppr alias <+> ppr lab) False + | otherwise = False where staticClosureLabel = isStaticClosureLabel lab diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs index c90b3384d6aab2665c73c2472be38da629666879..a9369729bc0cbb370d0bccd4787ab79aca1fe546 100644 --- a/compiler/llvmGen/LlvmCodeGen/Data.hs +++ b/compiler/llvmGen/LlvmCodeGen/Data.hs @@ -22,6 +22,7 @@ import Platform import FastString import Outputable +import Util ( debugIsOn ) -- ---------------------------------------------------------------------------- -- * Constants @@ -43,8 +44,8 @@ linkage lbl = if externallyVisibleCLabel lbl -- | Pass a CmmStatic section to an equivalent Llvm code. genLlvmData :: (Section, CmmStatics) -> LlvmM LlvmData -- See note [emit-time elimination of static indirections] -genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index 333874dfd0428b6a5c32ffd578659e86a7256f62..5e714dfed1f71544ea11e36e396f6ffc5f993304 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -34,6 +34,7 @@ import Platform import FastString import Outputable import DynFlags +import Util ( debugIsOn ) import Data.Word import Data.Int @@ -124,8 +125,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs index 3861468c4cde40e8bcf3a27293119f425a4fb5ff..dc24d00113b359d113cc7af183ae46a7a7d66648 100644 --- a/compiler/nativeGen/SPARC/Ppr.hs +++ b/compiler/nativeGen/SPARC/Ppr.hs @@ -50,6 +50,7 @@ import Outputable import Platform import FastString import Data.Word +import Util ( debugIsOn ) -- ----------------------------------------------------------------------------- -- Printing this stuff out @@ -107,8 +108,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: CmmStatics -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 71675adb2af27d7752b85f9c10c976eea46729db..8b9e001ab1eaadbc2020e8badd69e3894b275952 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -45,6 +45,7 @@ import Unique ( pprUniqueAlways ) import Platform import FastString import Outputable +import Util ( debugIsOn ) import Data.Word @@ -154,8 +155,8 @@ pprBasicBlock info_env (BasicBlock blockid instrs) pprDatas :: (Alignment, CmmStatics) -> SDoc -- See note [emit-time elimination of static indirections] -pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _]) - | lbl == mkIndStaticInfoLabel +pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, a, b]) + | ASSERT( (a,b) == (0,0) ) lbl == mkIndStaticInfoLabel , let labelInd (CmmLabelOff l _) = Just l labelInd (CmmLabel l) = Just l labelInd _ = Nothing