Skip to content
Snippets Groups Projects
Commit c0acc422 authored by Russel Arbore's avatar Russel Arbore
Browse files

Run CRC and SLF before the first SROA, so that read chains test doesn't break SROA

parent 8c4d528a
No related branches found
No related tags found
1 merge request!119Read chains
Pipeline #201120 passed
......@@ -149,8 +149,13 @@ pub fn compile_ir(
pm.add_pass(hercules_opt::pass::Pass::Verify);
}
add_verified_pass!(pm, verify, GVN);
add_pass!(pm, verify, DCE);
add_verified_pass!(pm, verify, PhiElim);
add_pass!(pm, verify, DCE);
add_pass!(pm, verify, CRC);
add_pass!(pm, verify, DCE);
add_pass!(pm, verify, SLF);
add_pass!(pm, verify, DCE);
if x_dot {
pm.add_pass(hercules_opt::pass::Pass::Xdot(true));
}
......@@ -167,7 +172,7 @@ pub fn compile_ir(
// Run SROA pretty early (though after inlining which can make SROA more effective) so that
// CCP, GVN, etc. can work on the result of SROA
add_pass!(pm, verify, InterproceduralSROA);
//add_pass!(pm, verify, SROA);
add_pass!(pm, verify, SROA);
// We run phi-elim again because SROA can introduce new phis that might be able to be
// simplified
add_verified_pass!(pm, verify, PhiElim);
......@@ -205,7 +210,7 @@ pub fn compile_ir(
add_pass!(pm, verify, DCE);
add_pass!(pm, verify, Outline);
add_pass!(pm, verify, InterproceduralSROA);
//add_pass!(pm, verify, SROA);
add_pass!(pm, verify, SROA);
add_pass!(pm, verify, InferSchedules);
add_verified_pass!(pm, verify, DCE);
if x_dot {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment