History

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.

Michael Matz committed 10 years ago

Commit 31c7ea01 parent b303a004 files · +182 −2Browse files

Showing the changes to tests/tests2/87_dead_code.expect (1 of 4 files). Show all

Unified · Split

tests/tests2/87_dead_code.expect+18−0
@@ -0,0 +1,18 @@
1timeout=2
2timeout=1
3boo
4yeah
5twice
6once
7twice
8SEtwice
9SEonce
10SEtwice
11twice2
12once2
13twice2
14twice3
15once3
16twice3
17caseok
18caseok2

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t