• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- AMDGPUSearchableTables.td - ------------------------*- tablegen -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10//===----------------------------------------------------------------------===//
11// Resource intrinsics table.
12//===----------------------------------------------------------------------===//
13
14class RsrcIntrinsic<AMDGPURsrcIntrinsic intr> {
15  Intrinsic Intr = !cast<Intrinsic>(intr);
16  bits<8> RsrcArg = intr.RsrcArg;
17  bit IsImage = intr.IsImage;
18}
19
20def RsrcIntrinsics : GenericTable {
21  let FilterClass = "RsrcIntrinsic";
22  let Fields = ["Intr", "RsrcArg", "IsImage"];
23
24  let PrimaryKey = ["Intr"];
25  let PrimaryKeyName = "lookupRsrcIntrinsic";
26}
27
28foreach intr = !listconcat(AMDGPUBufferIntrinsics,
29                           AMDGPUImageDimIntrinsics,
30                           AMDGPUImageDimAtomicIntrinsics) in {
31  def : RsrcIntrinsic<!cast<AMDGPURsrcIntrinsic>(intr)>;
32}
33
34class SourceOfDivergence<Intrinsic intr> {
35  Intrinsic Intr = intr;
36}
37
38def SourcesOfDivergence : GenericTable {
39  let FilterClass = "SourceOfDivergence";
40  let Fields = ["Intr"];
41
42  let PrimaryKey = ["Intr"];
43  let PrimaryKeyName = "lookupSourceOfDivergence";
44}
45
46def : SourceOfDivergence<int_amdgcn_workitem_id_x>;
47def : SourceOfDivergence<int_amdgcn_workitem_id_y>;
48def : SourceOfDivergence<int_amdgcn_workitem_id_z>;
49def : SourceOfDivergence<int_amdgcn_interp_mov>;
50def : SourceOfDivergence<int_amdgcn_interp_p1>;
51def : SourceOfDivergence<int_amdgcn_interp_p2>;
52def : SourceOfDivergence<int_amdgcn_mbcnt_hi>;
53def : SourceOfDivergence<int_amdgcn_mbcnt_lo>;
54def : SourceOfDivergence<int_r600_read_tidig_x>;
55def : SourceOfDivergence<int_r600_read_tidig_y>;
56def : SourceOfDivergence<int_r600_read_tidig_z>;
57def : SourceOfDivergence<int_amdgcn_atomic_inc>;
58def : SourceOfDivergence<int_amdgcn_atomic_dec>;
59def : SourceOfDivergence<int_amdgcn_ds_fadd>;
60def : SourceOfDivergence<int_amdgcn_ds_fmin>;
61def : SourceOfDivergence<int_amdgcn_ds_fmax>;
62def : SourceOfDivergence<int_amdgcn_buffer_atomic_swap>;
63def : SourceOfDivergence<int_amdgcn_buffer_atomic_add>;
64def : SourceOfDivergence<int_amdgcn_buffer_atomic_sub>;
65def : SourceOfDivergence<int_amdgcn_buffer_atomic_smin>;
66def : SourceOfDivergence<int_amdgcn_buffer_atomic_umin>;
67def : SourceOfDivergence<int_amdgcn_buffer_atomic_smax>;
68def : SourceOfDivergence<int_amdgcn_buffer_atomic_umax>;
69def : SourceOfDivergence<int_amdgcn_buffer_atomic_and>;
70def : SourceOfDivergence<int_amdgcn_buffer_atomic_or>;
71def : SourceOfDivergence<int_amdgcn_buffer_atomic_xor>;
72def : SourceOfDivergence<int_amdgcn_buffer_atomic_cmpswap>;
73def : SourceOfDivergence<int_amdgcn_ps_live>;
74def : SourceOfDivergence<int_amdgcn_ds_swizzle>;
75
76foreach intr = AMDGPUImageDimAtomicIntrinsics in
77def : SourceOfDivergence<intr>;
78