diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-12-03 13:43:39 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-03 23:00:16 +0100 |
commit | 0dd61fe72144a829a9e5bb87a1094244e53cdebb (patch) | |
tree | cd4c9d41f19a76edf7d0f3a46438f8fdfd4fc1e5 | |
parent | 7b29b0b1e8efac68fd4151cb5a44c4290a3e9d57 (diff) | |
download | haskell-0dd61fe72144a829a9e5bb87a1094244e53cdebb.tar.gz |
Kill redundant patterns
George's new exhaustiveness checker now realizes these are impossible.
Yay!
-rw-r--r-- | compiler/cmm/Hoopl/Dataflow.hs | 5 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Main.hs | 3 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Liveness.hs | 2 |
3 files changed, 0 insertions, 10 deletions
diff --git a/compiler/cmm/Hoopl/Dataflow.hs b/compiler/cmm/Hoopl/Dataflow.hs index 29c7afedb4..beaf6bcec8 100644 --- a/compiler/cmm/Hoopl/Dataflow.hs +++ b/compiler/cmm/Hoopl/Dataflow.hs @@ -163,7 +163,6 @@ arfGraph pass@FwdPass { fp_lattice = lattice, -> Fact e f -> UniqSM (DG f n e C, Fact C f) c NothingC (JustO entry) f = (block entry `cat` body (successors entry) bdy) f c (JustC entries) NothingO f = body entries bdy f - c _ _ _ = error "bogus GADT pattern match failure" -- Lift from nodes to blocks block BNil f = return (dgnil, f) @@ -253,7 +252,6 @@ analyzeFwd FwdPass { fp_lattice = lattice, = case (entries, entry) of (NothingC, JustO entry) -> block entry `cat` body (successors entry) (JustC entries, NothingO) -> body entries - _ -> error "bogus GADT pattern match failure" where body :: [Label] -> Fact C f -> Fact C f body entries f @@ -296,7 +294,6 @@ analyzeFwdBlocks FwdPass { fp_lattice = lattice, = case (entries, entry) of (NothingC, JustO entry) -> block entry `cat` body (successors entry) (JustC entries, NothingO) -> body entries - _ -> error "bogus GADT pattern match failure" where body :: [Label] -> Fact C f -> Fact C f body entries f @@ -339,7 +336,6 @@ analyzeBwd BwdPass { bp_lattice = lattice, = case (entries, entry) of (NothingC, JustO entry) -> body (successors entry) (JustC entries, NothingO) -> body entries - _ -> error "bogus GADT pattern match failure" where body :: [Label] -> Fact C f -> Fact C f body entries f @@ -429,7 +425,6 @@ arbGraph pass@BwdPass { bp_lattice = lattice, -> Fact C f -> UniqSM (DG f n e C, Fact e f) c NothingC (JustO entry) f = (block entry `cat` body (successors entry) bdy) f c (JustC entries) NothingO f = body entries bdy f - c _ _ _ = error "bogus GADT pattern match failure" -- Lift from nodes to blocks block BNil f = return (dgnil, f) diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs index 05db68dd46..8d5a4dbabd 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Main.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -355,9 +355,6 @@ graphAddCoalesce (r1, r2) graph , RegReal _ <- r2 = graph -graphAddCoalesce _ _ - = panic "graphAddCoalesce: bogus" - -- | Patch registers in code using the reg -> reg mapping in this graph. patchRegsFromGraph diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs index 167197d7c2..c1c2e3cdb7 100644 --- a/compiler/nativeGen/RegAlloc/Liveness.hs +++ b/compiler/nativeGen/RegAlloc/Liveness.hs @@ -909,8 +909,6 @@ livenessForward platform rsLiveEntry (li@(LiveInstr instr mLive) : lis) in LiveInstr instr (Just live { liveBorn = rsBorn }) : livenessForward platform rsLiveNext lis -livenessForward _ _ _ = panic "RegLiveness.livenessForward: no match" - -- | Calculate liveness going backwards, -- filling in when regs die, and what regs are live across each instruction |