Skip to content

Commit b8391cc

Browse files
committed
auto merge of #6881 : Aatch/rust/new-passes-2, r=thestinger
This is a better pipeline, both faster-running and produces faster code. For some reason the `mergefunc` pass screws over resolve. I have no idea why though.
2 parents 2bf053c + 6e075b6 commit b8391cc

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/librustc/back/passes.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
7070

7171
passes.push(~"targetlibinfo");
7272

73-
passes.push(~"tbaa");
73+
passes.push(~"scev-aa");
7474
passes.push(~"basicaa");
7575

76+
passes.push(~"instcombine");
77+
passes.push(~"simplifycfg");
78+
passes.push(~"scalarrepl-ssa");
7679
passes.push(~"early-cse");
7780

7881
passes.push(~"globalopt");
@@ -83,10 +86,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
8386

8487
passes.push(~"prune-eh");
8588

86-
if level == Aggressive {
87-
passes.push(~"mergefunc");
88-
}
89-
9089
passes.push(~"inline");
9190

9291
passes.push(~"functionattrs");
@@ -95,6 +94,7 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
9594
passes.push(~"argpromotion");
9695
}
9796

97+
passes.push(~"scalarrepl-ssa");
9898
passes.push(~"early-cse");
9999
passes.push(~"simplify-libcalls");
100100
passes.push(~"jump-threading");
@@ -134,11 +134,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
134134
passes.push(~"correlated-propagation");
135135
passes.push(~"dse");
136136

137-
passes.push(~"instcombine");
138-
passes.push(~"early-cse");
139-
140-
passes.push(~"loop-unroll");
141-
142137
passes.push(~"adce");
143138
passes.push(~"simplifycfg");
144139
passes.push(~"instsimplify");

0 commit comments

Comments
 (0)