Commit 0dd61fe7 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Kill redundant patterns

George's new exhaustiveness checker now realizes these are impossible.
Yay!
parent 7b29b0b1
......@@ -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)
......
......@@ -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
......
......@@ -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
......
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