[Git][ghc/ghc][master] AArch64: Delete unused LDATA pseudo-instruction
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Nov 11 11:35:49 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00
AArch64: Delete unused LDATA pseudo-instruction
Though there were consuming functions for LDATA, there were no
producers. Thus, the removed code was "dead".
- - - - -
3 changed files:
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
=====================================
@@ -162,8 +162,9 @@ basicBlockCodeGen block = do
-- unwinding info. See Ticket 19913
-- code generation may introduce new basic block boundaries, which
-- are indicated by the NEWBLOCK instruction. We must split up the
- -- instruction stream into basic blocks again. Also, we extract
- -- LDATAs here too.
+ -- instruction stream into basic blocks again. Also, we may extract
+ -- LDATAs here too (if they are implemented by AArch64 again - See
+ -- PPC how to do that.)
let
(top,other_blocks,statics) = foldrOL mkBlocks ([],[],[]) instrs
@@ -174,8 +175,6 @@ mkBlocks :: Instr
-> ([Instr], [GenBasicBlock Instr], [GenCmmDecl RawCmmStatics h g])
mkBlocks (NEWBLOCK id) (instrs,blocks,statics)
= ([], BasicBlock id instrs : blocks, statics)
-mkBlocks (LDATA sec dat) (instrs,blocks,statics)
- = (instrs, blocks, CmmData sec dat:statics)
mkBlocks instr (instrs,blocks,statics)
= (instr:instrs, blocks, statics)
-- -----------------------------------------------------------------------------
=====================================
compiler/GHC/CmmToAsm/AArch64/Instr.hs
=====================================
@@ -432,7 +432,6 @@ isMetaInstr instr
COMMENT{} -> True
MULTILINE_COMMENT{} -> True
LOCATION{} -> True
- LDATA{} -> True
NEWBLOCK{} -> True
DELTA{} -> True
PUSH_STACK_FRAME -> True
@@ -535,11 +534,6 @@ data Instr
-- location pseudo-op (file, line, col, name)
| LOCATION Int Int Int String
- -- some static data spat out during code
- -- generation. Will be extracted before
- -- pretty-printing.
- | LDATA Section RawCmmStatics
-
-- start a new basic block. Useful during
-- codegen, removed later. Preceding
-- instruction should be a jump, as per the
@@ -672,7 +666,6 @@ instrCon i =
MULTILINE_COMMENT{} -> "COMMENT"
ANN{} -> "ANN"
LOCATION{} -> "LOCATION"
- LDATA{} -> "LDATA"
NEWBLOCK{} -> "NEWBLOCK"
DELTA{} -> "DELTA"
SXTB{} -> "SXTB"
=====================================
compiler/GHC/CmmToAsm/AArch64/Ppr.hs
=====================================
@@ -357,7 +357,6 @@ pprInstr platform instr = case instr of
-- in the final instruction stream. But we still want to be able to
-- print it for debugging purposes.
line (text "BLOCK " <> pprAsmLabel platform (blockLbl blockid))
- LDATA _ _ -> panic "pprInstr: LDATA"
-- Pseudo Instructions -------------------------------------------------------
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2255136428b1e5fea5185c490e901c7d2ffee4a6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2255136428b1e5fea5185c490e901c7d2ffee4a6
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231111/a83c7161/attachment-0001.html>
More information about the ghc-commits
mailing list