[PATCH] D104811: [ModuloSchedule] Pass loop block explicitly to kernel rewriter.
Hendrik Greving via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 25 09:51:34 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe15e1417b9fd: [ModuloSchedule] Pass loop block explicitly to kernel rewriter. (authored by hgreving).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104811/new/
https://reviews.llvm.org/D104811
Files:
llvm/lib/CodeGen/ModuloSchedule.cpp
Index: llvm/lib/CodeGen/ModuloSchedule.cpp
===================================================================
--- llvm/lib/CodeGen/ModuloSchedule.cpp
+++ llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -1275,15 +1275,15 @@
Register undef(const TargetRegisterClass *RC);
public:
- KernelRewriter(MachineLoop &L, ModuloSchedule &S,
+ KernelRewriter(MachineLoop &L, ModuloSchedule &S, MachineBasicBlock *LoopBB,
LiveIntervals *LIS = nullptr);
void rewrite();
};
} // namespace
KernelRewriter::KernelRewriter(MachineLoop &L, ModuloSchedule &S,
- LiveIntervals *LIS)
- : S(S), BB(L.getTopBlock()), PreheaderBB(L.getLoopPreheader()),
+ MachineBasicBlock *LoopBB, LiveIntervals *LIS)
+ : S(S), BB(LoopBB), PreheaderBB(L.getLoopPreheader()),
ExitBB(L.getExitBlock()), MRI(BB->getParent()->getRegInfo()),
TII(BB->getParent()->getSubtarget().getInstrInfo()), LIS(LIS) {
PreheaderBB = *BB->pred_begin();
@@ -1981,7 +1981,7 @@
}
void PeelingModuloScheduleExpander::rewriteKernel() {
- KernelRewriter KR(*Schedule.getLoop(), Schedule);
+ KernelRewriter KR(*Schedule.getLoop(), Schedule, BB);
KR.rewrite();
}
@@ -2024,7 +2024,7 @@
Preheader->addSuccessor(BB);
// Now run the new expansion algorithm.
- KernelRewriter KR(*Schedule.getLoop(), Schedule);
+ KernelRewriter KR(*Schedule.getLoop(), Schedule, BB);
KR.rewrite();
peelPrologAndEpilogs();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104811.354532.patch
Type: text/x-patch
Size: 1471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210625/7e6302f8/attachment.bin>
More information about the llvm-commits
mailing list