mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Reapply 'Run LICM pass after loop unrolling pass.'
It's firstly committed at r231630, and reverted at r231635. Function pass InstructionSimplifier is inserted as barrier to make sure loop unroll pass won't affect on LICM pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -363,9 +363,20 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
MPM.add(createCFGSimplificationPass());
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
|
||||
if (!DisableUnrollLoops)
|
||||
if (!DisableUnrollLoops) {
|
||||
MPM.add(createLoopUnrollPass()); // Unroll small loops
|
||||
|
||||
// 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
|
||||
// checked value is loop invariant.
|
||||
MPM.add(createLICMPass());
|
||||
}
|
||||
|
||||
// After vectorization and unrolling, assume intrinsics may tell us more
|
||||
// about pointer alignments.
|
||||
MPM.add(createAlignmentFromAssumptionsPass());
|
||||
|
Reference in New Issue
Block a user