summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-26 03:02:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-26 03:02:21 +0000
commitca2d65467b7b4f39fe45c86bfff6907a64d4ed7b (patch)
tree4fed13ef61f1334e44dd5ea295dfa591d062325d /llvm/lib/CodeGen/VirtRegMap.cpp
parentee5fd035e2e9d2a5750517628427289fd98e1310 (diff)
downloadbcm5719-llvm-ca2d65467b7b4f39fe45c86bfff6907a64d4ed7b.tar.gz
bcm5719-llvm-ca2d65467b7b4f39fe45c86bfff6907a64d4ed7b.zip
The last commit was overly conservative. It's ok to reuse value that's already marked livein.
llvm-svn: 65498
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index e768e1c2043..0103e2042f3 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -516,18 +516,11 @@ void AvailableSpills::AddAvailableRegsToLiveIn(MachineBasicBlock &MBB,
I = PhysRegsAvailable.begin(), E = PhysRegsAvailable.end();
I != E; ++I) {
unsigned Reg = I->first;
- bool MakeAvail = true;
const TargetRegisterClass* RC = TRI->getPhysicalRegisterRegClass(Reg);
// FIXME: A temporary workaround. We can't reuse available value if it's
// not safe to move the def of the virtual register's class. e.g.
// X86::RFP* register classes. Do not add it as a live-in.
if (!TII->isSafeToMoveRegClassDefs(RC))
- MakeAvail = false;
- if (MBB.isLiveIn(Reg))
- // It's already livein somehow. Be conservative, do not make it available.
- MakeAvail = false;
-
- if (!MakeAvail)
// This is no longer available.
NotAvailable.insert(Reg);
else {
OpenPOWER on IntegriCloud