From 6f0d024a534af18d9e60b3ea757376cd8a3a980e Mon Sep 17 00:00:00 2001
From: Dan Gohman
Date: Sun, 10 Feb 2008 18:45:23 +0000
Subject: [PATCH] Rename MRegisterInfo to TargetRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
---
Xcode/LLVM.xcodeproj/project.pbxproj | 8 +-
docs/CodeGenerator.html | 29 ++--
docs/WritingAnLLVMBackend.html | 2 +-
include/llvm/CodeGen/CallingConvLower.h | 4 +-
include/llvm/CodeGen/LiveInterval.h | 8 +-
include/llvm/CodeGen/LiveIntervalAnalysis.h | 4 +-
include/llvm/CodeGen/LiveVariables.h | 4 +-
include/llvm/CodeGen/MachineFrameInfo.h | 8 +-
include/llvm/CodeGen/MachineInstr.h | 9 +-
include/llvm/CodeGen/MachineLocation.h | 2 +-
include/llvm/CodeGen/MachineRegisterInfo.h | 18 +--
include/llvm/CodeGen/RegisterCoalescer.h | 4 +-
include/llvm/CodeGen/RegisterScavenging.h | 4 +-
include/llvm/CodeGen/ScheduleDAG.h | 4 +-
include/llvm/Target/TargetMachine.h | 4 +-
.../{MRegisterInfo.h => TargetRegisterInfo.h} | 29 ++--
lib/CodeGen/BranchFolding.cpp | 4 +-
lib/CodeGen/DwarfWriter.cpp | 4 +-
lib/CodeGen/LiveInterval.cpp | 9 +-
lib/CodeGen/LiveIntervalAnalysis.cpp | 44 +++---
lib/CodeGen/LiveVariables.cpp | 38 +++---
lib/CodeGen/LowerSubregs.cpp | 50 +++----
lib/CodeGen/MachineBasicBlock.cpp | 14 +-
lib/CodeGen/MachineFunction.cpp | 10 +-
lib/CodeGen/MachineInstr.cpp | 20 +--
lib/CodeGen/MachineLICM.cpp | 12 +-
lib/CodeGen/MachineRegisterInfo.cpp | 10 +-
lib/CodeGen/MachineSink.cpp | 7 +-
lib/CodeGen/PHIElimination.cpp | 2 +-
lib/CodeGen/PhysRegTracker.h | 24 ++--
lib/CodeGen/PrologEpilogInserter.cpp | 22 +--
lib/CodeGen/RegAllocBigBlock.cpp | 26 ++--
lib/CodeGen/RegAllocLinearScan.cpp | 92 ++++++-------
lib/CodeGen/RegAllocLocal.cpp | 70 +++++-----
lib/CodeGen/RegAllocSimple.cpp | 8 +-
lib/CodeGen/RegisterCoalescer.cpp | 2 +-
lib/CodeGen/RegisterScavenging.cpp | 2 +-
lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 8 +-
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 45 +++---
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 2 +-
.../SelectionDAG/ScheduleDAGRRList.cpp | 30 ++--
lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 5 +-
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 13 +-
.../SelectionDAG/SelectionDAGPrinter.cpp | 4 +-
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 6 +-
lib/CodeGen/SimpleRegisterCoalescing.cpp | 128 +++++++++---------
lib/CodeGen/SimpleRegisterCoalescing.h | 4 +-
lib/CodeGen/TwoAddressInstructionPass.cpp | 6 +-
lib/CodeGen/VirtRegMap.cpp | 104 +++++++-------
lib/CodeGen/VirtRegMap.h | 14 +-
lib/Target/ARM/ARMAsmPrinter.cpp | 12 +-
lib/Target/ARM/ARMCodeEmitter.cpp | 9 +-
lib/Target/ARM/ARMInstrInfo.cpp | 2 +-
lib/Target/ARM/ARMInstrInfo.h | 2 +-
lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 6 +-
lib/Target/ARM/ARMMachineFunctionInfo.h | 2 +-
lib/Target/ARM/ARMRegisterInfo.cpp | 2 +-
lib/Target/ARM/ARMRegisterInfo.h | 4 +-
lib/Target/ARM/ARMRegisterInfo.td | 2 +-
lib/Target/ARM/ARMTargetMachine.h | 2 +-
lib/Target/Alpha/AlphaAsmPrinter.cpp | 5 +-
lib/Target/Alpha/AlphaISelLowering.cpp | 4 +-
lib/Target/Alpha/AlphaInstrInfo.h | 2 +-
lib/Target/Alpha/AlphaRegisterInfo.cpp | 2 +-
lib/Target/Alpha/AlphaRegisterInfo.h | 4 +-
lib/Target/Alpha/AlphaTargetMachine.h | 2 +-
lib/Target/CellSPU/SPUAsmPrinter.cpp | 7 +-
lib/Target/CellSPU/SPUInstrInfo.h | 2 +-
lib/Target/CellSPU/SPURegisterInfo.cpp | 2 +-
lib/Target/CellSPU/SPURegisterInfo.h | 3 +-
lib/Target/CellSPU/SPUTargetMachine.h | 2 +-
lib/Target/IA64/IA64AsmPrinter.cpp | 5 +-
lib/Target/IA64/IA64InstrInfo.h | 2 +-
lib/Target/IA64/IA64RegisterInfo.cpp | 5 +-
lib/Target/IA64/IA64RegisterInfo.h | 4 +-
lib/Target/IA64/IA64TargetMachine.h | 2 +-
lib/Target/Mips/MipsAsmPrinter.cpp | 8 +-
lib/Target/Mips/MipsInstrInfo.h | 2 +-
lib/Target/Mips/MipsRegisterInfo.cpp | 2 +-
lib/Target/Mips/MipsRegisterInfo.h | 4 +-
lib/Target/Mips/MipsTargetMachine.h | 2 +-
lib/Target/PowerPC/PPCAsmPrinter.cpp | 4 +-
lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 2 +-
lib/Target/PowerPC/PPCInstrInfo.h | 2 +-
lib/Target/PowerPC/PPCRegisterInfo.cpp | 3 +-
lib/Target/PowerPC/PPCRegisterInfo.h | 3 +-
lib/Target/PowerPC/PPCTargetMachine.h | 2 +-
lib/Target/Sparc/SparcAsmPrinter.cpp | 4 +-
lib/Target/Sparc/SparcInstrInfo.h | 2 +-
lib/Target/Sparc/SparcRegisterInfo.cpp | 2 +-
lib/Target/Sparc/SparcRegisterInfo.h | 4 +-
lib/Target/Sparc/SparcTargetMachine.h | 2 +-
...egisterInfo.cpp => TargetRegisterInfo.cpp} | 22 +--
lib/Target/X86/X86ATTAsmPrinter.cpp | 6 +-
lib/Target/X86/X86ISelDAGToDAG.cpp | 2 +-
lib/Target/X86/X86ISelLowering.cpp | 2 +-
lib/Target/X86/X86ISelLowering.h | 2 +-
lib/Target/X86/X86InstrInfo.h | 4 +-
lib/Target/X86/X86IntelAsmPrinter.cpp | 6 +-
lib/Target/X86/X86IntelAsmPrinter.h | 5 +-
lib/Target/X86/X86RegisterInfo.cpp | 5 +-
lib/Target/X86/X86RegisterInfo.h | 4 +-
lib/Target/X86/X86RegisterInfo.td | 14 +-
lib/Target/X86/X86TargetMachine.h | 2 +-
test/TableGen/TargetInstrInfo.td | 2 +-
utils/TableGen/RegisterInfoEmitter.cpp | 6 +-
win32/Target/Target.vcproj | 4 +-
107 files changed, 614 insertions(+), 596 deletions(-)
rename include/llvm/Target/{MRegisterInfo.h => TargetRegisterInfo.h} (96%)
rename lib/Target/{MRegisterInfo.cpp => TargetRegisterInfo.cpp} (78%)
diff --git a/Xcode/LLVM.xcodeproj/project.pbxproj b/Xcode/LLVM.xcodeproj/project.pbxproj
index b54d4943698..ee5dcfb157f 100644
--- a/Xcode/LLVM.xcodeproj/project.pbxproj
+++ b/Xcode/LLVM.xcodeproj/project.pbxproj
@@ -689,7 +689,7 @@
DE66EF0B08ABEE5E00323D32 /* IA64TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64TargetMachine.cpp; sourceTree = ""; };
DE66EF0C08ABEE5E00323D32 /* IA64TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64TargetMachine.h; sourceTree = ""; };
DE66EF0E08ABEE5E00323D32 /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README; sourceTree = ""; };
- DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MRegisterInfo.cpp; sourceTree = ""; };
+ DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetRegisterInfo.cpp; sourceTree = ""; };
DE66F08A08ABEE6000323D32 /* Target.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Target.td; sourceTree = ""; };
DE66F08B08ABEE6000323D32 /* TargetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetData.cpp; sourceTree = ""; };
DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetFrameInfo.cpp; sourceTree = ""; };
@@ -915,7 +915,7 @@
DE66F29C08ABF03200323D32 /* Program.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Program.h; sourceTree = ""; };
DE66F29D08ABF03200323D32 /* Signals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Signals.h; sourceTree = ""; };
DE66F29E08ABF03200323D32 /* TimeValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TimeValue.h; sourceTree = ""; };
- DE66F2A008ABF03200323D32 /* MRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MRegisterInfo.h; sourceTree = ""; };
+ DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetRegisterInfo.h; sourceTree = ""; };
DE66F2A108ABF03200323D32 /* TargetData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetData.h; sourceTree = ""; };
DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetFrameInfo.h; sourceTree = ""; };
DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInstrInfo.h; sourceTree = ""; };
@@ -1765,7 +1765,7 @@
DE66EF1108ABEE5E00323D32 /* PowerPC */,
DE66EF7008ABEE5F00323D32 /* Sparc */,
DE66F09308ABEE6000323D32 /* X86 */,
- DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */,
+ DE66EF1008ABEE5E00323D32 /* TargetRegisterInfo.cpp */,
CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */,
DE66F08A08ABEE6000323D32 /* Target.td */,
CF47BD860AAF487E00A8B13E /* TargetAsmInfo.cpp */,
@@ -2445,7 +2445,7 @@
DE66F29F08ABF03200323D32 /* Target */ = {
isa = PBXGroup;
children = (
- DE66F2A008ABF03200323D32 /* MRegisterInfo.h */,
+ DE66F2A008ABF03200323D32 /* TargetRegisterInfo.h */,
CF9BCD0808C74DE0001E7011 /* SubtargetFeature.h */,
CF47BD380AAF40BC00A8B13E /* TargetAsmInfo.h */,
DE66F2A108ABF03200323D32 /* TargetData.h */,
diff --git a/docs/CodeGenerator.html b/docs/CodeGenerator.html
index 7be4689562b..d0eb1d51050 100644
--- a/docs/CodeGenerator.html
+++ b/docs/CodeGenerator.html
@@ -26,7 +26,7 @@
The TargetMachine class
The TargetData class
The TargetLowering class
- The MRegisterInfo class
+ The TargetRegisterInfo class
The TargetInstrInfo class
The TargetFrameInfo class
The TargetSubtarget class
@@ -388,14 +388,13 @@ operations. Among other things, this class indicates:
-
The MRegisterInfo class (which will eventually be renamed to
-TargetRegisterInfo) is used to describe the register file of the
-target and any interactions between the registers.
+
The TargetRegisterInfo class is used to describe the register
+file of the target and any interactions between the registers.
Registers in the code generator are represented in the code generator by
unsigned integers. Physical registers (those that actually exist in the target
@@ -408,8 +407,8 @@ register (used for assembly output and debugging dumps) and a set of aliases
(used to indicate whether one register overlaps with another).
-
In addition to the per-register description, the MRegisterInfo class
-exposes a set of processor specific register classes (instances of the
+
In addition to the per-register description, the TargetRegisterInfo
+class exposes a set of processor specific register classes (instances of the
TargetRegisterClass class). Each register class contains sets of
registers that have the same properties (for example, they are all 32-bit
integer registers). Each SSA virtual register created by the instruction
@@ -1292,7 +1291,7 @@ X86 architecture, the registers EAX, AX and
marked as aliased in LLVM. Given a particular architecture, you
can check which registers are aliased by inspecting its
RegisterInfo.td file. Moreover, the method
-MRegisterInfo::getAliasSet(p_reg) returns an array containing
+TargetRegisterInfo::getAliasSet(p_reg) returns an array containing
all the physical registers aliased to the register p_reg.
Physical registers, in LLVM, are grouped in Register Classes.
@@ -1310,7 +1309,7 @@ this code can be used:
bool RegMapping_Fer::compatible_class(MachineFunction &mf,
unsigned v_reg,
unsigned p_reg) {
- assert(MRegisterInfo::isPhysicalRegister(p_reg) &&
+ assert(TargetRegisterInfo::isPhysicalRegister(p_reg) &&
"Target register must be physical");
const TargetRegisterClass *trc = mf.getRegInfo().getRegClass(v_reg);
return trc->contains(p_reg);
@@ -1335,9 +1334,9 @@ physical registers, different virtual registers never share the same
number. The smallest virtual register is normally assigned the number
1024. This may change, so, in order to know which is the first virtual
register, you should access
-MRegisterInfo::FirstVirtualRegister. Any register whose
+TargetRegisterInfo::FirstVirtualRegister. Any register whose
number is greater than or equal to
-MRegisterInfo::FirstVirtualRegister is considered a virtual
+TargetRegisterInfo::FirstVirtualRegister is considered a virtual
register. Whereas physical registers are statically defined in a
TargetRegisterInfo.td file and cannot be created by the
application developer, that is not the case with virtual registers.
@@ -1394,7 +1393,7 @@ overwritten by the values of virtual registers while still alive.
There are two ways to map virtual registers to physical registers (or to
memory slots). The first way, that we will call direct mapping,
-is based on the use of methods of the classes MRegisterInfo,
+is based on the use of methods of the classes TargetRegisterInfo,
and MachineOperand. The second way, that we will call
indirect mapping, relies on the VirtRegMap class in
order to insert loads and stores sending and getting values to and from
@@ -1408,8 +1407,8 @@ target function being compiled in order to get and store values in
memory. To assign a physical register to a virtual register present in
a given operand, use MachineOperand::setReg(p_reg). To insert
a store instruction, use
-MRegisterInfo::storeRegToStackSlot(...), and to insert a load
-instruction, use MRegisterInfo::loadRegFromStackSlot.
+
TargetRegisterInfo::storeRegToStackSlot(...), and to insert a load
+instruction, use
TargetRegisterInfo::loadRegFromStackSlot.
The indirect mapping shields the application developer from the
complexities of inserting load and store instructions. In order to map
@@ -1529,7 +1528,7 @@ instance, a sequence of instructions such as: