[llvm] [MachineInstr] add insert method for variadic instructions (PR #67699)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 10:04:57 PDT 2023
================
@@ -1818,6 +1818,9 @@ class MachineInstr
/// preferred.
void addOperand(const MachineOperand &Op);
+ /// Inserts Ops BEFORE It. Can untie/retie tied operands.
+ void insert(mop_iterator It, ArrayRef<MachineOperand> Ops);
----------------
MatzeB wrote:
Another compiler I worked on would always call these sort of parameters `InsertBefore` or `InsertAfter` (instead of `It` here) to make the semantics clear. Maybe that would be neat here to show the semantics? On the other hand I haven't seen this pattern anywhere else in LLVM so no strong opinion.
https://github.com/llvm/llvm-project/pull/67699
More information about the llvm-commits
mailing list