[commit: ghc] wip/T15155a: review feedback (7d6d281)
git at git.haskell.org
git at git.haskell.org
Sun Mar 31 15:06:51 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T15155a
Link : http://ghc.haskell.org/trac/ghc/changeset/7d6d28170779f2ec710e466eedc7052e4137c504/ghc
>---------------------------------------------------------------
commit 7d6d28170779f2ec710e466eedc7052e4137c504
Author: Gabor Greif <ggreif at gmail.com>
Date: Thu Dec 20 18:33:12 2018 +0100
review feedback
>---------------------------------------------------------------
7d6d28170779f2ec710e466eedc7052e4137c504
compiler/cmm/CLabel.hs | 4 ++--
compiler/llvmGen/LlvmCodeGen/Data.hs | 5 +++--
compiler/nativeGen/PPC/Ppr.hs | 5 +++--
compiler/nativeGen/SPARC/Ppr.hs | 5 +++--
compiler/nativeGen/X86/Ppr.hs | 5 +++--
5 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 1e5e6e9..1de6c6d 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 c90b338..a936972 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 333874d..5e714df 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 3861468..dc24d00 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 71675ad..8b9e001 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
More information about the ghc-commits
mailing list