From 50ac7ce94f34c5f43b02185ae0c33e150e78b044 Mon Sep 17 00:00:00 2001 From: Hendrik Greving Date: Fri, 26 Jun 2020 11:45:18 -0700 Subject: [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 --- llvm/lib/CodeGen/ModuloSchedule.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp') 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 Cond; TII->removeBranch(*Prolog); Optional 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(); -- cgit v1.1