At times, it's necessary to insert instruction after an iterator.
Allow to specify InsertAfter as a boolean in the setInstr interface.
Details
Details
- Reviewers
ab t.p.northover qcolombet dsanders
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I believe we use to do that by using std::next([Instr | Iterator]WeWantToInsertAfter), but I can see how that could make things easier, so LGTM
Comment Actions
Just one nit.
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h | ||
---|---|---|
88 | We should put a default value on that. |
Comment Actions
Good point. I think this is not needed. I'll update the other patch to use the std::next version. We can add this back at a later time if it's of value.
Comment Actions
Good point. I think this is not needed. I'll update the other patch to use the std::next version. We can add this back at a later time if it's of value.
You can probably directly use setInsertPt with getFirstTerminator I think (i.e., no need to use std::next ;))
We should put a default value on that.