[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp Printer.cpp PeepholeOptimizer.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Feb 15 15:38:01 PST 2004
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.50 -> 1.51
Printer.cpp updated: 1.81 -> 1.82
PeepholeOptimizer.cpp updated: 1.14 -> 1.15
---
Log message:
Make dense maps keyed on physical registers smallerusing
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.
Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.
---
Diffs of the changes: (+3 -3)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.50 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.51
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.50 Sat Feb 14 18:03:15 2004
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Sun Feb 15 15:37:17 2004
@@ -329,7 +329,7 @@
case X86::ST4: case X86::ST5: case X86::ST6: case X86::ST7:
return RegNo-X86::ST0;
default:
- assert(RegNo >= MRegisterInfo::FirstVirtualRegister &&
+ assert(MRegisterInfo::isVirtualRegister(RegNo) &&
"Unknown physical register!");
assert(0 && "Register allocator hasn't allocated reg correctly yet!");
return 0;
Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.81 llvm/lib/Target/X86/Printer.cpp:1.82
--- llvm/lib/Target/X86/Printer.cpp:1.81 Sat Feb 14 00:00:36 2004
+++ llvm/lib/Target/X86/Printer.cpp Sun Feb 15 15:37:17 2004
@@ -399,7 +399,7 @@
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
- if (MO.getReg() < MRegisterInfo::FirstVirtualRegister)
+ if (MRegisterInfo::isPhysicalRegister(MO.getReg()))
// Bug Workaround: See note in Printer::doInitialization about %.
O << "%" << RI.get(MO.getReg()).Name;
else
Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp
diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.14 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.15
--- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.14 Fri Feb 13 19:18:32 2004
+++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Sun Feb 15 15:37:17 2004
@@ -164,7 +164,7 @@
// getDefinition - Return the machine instruction that defines the specified
// SSA virtual register.
MachineInstr *getDefinition(unsigned Reg) {
- assert(Reg >= MRegisterInfo::FirstVirtualRegister &&
+ assert(MRegisterInfo::isVirtualRegister(Reg) &&
"use-def chains only exist for SSA registers!");
assert(Reg - MRegisterInfo::FirstVirtualRegister < DefiningInst.size() &&
"Unknown register number!");
More information about the llvm-commits
mailing list