[commit: ghc] wip/T15155: WIP: asm-emit-time IND_STATIC elimination (9da6b6c)
git at git.haskell.org
git at git.haskell.org
Thu May 24 14:34:19 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T15155
Link : http://ghc.haskell.org/trac/ghc/changeset/9da6b6ca857fbdf60b75658fb592647ce90df17b/ghc
>---------------------------------------------------------------
commit 9da6b6ca857fbdf60b75658fb592647ce90df17b
Author: Gabor Greif <ggreif at gmail.com>
Date: Mon Jan 29 14:34:25 2018 +0100
WIP: asm-emit-time IND_STATIC elimination
>---------------------------------------------------------------
9da6b6ca857fbdf60b75658fb592647ce90df17b
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 c03bf4f..2a673ec 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