[commit: ghc] wip/T15155a: revert asserts, they are useless (e2403e6)

git at git.haskell.org git at git.haskell.org
Sun Mar 31 15:07:00 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T15155a
Link       : http://ghc.haskell.org/trac/ghc/changeset/e2403e6e163ecf86f63f7ee2e20868c7709bded9/ghc

>---------------------------------------------------------------

commit e2403e6e163ecf86f63f7ee2e20868c7709bded9
Author: Gabor Greif <ggreif at gmail.com>
Date:   Tue Jan 1 14:45:03 2019 +0100

    revert asserts, they are useless


>---------------------------------------------------------------

e2403e6e163ecf86f63f7ee2e20868c7709bded9
 compiler/llvmGen/LlvmCodeGen/Data.hs | 5 ++---
 compiler/nativeGen/PPC/Ppr.hs        | 5 ++---
 compiler/nativeGen/SPARC/Ppr.hs      | 5 ++---
 compiler/nativeGen/X86/Ppr.hs        | 5 ++---
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
index a8b977d..c90b338 100644
--- a/compiler/llvmGen/LlvmCodeGen/Data.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
@@ -22,7 +22,6 @@ import Platform
 
 import FastString
 import Outputable
-import Util     ( debugIsOn )
 
 -- ----------------------------------------------------------------------------
 -- * Constants
@@ -44,8 +43,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, a, b])
-  | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel
+genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])
+  | 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 77c7ee3..333874d 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -34,7 +34,6 @@ import Platform
 import FastString
 import Outputable
 import DynFlags
-import Util                  ( debugIsOn )
 
 import Data.Word
 import Data.Int
@@ -125,8 +124,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, a, b])
-  | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel
+pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])
+  | 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 a5348e5..3861468 100644
--- a/compiler/nativeGen/SPARC/Ppr.hs
+++ b/compiler/nativeGen/SPARC/Ppr.hs
@@ -50,7 +50,6 @@ import Outputable
 import Platform
 import FastString
 import Data.Word
-import Util             ( debugIsOn )
 
 -- -----------------------------------------------------------------------------
 -- Printing this stuff out
@@ -108,8 +107,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, a, b])
-  | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel
+pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])
+  | 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 b763a32..71675ad 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -45,7 +45,6 @@ import Unique           ( pprUniqueAlways )
 import Platform
 import FastString
 import Outputable
-import Util             ( debugIsOn )
 
 import Data.Word
 
@@ -155,8 +154,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, a, b])
-  | {-ASSERT( (a,b) == (0,0) )-} lbl == mkIndStaticInfoLabel
+pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])
+  | lbl == mkIndStaticInfoLabel
   , let labelInd (CmmLabelOff l _) = Just l
         labelInd (CmmLabel l) = Just l
         labelInd _ = Nothing



More information about the ghc-commits mailing list