[PATCH] D66888: [LiveDebugValues] Insert entry values after bundles
David Stenberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 07:53:17 PDT 2019
dstenb marked 4 inline comments as done.
dstenb added inline comments.
================
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);
}
----------------
NikolaPrica wrote:
> 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.
>
>
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66888/new/
https://reviews.llvm.org/D66888
More information about the llvm-commits
mailing list