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 @@
1+timeout=2
2+timeout=1
3+boo
4+yeah
5+twice
6+once
7+twice
8+SEtwice
9+SEonce
10+SEtwice
11+twice2
12+once2
13+twice2
14+twice3
15+once3
16+twice3
17+caseok
18+caseok2

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