summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2023-05-04 05:52:13 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-16 14:00:00 -0400
commitb70bc6900fcee7ff1e334bf8099283f610d6f9d4 (patch)
tree00b6c66159721fbedc9f59e12e3b61181937c584 /compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
parent90e69d5d167b9d6cd63b04e42f8af375dc4b307f (diff)
downloadhaskell-b70bc6900fcee7ff1e334bf8099283f610d6f9d4.tar.gz
compiler: Use compact representation/FastStrings for `SourceNote`s
`SourceNote`s should not be stored as [Char] as this is highly wasteful and in certain scenarios can be highly duplicated. Metric Decrease: hard_hole_fits
Diffstat (limited to 'compiler/GHC/CmmToAsm/AArch64/CodeGen.hs')
-rw-r--r--compiler/GHC/CmmToAsm/AArch64/CodeGen.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
index c0e9a7e8d5..7e669e8363 100644
--- a/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
+++ b/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
@@ -144,10 +144,10 @@ basicBlockCodeGen block = do
-- Generate location directive
dbg <- getDebugBlock (entryLabel block)
loc_instrs <- case dblSourceTick =<< dbg of
- Just (SourceNote span name)
+ Just (SourceNote span (LexicalFastString name))
-> do fileId <- getFileId (srcSpanFile span)
let line = srcSpanStartLine span; col = srcSpanStartCol span
- return $ unitOL $ LOCATION fileId line col name
+ return $ unitOL $ LOCATION fileId line col (unpackFS name)
_ -> return nilOL
(mid_instrs,mid_bid) <- stmtsToInstrs id stmts
(!tail_instrs,_) <- stmtToInstrs mid_bid tail