Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
GH #49: Run GVN again after InstCombine.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb authored and arielb1 committed Jun 27, 2017
1 parent 318ccee commit c782feb
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 @@ -342,6 +342,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 c782feb

Please sign in to comment.