Commit 13d9380b authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot
Browse files

Rip out CmmStackInfo(updfr_space)

As noted in #18232, this field is currently completely unused and
moreover doesn't have a clear meaning.
parent 8f021b8c
Pipeline #20054 failed with stages
in 343 minutes and 18 seconds
......@@ -132,9 +132,6 @@ data CmmStackInfo
-- number of bytes of arguments on the stack on entry to the
-- the proc. This is filled in by GHC.StgToCmm.codeGen, and
-- used by the stack allocator later.
updfr_space :: Maybe ByteOff,
-- XXX: this never contains anything useful, but it should.
-- See comment in GHC.Cmm.LayoutStack.
do_layout :: Bool
-- Do automatic stack layout for this proc. This is
-- True for all code generated by the code generator,
......
......@@ -357,10 +357,9 @@ isGcJump _something_else = False
-- This doesn't seem right somehow. We need to find out whether this
-- proc will push some update frame material at some point, so that we
-- can avoid using that area of the stack for spilling. The
-- updfr_space field of the CmmProc *should* tell us, but it doesn't
-- (I think maybe it gets filled in later when we do proc-point
-- splitting).
-- can avoid using that area of the stack for spilling. Ideally we would
-- capture this information in the CmmProc (e.g. in CmmStackInfo; see #18232
-- for details on one ill-fated attempt at this).
--
-- So we'll just take the max of all the cml_ret_offs. This could be
-- unnecessarily pessimistic, but probably not in the code we
......
......@@ -103,9 +103,8 @@ instance Outputable CmmGraph where
-- Outputting types Cmm contains
pprStackInfo :: CmmStackInfo -> SDoc
pprStackInfo (StackInfo {arg_space=arg_space, updfr_space=updfr_space}) =
text "arg_space: " <> ppr arg_space <+>
text "updfr_space: " <> ppr updfr_space
pprStackInfo (StackInfo {arg_space=arg_space}) =
text "arg_space: " <> ppr arg_space
pprTopInfo :: CmmTopInfo -> SDoc
pprTopInfo (TopInfo {info_tbls=info_tbl, stack_info=stack_info}) =
......
......@@ -356,7 +356,6 @@ splitAtProcPoints dflags entry_label callPPs procPoints procMap
g' = replacePPIds g
live = ppLiveness (g_entry g')
stack_info = StackInfo { arg_space = 0
, updfr_space = Nothing
, do_layout = True }
-- cannot use panic, this is printed by -ddump-cmm
......
......@@ -762,8 +762,7 @@ emitProcWithConvention conv mb_info lbl args blocks
emitProc :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraphScoped
-> Int -> Bool -> FCode ()
emitProc mb_info lbl live blocks offset do_layout
= do { platform <- getPlatform
; l <- newBlockId
= do { l <- newBlockId
; let
blks :: CmmGraph
blks = labelAGraph l blocks
......@@ -772,7 +771,6 @@ emitProc mb_info lbl live blocks offset do_layout
| otherwise = mapEmpty
sinfo = StackInfo { arg_space = offset
, updfr_space = Just (initUpdFrameOff platform)
, do_layout = do_layout }
tinfo = TopInfo { info_tbls = infos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment