[llvm] r214195 - R600/SI: Add isMUBUF / isMTBUF
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Jul 29 11:51:57 PDT 2014
Author: arsenm
Date: Tue Jul 29 13:51:56 2014
New Revision: 214195
URL: http://llvm.org/viewvc/llvm-project?rev=214195&view=rev
Log:
R600/SI: Add isMUBUF / isMTBUF
Also add missing comments about how the flags work.
Modified:
llvm/trunk/lib/Target/R600/SIDefines.h
llvm/trunk/lib/Target/R600/SIInstrFormats.td
llvm/trunk/lib/Target/R600/SIInstrInfo.cpp
llvm/trunk/lib/Target/R600/SIInstrInfo.h
Modified: llvm/trunk/lib/Target/R600/SIDefines.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIDefines.h?rev=214195&r1=214194&r2=214195&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIDefines.h (original)
+++ llvm/trunk/lib/Target/R600/SIDefines.h Tue Jul 29 13:51:56 2014
@@ -12,6 +12,7 @@
#define SIDEFINES_H_
namespace SIInstrFlags {
+// This needs to be kept in sync with the field bits in InstSI.
enum {
MIMG = 1 << 3,
SMRD = 1 << 4,
@@ -19,7 +20,9 @@ enum {
VOP2 = 1 << 6,
VOP3 = 1 << 7,
VOPC = 1 << 8,
- SALU = 1 << 9
+ SALU = 1 << 9,
+ MUBUF = 1 << 10,
+ MTBUF = 1 << 11
};
}
Modified: llvm/trunk/lib/Target/R600/SIInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstrFormats.td?rev=214195&r1=214194&r2=214195&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstrFormats.td (original)
+++ llvm/trunk/lib/Target/R600/SIInstrFormats.td Tue Jul 29 13:51:56 2014
@@ -24,7 +24,10 @@ class InstSI <dag outs, dag ins, string
field bits<1> VOP3 = 0;
field bits<1> VOPC = 0;
field bits<1> SALU = 0;
+ field bits<1> MUBUF = 0;
+ field bits<1> MTBUF = 0;
+ // These need to be kept in sync with the enum in SIInstrFlags.
let TSFlags{0} = VM_CNT;
let TSFlags{1} = EXP_CNT;
let TSFlags{2} = LGKM_CNT;
@@ -35,6 +38,8 @@ class InstSI <dag outs, dag ins, string
let TSFlags{7} = VOP3;
let TSFlags{8} = VOPC;
let TSFlags{9} = SALU;
+ let TSFlags{10} = MUBUF;
+ let TSFlags{11} = MTBUF;
}
class Enc32 {
@@ -503,6 +508,7 @@ class MUBUF <bits<7> op, dag outs, dag i
let VM_CNT = 1;
let EXP_CNT = 1;
+ let MUBUF = 1;
let neverHasSideEffects = 1;
let UseNamedOperandTable = 1;
@@ -513,6 +519,7 @@ class MTBUF <bits<3> op, dag outs, dag i
let VM_CNT = 1;
let EXP_CNT = 1;
+ let MTBUF = 1;
let neverHasSideEffects = 1;
}
Modified: llvm/trunk/lib/Target/R600/SIInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstrInfo.cpp?rev=214195&r1=214194&r2=214195&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIInstrInfo.cpp Tue Jul 29 13:51:56 2014
@@ -483,6 +483,14 @@ bool SIInstrInfo::isSMRD(uint16_t Opcode
return get(Opcode).TSFlags & SIInstrFlags::SMRD;
}
+bool SIInstrInfo::isMUBUF(uint16_t Opcode) const {
+ return get(Opcode).TSFlags & SIInstrFlags::MUBUF;
+}
+
+bool SIInstrInfo::isMTBUF(uint16_t Opcode) const {
+ return get(Opcode).TSFlags & SIInstrFlags::MTBUF;
+}
+
bool SIInstrInfo::isVOP1(uint16_t Opcode) const {
return get(Opcode).TSFlags & SIInstrFlags::VOP1;
}
Modified: llvm/trunk/lib/Target/R600/SIInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstrInfo.h?rev=214195&r1=214194&r2=214195&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstrInfo.h (original)
+++ llvm/trunk/lib/Target/R600/SIInstrInfo.h Tue Jul 29 13:51:56 2014
@@ -98,6 +98,8 @@ public:
bool isDS(uint16_t Opcode) const;
bool isMIMG(uint16_t Opcode) const;
bool isSMRD(uint16_t Opcode) const;
+ bool isMUBUF(uint16_t Opcode) const;
+ bool isMTBUF(uint16_t Opcode) const;
bool isVOP1(uint16_t Opcode) const;
bool isVOP2(uint16_t Opcode) const;
bool isVOP3(uint16_t Opcode) const;
More information about the llvm-commits
mailing list