- 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
This commit is contained in:
Evan Cheng
2008-07-10 07:35:43 +00:00
parent 5dcc41f5b3
commit ef0732d25a
5 changed files with 24 additions and 37 deletions

View File

@@ -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.
///