[PATCH] D66888: [LiveDebugValues] Insert entry values after bundles
Nikola Prica via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 02:47:40 PDT 2019
NikolaPrica added a comment.
>From my point of view this is good to go. 'insertAfterBundle' could go as NFC I suppose.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues.cpp:1271-1272
for (auto &TR : Transfers) {
- MBB.insertAfter(MachineBasicBlock::iterator(*TR.TransferInst),
- TR.DebugInst);
+ MBB.insert(std::next(MachineBasicBlock::iterator(*TR.TransferInst)),
+ TR.DebugInst);
}
----------------
aprantl wrote:
> dstenb wrote:
> > A downstream comment was that this perhaps should become a helper function, e.g. `MachineBasicBlock::insertAfterBundled()`.
> I think this would be much more readable indeed.
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.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66888/new/
https://reviews.llvm.org/D66888
More information about the llvm-commits
mailing list