diff options
author | Hua Tian <akiratian@tencent.com> | 2024-08-15 19:03:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 19:03:27 +0800 |
commit | 43ba1097ee747b4ec5e757762ed0c9df6255a292 (patch) | |
tree | 286215d785ef0e18e0199914732c21e8f0e3b733 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 100c9c019cebf49427d9f3ea93db65f7e448a102 (diff) | |
download | llvm-43ba1097ee747b4ec5e757762ed0c9df6255a292.zip llvm-43ba1097ee747b4ec5e757762ed0c9df6255a292.tar.gz llvm-43ba1097ee747b4ec5e757762ed0c9df6255a292.tar.bz2 |
[llvm][CodeGen] Resolve issues when updating live intervals in window scheduler (#101945)
Corrupted live interval information can cause window scheduling to crash
in some cases. By adding the missing MBB's live interval information in the
ModuloScheduleExpander, the information can be correctly analyzed in
the window scheduler.
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ModuloSchedule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp index dae0cb2..78201d9 100644 --- a/llvm/lib/CodeGen/ModuloSchedule.cpp +++ b/llvm/lib/CodeGen/ModuloSchedule.cpp @@ -130,6 +130,7 @@ void ModuloScheduleExpander::generatePipelinedLoop() { // Generate the prolog instructions that set up the pipeline. generateProlog(MaxStageCount, KernelBB, VRMap, PrologBBs); MF.insert(BB->getIterator(), KernelBB); + LIS.insertMBBInMaps(KernelBB); // Rearrange the instructions to generate the new, pipelined loop, // and update register names as needed. @@ -210,6 +211,7 @@ void ModuloScheduleExpander::generateProlog(unsigned LastStage, NewBB->transferSuccessors(PredBB); PredBB->addSuccessor(NewBB); PredBB = NewBB; + LIS.insertMBBInMaps(NewBB); // Generate instructions for each appropriate stage. Process instructions // in original program order. @@ -283,6 +285,7 @@ void ModuloScheduleExpander::generateEpilog( PredBB->replaceSuccessor(LoopExitBB, NewBB); NewBB->addSuccessor(LoopExitBB); + LIS.insertMBBInMaps(NewBB); if (EpilogStart == LoopExitBB) EpilogStart = NewBB; |