From 6e075b6bb6c15e8fa358e08670687e3c94f4565b Mon Sep 17 00:00:00 2001 From: James Miller Date: Sun, 2 Jun 2013 00:08:38 +1200 Subject: [PATCH] Better optimization pipeline --- src/librustc/back/passes.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/librustc/back/passes.rs b/src/librustc/back/passes.rs index 076d1dcf37b29..315bb5d63177f 100644 --- a/src/librustc/back/passes.rs +++ b/src/librustc/back/passes.rs @@ -70,9 +70,12 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] { passes.push(~"targetlibinfo"); - passes.push(~"tbaa"); + passes.push(~"scev-aa"); passes.push(~"basicaa"); + passes.push(~"instcombine"); + passes.push(~"simplifycfg"); + passes.push(~"scalarrepl-ssa"); passes.push(~"early-cse"); passes.push(~"globalopt"); @@ -83,10 +86,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] { passes.push(~"prune-eh"); - if level == Aggressive { - passes.push(~"mergefunc"); - } - passes.push(~"inline"); passes.push(~"functionattrs"); @@ -95,6 +94,7 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] { passes.push(~"argpromotion"); } + passes.push(~"scalarrepl-ssa"); passes.push(~"early-cse"); passes.push(~"simplify-libcalls"); passes.push(~"jump-threading"); @@ -134,11 +134,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] { passes.push(~"correlated-propagation"); passes.push(~"dse"); - passes.push(~"instcombine"); - passes.push(~"early-cse"); - - passes.push(~"loop-unroll"); - passes.push(~"adce"); passes.push(~"simplifycfg"); passes.push(~"instsimplify");