From d0da9ebb0abc231ae765f3bdd300e0b2da13ea8b Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 18 Feb 2015 16:08:17 +0000 Subject: [PATCH] R600/SI: Don't set isCodeGenOnly = 1 on all instructions We only need to set this on pseudo instructions which won't be used by the assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229689 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/AMDGPUInstructions.td | 2 -- lib/Target/R600/R600Instructions.td | 5 +++++ lib/Target/R600/SIInstrFormats.td | 1 - lib/Target/R600/SIInstrInfo.td | 16 ++++++++++++++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/Target/R600/AMDGPUInstructions.td b/lib/Target/R600/AMDGPUInstructions.td index 1c5f76d0fee..8b5fe8c09db 100644 --- a/lib/Target/R600/AMDGPUInstructions.td +++ b/lib/Target/R600/AMDGPUInstructions.td @@ -23,8 +23,6 @@ class AMDGPUInst pattern> : Instructio let Pattern = pattern; let Itinerary = NullALU; - let isCodeGenOnly = 1; - let TSFlags{63} = isRegisterLoad; let TSFlags{62} = isRegisterStore; } diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td index cf6ac483bba..08e3d51fab6 100644 --- a/lib/Target/R600/R600Instructions.td +++ b/lib/Target/R600/R600Instructions.td @@ -580,6 +580,7 @@ i32imm:$COUNT, i32imm:$Enabled), let ALT_CONST = 0; let WHOLE_QUAD_MODE = 0; let BARRIER = 1; + let isCodeGenOnly = 1; let UseNamedOperandTable = 1; let Inst{31-0} = Word0; @@ -642,6 +643,7 @@ def FETCH_CLAUSE : AMDGPUInst <(outs), field bits<8> Inst; bits<8> num; let Inst = num; + let isCodeGenOnly = 1; } def ALU_CLAUSE : AMDGPUInst <(outs), @@ -649,10 +651,13 @@ def ALU_CLAUSE : AMDGPUInst <(outs), field bits<8> Inst; bits<8> num; let Inst = num; + let isCodeGenOnly = 1; } def LITERALS : AMDGPUInst <(outs), (ins LITERAL:$literal1, LITERAL:$literal2), "$literal1, $literal2", [] > { + let isCodeGenOnly = 1; + field bits<64> Inst; bits<32> literal1; bits<32> literal2; diff --git a/lib/Target/R600/SIInstrFormats.td b/lib/Target/R600/SIInstrFormats.td index 1d561a32349..816e6b41be1 100644 --- a/lib/Target/R600/SIInstrFormats.td +++ b/lib/Target/R600/SIInstrFormats.td @@ -252,7 +252,6 @@ class SOPP op, dag ins, string asm, list pattern = []> : let mayLoad = 0; let mayStore = 0; let hasSideEffects = 0; - let isCodeGenOnly = 0; let SALU = 1; let SOPP = 1; diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 544f0cb1fc1..b7bee299aa0 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -363,7 +363,7 @@ class EXPCommon : InstSI< multiclass EXP_m { - let isPseudo = 1 in { + let isPseudo = 1, isCodeGenOnly = 1 in { def "" : EXPCommon, SIMCInstr <"exp", SISubtarget.NONE> ; } @@ -380,6 +380,7 @@ class SOP1_Pseudo pattern> : SOP1 , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class SOP1_Real_si : @@ -453,6 +454,7 @@ class SOP2_Pseudo pattern> : SOP2, SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; let Size = 4; // Pseudo instructions have no encodings, but adding this field here allows @@ -526,6 +528,7 @@ class SOPK_Pseudo pattern> : SOPK , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class SOPK_Real_si : @@ -568,6 +571,7 @@ class SMRD_Pseudo pattern> : SMRD , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class SMRD_Real_si op, string opName, bit imm, dag outs, dag ins, @@ -821,6 +825,7 @@ class VOP1_Pseudo pattern, string opName> : VOP , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; field bits<8> vdst; field bits<9> src0; @@ -850,6 +855,7 @@ class VOP2_Pseudo pattern, string opName> : VOP , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } multiclass VOP2SI_m pattern, @@ -899,6 +905,7 @@ class VOP3_Pseudo pattern, string opName> : VOP , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class VOP3_Real_si op, dag outs, dag ins, string asm, string opName> : @@ -1054,7 +1061,7 @@ multiclass VOP3_C_m pattern = []> { - let isPseudo = 1 in { + let isPseudo = 1, isCodeGenOnly = 1 in { def "" : VOPAnyCommon , SIMCInstr; } @@ -1203,6 +1210,7 @@ class VOPC_Pseudo pattern, string opName> : VOP , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } multiclass VOPC_m pattern, @@ -1405,6 +1413,7 @@ class VINTRP_Pseudo pattern> : VINTRPCommon , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class VINTRP_Real_si op, string opName, dag outs, dag ins, @@ -1440,6 +1449,7 @@ class DS_Pseudo pattern> : DS , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class DS_Real_si op, string opName, dag outs, dag ins, string asm> : @@ -1657,6 +1667,7 @@ class MTBUF_Pseudo pattern> : MTBUF , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; } class MTBUF_Real_si op, string opName, dag outs, dag ins, @@ -1727,6 +1738,7 @@ class MUBUF_Pseudo pattern> : MUBUF , SIMCInstr { let isPseudo = 1; + let isCodeGenOnly = 1; // dummy fields, so that we can use let statements around multiclasses bits<1> offen; -- 2.34.1