aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-03 18:18:31 +0000
committerChris Lattner <sabre@nondot.org>2003-08-03 18:18:31 +0000
commita5100d91efaf7a0ccf87c1ef50ccf674bee7f236 (patch)
treed0434118ce4a259e2b17f9efaa80ccdd6cd2f6bc /lib
parent13c5b4cdc8b601bdb464bf31f316233fd02e1d49 (diff)
Remove the RegisterInfo class in favor of a general Target class. Add instrinfo stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Target.td55
1 files changed, 33 insertions, 22 deletions
diff --git a/lib/Target/Target.td b/lib/Target/Target.td
index 5ab6ed12ee..948b2cec9a 100644
--- a/lib/Target/Target.td
+++ b/lib/Target/Target.td
@@ -75,30 +75,10 @@ class RegisterClass<ValueType regType, int alignment, list<Register> regList> {
code Methods = [{}];
}
-// RegisterInfo - This class should only be instantiated once to provide
-// parameters which are global to the the target machine, such as callee safed
-// registers.
-//
-class RegisterInfo {
- // ClassName - Specify the name of the class that should be generated by the
- // register info emitter. This class may be further subclasses by custom
- // target code to implement virtual methods as necessary. Targets must
- // specify a value for this.
- //
- string ClassName;
-
- // CalleeSavedRegisters - As you might guess, this is a list of the callee
- // saved registers for a target.
- list<Register> CalleeSavedRegisters = [];
-
- // PointerType - Specify the value type to be used to represent pointers in
- // this target. Typically this is an i32 or i64 type.
- ValueType PointerType;
-}
-
//===----------------------------------------------------------------------===//
-// Instruction set description -
+// Instruction set description - These classes correspond to the C++ classes in
+// the Target/TargetInstrInfo.h file.
//
class Instruction {
@@ -115,4 +95,35 @@ class Instruction {
bit isCall = 0; // Is this instruction a call instruction?
bit isTwoAddress = 0; // Is this a two address instruction?
bit isTerminator = 0; // Is this part of the terminator for a basic block?
+
+ // If the target wants to associate some target-specific information with each
+ // instruction, it should provide these two lists to indicate how to assemble
+ // the target specific information into the 32 bits available.
+ list<string> TargetInfoFields = [];
+ list<int> TargetInfoPositions = [];
+}
+
+// InstrInfo - This class should only be instantiated once to provide parameters
+// which are global to the the target machine.
+//
+class InstrInfo {
+ Instruction PHIInst;
+ Instruction NOOPInst;
+}
+
+
+//===----------------------------------------------------------------------===//
+// Target - This class contains the "global" target information
+//
+class Target {
+ // CalleeSavedRegisters - As you might guess, this is a list of the callee
+ // saved registers for a target.
+ list<Register> CalleeSavedRegisters = [];
+
+ // PointerType - Specify the value type to be used to represent pointers in
+ // this target. Typically this is an i32 or i64 type.
+ ValueType PointerType;
+
+ // InstructionSet - Instruction set description for this target
+ InstrInfo InstructionSet;
}