diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 12:07:57 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-20 12:07:57 +0000 |
commit | 18991d78fa2f4757853d7aab2bd4b88610f4dfcc (patch) | |
tree | 6bd503fc5dff7298f69a46201a11d2ff170aa4d8 /llvm/lib/CodeGen | |
parent | ea333124f18608969feb2b0f69aae75f2072613e (diff) | |
download | bcm5719-llvm-18991d78fa2f4757853d7aab2bd4b88610f4dfcc.tar.gz bcm5719-llvm-18991d78fa2f4757853d7aab2bd4b88610f4dfcc.zip |
Fix newly-introduced 4.3 warnings
llvm-svn: 47375
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLocal.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index c70ff952432..f4f994c9e73 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -224,11 +224,12 @@ unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) { unsigned SrcReg, DstReg; if (!CopyMI || !tii_->isMoveInstr(*CopyMI, SrcReg, DstReg)) return Reg; - if (TargetRegisterInfo::isVirtualRegister(SrcReg)) + if (TargetRegisterInfo::isVirtualRegister(SrcReg)) { if (!vrm_->isAssignedReg(SrcReg)) return Reg; else SrcReg = vrm_->getPhys(SrcReg); + } if (Reg == SrcReg) return Reg; @@ -864,7 +865,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) { // If copy coalescer has assigned a "preferred" register, check if it's // available first. - if (cur->preference) + if (cur->preference) { if (prt_->isRegAvail(cur->preference)) { DOUT << "\t\tassigned the preferred register: " << tri_->getName(cur->preference) << "\n"; @@ -872,6 +873,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) { } else DOUT << "\t\tunable to assign the preferred register: " << tri_->getName(cur->preference) << "\n"; + } // Scan for the first available register. TargetRegisterClass::iterator I = RC->allocation_order_begin(*mf_); diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index b14af2761c6..765e7ff96ff 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -775,11 +775,12 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { // Spill all physical registers holding virtual registers now. for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i) - if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) + if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) { if (unsigned VirtReg = PhysRegsUsed[i]) spillVirtReg(MBB, MI, VirtReg, i); else removePhysReg(i); + } #if 0 // This checking code is very expensive. |