aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackMaps.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2024-12-17 12:59:46 +0700
committerGitHub <noreply@github.com>2024-12-17 12:59:46 +0700
commit5e727e8bed5c57cbc804a2453bba1c2379084f27 (patch)
tree5211949378087ecde5ade081c78df8652123cff2 /llvm/lib/CodeGen/StackMaps.cpp
parent3c357a49d61e4c81a1ac016502ee504521bc8dda (diff)
downloadllvm-5e727e8bed5c57cbc804a2453bba1c2379084f27.zip
llvm-5e727e8bed5c57cbc804a2453bba1c2379084f27.tar.gz
llvm-5e727e8bed5c57cbc804a2453bba1c2379084f27.tar.bz2
[Statepoint] Treat undef operands less specially (#119682)
This reverts commit f7443905af1e06eaacda1e437fff8d54dc89c487. This is to avoid an assertion if an undef operand appears in a stackmap. This is important to avoid hitting verifier errors when register allocation starts adding undefs in error scenarios. Rather than trying to treat undef operands as special, leave them alone and avoid producing an invalid spill. It would a bit more precise to produce a spill of an undef register here, but that's not exposed through the storeRegToStackSlot API. https://reviews.llvm.org/D122605 This was an alternative to https://reviews.llvm.org/D122582
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
-rw-r--r--llvm/lib/CodeGen/StackMaps.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp
index 81b288d..7480963 100644
--- a/llvm/lib/CodeGen/StackMaps.cpp
+++ b/llvm/lib/CodeGen/StackMaps.cpp
@@ -268,12 +268,6 @@ StackMaps::parseOperand(MachineInstr::const_mop_iterator MOI,
if (MOI->isImplicit())
return ++MOI;
- if (MOI->isUndef()) {
- // Record `undef` register as constant. Use same value as ISel uses.
- Locs.emplace_back(Location::Constant, sizeof(int64_t), 0, 0xFEFEFEFE);
- return ++MOI;
- }
-
assert(MOI->getReg().isPhysical() &&
"Virtreg operands should have been rewritten before now.");
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(MOI->getReg());