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 bool operator!=(const Expression &Other) const { return !(*this == Other); }
74 bool operator==(const Expression &Other) const {
75 if (getOpcode() != Other.getOpcode())
76 return false;
77 // Compare the expression type for anything but load and store.
78 // For load and store we set the opcode to zero to make them equal.
80 getExpressionType() != Other.getExpressionType())
81 return false;
82
83 return equals(Other);
84 }
85
87 // It's theoretically possible for a thing to hash to zero. In that case,
88 // we will just compute the hash a few extra times, which is no worse that
89 // we did before, which was to compute it always.
90 if (static_cast<unsigned>(HashVal) == 0)
91 HashVal = getHashValue();
92 return HashVal;
93 }
94
95 virtual bool equals(const Expression &Other) const { return true; }
96
97 // Return true if the two expressions are exactly the same, including the
98 // normally ignored fields.
99 virtual bool exactlyEquals(const Expression &Other) const {
100 return getExpressionType() == Other.getExpressionType() && equals(Other);
101 }
102
103 unsigned getOpcode() const { return Opcode; }
104 void setOpcode(unsigned opcode) { Opcode = opcode; }
105 ExpressionType getExpressionType() const { return EType; }
106
107 // We deliberately leave the expression type out of the hash value.
108 virtual hash_code getHashValue() const { return getOpcode(); }
109
110 // Debugging support
111 virtual void printInternal(raw_ostream &OS, bool PrintEType) const {
112 if (PrintEType)
113 OS << "etype = " << getExpressionType() << ",";
114 OS << "opcode = " << getOpcode() << ", ";
115 }
116
117 void print(raw_ostream &OS) const {
118 OS << "{ ";
119 printInternal(OS, true);
120 OS << "}";
121 }
122
123 LLVM_DUMP_METHOD void dump() const;
124};
125
127 E.print(OS);
128 return OS;
129}
130
132private:
133 using RecyclerType = ArrayRecycler<Value *>;
134 using RecyclerCapacity = RecyclerType::Capacity;
135
136 Value **Operands = nullptr;
137 unsigned MaxOperands;
138 unsigned NumOperands = 0;
139 Type *ValueType = nullptr;
140
141public:
142 BasicExpression(unsigned NumOperands)
143 : BasicExpression(NumOperands, ET_Basic) {}
144 BasicExpression(unsigned NumOperands, ExpressionType ET)
145 : Expression(ET), MaxOperands(NumOperands) {}
146 BasicExpression() = delete;
150
151 static bool classof(const Expression *EB) {
153 return ET > ET_BasicStart && ET < ET_BasicEnd;
154 }
155
156 /// Swap two operands. Used during GVN to put commutative operands in
157 /// order.
158 void swapOperands(unsigned First, unsigned Second) {
159 std::swap(Operands[First], Operands[Second]);
160 }
161
162 Value *getOperand(unsigned N) const {
163 assert(Operands && "Operands not allocated");
164 assert(N < NumOperands && "Operand out of range");
165 return Operands[N];
166 }
167
168 void setOperand(unsigned N, Value *V) {
169 assert(Operands && "Operands not allocated before setting");
170 assert(N < NumOperands && "Operand out of range");
171 Operands[N] = V;
172 }
173
174 unsigned getNumOperands() const { return NumOperands; }
175
176 using op_iterator = Value **;
177 using const_op_iterator = Value *const *;
178
179 op_iterator op_begin() { return Operands; }
180 op_iterator op_end() { return Operands + NumOperands; }
181 const_op_iterator op_begin() const { return Operands; }
182 const_op_iterator op_end() const { return Operands + NumOperands; }
189
190 void op_push_back(Value *Arg) {
191 assert(NumOperands < MaxOperands && "Tried to add too many operands");
192 assert(Operands && "Operandss not allocated before pushing");
193 Operands[NumOperands++] = Arg;
194 }
195 bool op_empty() const { return getNumOperands() == 0; }
196
198 assert(!Operands && "Operands already allocated");
199 Operands = Recycler.allocate(RecyclerCapacity::get(MaxOperands), Allocator);
200 }
201 void deallocateOperands(RecyclerType &Recycler) {
202 Recycler.deallocate(RecyclerCapacity::get(MaxOperands), Operands);
203 }
204
205 void setType(Type *T) { ValueType = T; }
206 Type *getType() const { return ValueType; }
207
208 bool equals(const Expression &Other) const override {
209 if (getOpcode() != Other.getOpcode())
210 return false;
211
212 const auto &OE = cast<BasicExpression>(Other);
213 return getType() == OE.getType() && NumOperands == OE.NumOperands &&
214 std::equal(op_begin(), op_end(), OE.op_begin());
215 }
216
217 hash_code getHashValue() const override {
218 return hash_combine(this->Expression::getHashValue(), ValueType,
220 }
221
222 // Debugging support
223 void printInternal(raw_ostream &OS, bool PrintEType) const override {
224 if (PrintEType)
225 OS << "ExpressionTypeBasic, ";
226
227 this->Expression::printInternal(OS, false);
228 OS << "operands = {";
229 for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
230 OS << "[" << i << "] = ";
231 Operands[i]->printAsOperand(OS);
232 OS << " ";
233 }
234 OS << "} ";
235 }
236};
237
239private:
240 using Container = BasicExpression;
241
242 Container *BE;
243
244public:
245 using iterator_category = std::output_iterator_tag;
246 using value_type = void;
247 using difference_type = void;
248 using pointer = void;
249 using reference = void;
250
251 explicit op_inserter(BasicExpression &E) : BE(&E) {}
252 explicit op_inserter(BasicExpression *E) : BE(E) {}
253
255 BE->op_push_back(val);
256 return *this;
257 }
258 op_inserter &operator*() { return *this; }
259 op_inserter &operator++() { return *this; }
260 op_inserter &operator++(int) { return *this; }
261};
262
264private:
265 const MemoryAccess *MemoryLeader;
266
267public:
268 MemoryExpression(unsigned NumOperands, enum ExpressionType EType,
269 const MemoryAccess *MemoryLeader)
270 : BasicExpression(NumOperands, EType), MemoryLeader(MemoryLeader) {}
274
275 static bool classof(const Expression *EB) {
276 return EB->getExpressionType() > ET_MemoryStart &&
278 }
279
280 hash_code getHashValue() const override {
281 return hash_combine(this->BasicExpression::getHashValue(), MemoryLeader);
282 }
283
284 bool equals(const Expression &Other) const override {
285 if (!this->BasicExpression::equals(Other))
286 return false;
288
289 return MemoryLeader == OtherMCE.MemoryLeader;
290 }
291
292 const MemoryAccess *getMemoryLeader() const { return MemoryLeader; }
293 void setMemoryLeader(const MemoryAccess *ML) { MemoryLeader = ML; }
294};
295
297private:
298 CallInst *Call;
299
300public:
301 CallExpression(unsigned NumOperands, CallInst *C,
302 const MemoryAccess *MemoryLeader)
303 : MemoryExpression(NumOperands, ET_Call, MemoryLeader), Call(C) {}
304 CallExpression() = delete;
307 ~CallExpression() override;
308
309 static bool classof(const Expression *EB) {
310 return EB->getExpressionType() == ET_Call;
311 }
312
313 bool equals(const Expression &Other) const override;
314 bool exactlyEquals(const Expression &Other) const override {
316 cast<CallExpression>(Other).Call == Call;
317 }
318
319 // Debugging support
320 void printInternal(raw_ostream &OS, bool PrintEType) const override {
321 if (PrintEType)
322 OS << "ExpressionTypeCall, ";
323 this->BasicExpression::printInternal(OS, false);
324 OS << " represents call at ";
325 Call->printAsOperand(OS);
326 }
327};
328
330private:
331 LoadInst *Load;
332
333public:
334 LoadExpression(unsigned NumOperands, LoadInst *L,
335 const MemoryAccess *MemoryLeader)
336 : LoadExpression(ET_Load, NumOperands, L, MemoryLeader) {}
337
338 LoadExpression(enum ExpressionType EType, unsigned NumOperands, LoadInst *L,
339 const MemoryAccess *MemoryLeader)
340 : MemoryExpression(NumOperands, EType, MemoryLeader), Load(L) {}
341
342 LoadExpression() = delete;
345 ~LoadExpression() override;
346
347 static bool classof(const Expression *EB) {
348 return EB->getExpressionType() == ET_Load;
349 }
350
351 LoadInst *getLoadInst() const { return Load; }
352 void setLoadInst(LoadInst *L) { Load = L; }
353
354 bool equals(const Expression &Other) const override;
355 bool exactlyEquals(const Expression &Other) const override {
357 cast<LoadExpression>(Other).getLoadInst() == getLoadInst();
358 }
359
360 // Debugging support
361 void printInternal(raw_ostream &OS, bool PrintEType) const override {
362 if (PrintEType)
363 OS << "ExpressionTypeLoad, ";
364 this->BasicExpression::printInternal(OS, false);
365 OS << " represents Load at ";
366 Load->printAsOperand(OS);
367 OS << " with MemoryLeader " << *getMemoryLeader();
368 }
369};
370
372private:
373 StoreInst *Store;
374 Value *StoredValue;
375
376public:
377 StoreExpression(unsigned NumOperands, StoreInst *S, Value *StoredValue,
378 const MemoryAccess *MemoryLeader)
379 : MemoryExpression(NumOperands, ET_Store, MemoryLeader), Store(S),
380 StoredValue(StoredValue) {}
381 StoreExpression() = delete;
385
386 static bool classof(const Expression *EB) {
387 return EB->getExpressionType() == ET_Store;
388 }
389
390 StoreInst *getStoreInst() const { return Store; }
391 Value *getStoredValue() const { return StoredValue; }
392
393 bool equals(const Expression &Other) const override;
394
395 bool exactlyEquals(const Expression &Other) const override {
397 cast<StoreExpression>(Other).getStoreInst() == getStoreInst();
398 }
399
400 // Debugging support
401 void printInternal(raw_ostream &OS, bool PrintEType) const override {
402 if (PrintEType)
403 OS << "ExpressionTypeStore, ";
404 this->BasicExpression::printInternal(OS, false);
405 OS << " represents Store " << *Store;
406 OS << " with StoredValue ";
407 StoredValue->printAsOperand(OS);
408 OS << " and MemoryLeader " << *getMemoryLeader();
409 }
410};
411
413private:
414 unsigned MaxIntOperands;
415 unsigned NumIntOperands = 0;
416 unsigned *IntOperands = nullptr;
417
418public:
419 AggregateValueExpression(unsigned NumOperands, unsigned NumIntOperands)
420 : BasicExpression(NumOperands, ET_AggregateValue),
421 MaxIntOperands(NumIntOperands) {}
427
428 static bool classof(const Expression *EB) {
429 return EB->getExpressionType() == ET_AggregateValue;
430 }
431
432 using int_arg_iterator = unsigned *;
433 using const_int_arg_iterator = const unsigned *;
434
435 int_arg_iterator int_op_begin() { return IntOperands; }
436 int_arg_iterator int_op_end() { return IntOperands + NumIntOperands; }
437 const_int_arg_iterator int_op_begin() const { return IntOperands; }
439 return IntOperands + NumIntOperands;
440 }
441 unsigned int_op_size() const { return NumIntOperands; }
442 bool int_op_empty() const { return NumIntOperands == 0; }
443 void int_op_push_back(unsigned IntOperand) {
444 assert(NumIntOperands < MaxIntOperands &&
445 "Tried to add too many int operands");
446 assert(IntOperands && "Operands not allocated before pushing");
447 IntOperands[NumIntOperands++] = IntOperand;
448 }
449
451 assert(!IntOperands && "Operands already allocated");
452 IntOperands = Allocator.Allocate<unsigned>(MaxIntOperands);
453 }
454
455 bool equals(const Expression &Other) const override {
456 if (!this->BasicExpression::equals(Other))
457 return false;
459 return NumIntOperands == OE.NumIntOperands &&
460 std::equal(int_op_begin(), int_op_end(), OE.int_op_begin());
461 }
462
467
468 // Debugging support
469 void printInternal(raw_ostream &OS, bool PrintEType) const override {
470 if (PrintEType)
471 OS << "ExpressionTypeAggregateValue, ";
472 this->BasicExpression::printInternal(OS, false);
473 OS << ", intoperands = {";
474 for (unsigned i = 0, e = int_op_size(); i != e; ++i) {
475 OS << "[" << i << "] = " << IntOperands[i] << " ";
476 }
477 OS << "}";
478 }
479};
480
482private:
483 using Container = AggregateValueExpression;
484
485 Container *AVE;
486
487public:
488 using iterator_category = std::output_iterator_tag;
489 using value_type = void;
490 using difference_type = void;
491 using pointer = void;
492 using reference = void;
493
496
497 int_op_inserter &operator=(unsigned int val) {
498 AVE->int_op_push_back(val);
499 return *this;
500 }
501 int_op_inserter &operator*() { return *this; }
502 int_op_inserter &operator++() { return *this; }
503 int_op_inserter &operator++(int) { return *this; }
504};
505
507private:
508 BasicBlock *BB;
509
510public:
511 PHIExpression(unsigned NumOperands, BasicBlock *B)
512 : BasicExpression(NumOperands, ET_Phi), BB(B) {}
513 PHIExpression() = delete;
514 PHIExpression(const PHIExpression &) = delete;
516 ~PHIExpression() override;
517
518 static bool classof(const Expression *EB) {
519 return EB->getExpressionType() == ET_Phi;
520 }
521
522 bool equals(const Expression &Other) const override {
523 if (!this->BasicExpression::equals(Other))
524 return false;
526 return BB == OE.BB;
527 }
528
529 hash_code getHashValue() const override {
531 }
532
533 // Debugging support
534 void printInternal(raw_ostream &OS, bool PrintEType) const override {
535 if (PrintEType)
536 OS << "ExpressionTypePhi, ";
537 this->BasicExpression::printInternal(OS, false);
538 OS << "bb = " << BB;
539 }
540};
541
542class DeadExpression final : public Expression {
543public:
547
548 static bool classof(const Expression *E) {
549 return E->getExpressionType() == ET_Dead;
550 }
551};
552
553class VariableExpression final : public Expression {
554private:
555 Value *VariableValue;
556
557public:
558 VariableExpression(Value *V) : Expression(ET_Variable), VariableValue(V) {}
562
563 static bool classof(const Expression *EB) {
564 return EB->getExpressionType() == ET_Variable;
565 }
566
567 Value *getVariableValue() const { return VariableValue; }
568 void setVariableValue(Value *V) { VariableValue = V; }
569
570 bool equals(const Expression &Other) const override {
572 return VariableValue == OC.VariableValue;
573 }
574
575 hash_code getHashValue() const override {
577 VariableValue->getType(), VariableValue);
578 }
579
580 // Debugging support
581 void printInternal(raw_ostream &OS, bool PrintEType) const override {
582 if (PrintEType)
583 OS << "ExpressionTypeVariable, ";
584 this->Expression::printInternal(OS, false);
585 OS << " variable = " << *VariableValue;
586 }
587};
588
589class ConstantExpression final : public Expression {
590private:
591 Constant *ConstantValue = nullptr;
592
593public:
596 : Expression(ET_Constant), ConstantValue(constantValue) {}
599
600 static bool classof(const Expression *EB) {
601 return EB->getExpressionType() == ET_Constant;
602 }
603
604 Constant *getConstantValue() const { return ConstantValue; }
605 void setConstantValue(Constant *V) { ConstantValue = V; }
606
607 bool equals(const Expression &Other) const override {
609 return ConstantValue == OC.ConstantValue;
610 }
611
612 hash_code getHashValue() const override {
614 ConstantValue->getType(), ConstantValue);
615 }
616
617 // Debugging support
618 void printInternal(raw_ostream &OS, bool PrintEType) const override {
619 if (PrintEType)
620 OS << "ExpressionTypeConstant, ";
621 this->Expression::printInternal(OS, false);
622 OS << " constant = " << *ConstantValue;
623 }
624};
625
626class UnknownExpression final : public Expression {
627private:
628 Instruction *Inst;
629
630public:
635
636 static bool classof(const Expression *EB) {
637 return EB->getExpressionType() == ET_Unknown;
638 }
639
640 Instruction *getInstruction() const { return Inst; }
641 void setInstruction(Instruction *I) { Inst = I; }
642
643 bool equals(const Expression &Other) const override {
644 const auto &OU = cast<UnknownExpression>(Other);
645 return Inst == OU.Inst;
646 }
647
648 hash_code getHashValue() const override {
649 return hash_combine(this->Expression::getHashValue(), Inst);
650 }
651
652 // Debugging support
653 void printInternal(raw_ostream &OS, bool PrintEType) const override {
654 if (PrintEType)
655 OS << "ExpressionTypeUnknown, ";
656 this->Expression::printInternal(OS, false);
657 OS << " inst = " << *Inst;
658 }
659};
660
661} // end namespace GVNExpression
662
663} // end namespace llvm
664
665#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:77
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:305
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:285
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Definition BitVector.h:862
#define N