diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2023-05-04 05:52:13 +0530 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-16 14:00:00 -0400 |
commit | b70bc6900fcee7ff1e334bf8099283f610d6f9d4 (patch) | |
tree | 00b6c66159721fbedc9f59e12e3b61181937c584 /compiler/GHC/CmmToAsm/PPC/CodeGen.hs | |
parent | 90e69d5d167b9d6cd63b04e42f8af375dc4b307f (diff) | |
download | haskell-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/PPC/CodeGen.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm/PPC/CodeGen.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs index f8a726da6c..6fa50d586d 100644 --- a/compiler/GHC/CmmToAsm/PPC/CodeGen.hs +++ b/compiler/GHC/CmmToAsm/PPC/CodeGen.hs @@ -129,10 +129,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 <- stmtsToInstrs stmts tail_instrs <- stmtToInstrs tail |