[InstCombine] Signed saturation patterns
[llvm-core.git] / bindings / python / llvm / enumerations.py
blobebb39a4ded831dc020c6aaa9586f6d32cf9d1cb5
1 #===- enumerations.py - Python LLVM Enumerations -------------*- python -*--===#
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 #===------------------------------------------------------------------------===#
9 r"""
10 LLVM Enumerations
11 =================
13 This file defines enumerations from LLVM.
15 Each enumeration is exposed as a list of 2-tuples. These lists are consumed by
16 dedicated types elsewhere in the package. The enumerations are centrally
17 defined in this file so they are easier to locate and maintain.
18 """
20 __all__ = [
21 'Attributes',
22 'OpCodes',
23 'TypeKinds',
24 'Linkages',
25 'Visibility',
26 'CallConv',
27 'IntPredicate',
28 'RealPredicate',
29 'LandingPadClauseTy',
32 Attributes = [
33 ('ZExt', 1 << 0),
34 ('MSExt', 1 << 1),
35 ('NoReturn', 1 << 2),
36 ('InReg', 1 << 3),
37 ('StructRet', 1 << 4),
38 ('NoUnwind', 1 << 5),
39 ('NoAlias', 1 << 6),
40 ('ByVal', 1 << 7),
41 ('Nest', 1 << 8),
42 ('ReadNone', 1 << 9),
43 ('ReadOnly', 1 << 10),
44 ('NoInline', 1 << 11),
45 ('AlwaysInline', 1 << 12),
46 ('OptimizeForSize', 1 << 13),
47 ('StackProtect', 1 << 14),
48 ('StackProtectReq', 1 << 15),
49 ('Alignment', 31 << 16),
50 ('NoCapture', 1 << 21),
51 ('NoRedZone', 1 << 22),
52 ('ImplicitFloat', 1 << 23),
53 ('Naked', 1 << 24),
54 ('InlineHint', 1 << 25),
55 ('StackAlignment', 7 << 26),
56 ('ReturnsTwice', 1 << 29),
57 ('UWTable', 1 << 30),
58 ('NonLazyBind', 1 << 31),
61 OpCodes = [
62 ('Ret', 1),
63 ('Br', 2),
64 ('Switch', 3),
65 ('IndirectBr', 4),
66 ('Invoke', 5),
67 ('Unreachable', 7),
68 ('Add', 8),
69 ('FAdd', 9),
70 ('Sub', 10),
71 ('FSub', 11),
72 ('Mul', 12),
73 ('FMul', 13),
74 ('UDiv', 14),
75 ('SDiv', 15),
76 ('FDiv', 16),
77 ('URem', 17),
78 ('SRem', 18),
79 ('FRem', 19),
80 ('Shl', 20),
81 ('LShr', 21),
82 ('AShr', 22),
83 ('And', 23),
84 ('Or', 24),
85 ('Xor', 25),
86 ('Alloca', 26),
87 ('Load', 27),
88 ('Store', 28),
89 ('GetElementPtr', 29),
90 ('Trunc', 30),
91 ('ZExt', 31),
92 ('SExt', 32),
93 ('FPToUI', 33),
94 ('FPToSI', 34),
95 ('UIToFP', 35),
96 ('SIToFP', 36),
97 ('FPTrunc', 37),
98 ('FPExt', 38),
99 ('PtrToInt', 39),
100 ('IntToPtr', 40),
101 ('BitCast', 41),
102 ('ICmp', 42),
103 ('FCmpl', 43),
104 ('PHI', 44),
105 ('Call', 45),
106 ('Select', 46),
107 ('UserOp1', 47),
108 ('UserOp2', 48),
109 ('AArg', 49),
110 ('ExtractElement', 50),
111 ('InsertElement', 51),
112 ('ShuffleVector', 52),
113 ('ExtractValue', 53),
114 ('InsertValue', 54),
115 ('Fence', 55),
116 ('AtomicCmpXchg', 56),
117 ('AtomicRMW', 57),
118 ('Resume', 58),
119 ('LandingPad', 59),
122 TypeKinds = [
123 ('Void', 0),
124 ('Half', 1),
125 ('Float', 2),
126 ('Double', 3),
127 ('X86_FP80', 4),
128 ('FP128', 5),
129 ('PPC_FP128', 6),
130 ('Label', 7),
131 ('Integer', 8),
132 ('Function', 9),
133 ('Struct', 10),
134 ('Array', 11),
135 ('Pointer', 12),
136 ('Vector', 13),
137 ('Metadata', 14),
138 ('X86_MMX', 15),
141 Linkages = [
142 ('External', 0),
143 ('AvailableExternally', 1),
144 ('LinkOnceAny', 2),
145 ('LinkOnceODR', 3),
146 ('WeakAny', 4),
147 ('WeakODR', 5),
148 ('Appending', 6),
149 ('Internal', 7),
150 ('Private', 8),
151 ('DLLImport', 9),
152 ('DLLExport', 10),
153 ('ExternalWeak', 11),
154 ('Ghost', 12),
155 ('Common', 13),
156 ('LinkerPrivate', 14),
157 ('LinkerPrivateWeak', 15),
158 ('LinkerPrivateWeakDefAuto', 16),
161 Visibility = [
162 ('Default', 0),
163 ('Hidden', 1),
164 ('Protected', 2),
167 CallConv = [
168 ('CCall', 0),
169 ('FastCall', 8),
170 ('ColdCall', 9),
171 ('X86StdcallCall', 64),
172 ('X86FastcallCall', 65),
175 IntPredicate = [
176 ('EQ', 32),
177 ('NE', 33),
178 ('UGT', 34),
179 ('UGE', 35),
180 ('ULT', 36),
181 ('ULE', 37),
182 ('SGT', 38),
183 ('SGE', 39),
184 ('SLT', 40),
185 ('SLE', 41),
188 RealPredicate = [
189 ('PredicateFalse', 0),
190 ('OEQ', 1),
191 ('OGT', 2),
192 ('OGE', 3),
193 ('OLT', 4),
194 ('OLE', 5),
195 ('ONE', 6),
196 ('ORD', 7),
197 ('UNO', 8),
198 ('UEQ', 9),
199 ('UGT', 10),
200 ('UGE', 11),
201 ('ULT', 12),
202 ('ULE', 13),
203 ('UNE', 14),
204 ('PredicateTrue', 15),
207 LandingPadClauseTy = [
208 ('Catch', 0),
209 ('Filter', 1),