================ @@ -2057,6 +2057,14 @@ class TargetInstrInfo : public MCInstrInfo { "Target didn't implement TargetInstrInfo::insertOutlinedCall!"); } + /// Insert an architecture-specific instruction to clear a register. + virtual void buildClearRegister(Register Reg, MachineBasicBlock &MBB, + MachineBasicBlock::iterator Iter, ---------------- bwendling wrote:
That could work, though I'm then a bit confused why `BuildMI` requires both the `MBB` and `Iter` values. My guess is that it has something to do with when `Iter` is at the end of the list? If it's okay, I'd like to keep it like this for the time being. If it's possible to safely get the MBB from the iterator, then we should probably consider adding a `BuildMI` which takes only an iterator instead of both. https://github.com/llvm/llvm-project/pull/66958 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits