[llvm] [InstrRef] Skip clobbered EntryValue register recovery (PR #142478)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 18:03:46 PDT 2025
rastogishubham wrote:
Hi @jmorse
Thanks for the explanation, however, I have two questions:
1. If we move the clobber to the second basic block in the example MIR test case shown. We get to the end of `loadVarInLoc` and track the location _before_ we see the clobber, which then takes the `recoverAsEntryValue` path. How would the filtering work in that case? What is the condition to guard against the insertion into `loadVarInLoc`? We only want to do it in the case there is a clobber in the basic block right, but that is detected later.
2. In `clobberMLoc` we have the loop
```
for (DebugVariableID VarID : ActiveMLocIt->second) {
auto &Prop = ActiveVLocs.find(VarID)->second.Properties;
recoverAsEntryValue(VarID, Prop, OldValue);
}
```
The `VarID` that has been filtered from `ActiveVLocs` will still exist in `ActiveMLocs` and therefore cause a crash. I think we need to do more than just filter it from `ActiveVLocs`
https://github.com/llvm/llvm-project/pull/142478
More information about the llvm-commits
mailing list