summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorman Ramsey <nr@eecs.harvard.edu>2007-09-15 20:12:43 +0000
committerNorman Ramsey <nr@eecs.harvard.edu>2007-09-15 20:12:43 +0000
commit09a416591da9ad89e0e6ca85e5093b6eb629a98e (patch)
treef9ecca8c53ca930c91b2bea00c89498e2c76fc92
parentcd437edc8792e5dbcfaa6a6b9948364e9d9d08f3 (diff)
downloadhaskell-09a416591da9ad89e0e6ca85e5093b6eb629a98e.tar.gz
get rid of MidNop
-rw-r--r--compiler/cmm/CmmLiveZ.hs3
-rw-r--r--compiler/cmm/CmmSpillReload.hs3
-rw-r--r--compiler/cmm/MkZipCfgCmm.hs2
-rw-r--r--compiler/cmm/ZipCfgCmmRep.hs6
4 files changed, 4 insertions, 10 deletions
diff --git a/compiler/cmm/CmmLiveZ.hs b/compiler/cmm/CmmLiveZ.hs
index 9b2fa56d5b..09ff52166b 100644
--- a/compiler/cmm/CmmLiveZ.hs
+++ b/compiler/cmm/CmmLiveZ.hs
@@ -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
diff --git a/compiler/cmm/CmmSpillReload.hs b/compiler/cmm/CmmSpillReload.hs
index 067a8ec98e..a2560156c9 100644
--- a/compiler/cmm/CmmSpillReload.hs
+++ b/compiler/cmm/CmmSpillReload.hs
@@ -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
diff --git a/compiler/cmm/MkZipCfgCmm.hs b/compiler/cmm/MkZipCfgCmm.hs
index f067d9855e..f83444922b 100644
--- a/compiler/cmm/MkZipCfgCmm.hs
+++ b/compiler/cmm/MkZipCfgCmm.hs
@@ -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
diff --git a/compiler/cmm/ZipCfgCmmRep.hs b/compiler/cmm/ZipCfgCmmRep.hs
index d4ed3cfde9..11f420a1cc 100644
--- a/compiler/cmm/ZipCfgCmmRep.hs
+++ b/compiler/cmm/ZipCfgCmmRep.hs
@@ -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"