diff options
author | Jay Foad <jay.foad@amd.com> | 2023-02-03 09:42:25 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2023-02-07 11:50:57 +0000 |
commit | d170a254a53bce54596ed0f94aa86ffa3eede42b (patch) | |
tree | a910e6d7c653f66b9435f0a28d58115de4e4a472 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 3d6b108a87cc017faf27824b82b90d9aaea707ca (diff) | |
download | llvm-d170a254a53bce54596ed0f94aa86ffa3eede42b.zip llvm-d170a254a53bce54596ed0f94aa86ffa3eede42b.tar.gz llvm-d170a254a53bce54596ed0f94aa86ffa3eede42b.tar.bz2 |
[CodeGen] Define and use MachineOperand::getOperandNo
This is a helper function to very slightly simplify many calls to
MachineInstruction::getOperandNo.
Differential Revision: https://reviews.llvm.org/D143250
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index 34c81c9..547e9a9 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -699,7 +699,7 @@ void LiveVariables::recomputeForSingleDefVirtReg(Register Reg) { if (UseMI.isPHI()) { // If Reg is used in a phi then it is live-to-end of the corresponding // predecessor. - unsigned Idx = UseMI.getOperandNo(&UseMO); + unsigned Idx = UseMO.getOperandNo(); LiveToEndBlocks.push_back(UseMI.getOperand(Idx + 1).getMBB()); } else if (&UseBB == &DefBB) { // A non-phi use in the same BB as the single def must come after the def. |