[PATCH] D101415: [CSSPGO] Fix an AV caused by a block that has only pseudo pseudo instructions.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 27 17:42:13 PDT 2021
hoy added inline comments.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:1328
+ auto FirstNonDebugInstr = MBB->getFirstNonDebugInstr();
+ if (FirstNonDebugInstr != MBB->end() &&
+ SlotIndex::isEarlierInstr(LIS->getInstructionIndex(*FirstNonDebugInstr),
----------------
wenlei wrote:
> 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?
I think it's by design. The original code is like below. We were skipping dbg and probe but overlooked that the block could be empty in terms of real instructions.
```
if (!MBB->empty() &&
SlotIndex::isEarlierInstr(LIS->getInstructionIndex(MBB->instr_front()),
SA->getFirstSplitPoint(Number)))
```
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