diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-07-10 07:35:43 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-07-10 07:35:43 +0000 |
commit | ef0732d25a9882c947984ae3f2afbef5463ba00f (patch) | |
tree | fb57684794d4837a901af952c17b790c9ab2cc69 /include/llvm/CodeGen/MachineInstr.h | |
parent | 5dcc41f5b3daf6ef7097f169767291ff9cd0dd0b (diff) |
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 77e5e76521..88116d2bb2 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -207,9 +207,9 @@ public: /// none is found. int findFirstPredOperandIdx() const; - /// isRegReDefinedByTwoAddr - Returns true if the Reg re-definition is due - /// to two addr elimination. - bool isRegReDefinedByTwoAddr(unsigned Reg) const; + /// isRegReDefinedByTwoAddr - Given the defined register and the operand index, + /// check if the register def is a re-definition due to two addr elimination. + bool isRegReDefinedByTwoAddr(unsigned Reg, unsigned DefIdx) const; /// copyKillDeadInfo - Copies kill / dead operand properties from MI. /// |