LLVM 23.0.0git
GVNExpression.h
Go to the documentation of this file.
1//===- GVNExpression.h - GVN Expression classes -----------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9/// \file
10///
11/// The header file for the GVN pass that contains expression handling
12/// classes
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_TRANSFORMS_SCALAR_GVNEXPRESSION_H
17#define LLVM_TRANSFORMS_SCALAR_GVNEXPRESSION_H
18
19#include "llvm/ADT/Hashing.h"
22#include "llvm/IR/Constant.h"
24#include "llvm/IR/Value.h"
30#include <algorithm>
31#include <cassert>
32#include <iterator>
33#include <utility>
34
35namespace llvm {
36
37class BasicBlock;
38class Type;
39
40namespace GVNExpression {
41
59
61private:
62 ExpressionType EType;
63 unsigned Opcode;
64 mutable hash_code HashVal = 0;
65
66public:
67 Expression(ExpressionType ET = ET_Base, unsigned O = ~2U)
68 : EType(ET), Opcode(O) {}
69 Expression(const Expression &) = delete;
70 Expression &operator=(const Expression &) = delete;
71 virtual ~Expression();
72
73 static unsigned getEmptyKey() { return ~0U; }
74
75 bool operator!=(const Expression &Other) const { return !(*this == Other); }
76 bool operator==(const Expression &Other) const {
77 if (getOpcode() != Other.getOpcode())
78 return false;
79 if (getOpcode() == getEmptyKey())
80 return true;
81 // Compare the expression type for anything but load and store.
82 // For load and store we set the opcode to zero to make them equal.
84 getExpressionType() != Other.getExpressionType())
85 return false;
86
87 return equals(Other);
88 }
89
91 // It's theoretically possible for a thing to hash to zero. In that case,
92 // we will just compute the hash a few extra times, which is no worse that
93 // we did before, which was to compute it always.
94 if (static_cast<unsigned>(HashVal) == 0)
95 HashVal = getHashValue();
96 return HashVal;
97 }
98
99 virtual bool equals(const Expression &Other) const { return true; }
100
101 // Return true if the two expressions are exactly the same, including the
102 // normally ignored fields.
103 virtual bool exactlyEquals(const Expression &Other) const {
104 return getExpressionType() == Other.getExpressionType() && equals(Other);
105 }
106
107 unsigned getOpcode() const { return Opcode; }
108 void setOpcode(unsigned opcode) { Opcode = opcode; }
109 ExpressionType getExpressionType() const { return EType; }
110
111 // We deliberately leave the expression type out of the hash value.
112 virtual hash_code getHashValue() const { return getOpcode(); }
113
114 // Debugging support
115 virtual void printInternal(raw_ostream &OS, bool PrintEType) const {
116 if (PrintEType)
117 OS << "etype = " << getExpressionType() << ",";
118 OS << "opcode = " << getOpcode() << ", ";
119 }
120
121 void print(raw_ostream &OS) const {
122 OS << "{ ";
123 printInternal(OS, true);
124 OS << "}";
125 }
126
127 LLVM_DUMP_METHOD void dump() const;
128};
129
131 E.print(OS);
132 return OS;
133}
134
136private:
137 using RecyclerType = ArrayRecycler<Value *>;
138 using RecyclerCapacity = RecyclerType::Capacity;
139
140 Value **Operands = nullptr;
141 unsigned MaxOperands;
142 unsigned NumOperands = 0;
143 Type *ValueType = nullptr;
144
145public:
146 BasicExpression(unsigned NumOperands)
147 : BasicExpression(NumOperands, ET_Basic) {}
148 BasicExpression(unsigned NumOperands, ExpressionType ET)
149 : Expression(ET), MaxOperands(NumOperands) {}
150 BasicExpression() = delete;
154
155 static bool classof(const Expression *EB) {
157 return ET > ET_BasicStart && ET < ET_BasicEnd;
158 }
159
160 /// Swap two operands. Used during GVN to put commutative operands in
161 /// order.
162 void swapOperands(unsigned First, unsigned Second) {
163 std::swap(Operands[First], Operands[Second]);
164 }
165
166 Value *getOperand(unsigned N) const {
167 assert(Operands && "Operands not allocated");
168 assert(N < NumOperands && "Operand out of range");
169 return Operands[N];
170 }
171
172 void setOperand(unsigned N, Value *V) {
173 assert(Operands && "Operands not allocated before setting");
174 assert(N < NumOperands && "Operand out of range");
175 Operands[N] = V;
176 }
177
178 unsigned getNumOperands() const { return NumOperands; }
179
180 using op_iterator = Value **;
181 using const_op_iterator = Value *const *;
182
183 op_iterator op_begin() { return Operands; }
184 op_iterator op_end() { return Operands + NumOperands; }
185 const_op_iterator op_begin() const { return Operands; }
186 const_op_iterator op_end() const { return Operands + NumOperands; }
193
194 void op_push_back(Value *Arg) {
195 assert(NumOperands < MaxOperands && "Tried to add too many operands");
196 assert(Operands && "Operandss not allocated before pushing");
197 Operands[NumOperands++] = Arg;
198 }
199 bool op_empty() const { return getNumOperands() == 0; }
200
202 assert(!Operands && "Operands already allocated");
203 Operands = Recycler.allocate(RecyclerCapacity::get(MaxOperands), Allocator);
204 }
205 void deallocateOperands(RecyclerType &Recycler) {
206 Recycler.deallocate(RecyclerCapacity::get(MaxOperands), Operands);
207 }
208
209 void setType(Type *T) { ValueType = T; }
210 Type *getType() const { return ValueType; }
211
212 bool equals(const Expression &Other) const override {
213 if (getOpcode() != Other.getOpcode())
214 return false;
215
216 const auto &OE = cast<BasicExpression>(Other);
217 return getType() == OE.getType() && NumOperands == OE.NumOperands &&
218 std::equal(op_begin(), op_end(), OE.op_begin());
219 }
220
221 hash_code getHashValue() const override {
222 return hash_combine(this->Expression::getHashValue(), ValueType,
224 }
225
226 // Debugging support
227 void printInternal(raw_ostream &OS, bool PrintEType) const override {
228 if (PrintEType)
229 OS << "ExpressionTypeBasic, ";
230
231 this->Expression::printInternal(OS, false);
232 OS << "operands = {";
233 for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
234 OS << "[" << i << "] = ";
235 Operands[i]->printAsOperand(OS);
236 OS << " ";
237 }
238 OS << "} ";
239 }
240};
241
243private:
244 using Container = BasicExpression;
245
246 Container *BE;
247
248public:
249 using iterator_category = std::output_iterator_tag;
250 using value_type = void;
251 using difference_type = void;
252 using pointer = void;
253 using reference = void;
254
255 explicit op_inserter(BasicExpression &E) : BE(&E) {}
256 explicit op_inserter(BasicExpression *E) : BE(E) {}
257
259 BE->op_push_back(val);
260 return *this;
261 }
262 op_inserter &operator*() { return *this; }
263 op_inserter &operator++() { return *this; }
264 op_inserter &operator++(int) { return *this; }
265};
266
268private:
269 const MemoryAccess *MemoryLeader;
270
271public:
272 MemoryExpression(unsigned NumOperands, enum ExpressionType EType,
273 const MemoryAccess *MemoryLeader)
274 : BasicExpression(NumOperands, EType), MemoryLeader(MemoryLeader) {}
278
279 static bool classof(const Expression *EB) {
280 return EB->getExpressionType() > ET_MemoryStart &&
282 }
283
284 hash_code getHashValue() const override {
285 return hash_combine(this->BasicExpression::getHashValue(), MemoryLeader);
286 }
287
288 bool equals(const Expression &Other) const override {
289 if (!this->BasicExpression::equals(Other))
290 return false;
292
293 return MemoryLeader == OtherMCE.MemoryLeader;
294 }
295
296 const MemoryAccess *getMemoryLeader() const { return MemoryLeader; }
297 void setMemoryLeader(const MemoryAccess *ML) { MemoryLeader = ML; }
298};
299
301private:
302 CallInst *Call;
303
304public:
305 CallExpression(unsigned NumOperands, CallInst *C,
306 const MemoryAccess *MemoryLeader)
307 : MemoryExpression(NumOperands, ET_Call, MemoryLeader), Call(C) {}
308 CallExpression() = delete;
311 ~CallExpression() override;
312
313 static bool classof(const Expression *EB) {
314 return EB->getExpressionType() == ET_Call;
315 }
316
317 bool equals(const Expression &Other) const override;
318 bool exactlyEquals(const Expression &Other) const override {
320 cast<CallExpression>(Other).Call == Call;
321 }
322
323 // Debugging support
324 void printInternal(raw_ostream &OS, bool PrintEType) const override {
325 if (PrintEType)
326 OS << "ExpressionTypeCall, ";
327 this->BasicExpression::printInternal(OS, false);
328 OS << " represents call at ";
329 Call->printAsOperand(OS);
330 }
331};
332
334private:
335 LoadInst *Load;
336
337public:
338 LoadExpression(unsigned NumOperands, LoadInst *L,
339 const MemoryAccess *MemoryLeader)
340 : LoadExpression(ET_Load, NumOperands, L, MemoryLeader) {}
341
342 LoadExpression(enum ExpressionType EType, unsigned NumOperands, LoadInst *L,
343 const MemoryAccess *MemoryLeader)
344 : MemoryExpression(NumOperands, EType, MemoryLeader), Load(L) {}
345
346 LoadExpression() = delete;
349 ~LoadExpression() override;
350
351 static bool classof(const Expression *EB) {
352 return EB->getExpressionType() == ET_Load;
353 }
354
355 LoadInst *getLoadInst() const { return Load; }
356 void setLoadInst(LoadInst *L) { Load = L; }
357
358 bool equals(const Expression &Other) const override;
359 bool exactlyEquals(const Expression &Other) const override {
361 cast<LoadExpression>(Other).getLoadInst() == getLoadInst();
362 }
363
364 // Debugging support
365 void printInternal(raw_ostream &OS, bool PrintEType) const override {
366 if (PrintEType)
367 OS << "ExpressionTypeLoad, ";
368 this->BasicExpression::printInternal(OS, false);
369 OS << " represents Load at ";
370 Load->printAsOperand(OS);
371 OS << " with MemoryLeader " << *getMemoryLeader();
372 }
373};
374
376private:
377 StoreInst *Store;
378 Value *StoredValue;
379
380public:
381 StoreExpression(unsigned NumOperands, StoreInst *S, Value *StoredValue,
382 const MemoryAccess *MemoryLeader)
383 : MemoryExpression(NumOperands, ET_Store, MemoryLeader), Store(S),
384 StoredValue(StoredValue) {}
385 StoreExpression() = delete;
389
390 static bool classof(const Expression *EB) {
391 return EB->getExpressionType() == ET_Store;
392 }
393
394 StoreInst *getStoreInst() const { return Store; }
395 Value *getStoredValue() const { return StoredValue; }
396
397 bool equals(const Expression &Other) const override;
398
399 bool exactlyEquals(const Expression &Other) const override {
401 cast<StoreExpression>(Other).getStoreInst() == getStoreInst();
402 }
403
404 // Debugging support
405 void printInternal(raw_ostream &OS, bool PrintEType) const override {
406 if (PrintEType)
407 OS << "ExpressionTypeStore, ";
408 this->BasicExpression::printInternal(OS, false);
409 OS << " represents Store " << *Store;
410 OS << " with StoredValue ";
411 StoredValue->printAsOperand(OS);
412 OS << " and MemoryLeader " << *getMemoryLeader();
413 }
414};
415
417private:
418 unsigned MaxIntOperands;
419 unsigned NumIntOperands = 0;
420 unsigned *IntOperands = nullptr;
421
422public:
423 AggregateValueExpression(unsigned NumOperands, unsigned NumIntOperands)
424 : BasicExpression(NumOperands, ET_AggregateValue),
425 MaxIntOperands(NumIntOperands) {}
431
432 static bool classof(const Expression *EB) {
433 return EB->getExpressionType() == ET_AggregateValue;
434 }
435
436 using int_arg_iterator = unsigned *;
437 using const_int_arg_iterator = const unsigned *;
438
439 int_arg_iterator int_op_begin() { return IntOperands; }
440 int_arg_iterator int_op_end() { return IntOperands + NumIntOperands; }
441 const_int_arg_iterator int_op_begin() const { return IntOperands; }
443 return IntOperands + NumIntOperands;
444 }
445 unsigned int_op_size() const { return NumIntOperands; }
446 bool int_op_empty() const { return NumIntOperands == 0; }
447 void int_op_push_back(unsigned IntOperand) {
448 assert(NumIntOperands < MaxIntOperands &&
449 "Tried to add too many int operands");
450 assert(IntOperands && "Operands not allocated before pushing");
451 IntOperands[NumIntOperands++] = IntOperand;
452 }
453
455 assert(!IntOperands && "Operands already allocated");
456 IntOperands = Allocator.Allocate<unsigned>(MaxIntOperands);
457 }
458
459 bool equals(const Expression &Other) const override {
460 if (!this->BasicExpression::equals(Other))
461 return false;
463 return NumIntOperands == OE.NumIntOperands &&
464 std::equal(int_op_begin(), int_op_end(), OE.int_op_begin());
465 }
466
471
472 // Debugging support
473 void printInternal(raw_ostream &OS, bool PrintEType) const override {
474 if (PrintEType)
475 OS << "ExpressionTypeAggregateValue, ";
476 this->BasicExpression::printInternal(OS, false);
477 OS << ", intoperands = {";
478 for (unsigned i = 0, e = int_op_size(); i != e; ++i) {
479 OS << "[" << i << "] = " << IntOperands[i] << " ";
480 }
481 OS << "}";
482 }
483};
484
486private:
487 using Container = AggregateValueExpression;
488
489 Container *AVE;
490
491public:
492 using iterator_category = std::output_iterator_tag;
493 using value_type = void;
494 using difference_type = void;
495 using pointer = void;
496 using reference = void;
497
500
501 int_op_inserter &operator=(unsigned int val) {
502 AVE->int_op_push_back(val);
503 return *this;
504 }
505 int_op_inserter &operator*() { return *this; }
506 int_op_inserter &operator++() { return *this; }
507 int_op_inserter &operator++(int) { return *this; }
508};
509
511private:
512 BasicBlock *BB;
513
514public:
515 PHIExpression(unsigned NumOperands, BasicBlock *B)
516 : BasicExpression(NumOperands, ET_Phi), BB(B) {}
517 PHIExpression() = delete;
518 PHIExpression(const PHIExpression &) = delete;
520 ~PHIExpression() override;
521
522 static bool classof(const Expression *EB) {
523 return EB->getExpressionType() == ET_Phi;
524 }
525
526 bool equals(const Expression &Other) const override {
527 if (!this->BasicExpression::equals(Other))
528 return false;
530 return BB == OE.BB;
531 }
532
533 hash_code getHashValue() const override {
535 }
536
537 // Debugging support
538 void printInternal(raw_ostream &OS, bool PrintEType) const override {
539 if (PrintEType)
540 OS << "ExpressionTypePhi, ";
541 this->BasicExpression::printInternal(OS, false);
542 OS << "bb = " << BB;
543 }
544};
545
546class DeadExpression final : public Expression {
547public:
551
552 static bool classof(const Expression *E) {
553 return E->getExpressionType() == ET_Dead;
554 }
555};
556
557class VariableExpression final : public Expression {
558private:
559 Value *VariableValue;
560
561public:
562 VariableExpression(Value *V) : Expression(ET_Variable), VariableValue(V) {}
566
567 static bool classof(const Expression *EB) {
568 return EB->getExpressionType() == ET_Variable;
569 }
570
571 Value *getVariableValue() const { return VariableValue; }
572 void setVariableValue(Value *V) { VariableValue = V; }
573
574 bool equals(const Expression &Other) const override {
576 return VariableValue == OC.VariableValue;
577 }
578
579 hash_code getHashValue() const override {
581 VariableValue->getType(), VariableValue);
582 }
583
584 // Debugging support
585 void printInternal(raw_ostream &OS, bool PrintEType) const override {
586 if (PrintEType)
587 OS << "ExpressionTypeVariable, ";
588 this->Expression::printInternal(OS, false);
589 OS << " variable = " << *VariableValue;
590 }
591};
592
593class ConstantExpression final : public Expression {
594private:
595 Constant *ConstantValue = nullptr;
596
597public:
600 : Expression(ET_Constant), ConstantValue(constantValue) {}
603
604 static bool classof(const Expression *EB) {
605 return EB->getExpressionType() == ET_Constant;
606 }
607
608 Constant *getConstantValue() const { return ConstantValue; }
609 void setConstantValue(Constant *V) { ConstantValue = V; }
610
611 bool equals(const Expression &Other) const override {
613 return ConstantValue == OC.ConstantValue;
614 }
615
616 hash_code getHashValue() const override {
618 ConstantValue->getType(), ConstantValue);
619 }
620
621 // Debugging support
622 void printInternal(raw_ostream &OS, bool PrintEType) const override {
623 if (PrintEType)
624 OS << "ExpressionTypeConstant, ";
625 this->Expression::printInternal(OS, false);
626 OS << " constant = " << *ConstantValue;
627 }
628};
629
630class UnknownExpression final : public Expression {
631private:
632 Instruction *Inst;
633
634public:
639
640 static bool classof(const Expression *EB) {
641 return EB->getExpressionType() == ET_Unknown;
642 }
643
644 Instruction *getInstruction() const { return Inst; }
645 void setInstruction(Instruction *I) { Inst = I; }
646
647 bool equals(const Expression &Other) const override {
648 const auto &OU = cast<UnknownExpression>(Other);
649 return Inst == OU.Inst;
650 }
651
652 hash_code getHashValue() const override {
653 return hash_combine(this->Expression::getHashValue(), Inst);
654 }
655
656 // Debugging support
657 void printInternal(raw_ostream &OS, bool PrintEType) const override {
658 if (PrintEType)
659 OS << "ExpressionTypeUnknown, ";
660 this->Expression::printInternal(OS, false);
661 OS << " inst = " << *Inst;
662 }
663};
664
665} // end namespace GVNExpression
666
667} // end namespace llvm
668
669#endif // LLVM_TRANSFORMS_SCALAR_GVNEXPRESSION_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_ABI
Definition Compiler.h:213
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Definition Compiler.h:661
static Value * getOpcode(Value &V, Type &Ty, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
#define I(x, y, z)
Definition MD5.cpp:57
This file exposes an interface to building/using memory SSA to walk memory instructions using a use/d...
#define T
Basic Register Allocator
static SymbolRef::Type getType(const Symbol *Sym)
Definition TapiFile.cpp:39
Recycle small arrays allocated from a BumpPtrAllocator.
LLVM Basic Block Representation.
Definition BasicBlock.h:62
This class represents a function call, abstracting a target machine's calling convention.
This is an important base class in LLVM.
Definition Constant.h:43
static bool classof(const Expression *EB)
AggregateValueExpression(const AggregateValueExpression &)=delete
bool equals(const Expression &Other) const override
void printInternal(raw_ostream &OS, bool PrintEType) const override
AggregateValueExpression(unsigned NumOperands, unsigned NumIntOperands)
void allocateIntOperands(BumpPtrAllocator &Allocator)
const_int_arg_iterator int_op_begin() const
AggregateValueExpression & operator=(const AggregateValueExpression &)=delete
const_int_arg_iterator int_op_end() const
BasicExpression(unsigned NumOperands)
void allocateOperands(RecyclerType &Recycler, BumpPtrAllocator &Allocator)
iterator_range< const_op_iterator > operands() const
const_op_iterator op_begin() const
bool equals(const Expression &Other) const override
const_op_iterator op_end() const
BasicExpression(unsigned NumOperands, ExpressionType ET)
BasicExpression & operator=(const BasicExpression &)=delete
hash_code getHashValue() const override
void deallocateOperands(RecyclerType &Recycler)
iterator_range< op_iterator > operands()
void setOperand(unsigned N, Value *V)
void swapOperands(unsigned First, unsigned Second)
Swap two operands.
BasicExpression(const BasicExpression &)=delete
static bool classof(const Expression *EB)
Value * getOperand(unsigned N) const
void printInternal(raw_ostream &OS, bool PrintEType) const override
CallExpression(const CallExpression &)=delete
CallExpression & operator=(const CallExpression &)=delete
void printInternal(raw_ostream &OS, bool PrintEType) const override
static bool classof(const Expression *EB)
CallExpression(unsigned NumOperands, CallInst *C, const MemoryAccess *MemoryLeader)
bool exactlyEquals(const Expression &Other) const override
hash_code getHashValue() const override
void printInternal(raw_ostream &OS, bool PrintEType) const override
static bool classof(const Expression *EB)
ConstantExpression & operator=(const ConstantExpression &)=delete
ConstantExpression(const ConstantExpression &)=delete
bool equals(const Expression &Other) const override
ConstantExpression(Constant *constantValue)
static bool classof(const Expression *E)
DeadExpression(const DeadExpression &)=delete
DeadExpression & operator=(const DeadExpression &)=delete
bool operator==(const Expression &Other) const
virtual hash_code getHashValue() const
Expression & operator=(const Expression &)=delete
virtual bool exactlyEquals(const Expression &Other) const
Expression(const Expression &)=delete
Expression(ExpressionType ET=ET_Base, unsigned O=~2U)
bool operator!=(const Expression &Other) const
ExpressionType getExpressionType() const
virtual void printInternal(raw_ostream &OS, bool PrintEType) const
hash_code getComputedHash() const
virtual bool equals(const Expression &Other) const
void setOpcode(unsigned opcode)
void print(raw_ostream &OS) const
LoadExpression(const LoadExpression &)=delete
LoadExpression(enum ExpressionType EType, unsigned NumOperands, LoadInst *L, const MemoryAccess *MemoryLeader)
static bool classof(const Expression *EB)
LoadExpression & operator=(const LoadExpression &)=delete
void printInternal(raw_ostream &OS, bool PrintEType) const override
bool exactlyEquals(const Expression &Other) const override
LoadExpression(unsigned NumOperands, LoadInst *L, const MemoryAccess *MemoryLeader)
void setMemoryLeader(const MemoryAccess *ML)
static bool classof(const Expression *EB)
hash_code getHashValue() const override
MemoryExpression & operator=(const MemoryExpression &)=delete
MemoryExpression(const MemoryExpression &)=delete
MemoryExpression(unsigned NumOperands, enum ExpressionType EType, const MemoryAccess *MemoryLeader)
bool equals(const Expression &Other) const override
const MemoryAccess * getMemoryLeader() const
PHIExpression(const PHIExpression &)=delete
bool equals(const Expression &Other) const override
PHIExpression & operator=(const PHIExpression &)=delete
PHIExpression(unsigned NumOperands, BasicBlock *B)
void printInternal(raw_ostream &OS, bool PrintEType) const override
hash_code getHashValue() const override
static bool classof(const Expression *EB)
StoreExpression(unsigned NumOperands, StoreInst *S, Value *StoredValue, const MemoryAccess *MemoryLeader)
StoreExpression(const StoreExpression &)=delete
bool exactlyEquals(const Expression &Other) const override
StoreExpression & operator=(const StoreExpression &)=delete
static bool classof(const Expression *EB)
void printInternal(raw_ostream &OS, bool PrintEType) const override
hash_code getHashValue() const override
UnknownExpression(const UnknownExpression &)=delete
bool equals(const Expression &Other) const override
static bool classof(const Expression *EB)
UnknownExpression & operator=(const UnknownExpression &)=delete
void printInternal(raw_ostream &OS, bool PrintEType) const override
VariableExpression & operator=(const VariableExpression &)=delete
bool equals(const Expression &Other) const override
static bool classof(const Expression *EB)
VariableExpression(const VariableExpression &)=delete
void printInternal(raw_ostream &OS, bool PrintEType) const override
hash_code getHashValue() const override
int_op_inserter & operator=(unsigned int val)
std::output_iterator_tag iterator_category
int_op_inserter(AggregateValueExpression &E)
int_op_inserter(AggregateValueExpression *E)
std::output_iterator_tag iterator_category
op_inserter & operator=(Value *val)
An instruction for reading from memory.
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated ...
Definition Recycler.h:37
An instruction for storing to memory.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
LLVM Value Representation.
Definition Value.h:75
An opaque object representing a hash code.
Definition Hashing.h:78
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
@ C
The default llvm calling convention, compatible with C.
Definition CallingConv.h:34
raw_ostream & operator<<(raw_ostream &OS, const Expression &E)
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
@ Other
Any other memory.
Definition ModRef.h:68
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
Definition ModRef.h:74
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
Definition Hashing.h:325
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:383
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
Definition Hashing.h:305
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Definition BitVector.h:863
#define N