diff options
author | dias@eecs.harvard.edu <unknown> | 2008-05-29 16:05:45 +0000 |
---|---|---|
committer | dias@eecs.harvard.edu <unknown> | 2008-05-29 16:05:45 +0000 |
commit | 0d80489c9b9f2421f65d8dd86c1e50c6bb429715 (patch) | |
tree | 68fbebbb771f95252e847cd91180c614b405f14c /compiler/cmm/PprCmm.hs | |
parent | 724a9e83f9498382e3580d26a7dd7cd6b108408c (diff) | |
download | haskell-0d80489c9b9f2421f65d8dd86c1e50c6bb429715.tar.gz |
Replacing copyins and copyouts with data-movement instructions
o Moved BlockId stuff to a new file to avoid module recursion
o Defined stack areas for parameter-passing locations and spill slots
o Part way through replacing copy in and copy out nodes
- added movement instructions for stack pointer
- added movement instructions for call and return parameters
(but not with the proper calling conventions)
o Inserting spills and reloads for proc points is now procpoint-aware
(it was relying on the presence of a CopyIn node as a proxy for
procpoint knowledge)
o Changed ZipDataflow to expect AGraphs (instead of being polymorphic in
the type of graph)
Diffstat (limited to 'compiler/cmm/PprCmm.hs')
-rw-r--r-- | compiler/cmm/PprCmm.hs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs index 150ffb9d6f..dbfd20e424 100644 --- a/compiler/cmm/PprCmm.hs +++ b/compiler/cmm/PprCmm.hs @@ -37,8 +37,8 @@ module PprCmm ) where +import BlockId import Cmm -import CmmExpr import CmmUtils import MachOp import CLabel @@ -91,6 +91,9 @@ instance Outputable CmmLit where instance Outputable LocalReg where ppr e = pprLocalReg e +instance Outputable Area where + ppr e = pprArea e + instance Outputable GlobalReg where ppr e = pprGlobalReg e @@ -435,7 +438,8 @@ pprExpr9 e = CmmLit lit -> pprLit1 lit CmmLoad expr rep -> ppr rep <> brackets( ppr expr ) CmmReg reg -> ppr reg - CmmRegOff reg off -> parens (ppr reg <+> char '+' <+> int off) + CmmRegOff reg off -> parens (ppr reg <+> char '+' <+> int off) + CmmStackSlot a off -> parens (ppr a <+> char '+' <+> int off) CmmMachOp mop args -> genMachOp mop args genMachOp :: MachOp -> [CmmExpr] -> SDoc @@ -525,7 +529,6 @@ pprReg r = case r of CmmLocal local -> pprLocalReg local CmmGlobal global -> pprGlobalReg global - CmmStack slot -> ppr slot -- -- We only print the type of the local reg if it isn't wordRep @@ -540,6 +543,12 @@ pprLocalReg (LocalReg uniq rep follow) then empty else doubleQuotes (text "ptr") +-- Stack areas +pprArea :: Area -> SDoc +pprArea (RegSlot r) = hcat [ text "slot<", ppr r, text ">" ] +pprArea (CallArea id n n') = + hcat [ text "callslot<", ppr id, char '+', ppr n, char '/', ppr n', text ">" ] + -- needs to be kept in syn with Cmm.hs.GlobalReg -- pprGlobalReg :: GlobalReg -> SDoc |