[PATCH] D58041: [Backend] DBG_CALLSITE & DBG_CALLSITEPARAM instr handling
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 13 04:55:05 PST 2019
djtodoro marked 2 inline comments as done.
djtodoro added a comment.
@dstenb Thanks for comments!
================
Comment at: lib/CodeGen/StackColoring.cpp:963
for (MachineBasicBlock &BB : *MF)
- for (MachineInstr &I : BB) {
+ for (auto I = BB.instr_begin(), E = BB.instr_end(); I != E; I++) {
// Skip lifetime markers. We'll remove them soon.
----------------
dstenb wrote:
> dstenb wrote:
> > The iterator does seem to be invalidated here (or am I overlooking something?), so you should be able to use `BB.instrs()` here instead.
> Gah, "does _not_".
Yes.
================
Comment at: lib/CodeGen/StackSlotColoring.cpp:375
for (MachineBasicBlock &MBB : MF) {
- for (MachineInstr &MI : MBB)
- RewriteInstruction(MI, SlotMapping, MF);
+ for (auto I = MBB.instr_begin(), E = MBB.instr_end(); I != E; I++)
+ RewriteInstruction(*I, SlotMapping, MF);
----------------
dstenb wrote:
> `MBB.instrs()`
As well as above.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58041/new/
https://reviews.llvm.org/D58041
More information about the llvm-commits
mailing list