Skip to content

Commit

Permalink
Run GVN again after InstCombine.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Aug 29, 2016
1 parent eee68ea commit cc2009f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Transforms/IPO/PassManagerBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
// Run instcombine after redundancy elimination to exploit opportunities
// opened up by them.
addInstructionCombiningPass(MPM);
if (OptLevel > 1)
MPM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies
addExtensionsToPM(EP_Peephole, MPM);
MPM.add(createJumpThreadingPass()); // Thread jumps
MPM.add(createCorrelatedValuePropagationPass());
Expand Down

0 comments on commit cc2009f

Please sign in to comment.