Commit 09a41659 authored by nr@eecs.harvard.edu's avatar nr@eecs.harvard.edu

get rid of MidNop

parent cd437edc
......@@ -56,8 +56,7 @@ kill a live = foldRegsUsed delOneFromUniqSet live a
middleLiveness :: Middle -> CmmLive -> CmmLive
middleLiveness m = middle m
where middle (MidNop) = id
middle (MidComment {}) = id
where middle (MidComment {}) = id
middle (MidAssign lhs expr) = gen expr . kill lhs
middle (MidStore addr rval) = gen addr . gen rval
middle (MidUnsafeCall tgt ress args) = gen tgt . gen args . kill ress
......
......@@ -251,8 +251,7 @@ middleAvail :: M -> AvailRegs -> AvailRegs
middleAvail (Spill _) = id
middleAvail (Reload regs) = agen regs
middleAvail (NotSpillOrReload m) = middle m
where middle (MidNop) = id
middle (MidComment {}) = id
where middle (MidComment {}) = id
middle (MidAssign lhs _expr) = akill lhs
middle (MidStore {}) = id
middle (MidUnsafeCall _tgt ress _args) = akill ress
......
......@@ -78,7 +78,7 @@ mkCmmWhileDo e = mkWhileDo (mkCbranch e)
-- ================ IMPLEMENTATION ================--
mkNop = mkMiddle $ MidNop
mkNop = emptyAgraph
mkComment fs = mkMiddle $ MidComment fs
mkAssign l r = mkMiddle $ MidAssign l r
mkStore l r = mkMiddle $ MidStore l r
......
......@@ -43,8 +43,7 @@ type CmmZ = GenCmm CmmStatic CmmInfo CmmGraph
type CmmTopZ = GenCmmTop CmmStatic CmmInfo CmmGraph
data Middle
= MidNop
| MidComment FastString
= MidComment FastString
| MidAssign CmmReg CmmExpr -- Assign to register
......@@ -176,8 +175,6 @@ debugPpr = debugIsOn
pprMiddle :: Middle -> SDoc
pprMiddle stmt = (case stmt of
MidNop -> semi
CopyIn conv args _ ->
if null args then ptext SLIT("empty CopyIn")
else commafy (map pprHinted args) <+> equals <+>
......@@ -221,7 +218,6 @@ pprMiddle stmt = (case stmt of
if debugPpr then empty
else text " //" <+>
case stmt of
MidNop {} -> text "MidNop"
CopyIn {} -> text "CopyIn"
CopyOut {} -> text "CopyOut"
MidComment {} -> text "MidComment"
......
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