diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 20:01:33 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 20:01:33 +0000 |
commit | fd8cc23220d25dfe6956470da8bd63d26649c428 (patch) | |
tree | 121ce8d85170b862228e2a15d45da0bc7ad8b68b /llvm/include | |
parent | 982224cfb8de39337e977219b3571c5a87aca4ce (diff) | |
download | bcm5719-llvm-fd8cc23220d25dfe6956470da8bd63d26649c428.tar.gz bcm5719-llvm-fd8cc23220d25dfe6956470da8bd63d26649c428.zip |
CodeGen: Change MachineInstr to use MachineInstr&, NFC
Change MachineInstr API to prefer MachineInstr& over MachineInstr*
whenever the parameter is expected to be non-null. Slowly inching
toward being able to fix PR26753.
llvm-svn: 262149
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstr.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstrBuilder.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index a654d9cd593..da9eddf7ebd 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/include/llvm/CodeGen/MachineInstr.h @@ -742,7 +742,7 @@ public: /// Return true if this instruction is identical to (same /// opcode and same operands as) the specified instruction. - bool isIdenticalTo(const MachineInstr *Other, + bool isIdenticalTo(const MachineInstr &Other, MICheckType Check = CheckDefs) const; /// Unlink 'this' from the containing basic block, and return it without @@ -1154,7 +1154,7 @@ public: /// Copy implicit register operands from specified /// instruction to this instruction. - void copyImplicitOps(MachineFunction &MF, const MachineInstr *MI); + void copyImplicitOps(MachineFunction &MF, const MachineInstr &MI); // // Debugging support @@ -1297,7 +1297,7 @@ struct MachineInstrExpressionTrait : DenseMapInfo<MachineInstr*> { if (RHS == getEmptyKey() || RHS == getTombstoneKey() || LHS == getEmptyKey() || LHS == getTombstoneKey()) return LHS == RHS; - return LHS->isIdenticalTo(RHS, MachineInstr::IgnoreVRegDefs); + return LHS->isIdenticalTo(*RHS, MachineInstr::IgnoreVRegDefs); } }; diff --git a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h index f19d426a310..8683917a51c 100644 --- a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h @@ -230,7 +230,7 @@ public: /// Copy all the implicit operands from OtherMI onto this one. const MachineInstrBuilder & - copyImplicitOps(const MachineInstr *OtherMI) const { + copyImplicitOps(const MachineInstr &OtherMI) const { MI->copyImplicitOps(*MF, OtherMI); return *this; } |