[PATCH] D101415: [CSSPGO] Fix an AV caused by a block that has only pseudo pseudo instructions.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 17:29:26 PDT 2021


wenlei added a comment.

So without this fix, it would AV as well if a block only had dbg instruction?



================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:1328
+    auto FirstNonDebugInstr = MBB->getFirstNonDebugInstr();
+    if (FirstNonDebugInstr != MBB->end() &&
+        SlotIndex::isEarlierInstr(LIS->getInstructionIndex(*FirstNonDebugInstr),
----------------
Without slot index for dbg or probe, we don't know whether the MBB is before the split, is it safe to allow insertion of spill there? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101415



More information about the llvm-commits mailing list