From 09a416591da9ad89e0e6ca85e5093b6eb629a98e Mon Sep 17 00:00:00 2001 From: Norman Ramsey Date: Sat, 15 Sep 2007 20:12:43 +0000 Subject: [PATCH] get rid of MidNop --- compiler/cmm/CmmLiveZ.hs | 3 +-- compiler/cmm/CmmSpillReload.hs | 3 +-- compiler/cmm/MkZipCfgCmm.hs | 2 +- compiler/cmm/ZipCfgCmmRep.hs | 6 +----- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/compiler/cmm/CmmLiveZ.hs b/compiler/cmm/CmmLiveZ.hs index 9b2fa56..09ff521 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 067a8ec..a256015 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 f067d98..f834449 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 d4ed3cf..11f420a 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" -- 1.7.10.4