mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Move partial/runtime unrolling late in the pipeline
The generic (concatenation) loop unroller is currently placed early in the standard optimization pipeline. This is a good place to perform full unrolling, but not the right place to perform partial/runtime unrolling. However, most targets don't enable partial/runtime unrolling, so this never mattered. However, even some x86 cores benefit from partial/runtime unrolling of very small loops, and follow-up commits will enable this. First, we need to move partial/runtime unrolling late in the optimization pipeline (importantly, this is after SLP and loop vectorization, as vectorization can drastically change the size of a loop), while keeping the full unrolling where it is now. This change does just that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -125,6 +125,10 @@ Pass *llvm::createLoopUnrollPass(int Threshold, int Count, int AllowPartial,
|
||||
return new LoopUnroll(Threshold, Count, AllowPartial, Runtime);
|
||||
}
|
||||
|
||||
Pass *llvm::createSimpleLoopUnrollPass() {
|
||||
return llvm::createLoopUnrollPass(-1, -1, 0, 0);
|
||||
}
|
||||
|
||||
/// ApproximateLoopSize - Approximate the size of the loop.
|
||||
static unsigned ApproximateLoopSize(const Loop *L, unsigned &NumCalls,
|
||||
bool &NotDuplicatable,
|
||||
|
||||
Reference in New Issue
Block a user