summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/CmmToAsm/AArch64/CodeGen.hs')
-rw-r--r--compiler/GHC/CmmToAsm/AArch64/CodeGen.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
index 0071f291a1..c017f376bb 100644
--- a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
@@ -60,6 +60,7 @@ import GHC.Types.ForeignCall
import GHC.Data.FastString
import GHC.Utils.Misc
import GHC.Utils.Panic
+import GHC.Utils.Constants (debugIsOn)
-- Note [General layout of an NCG]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -135,10 +136,11 @@ basicBlockCodeGen block = do
id = entryLabel block
stmts = blockToList nodes
- header_comment_instr = unitOL $ MULTILINE_COMMENT (
+ header_comment_instr | debugIsOn = unitOL $ MULTILINE_COMMENT (
text "-- --------------------------- basicBlockCodeGen --------------------------- --\n"
- $+$ pdoc (ncgPlatform config) block
+ $+$ withPprStyle defaultDumpStyle (pdoc (ncgPlatform config) block)
)
+ | otherwise = nilOL
-- Generate location directive
dbg <- getDebugBlock (entryLabel block)
loc_instrs <- case dblSourceTick =<< dbg of