LLVM: include/llvm/Transforms/IPO/LowerTypeTests.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_TRANSFORMS_IPO_LOWERTYPETESTS_H
15#define LLVM_TRANSFORMS_IPO_LOWERTYPETESTS_H
16
20#include
21#include
22#include
23#include
24#include
25
26namespace llvm {
27
31
33
35
37
38
40
41
43
44
45
46
48
50 return Bits.size() == 1;
51 }
52
56
58
60};
61
64 uint64_t Min = std::numeric_limits<uint64_t>::max();
66
69 auto [MinIt, MaxIt] = std::minmax_element(Offsets.begin(), Offsets.end());
70 Min = *MinIt;
71 Max = *MaxIt;
72 }
73 }
74
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
125
126
127 std::vector<std::vector<uint64_t>> Fragments;
128
129
131
134
135
136
137
139};
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
173
175
177
178
180
184
185
186
187
188
189
192};
193
195
196
202
203}
204
206 bool UseCommandLine = false;
207
212
213public:
219 : ExportSummary(ExportSummary), ImportSummary(ImportSummary),
220 DropTypeTests(DropTypeTests) {}
222};
223
228
229}
230
231#endif
This header defines various interfaces for pass management in LLVM.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
LowerTypeTestsPass()
Definition LowerTypeTests.h:214
LowerTypeTestsPass(ModuleSummaryIndex *ExportSummary, const ModuleSummaryIndex *ImportSummary, lowertypetests::DropTestKind DropTypeTests=lowertypetests::DropTestKind::None)
Definition LowerTypeTests.h:215
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Class to hold module path string table and global value map, and encapsulate methods for operating on...
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
Definition LowerTypeTests.h:224
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition LowerTypeTests.h:32
DropTestKind
Specifies how to drop type tests.
Definition LowerTypeTests.h:197
@ Assume
Do not drop type tests (default).
Definition LowerTypeTests.h:199
@ None
Definition LowerTypeTests.h:198
@ All
Drop only llvm.assumes using type test value.
Definition LowerTypeTests.h:200
LLVM_ABI bool isJumpTableCanonical(Function *F)
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
A CRTP mix-in to automatically provide informational APIs needed for passes.
uint64_t Max
Definition LowerTypeTests.h:65
uint64_t Min
Definition LowerTypeTests.h:64
LLVM_ABI BitSetInfo build()
SmallVector< uint64_t, 16 > Offsets
Definition LowerTypeTests.h:63
BitSetBuilder(ArrayRef< uint64_t > Offsets)
Definition LowerTypeTests.h:67
Definition LowerTypeTests.h:34
LLVM_ABI bool containsGlobalOffset(uint64_t Offset) const
LLVM_ABI void print(raw_ostream &OS) const
unsigned AlignLog2
Definition LowerTypeTests.h:47
uint64_t ByteOffset
Definition LowerTypeTests.h:39
std::set< uint64_t > Bits
Definition LowerTypeTests.h:36
bool isSingleOffset() const
Definition LowerTypeTests.h:49
uint64_t BitSize
Definition LowerTypeTests.h:42
bool isAllOnes() const
Definition LowerTypeTests.h:53
@ BitsPerByte
Definition LowerTypeTests.h:176
uint64_t BitAllocs[BitsPerByte]
The number of bytes allocated so far for each of the bits.
Definition LowerTypeTests.h:179
ByteArrayBuilder()
Definition LowerTypeTests.h:181
std::vector< uint8_t > Bytes
The byte array built so far.
Definition LowerTypeTests.h:174
LLVM_ABI void allocate(const std::set< uint64_t > &Bits, uint64_t BitSize, uint64_t &AllocByteOffset, uint8_t &AllocMask)
Allocate BitSize bits in the byte array where Bits contains the bits to set.
GlobalLayoutBuilder(uint64_t NumObjects)
Definition LowerTypeTests.h:132
std::vector< std::vector< uint64_t > > Fragments
The computed layout.
Definition LowerTypeTests.h:127
LLVM_ABI void addFragment(const std::set< uint64_t > &F)
Add F to the layout while trying to keep its indices contiguous.
std::vector< uint64_t > FragmentMap
Mapping from object index to fragment index.
Definition LowerTypeTests.h:130