Skip to content

Commit e78c2ee

Browse files
committed
Improve optmization pipeline
1 parent c857eb4 commit e78c2ee

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/librustc/back/passes.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
7171
passes.push(~"targetlibinfo");
7272

7373
passes.push(~"tbaa");
74+
passes.push(~"scev-aa");
7475
passes.push(~"basicaa");
7576

76-
passes.push(~"early-cse");
77+
passes.push(~"simplifycfg");
7778

7879
passes.push(~"globalopt");
7980
passes.push(~"ipsccp");
@@ -83,10 +84,9 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
8384

8485
passes.push(~"prune-eh");
8586

86-
if level == Aggressive {
87+
if level != Less {
8788
passes.push(~"mergefunc");
8889
}
89-
9090
passes.push(~"inline");
9191

9292
passes.push(~"functionattrs");
@@ -95,7 +95,11 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
9595
passes.push(~"argpromotion");
9696
}
9797

98+
passes.push(~"sroa");
99+
98100
passes.push(~"early-cse");
101+
passes.push(~"constmerge");
102+
99103
passes.push(~"simplify-libcalls");
100104
passes.push(~"jump-threading");
101105
passes.push(~"correlated-propagation");
@@ -134,11 +138,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
134138
passes.push(~"correlated-propagation");
135139
passes.push(~"dse");
136140

137-
passes.push(~"instcombine");
138-
passes.push(~"early-cse");
139-
140-
passes.push(~"loop-unroll");
141-
142141
passes.push(~"adce");
143142
passes.push(~"simplifycfg");
144143
passes.push(~"instsimplify");

0 commit comments

Comments
 (0)