[llvm-commits] [llvm] r83137 - in /llvm/trunk/lib/CodeGen: PrologEpilogInserter.cpp RegisterScavenging.cpp
Jim Grosbach
grosbach at apple.com
Tue Sep 29 18:47:59 PDT 2009
Author: grosbach
Date: Tue Sep 29 20:47:59 2009
New Revision: 83137
URL: http://llvm.org/viewvc/llvm-project?rev=83137&view=rev
Log:
replace TRI->isVirtualRegister() with TargetRegisterInfo::isVirtualRegister()
per customary usage
Modified:
llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=83137&r1=83136&r2=83137&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue Sep 29 20:47:59 2009
@@ -731,8 +731,6 @@
/// with physical registers. Use the register scavenger to find an
/// appropriate register to use.
void PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) {
- const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
-
// Run through the instructions and find any virtual registers.
for (MachineFunction::iterator BB = Fn.begin(),
E = Fn.end(); BB != E; ++BB) {
@@ -746,7 +744,7 @@
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
if (MI->getOperand(i).isReg()) {
unsigned Reg = MI->getOperand(i).getReg();
- if (Reg == 0 || !TRI->isVirtualRegister(Reg))
+ if (Reg == 0 || !TargetRegisterInfo::isVirtualRegister(Reg))
continue;
// If we already have a scratch for this virtual register, use it
Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=83137&r1=83136&r2=83137&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Tue Sep 29 20:47:59 2009
@@ -242,7 +242,7 @@
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || MO.isUndef() || !MO.getReg() ||
- TRI->isVirtualRegister(MO.getReg()))
+ TargetRegisterInfo::isVirtualRegister(MO.getReg()))
continue;
Candidates.reset(MO.getReg());
for (const unsigned *R = TRI->getAliasSet(MO.getReg()); *R; R++)
@@ -280,7 +280,8 @@
// Exclude all the registers being used by the instruction.
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
MachineOperand &MO = I->getOperand(i);
- if (MO.isReg() && MO.getReg() != 0 && !TRI->isVirtualRegister(MO.getReg()))
+ if (MO.isReg() && MO.getReg() != 0 &&
+ !TargetRegisterInfo::isVirtualRegister(MO.getReg()))
Candidates.reset(MO.getReg());
}
More information about the llvm-commits
mailing list