// Resource intrinsics table.
//===----------------------------------------------------------------------===//
-class RsrcIntrinsic<AMDGPURsrcIntrinsic intr> : SearchableTable {
- let SearchableFields = ["Intr"];
- let EnumNameField = ?;
-
+class RsrcIntrinsic<AMDGPURsrcIntrinsic intr> {
Intrinsic Intr = !cast<Intrinsic>(intr);
bits<8> RsrcArg = intr.RsrcArg;
bit IsImage = intr.IsImage;
}
+def RsrcIntrinsics : GenericTable {
+ let FilterClass = "RsrcIntrinsic";
+ let Fields = ["Intr", "RsrcArg", "IsImage"];
+
+ let PrimaryKey = ["Intr"];
+ let PrimaryKeyName = "lookupRsrcIntrinsic";
+}
+
foreach intr = !listconcat(AMDGPUBufferIntrinsics,
AMDGPUImageIntrinsics,
AMDGPUImageDimIntrinsics,
def : RsrcIntrinsic<!cast<AMDGPURsrcIntrinsic>(intr)>;
}
-class SourceOfDivergence<Intrinsic intr> : SearchableTable {
- let SearchableFields = ["Intr"];
- let EnumNameField = ?;
-
+class SourceOfDivergence<Intrinsic intr> {
Intrinsic Intr = intr;
}
+def SourcesOfDivergence : GenericTable {
+ let FilterClass = "SourceOfDivergence";
+ let Fields = ["Intr"];
+
+ let PrimaryKey = ["Intr"];
+ let PrimaryKeyName = "lookupSourceOfDivergence";
+}
+
def : SourceOfDivergence<int_amdgcn_workitem_id_x>;
def : SourceOfDivergence<int_amdgcn_workitem_id_y>;
def : SourceOfDivergence<int_amdgcn_workitem_id_z>;
foreach intr = AMDGPUImageDimAtomicIntrinsics in
def : SourceOfDivergence<intr>;
-class D16ImageDimIntrinsic<AMDGPUImageDimIntrinsic intr> : SearchableTable {
- let SearchableFields = ["Intr"];
- let EnumNameField = ?;
-
+class D16ImageDimIntrinsic<AMDGPUImageDimIntrinsic intr> {
Intrinsic Intr = intr;
code D16HelperIntr =
!cast<code>("AMDGPUIntrinsic::SI_image_d16helper_" # intr.P.OpMod # intr.P.Dim.Name);
}
+def D16ImageDimIntrinsics : GenericTable {
+ let FilterClass = "D16ImageDimIntrinsic";
+ let Fields = ["Intr", "D16HelperIntr"];
+
+ let PrimaryKey = ["Intr"];
+ let PrimaryKeyName = "lookupD16ImageDimIntrinsic";
+}
+
foreach intr = !listconcat(AMDGPUImageDimIntrinsics,
AMDGPUImageDimGatherIntrinsics) in {
def : D16ImageDimIntrinsic<intr>;
MachineFunction &MF,
unsigned IntrID) const {
if (const AMDGPU::RsrcIntrinsic *RsrcIntr =
- AMDGPU::lookupRsrcIntrinsicByIntr(IntrID)) {
+ AMDGPU::lookupRsrcIntrinsic(IntrID)) {
AttributeList Attr = Intrinsic::getAttributes(CI.getContext(),
(Intrinsic::ID)IntrID);
if (Attr.hasFnAttribute(Attribute::ReadNone))
Op.getValueType().isVector() &&
Op.getValueType().getScalarSizeInBits() == 16) {
if (const AMDGPU::D16ImageDimIntrinsic *D16ImageDimIntr =
- AMDGPU::lookupD16ImageDimIntrinsicByIntr(IntrID)) {
+ AMDGPU::lookupD16ImageDimIntrinsic(IntrID)) {
return adjustLoadValueType(D16ImageDimIntr->D16HelperIntr,
cast<MemSDNode>(Op), DAG, true);
}
}
default: {
const AMDGPU::D16ImageDimIntrinsic *D16ImageDimIntr =
- AMDGPU::lookupD16ImageDimIntrinsicByIntr(IntrinsicID);
+ AMDGPU::lookupD16ImageDimIntrinsic(IntrinsicID);
if (D16ImageDimIntr) {
SDValue VData = Op.getOperand(2);
EVT StoreVT = VData.getValueType();
struct SourceOfDivergence {
unsigned Intr;
};
-const SourceOfDivergence *lookupSourceOfDivergenceByIntr(unsigned Intr);
+const SourceOfDivergence *lookupSourceOfDivergence(unsigned Intr);
-#define GET_SOURCEOFDIVERGENCE_IMPL
+#define GET_SourcesOfDivergence_IMPL
#include "AMDGPUGenSearchableTables.inc"
} // end anonymous namespace
bool isIntrinsicSourceOfDivergence(unsigned IntrID) {
- return lookupSourceOfDivergenceByIntr(IntrID);
+ return lookupSourceOfDivergence(IntrID);
}
} // namespace AMDGPU
} // namespace llvm