PHI and INLINEASM are now built-in instructions provided by Target.td
authorChris Lattner <sabre@nondot.org>
Fri, 27 Jan 2006 01:46:15 +0000 (01:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 27 Jan 2006 01:46:15 +0000 (01:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25674 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
lib/Target/Alpha/Alpha.td
lib/Target/Alpha/AlphaInstrInfo.td
lib/Target/IA64/IA64.td
lib/Target/IA64/IA64InstrInfo.td
lib/Target/PowerPC/PPCInstrFormats.td
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/Skeleton/Skeleton.td
lib/Target/Skeleton/SkeletonInstrInfo.td
lib/Target/Sparc/Sparc.td
lib/Target/Sparc/SparcInstrInfo.td
lib/Target/SparcV8/SparcV8.td
lib/Target/SparcV8/SparcV8InstrInfo.td
lib/Target/SparcV9/SparcV9.td
lib/Target/SparcV9/SparcV9InstrInfo.td
lib/Target/Target.td
lib/Target/X86/X86.td
lib/Target/X86/X86InstrInfo.td

index 7cbb0f181f774c660062dacf487d4d8dfb1e727b..facc767c40b636284800f1d20b63b203006e1423 100644 (file)
@@ -38,8 +38,6 @@ include "AlphaRegisterInfo.td"
 include "AlphaInstrInfo.td"
 
 def AlphaInstrInfo : InstrInfo {
-  let PHIInst = PHI;
-
   // Define how we want to layout our target-specific information field.
  // let TSFlagsFields = [];
  // let TSFlagsShifts = [];
index dec058ea9f94ffd6ae812dababc8891a6147c9b2..b39c94a7a215438b593d85021f60c9cbe1f42213 100644 (file)
@@ -113,8 +113,6 @@ def sub8  : PatFrag<(ops node:$op1, node:$op2),
 
 //Pseudo ops for selection
 
-def PHI : PseudoInstAlpha<(ops variable_ops), "#phi", []>;
-
 def IDEF_I : PseudoInstAlpha<(ops GPRC:$RA), "#idef $RA",
              [(set GPRC:$RA, (undef))]>;
 def IDEF_F32 : PseudoInstAlpha<(ops F4RC:$RA), "#idef $RA",
index 78cf55e48e0aa9dedcc6eaf6868bcccdc14b6c6a..30337625c589fb1253edbd05891d75a2db9b2704 100644 (file)
@@ -28,9 +28,7 @@ include "IA64RegisterInfo.td"
 
 include "IA64InstrInfo.td"
 
-def IA64InstrInfo : InstrInfo {
-    let PHIInst = PHI;
-}
+def IA64InstrInfo : InstrInfo { }
 
 def IA64 : Target {
   // The following registers are always saved across calls:
index 67d71e48db6711699fb26decac2b0ef0d5ef6425..7dc184c861296abb3d212e599026c782a672e0e5 100644 (file)
@@ -448,7 +448,6 @@ def : Pat<(i1  0), (CMPNE r0, r0)>; // TODO: any instruction actually *using*
 // TODO: support postincrement (reg, imm9) loads+stores - this needs more
 // tablegen support
 
-def PHI : PseudoInstIA64<(ops variable_ops), "PHI">;
 def IDEF : PseudoInstIA64<(ops variable_ops), "// IDEF">;
 
 def IDEF_GR_D : PseudoInstIA64_DAG<(ops GR:$reg), "// $reg = IDEF",
index 07f0e1ca30964d43af316648598219883fb00cdf..0c7dca0d7b1a9c3758fd83eb2f51bd8586f7c966 100644 (file)
@@ -644,9 +644,8 @@ class VXRForm_1<bits<10> xo, bit rc, dag OL, string asmstr,
 }
 
 //===----------------------------------------------------------------------===//
-def NoItin : InstrItinClass;
 class Pseudo<dag OL, string asmstr, list<dag> pattern>
-    : I<0, OL, asmstr, NoItin> {
+    : I<0, OL, asmstr, NoItinerary> {
   let PPC64 = 0;
   let VMX = 0;
   let Pattern = pattern;
index 4ccf4c22faf226d55718e6cd34c108a11e7a6531..6312559ce237cfd87ac20e1cb9ca485d90a0aea1 100644 (file)
@@ -194,7 +194,6 @@ def FPContractions : Predicate<"!NoExcessFPPrecision">;
 // PowerPC Instruction Definitions.
 
 // Pseudo-instructions:
-def PHI : Pseudo<(ops variable_ops), "; PHI", []>;
 
 let isLoad = 1, hasCtrlDep = 1 in {
 def ADJCALLSTACKDOWN : Pseudo<(ops u16imm:$amt),
@@ -1087,8 +1086,6 @@ def : Pattern<(xor GPRC:$in, imm:$imm),
 // PowerPCInstrInfo Definition
 //
 def PowerPCInstrInfo : InstrInfo {
-  let PHIInst  = PHI;
-
   let TSFlagsFields = [ "VMX", "PPC64" ];
   let TSFlagsShifts = [ 0, 1 ];
 
index 8a2dc7291f7eaf6fda19bedc2e7822e391a132ba..47b8a20c2767b689b6d04a86fecef25031b2a039 100644 (file)
@@ -21,9 +21,7 @@ include "../Target.td"
 include "SkeletonRegisterInfo.td"
 include "SkeletonInstrInfo.td"
 
-def SkeletonInstrInfo : InstrInfo {
-  let PHIInst = PHI;
-}
+def SkeletonInstrInfo : InstrInfo { }
 
 def Skeleton : Target {
   // Pointers are 32-bits in size.
index c10af8a9ad49037b534847f3be2229a398ba287f..c5a15bbeecb6d33723c6facb838bb45dc8c8efc9 100644 (file)
@@ -32,7 +32,6 @@ class SkelInst<string nm, bits<6> opcd, dag ops, Format f> : Instruction {
 }
 
 // Pseudo-instructions:
-def PHI : SkelInst<"PHI", 0, (ops), Pseudo>;          // PHI node...
 def NOP : SkelInst<"NOP", 0, (ops), Pseudo>;          // No-op
 def ADJCALLSTACKDOWN : SkelInst<"ADJCALLSTACKDOWN", 0, (ops), Pseudo>;
 def ADJCALLSTACKUP : SkelInst<"ADJCALLSTACKUP", 0, (ops), Pseudo>;
index 886edc1c32a5c34743bec44d040d3527cdec438e..db9b367e88fa9ddc32d2682bd97a7b93261ac65b 100644 (file)
@@ -43,8 +43,6 @@ include "SparcV8RegisterInfo.td"
 include "SparcV8InstrInfo.td"
 
 def SparcV8InstrInfo : InstrInfo {
-  let PHIInst = PHI;
-
   // Define how we want to layout our target-specific information field.
   let TSFlagsFields = [];
   let TSFlagsShifts = [];
index 9613bc5fd466eaeb2cd1c2ba71d8b40685f43d22..db87d4c850016a7f0a29c134ee6d3088f4e36614 100644 (file)
@@ -107,7 +107,6 @@ def retflag       : SDNode<"V8ISD::RET_FLAG", SDT_V8RetFlag,
 class Pseudo<dag ops, string asmstr, list<dag> pattern>
    : InstV8<ops, asmstr, pattern>;
 
-def PHI : Pseudo<(ops variable_ops), "PHI", []>;
 def ADJCALLSTACKDOWN : Pseudo<(ops i32imm:$amt),
                                "!ADJCALLSTACKDOWN $amt",
                                [(callseq_start imm:$amt)]>;
index 886edc1c32a5c34743bec44d040d3527cdec438e..db9b367e88fa9ddc32d2682bd97a7b93261ac65b 100644 (file)
@@ -43,8 +43,6 @@ include "SparcV8RegisterInfo.td"
 include "SparcV8InstrInfo.td"
 
 def SparcV8InstrInfo : InstrInfo {
-  let PHIInst = PHI;
-
   // Define how we want to layout our target-specific information field.
   let TSFlagsFields = [];
   let TSFlagsShifts = [];
index 9613bc5fd466eaeb2cd1c2ba71d8b40685f43d22..db87d4c850016a7f0a29c134ee6d3088f4e36614 100644 (file)
@@ -107,7 +107,6 @@ def retflag       : SDNode<"V8ISD::RET_FLAG", SDT_V8RetFlag,
 class Pseudo<dag ops, string asmstr, list<dag> pattern>
    : InstV8<ops, asmstr, pattern>;
 
-def PHI : Pseudo<(ops variable_ops), "PHI", []>;
 def ADJCALLSTACKDOWN : Pseudo<(ops i32imm:$amt),
                                "!ADJCALLSTACKDOWN $amt",
                                [(callseq_start imm:$amt)]>;
index a288248399487be138b8fe7ba81c199d88668017..87ed94d497f447bf44668a63aec9eb6a938eea8f 100644 (file)
@@ -31,8 +31,6 @@ include "SparcV9RegisterInfo.td"
 include "SparcV9InstrInfo.td"
 
 def SparcV9InstrInfo : InstrInfo {
-  let PHIInst = PHI;
-
   // Define how we want to layout our TargetSpecific information field.
   let TSFlagsFields = [];
   let TSFlagsShifts = [];
index c2df4e46f1ed27187b94c9fc8713267815925dcb..e813cfaddaf4c6a8baa3996241a78756c707fb4f 100644 (file)
@@ -38,9 +38,6 @@ include "SparcV9_F4.td"
 // Instruction list
 //===----------------------------------------------------------------------===//
 
-// Pseudo-instructions
-def PHI     : Pseudo<"phi">;
-
 // Section A.2: Add - p137
 def ADDr    : F3_1<2, 0b000000, "add">;             // add    rs1, rs2, rd
 def ADDi    : F3_2<2, 0b000000, "add">;             // add    rs1, imm, rd
index b4584244d0fbd7e4712977655e2f05b8d39b600c..407ad6405942e87e47d5cb68d72eb12b1ffa7ec6 100644 (file)
@@ -171,7 +171,7 @@ class Instruction {
   bit hasCtrlDep   = 0;     // Does this instruction r/w ctrl-flow chains?
   bit noResults    = 0;     // Does this instruction produce no results?
   
-  InstrItinClass Itinerary; // Execution steps used for scheduling. 
+  InstrItinClass Itinerary = NoItinerary;// Execution steps used for scheduling.
 }
 
 /// Predicates - These are extra conditionals which are turned into instruction
@@ -213,8 +213,6 @@ def i64imm : Operand<i64>;
 // which are global to the the target machine.
 //
 class InstrInfo {
-  Instruction PHIInst;
-
   // 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.
@@ -229,6 +227,16 @@ class InstrInfo {
   bit isLittleEndianEncoding = 0;
 }
 
+// Standard Instructions.
+def PHI : Instruction {
+  let OperandList = (ops variable_ops);
+  let AsmString = "PHINODE";
+}
+def INLINEASM : Instruction {
+  let OperandList = (ops variable_ops);
+  let AsmString = "";
+}
+
 //===----------------------------------------------------------------------===//
 // AsmWriter - This class can be implemented by targets that need to customize
 // the format of the .s file writer.
index a93d7822e262cbbd25c44afddc0da10ed9deb56b..f341949e00b681fcf6b6649567e01e4272021252 100644 (file)
@@ -98,7 +98,6 @@ include "X86RegisterInfo.td"
 include "X86InstrInfo.td"
 
 def X86InstrInfo : InstrInfo {
-  let PHIInst  = PHI;
 
   // Define how we want to layout our TargetSpecific information field... This
   // should be kept up-to-date with the fields in the X86InstrInfo.h file.
index 323b2ab7b20a32ecfe110361c21509771290deb2..37e5c957a1001a3aaa1276519c0c36099f8b43ca 100644 (file)
@@ -378,9 +378,6 @@ class Ii32<bits<8> o, Format f, dag ops, string asm, list<dag> pattern>
 // Instruction list...
 //
 
-// Pseudo-instructions:
-def PHI : I<0, Pseudo, (ops variable_ops), "PHINODE", []>;        // PHI node.
-
 def ADJCALLSTACKDOWN : I<0, Pseudo, (ops i32imm:$amt), "#ADJCALLSTACKDOWN",
                          [(X86callseq_start imm:$amt)]>;
 def ADJCALLSTACKUP   : I<0, Pseudo, (ops i32imm:$amt1, i32imm:$amt2),