Change LiveDebugValues so that it inserts entry values after the bundle
which contains the clobbering instruction. Previously it would insert
the debug value after the bundle head using insertAfter(), breaking the
bundle.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/lib/CodeGen/LiveDebugValues.cpp | ||
---|---|---|
1271–1272 ↗ | (On Diff #217663) | A downstream comment was that this perhaps should become a helper function, e.g. MachineBasicBlock::insertAfterBundled(). |
@dstenb This is desirable! Thanks a lot for working on this! We also found such case when trying to add support for MIPS and we wanted to shared it, but it is good to see you also have found it!
I think MachineBasicBlock::insertAfterBundled() would be good to have.
llvm/lib/CodeGen/LiveDebugValues.cpp | ||
---|---|---|
1271–1272 ↗ | (On Diff #217663) | I think this would be much more readable indeed. |
From my point of view this is good to go. 'insertAfterBundle' could go as NFC I suppose.
llvm/lib/CodeGen/LiveDebugValues.cpp | ||
---|---|---|
1271–1272 ↗ | (On Diff #217663) | I would have expected from insertAfter to insert at the end of the bundle. Bundled instructions are usually inserted with MIBundlerBuilder. Comment for MachineBasicBlock::insert() indicates that MIBundleBuilder::insert is designed for prepending/appending to the bundle. |
llvm/lib/CodeGen/LiveDebugValues.cpp | ||
---|---|---|
1271–1272 ↗ | (On Diff #217663) | Perhaps that is how insertAfter() really ought to behave. Still, I think this new helper function can be useful since the iterator can point to any instruction in the bundle. |