From 31c7ea0165882eaf09040ea7edfc37cc38f0a032 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 19 Sep 2016 18:38:12 +0200 Subject: opt: Start optimizing dead code a bit If a condition is always zero/non-zero we can omit the then or else code. This is complicated a bit by having to deal with labels that might make such code reachable without us yet knowing during parsing. --- tests/tests2/87_dead_code.expect | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/tests2/87_dead_code.expect (limited to 'tests/tests2/87_dead_code.expect') diff --git a/tests/tests2/87_dead_code.expect b/tests/tests2/87_dead_code.expect new file mode 100644 index 0000000..0b3ec1d --- /dev/null +++ b/tests/tests2/87_dead_code.expect @@ -0,0 +1,18 @@ +timeout=2 +timeout=1 +boo +yeah +twice +once +twice +SEtwice +SEonce +SEtwice +twice2 +once2 +twice2 +twice3 +once3 +twice3 +caseok +caseok2 -- cgit v1.3.1