[commit: ghc] wip/T14626: WIP: asm-emit-time IND_STATIC elimination (4a4dc80)

git at git.haskell.org git at git.haskell.org
Mon Jan 29 13:34:41 UTC 2018


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

On branch  : wip/T14626
Link       : http://ghc.haskell.org/trac/ghc/changeset/4a4dc80bab9a8a9096b544011d24f3b380eb30e3/ghc

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

commit 4a4dc80bab9a8a9096b544011d24f3b380eb30e3
Author: Gabor Greif <ggreif at gmail.com>
Date:   Mon Jan 29 14:34:25 2018 +0100

    WIP: asm-emit-time IND_STATIC elimination


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

4a4dc80bab9a8a9096b544011d24f3b380eb30e3
 compiler/nativeGen/X86/Ppr.hs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index f5011b2..95c4728 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -144,6 +144,16 @@ pprBasicBlock info_env (BasicBlock blockid instrs)
       _other             -> empty
 
 pprDatas :: (Alignment, CmmStatics) -> SDoc
+
+pprDatas (_, Statics alias [CmmStaticLit lit@(CmmLabel lbl), CmmStaticLit ind, _, _])
+  | lbl == mkIndStaticInfoLabel
+  , let labelInd (CmmLabelOff l _) = Just l
+        labelInd (CmmLabel l) = Just l
+        labelInd _ = Nothing
+  , Just ind' <- labelInd ind
+  , let equate = pprGloblDecl alias $$ text ".equiv" <+> ppr alias <> comma <> ppr (CmmLabel ind')
+  = pprTrace "IndStaticInfo: pprDatas" (ppr alias <+> ppr lit <+> ppr ind') equate
+
 pprDatas (align, (Statics lbl dats))
  = vcat (pprAlign align : pprLabel lbl : map pprData dats)
 



More information about the ghc-commits mailing list