diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-08-25 16:51:21 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-08-26 15:06:01 -0400 |
commit | f5e0f086a43c4e830f3fec343917daf3cc24b73a (patch) | |
tree | 7d2a3eaad953c8cee9cc5f2275f327c15d17d6e2 /compiler/GHC/CmmToAsm.hs | |
parent | 4786acf758ef064d3b79593774d1672e294b0afb (diff) | |
download | haskell-f5e0f086a43c4e830f3fec343917daf3cc24b73a.tar.gz |
Remove label style from printing context
Previously, the SDocContext used for code generation contained
information whether the labels should use Asm or C style.
However, at every individual call site, this is known statically.
This removes the parameter to 'PprCode' and replaces every 'pdoc'
used to print a label in code style with 'pprCLabel' or 'pprAsmLabel'.
The OutputableP instance is now used only for dumps.
The output of T15155 changes, it now uses the Asm style
(which is faithful to what actually happens).
Diffstat (limited to 'compiler/GHC/CmmToAsm.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 21b68a8f01..a8cfd23f08 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -396,7 +396,7 @@ cmmNativeGens logger config modLoc ncgImpl h dbgMap = go -- force evaluation all this stuff to avoid space leaks let platform = ncgPlatform config - {-# SCC "seqString" #-} evaluate $ seqList (showSDocUnsafe $ vcat $ map (pdoc platform) imports) () + {-# SCC "seqString" #-} evaluate $ seqList (showSDocUnsafe $ vcat $ map (pprAsmLabel platform) imports) () let !labels' = if ncgDwarfEnabled config then cmmDebugLabels isMetaInstr native else [] @@ -455,7 +455,7 @@ cmmNativeGen logger modLoc ncgImpl us fileIds dbgMap cmm count let weights = ncgCfgWeights config let proc_name = case cmm of - (CmmProc _ entry_label _ _) -> pdoc platform entry_label + (CmmProc _ entry_label _ _) -> pprAsmLabel platform entry_label _ -> text "DataChunk" -- rewrite assignments to global regs @@ -789,7 +789,7 @@ makeImportsDoc config imports doPpr lbl = (lbl, renderWithContext (ncgAsmContext config) - (pprCLabel platform AsmStyle lbl)) + (pprAsmLabel platform lbl)) -- ----------------------------------------------------------------------------- -- Generate jump tables |