[PATCH] D100453: [MIR][NFC] Introduce a new method to check a MachineInstr contains implicit register
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 14 05:43:14 PDT 2021
arsenm added a comment.
This is also further confused by the two types of implicit operands. There are implicit physical register uses as present in the instruction definition, but also implicit uses that code can arbitrarily append to an instruction
================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:1864
+ bool containsImplicitRegister() const {
+ return any_of(operands(), [](const MachineOperand &MO) {
+ return MO.isReg() && MO.isImplicit();
----------------
This would early out earlier if you check from the back too
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100453/new/
https://reviews.llvm.org/D100453
More information about the llvm-commits
mailing list