mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
[ModuloSchedule] Do target loop analysis before peeling.
Simple change to call target hook analyzeLoopForPipelining before changing the loop. After peeling analyzing the loop may be more complicated for target that don't have a loop instruction. This doesn't affect Hexagone and PPC as they have hardware loop instructions. Differential Revision: https://reviews.llvm.org/D69912
This commit is contained in:
parent
eef75e4354
commit
49a73c0155
@ -342,6 +342,8 @@ private:
|
||||
MI = CanonicalMIs[MI];
|
||||
return Schedule.getStage(MI);
|
||||
}
|
||||
/// Target loop info before kernel peeling.
|
||||
std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo> Info;
|
||||
};
|
||||
|
||||
/// Expander that simply annotates each scheduled instruction with a post-instr
|
||||
|
@ -1759,10 +1759,6 @@ void PeelingModuloScheduleExpander::rewriteUsesOf(MachineInstr *MI) {
|
||||
}
|
||||
|
||||
void PeelingModuloScheduleExpander::fixupBranches() {
|
||||
std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo> Info =
|
||||
TII->analyzeLoopForPipelining(BB);
|
||||
assert(Info);
|
||||
|
||||
// Work outwards from the kernel.
|
||||
bool KernelDisposed = false;
|
||||
int TC = Schedule.getNumStages() - 1;
|
||||
@ -1818,6 +1814,8 @@ void PeelingModuloScheduleExpander::expand() {
|
||||
BB = Schedule.getLoop()->getTopBlock();
|
||||
Preheader = Schedule.getLoop()->getLoopPreheader();
|
||||
LLVM_DEBUG(Schedule.dump());
|
||||
Info = TII->analyzeLoopForPipelining(BB);
|
||||
assert(Info);
|
||||
|
||||
rewriteKernel();
|
||||
peelPrologAndEpilogs();
|
||||
|
Loading…
Reference in New Issue
Block a user