summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-13 17:42:48 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-13 17:42:48 +0000
commite21a68bca7ef80e9960b4177e840c59033b814d5 (patch)
treee4a746e2f34bb7b7c0e897ddd599b00281bdc901 /llvm/lib/CodeGen
parentaf305d23426ee2af8de429a07c3f558175f07d90 (diff)
downloadbcm5719-llvm-e21a68bca7ef80e9960b4177e840c59033b814d5.tar.gz
bcm5719-llvm-e21a68bca7ef80e9960b4177e840c59033b814d5.zip
Undo tweak. It had no obvious benefit.
llvm-svn: 48341
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index 12e7d6a6975..2713771ceb2 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
@@ -687,25 +687,10 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
// All registers must have inf weight. Just grab one!
if (!minReg) {
- if (BestPhysReg)
- minReg = BestPhysReg;
- else {
- // Get the physical register with the fewest conflicts.
- unsigned MinConflicts = ~0U;
- for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_),
- e = RC->allocation_order_end(*mf_); i != e; ++i) {
- unsigned reg = *i;
- unsigned NumConflicts = li_->getNumConflictsWithPhysReg(*cur, reg);
- if (NumConflicts <= MinConflicts) {
- MinConflicts = NumConflicts;
- minReg = reg;
- }
- }
- }
-
- if (cur->weight == HUGE_VALF || cur->getSize() == 1)
- // Spill a physical register around defs and uses.
- li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
+ minReg = BestPhysReg ? BestPhysReg : *RC->allocation_order_begin(*mf_);
+ if (cur->weight == HUGE_VALF || cur->getSize() == 1)
+ // Spill a physical register around defs and uses.
+ li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
}
}
OpenPOWER on IntegriCloud