| Nicolai Haehnle | 5d0d303 | 2018-04-01 17:09:07 +0000 | [diff] [blame] | 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 | include "llvm/TableGen/SearchableTable.td" | 
|  | 11 |  | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 | // Resource intrinsics table. | 
|  | 14 | //===----------------------------------------------------------------------===// | 
|  | 15 |  | 
|  | 16 | class RsrcIntrinsic<AMDGPURsrcIntrinsic intr> : SearchableTable { | 
|  | 17 | let SearchableFields = ["Intr"]; | 
|  | 18 | let EnumNameField = ?; | 
|  | 19 |  | 
|  | 20 | Intrinsic Intr = !cast<Intrinsic>(intr); | 
|  | 21 | bits<8> RsrcArg = intr.RsrcArg; | 
|  | 22 | bit IsImage = intr.IsImage; | 
|  | 23 | } | 
|  | 24 |  | 
|  | 25 | foreach intr = !listconcat(AMDGPUBufferIntrinsics, | 
|  | 26 | AMDGPUImageIntrinsics) in { | 
|  | 27 | def : RsrcIntrinsic<!cast<AMDGPURsrcIntrinsic>(intr)>; | 
|  | 28 | } | 
| Nicolai Haehnle | 4254d45 | 2018-04-01 17:09:14 +0000 | [diff] [blame] | 29 |  | 
|  | 30 | class SourceOfDivergence<Intrinsic intr> : SearchableTable { | 
|  | 31 | let SearchableFields = ["Intr"]; | 
|  | 32 | let EnumNameField = ?; | 
|  | 33 |  | 
|  | 34 | Intrinsic Intr = intr; | 
|  | 35 | } | 
|  | 36 |  | 
|  | 37 | def : SourceOfDivergence<int_amdgcn_workitem_id_x>; | 
|  | 38 | def : SourceOfDivergence<int_amdgcn_workitem_id_y>; | 
|  | 39 | def : SourceOfDivergence<int_amdgcn_workitem_id_z>; | 
|  | 40 | def : SourceOfDivergence<int_amdgcn_interp_mov>; | 
|  | 41 | def : SourceOfDivergence<int_amdgcn_interp_p1>; | 
|  | 42 | def : SourceOfDivergence<int_amdgcn_interp_p2>; | 
|  | 43 | def : SourceOfDivergence<int_amdgcn_mbcnt_hi>; | 
|  | 44 | def : SourceOfDivergence<int_amdgcn_mbcnt_lo>; | 
|  | 45 | def : SourceOfDivergence<int_r600_read_tidig_x>; | 
|  | 46 | def : SourceOfDivergence<int_r600_read_tidig_y>; | 
|  | 47 | def : SourceOfDivergence<int_r600_read_tidig_z>; | 
|  | 48 | def : SourceOfDivergence<int_amdgcn_atomic_inc>; | 
|  | 49 | def : SourceOfDivergence<int_amdgcn_atomic_dec>; | 
|  | 50 | def : SourceOfDivergence<int_amdgcn_ds_fadd>; | 
|  | 51 | def : SourceOfDivergence<int_amdgcn_ds_fmin>; | 
|  | 52 | def : SourceOfDivergence<int_amdgcn_ds_fmax>; | 
|  | 53 | def : SourceOfDivergence<int_amdgcn_image_atomic_swap>; | 
|  | 54 | def : SourceOfDivergence<int_amdgcn_image_atomic_add>; | 
|  | 55 | def : SourceOfDivergence<int_amdgcn_image_atomic_sub>; | 
|  | 56 | def : SourceOfDivergence<int_amdgcn_image_atomic_smin>; | 
|  | 57 | def : SourceOfDivergence<int_amdgcn_image_atomic_umin>; | 
|  | 58 | def : SourceOfDivergence<int_amdgcn_image_atomic_smax>; | 
|  | 59 | def : SourceOfDivergence<int_amdgcn_image_atomic_umax>; | 
|  | 60 | def : SourceOfDivergence<int_amdgcn_image_atomic_and>; | 
|  | 61 | def : SourceOfDivergence<int_amdgcn_image_atomic_or>; | 
|  | 62 | def : SourceOfDivergence<int_amdgcn_image_atomic_xor>; | 
|  | 63 | def : SourceOfDivergence<int_amdgcn_image_atomic_inc>; | 
|  | 64 | def : SourceOfDivergence<int_amdgcn_image_atomic_dec>; | 
|  | 65 | def : SourceOfDivergence<int_amdgcn_image_atomic_cmpswap>; | 
|  | 66 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_swap>; | 
|  | 67 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_add>; | 
|  | 68 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_sub>; | 
|  | 69 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_smin>; | 
|  | 70 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_umin>; | 
|  | 71 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_smax>; | 
|  | 72 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_umax>; | 
|  | 73 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_and>; | 
|  | 74 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_or>; | 
|  | 75 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_xor>; | 
|  | 76 | def : SourceOfDivergence<int_amdgcn_buffer_atomic_cmpswap>; | 
|  | 77 | def : SourceOfDivergence<int_amdgcn_ps_live>; | 
|  | 78 | def : SourceOfDivergence<int_amdgcn_ds_swizzle>; |