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

Commit 2ae0b92

Browse files
eddybalexcrichton
authored andcommitted
GH #49: Run GVN again after InstCombine.
1 parent 48d9493 commit 2ae0b92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Transforms/IPO/PassManagerBuilder.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
379379
// Run instcombine after redundancy elimination to exploit opportunities
380380
// opened up by them.
381381
addInstructionCombiningPass(MPM);
382+
if (OptLevel > 1)
383+
MPM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies
382384
addExtensionsToPM(EP_Peephole, MPM);
383385
MPM.add(createJumpThreadingPass()); // Thread jumps
384386
MPM.add(createCorrelatedValuePropagationPass());

0 commit comments

Comments
 (0)