[Git][ghc/ghc][master] NCG: remove useless .align directive (#20758)
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon May 22 18:21:37 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
b56d7379 by Sylvain Henry at 2023-05-22T14:21:22-04:00
NCG: remove useless .align directive (#20758)
- - - - -
2 changed files:
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/AArch64/Ppr.hs
=====================================
@@ -18,7 +18,6 @@ import GHC.CmmToAsm.Utils
import GHC.Cmm hiding (topInfoTable)
import GHC.Cmm.Dataflow.Collections
import GHC.Cmm.Dataflow.Label
-import GHC.Types.Basic (Alignment, mkAlignment, alignmentBytes)
import GHC.Cmm.BlockId
import GHC.Cmm.CLabel
@@ -29,18 +28,12 @@ import GHC.Utils.Outputable
import GHC.Utils.Panic
-pprProcAlignment :: IsDoc doc => NCGConfig -> doc
-pprProcAlignment config = maybe empty (pprAlign platform . mkAlignment) (ncgProcAlignment config)
- where
- platform = ncgPlatform config
-
pprNatCmmDecl :: IsDoc doc => NCGConfig -> NatCmmDecl RawCmmStatics Instr -> doc
pprNatCmmDecl config (CmmData section dats) =
pprSectionAlign config section $$ pprDatas config dats
pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
let platform = ncgPlatform config in
- pprProcAlignment config $$
case topInfoTable proc of
Nothing ->
-- special case for code without info table:
@@ -80,10 +73,6 @@ pprLabel platform lbl =
$$ pprTypeDecl platform lbl
$$ line (pprAsmLabel platform lbl <> char ':')
-pprAlign :: IsDoc doc => Platform -> Alignment -> doc
-pprAlign _platform alignment
- = line $ text "\t.balign " <> int (alignmentBytes alignment)
-
-- | Print appropriate alignment for the given section type.
pprAlignForSection :: IsDoc doc => Platform -> SectionType -> doc
pprAlignForSection _platform _seg
=====================================
compiler/GHC/CmmToAsm/X86/Ppr.hs
=====================================
@@ -74,7 +74,6 @@ pprNatCmmDecl config (CmmData section dats) =
pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
let platform = ncgPlatform config in
- pprProcAlignment config $$
case topInfoTable proc of
Nothing ->
-- special case for code without info table:
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b56d737974f55933a35c911e8a81ee6147b4a542
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b56d737974f55933a35c911e8a81ee6147b4a542
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/20230522/365cd3ff/attachment-0001.html>
More information about the ghc-commits
mailing list