summaryrefslogtreecommitdiff
path: root/runtime/queries/llvm-mir/highlights.scm
blob: 7923461222c4dff78799dbd30d8eaa138e5b5f07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[
  (label)
  (bb_ref)
] @label

[
  (comment)
  (multiline_comment)
] @comment

[
  "("
  ")"
  "["
  "]"
  "{"
  "}"
  "<"
  ">"
] @punctuation.bracket

[
  ","
  ":"
  "|"
  "*"
] @punctuation.delimiter

[
  "="
  "x"
] @operator

[
  "true"
  "false"
] @constant.builtin.boolean

[
  "null"
  "_"
  "unknown-address"
] @constant.builtin

[
  (stack_object)
  (constant_pool_index)
  (jump_table_index)
  (var)
  (physical_register)
  (ir_block)
  (external_symbol)
  (global_var)
  (ir_local_var)
  (metadata_ref)
  (mnemonic)
] @variable

(low_level_type) @type

[
  (immediate_type)
  (primitive_type)
] @type.builtin

(number) @constant.numeric.integer
(float) @constant.numeric.float
(string) @string

(instruction name: _ @keyword.operator)

[
  "successors"
  "liveins"
  "pre-instr-symbol"
  "post-instr-symbol"
  "heap-alloc-marker"
  "debug-instr-number"
  "debug-location"
  "mcsymbol"
  "tied-def"
  "target-flags"
  "CustomRegMask"
  "same_value"
  "def_cfa_register"
  "restore"
  "undefined"
  "offset"
  "rel_offset"
  "def_cfa"
  "llvm_def_aspace_cfa"
  "register"
  "escape"
  "remember_state"
  "restore_state"
  "window_save"
  "negate_ra_sign_state"
  "intpred"
  "floatpred"
  "shufflemask"
  "liveout"
  "target-index"
  "blockaddress"
  "intrinsic"
  "load"
  "store"
  "unknown-size"
  "on"
  "from"
  "into"
  "align"
  "basealign"
  "addrspace"
  "call-entry"
  "custom"
  "constant-pool"
  "stack"
  "got"
  "jump-table"
  "syncscope"
  "address-taken"
  "landing-pad"
  "inlineasm-br-indirect-target"
  "ehfunclet-entry"
  "bbsections"

  (intpred)
  (floatpred)
  (memory_operand_flag)
  (atomic_ordering)
  (register_flag)
  (instruction_flag)
  (float_keyword)
] @keyword

(ERROR) @error