Remove the InstructionSimplifierPass immediately after InstructionCombiningPass.
authorWei Mi <wmi@google.com>
Tue, 19 May 2015 16:09:11 +0000 (16:09 +0000)
committerWei Mi <wmi@google.com>
Tue, 19 May 2015 16:09:11 +0000 (16:09 +0000)
InstructionCombiningPass was added after LoopUnrollPass in r237395. Because
InstructionCombiningPass is strictly more powerful than InstructionSimplifierPass,
remove the unnecessary InstructionSimplifierPass.

Differential Revision: http://reviews.llvm.org/D9838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237702 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/PassManagerBuilder.cpp

index 3b21d3f0cb134b1ea04389bcf03f6fdace19c39b..3496a663f53b75248fb923b3c5641e97dd1aca2e 100644 (file)
@@ -385,10 +385,6 @@ void PassManagerBuilder::populateModulePassManager(
     // LoopUnroll may generate some redundency to cleanup.
     MPM.add(createInstructionCombiningPass());
 
-    // This is a barrier pass to avoid combine LICM pass and loop unroll pass
-    // within same loop pass manager.
-    MPM.add(createInstructionSimplifierPass());
-
     // Runtime unrolling will introduce runtime check in loop prologue. If the
     // unrolled loop is a inner loop, then the prologue will be inside the
     // outer loop. LICM pass can help to promote the runtime check out if the