diff options
author | Hendrik Greving <hgreving@google.com> | 2020-06-26 11:45:18 -0700 |
---|---|---|
committer | Hendrik Greving <hgreving@google.com> | 2020-06-30 15:56:13 -0700 |
commit | 50ac7ce94f34c5f43b02185ae0c33e150e78b044 (patch) | |
tree | b60083e470945b495b5069d1f97f2eb689d6c668 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 3dfe1440aecc285992b0f325b13c1b95468f0074 (diff) | |
download | llvm-50ac7ce94f34c5f43b02185ae0c33e150e78b044.zip llvm-50ac7ce94f34c5f43b02185ae0c33e150e78b044.tar.gz llvm-50ac7ce94f34c5f43b02185ae0c33e150e78b044.tar.bz2 |
[ModuloSchedule] Make PeelingModuloScheduleExpander inheritable.
Basically a NFC, but allows subclasses access to the entire PeelingModuloScheduleExpander
class. We are doing this to allow backends, particularly one that are not necessarily
upstreamed, to inherit from PeelingModuloScheduleExpander and access its basic structures.
Renames Info into LoopInfo for consistency in PeelingModuloScheduleExpander.
Differential Revision: https://reviews.llvm.org/D82673
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ModuloSchedule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp index 98aa6e8..d85b1b7 100644 --- a/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -1947,7 +1947,7 @@ void PeelingModuloScheduleExpander::fixupBranches() { SmallVector<MachineOperand, 4> Cond; TII->removeBranch(*Prolog); Optional<bool> StaticallyGreater = - Info->createTripCountGreaterCondition(TC, *Prolog, Cond); + LoopInfo->createTripCountGreaterCondition(TC, *Prolog, Cond); if (!StaticallyGreater.hasValue()) { LLVM_DEBUG(dbgs() << "Dynamic: TC > " << TC << "\n"); // Dynamically branch based on Cond. @@ -1975,10 +1975,10 @@ void PeelingModuloScheduleExpander::fixupBranches() { } if (!KernelDisposed) { - Info->adjustTripCount(-(Schedule.getNumStages() - 1)); - Info->setPreheader(Prologs.back()); + LoopInfo->adjustTripCount(-(Schedule.getNumStages() - 1)); + LoopInfo->setPreheader(Prologs.back()); } else { - Info->disposed(); + LoopInfo->disposed(); } } @@ -1991,8 +1991,8 @@ void PeelingModuloScheduleExpander::expand() { BB = Schedule.getLoop()->getTopBlock(); Preheader = Schedule.getLoop()->getLoopPreheader(); LLVM_DEBUG(Schedule.dump()); - Info = TII->analyzeLoopForPipelining(BB); - assert(Info); + LoopInfo = TII->analyzeLoopForPipelining(BB); + assert(LoopInfo); rewriteKernel(); peelPrologAndEpilogs(); |