[PATCH] D100922: [InlineSpiller] Clean-up isSpillCandBB

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 20:16:25 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG914c83282444: [InlineSpiller] Clean-up isSpillCandBB (authored by skatkov).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100922/new/

https://reviews.llvm.org/D100922

Files:
  llvm/lib/CodeGen/InlineSpiller.cpp


Index: llvm/lib/CodeGen/InlineSpiller.cpp
===================================================================
--- llvm/lib/CodeGen/InlineSpiller.cpp
+++ llvm/lib/CodeGen/InlineSpiller.cpp
@@ -1245,13 +1245,8 @@
 /// i.e., there should be a living sibling of OrigReg at the insert point.
 bool HoistSpillHelper::isSpillCandBB(LiveInterval &OrigLI, VNInfo &OrigVNI,
                                      MachineBasicBlock &BB, Register &LiveReg) {
-  SlotIndex Idx;
+  SlotIndex Idx = IPA.getLastInsertPoint(OrigLI, BB);
   Register OrigReg = OrigLI.reg();
-  MachineBasicBlock::iterator MI = IPA.getLastInsertPointIter(OrigLI, BB);
-  if (MI != BB.end())
-    Idx = LIS.getInstructionIndex(*MI);
-  else
-    Idx = LIS.getMBBEndIdx(&BB).getPrevSlot();
   SmallSetVector<Register, 16> &Siblings = Virt2SiblingsMap[OrigReg];
   assert(OrigLI.getVNInfoAt(Idx) == &OrigVNI && "Unexpected VNI");
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100922.339855.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/e8d3e3c8/attachment.bin>


More information about the llvm-commits mailing list