diff options
author | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2025-06-27 10:30:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-27 10:30:29 -0700 |
commit | 32ef4ceec03d6510ba19a098a2894a1caeb2704e (patch) | |
tree | ef80207ebb3f36c2d68c6d3abdfbee3e92587354 /clang/lib/AST/ByteCode/InterpBuiltin.cpp | |
parent | e4d8e06f83f866786cb5af602857f6d161501593 (diff) | |
download | llvm-32ef4ceec03d6510ba19a098a2894a1caeb2704e.zip llvm-32ef4ceec03d6510ba19a098a2894a1caeb2704e.tar.gz llvm-32ef4ceec03d6510ba19a098a2894a1caeb2704e.tar.bz2 |
[InstrRef] Skip clobbered EntryValue register recovery (#142478)
This changes the final stage of InstrRef, i.e. the TransferTracker
(which combines the values locations with the variable values), so that
it treats a DEBUG_VALUE of an EntryValue just like a DEBUG_VALUE of a
constant: a location that is never clobbered and can be propagated to
subsequent BBs as long as no other DEBUG_VALUE intrinsics updated the
variable.
We add two tests here:
1. `entry_value_clobbered_stack_copy` that saves a register on the
stack, uses this register as an entry value DBG_VALUE location, and then
clobbers it. Prior to this patch, this test would crash because we would
try to describe a new location for the variable in terms of what was
saved on the stack, and use an invalid expression to do so. This is not
needed as an EntryValue can never be clobbered.
2. `entry_value_gets_propagated`, that tests that an EntryValue
DBG_VALUE is propagated in a diamond-shaped CFG.
This patch is trying to reland
https://github.com/llvm/llvm-project/pull/77938 but also fixes the bug
with InstrRef based LiveDebugValues, where entry values were not being
propagated in a diamond-shaped CFG.
Diffstat (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp')
0 files changed, 0 insertions, 0 deletions