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 | f1107fd43d82a369fd53b60b202b6c3bcd7b362d (patch) | |
tree | fb57684794d4837a901af952c17b790c9ab2cc69 /include | |
parent | a349ba4040065d4d61e81c41ba476311deebf403 (diff) | |
download | external_llvm-f1107fd43d82a369fd53b60b202b6c3bcd7b362d.tar.gz external_llvm-f1107fd43d82a369fd53b60b202b6c3bcd7b362d.tar.bz2 external_llvm-f1107fd43d82a369fd53b60b202b6c3bcd7b362d.zip |
- 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')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 6a2fd9eb70..8efcbee290 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -328,14 +328,14 @@ namespace llvm { /// handleVirtualRegisterDef) void handleRegisterDef(MachineBasicBlock *MBB, MachineBasicBlock::iterator MI, unsigned MIIdx, - MachineOperand& MO); + MachineOperand& MO, unsigned MOIdx); /// handleVirtualRegisterDef - update intervals for a virtual /// register def void handleVirtualRegisterDef(MachineBasicBlock *MBB, MachineBasicBlock::iterator MI, unsigned MIIdx, MachineOperand& MO, - LiveInterval& interval); + unsigned MOIdx, LiveInterval& interval); /// handlePhysicalRegisterDef - update intervals for a physical register /// def. 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. /// |