LLVM 23.0.0git
DependencyGraph.h
Go to the documentation of this file.
1//===- DependencyGraph.h ----------------------------------------*- 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// This file declares the dependency graph used by the vectorizer's instruction
10// scheduler.
11//
12// The nodes of the graph are objects of the `DGNode` class. Each `DGNode`
13// object points to an instruction.
14// The edges between `DGNode`s are implicitly defined by an ordered set of
15// predecessor nodes, to save memory.
16// Finally the whole dependency graph is an object of the `DependencyGraph`
17// class, which also provides the API for creating/extending the graph from
18// input Sandbox IR.
19//
20//===----------------------------------------------------------------------===//
21
22#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_DEPENDENCYGRAPH_H
23#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_DEPENDENCYGRAPH_H
24
25#include "llvm/ADT/DenseMap.h"
32
33namespace llvm::sandboxir {
34
35class DependencyGraph;
36class MemDGNode;
37class SchedBundle;
38
39/// SubclassIDs for isa/dyn_cast etc.
40enum class DGNodeID {
43};
44
45class DGNode;
46class MemDGNode;
47class DependencyGraph;
48
49// Defined in Transforms/Vectorize/SandboxVectorizer/Interval.cpp
50extern template class LLVM_TEMPLATE_ABI Interval<MemDGNode>;
51
52/// Iterate over both def-use and mem dependencies.
53class PredIterator {
57 DGNode *N = nullptr;
58 DependencyGraph *DAG = nullptr;
59
60 PredIterator(const User::op_iterator &OpIt, const User::op_iterator &OpItE,
62 DependencyGraph &DAG)
63 : OpIt(OpIt), OpItE(OpItE), MemIt(MemIt), N(N), DAG(&DAG) {}
64 PredIterator(const User::op_iterator &OpIt, const User::op_iterator &OpItE,
65 DGNode *N, DependencyGraph &DAG)
66 : OpIt(OpIt), OpItE(OpItE), N(N), DAG(&DAG) {}
67 friend class DGNode; // For constructor
68 friend class MemDGNode; // For constructor
69
70 /// Skip iterators that don't point instructions or are outside \p DAG,
71 /// starting from \p OpIt and ending before \p OpItE.n
72 LLVM_ABI static User::op_iterator skipBadIt(User::op_iterator OpIt,
74 const DependencyGraph &DAG);
75
76public:
77 using difference_type = std::ptrdiff_t;
78 using value_type = DGNode *;
81 using iterator_category = std::input_iterator_tag;
83 LLVM_ABI PredIterator &operator++();
84 PredIterator operator++(int) {
85 auto Copy = *this;
86 ++(*this);
87 return Copy;
88 }
89 LLVM_ABI bool operator==(const PredIterator &Other) const;
90 bool operator!=(const PredIterator &Other) const { return !(*this == Other); }
91};
92
93/// A DependencyGraph Node that points to an Instruction and contains memory
94/// dependency edges.
96protected:
98 // TODO: Use a PointerIntPair for SubclassID and I.
99 /// For isa/dyn_cast etc.
101 /// The number of unscheduled successors. Optional represents whether the
102 /// value is meaningless, e.g., after a node gets scheduled.
103 std::optional<unsigned> UnscheduledSuccs = 0;
104 /// This is true if this node has been scheduled.
105 bool Scheduled = false;
106 /// The scheduler bundle that this node belongs to.
107 SchedBundle *SB = nullptr;
108
110 void clearSchedBundle() { this->SB = nullptr; }
111 friend class SchedBundle; // For setSchedBundle(), clearSchedBundle().
112
114 friend class MemDGNode; // For constructor.
115 friend class DependencyGraph; // For UnscheduledSuccs
116
117public:
119 assert(!isMemDepNodeCandidate(I) && "Expected Non-Mem instruction, ");
120 }
121 DGNode(const DGNode &Other) = delete;
122 virtual ~DGNode();
123 /// \Returns the number of unscheduled successors.
124 unsigned getNumUnscheduledSuccs() const {
125 assert((bool)UnscheduledSuccs && "Invalid UnscheduledSuccs!");
126 return *UnscheduledSuccs;
127 }
128#ifndef NDEBUG
129 /// \returns true unscheduled successors contains valid data (for testing).
130 bool validUnscheduledSuccs() const { return (bool)UnscheduledSuccs; }
131#endif
132 // TODO: Make this private?
134 assert(*UnscheduledSuccs > 0 && "Counting error!");
136 }
140 Scheduled = false;
141 }
142 /// \Returns true if all dependent successors have been scheduled.
143 bool ready() const { return UnscheduledSuccs == 0; }
144 /// \Returns true if this node has been scheduled.
145 bool scheduled() const { return Scheduled; }
147 Scheduled = true;
148 // UnscheduledSuccs is meaningless from this point on, so prohibit its use.
149 UnscheduledSuccs = std::nullopt;
150 }
151 /// \Returns the scheduling bundle that this node belongs to, or nullptr.
152 SchedBundle *getSchedBundle() const { return SB; }
153 /// \Returns true if this is before \p Other in program order.
154 bool comesBefore(const DGNode *Other) { return I->comesBefore(Other->I); }
157 return PredIterator(
158 PredIterator::skipBadIt(I->op_begin(), I->op_end(), DAG), I->op_end(),
159 this, DAG);
160 }
162 return PredIterator(I->op_end(), I->op_end(), this, DAG);
163 }
165 return const_cast<DGNode *>(this)->preds_begin(DAG);
166 }
168 return const_cast<DGNode *>(this)->preds_end(DAG);
169 }
170 /// \Returns a range of DAG predecessors nodes. If this is a MemDGNode then
171 /// this will also include the memory dependency predecessors.
172 /// Please note that this can include the same node more than once, if for
173 /// example it's both a use-def predecessor and a mem dep predecessor.
177
179 if (auto *II = dyn_cast<IntrinsicInst>(I)) {
180 auto IID = II->getIntrinsicID();
181 return IID == Intrinsic::stackrestore || IID == Intrinsic::stacksave;
182 }
183 return false;
184 }
185
186 /// \Returns true if intrinsic \p I touches memory. This is used by the
187 /// dependency graph.
189 auto IID = I->getIntrinsicID();
190 return IID != Intrinsic::sideeffect && IID != Intrinsic::pseudoprobe;
191 }
192
193 /// We consider \p I as a Memory Dependency Candidate instruction if it
194 /// reads/write memory or if it has side-effects. This is used by the
195 /// dependency graph.
198 return I->mayReadOrWriteMemory() &&
200 }
201
202 /// \Returns true if \p I is fence like. It excludes non-mem intrinsics.
203 static bool isFenceLike(Instruction *I) {
205 return I->isFenceLike() &&
207 }
208
209 /// \Returns true if \p I is a memory dependency candidate instruction.
211 AllocaInst *Alloca;
212 return isMemDepCandidate(I) ||
213 ((Alloca = dyn_cast<AllocaInst>(I)) &&
214 Alloca->isUsedWithInAlloca()) ||
216 }
217
218 Instruction *getInstruction() const { return I; }
219
220#ifndef NDEBUG
221 virtual void print(raw_ostream &OS, bool PrintDeps = true) const;
223 N.print(OS);
224 return OS;
225 }
226 LLVM_DUMP_METHOD void dump() const;
227#endif // NDEBUG
228};
229
230/// A DependencyGraph Node for instructions that may read/write memory, or have
231/// some ordering constraints, like with stacksave/stackrestore and
232/// alloca/inalloca.
233class MemDGNode final : public DGNode {
234 MemDGNode *PrevMemN = nullptr;
235 MemDGNode *NextMemN = nullptr;
236 /// Memory predecessors.
237 DenseSet<MemDGNode *> MemPreds;
238 /// Memory successors.
239 DenseSet<MemDGNode *> MemSuccs;
240 friend class PredIterator; // For MemPreds.
241 /// Creates both edges: this<->N.
242 void setNextNode(MemDGNode *N) {
243 assert(N != this && "About to point to self!");
244 NextMemN = N;
245 if (NextMemN != nullptr)
246 NextMemN->PrevMemN = this;
247 }
248 /// Creates both edges: N<->this.
249 void setPrevNode(MemDGNode *N) {
250 assert(N != this && "About to point to self!");
251 PrevMemN = N;
252 if (PrevMemN != nullptr)
253 PrevMemN->NextMemN = this;
254 }
255 friend class DependencyGraph; // For setNextNode(), setPrevNode().
256 void detachFromChain() {
257 if (PrevMemN != nullptr)
258 PrevMemN->NextMemN = NextMemN;
259 if (NextMemN != nullptr)
260 NextMemN->PrevMemN = PrevMemN;
261 PrevMemN = nullptr;
262 NextMemN = nullptr;
263 }
264
265public:
267 assert(isMemDepNodeCandidate(I) && "Expected Mem instruction!");
268 }
269 static bool classof(const DGNode *Other) {
270 return Other->SubclassID == DGNodeID::MemDGNode;
271 }
273 auto OpEndIt = I->op_end();
274 return PredIterator(PredIterator::skipBadIt(I->op_begin(), OpEndIt, DAG),
275 OpEndIt, MemPreds.begin(), this, DAG);
276 }
278 return PredIterator(I->op_end(), I->op_end(), MemPreds.end(), this, DAG);
279 }
280 /// \Returns the previous Mem DGNode in instruction order.
281 MemDGNode *getPrevNode() const { return PrevMemN; }
282 /// \Returns the next Mem DGNode in instruction order.
283 MemDGNode *getNextNode() const { return NextMemN; }
284 /// Adds the mem dependency edge PredN->this. This also increments the
285 /// UnscheduledSuccs counter of the predecessor if this node has not been
286 /// scheduled.
287 void addMemPred(MemDGNode *PredN) {
288 [[maybe_unused]] auto Inserted = MemPreds.insert(PredN).second;
289 assert(Inserted && "PredN already exists!");
290 assert(PredN != this && "Trying to add a dependency to self!");
291 PredN->MemSuccs.insert(this);
292 if (!Scheduled) {
293 if (!PredN->Scheduled)
294 PredN->incrUnscheduledSuccs();
295 }
296 }
297 /// Removes the memory dependency PredN->this. This also updates the
298 /// UnscheduledSuccs counter of PredN if this node has not been scheduled.
300 MemPreds.erase(PredN);
301 PredN->MemSuccs.erase(this);
302 if (!Scheduled) {
303 if (!PredN->Scheduled)
304 PredN->decrUnscheduledSuccs();
305 }
306 }
307 /// \Returns true if there is a memory dependency N->this.
308 bool hasMemPred(DGNode *N) const {
309 if (auto *MN = dyn_cast<MemDGNode>(N))
310 return MemPreds.count(MN);
311 return false;
312 }
313 /// \Returns all memory dependency predecessors. Used by tests.
315 return make_range(MemPreds.begin(), MemPreds.end());
316 }
317 /// \Returns all memory dependency successors.
319 return make_range(MemSuccs.begin(), MemSuccs.end());
320 }
321#ifndef NDEBUG
322 void print(raw_ostream &OS, bool PrintDeps = true) const override;
323#endif // NDEBUG
324};
325
326/// Convenience builders for a MemDGNode interval.
328public:
329 /// Scans the instruction chain in \p Intvl top-down, returning the top-most
330 /// MemDGNode, or nullptr.
332 const DependencyGraph &DAG);
333 /// Scans the instruction chain in \p Intvl bottom-up, returning the
334 /// bottom-most MemDGNode, or nullptr.
336 const DependencyGraph &DAG);
337 /// Given \p Instrs it finds their closest mem nodes in the interval and
338 /// returns the corresponding mem range. Note: BotN (or its neighboring mem
339 /// node) is included in the range.
341 DependencyGraph &DAG);
342 static Interval<MemDGNode> makeEmpty() { return {}; }
343};
344
346private:
348 /// The DAG spans across all instructions in this interval.
349 Interval<Instruction> DAGInterval;
350
351 Context *Ctx = nullptr;
352 std::optional<Context::CallbackID> CreateInstrCB;
353 std::optional<Context::CallbackID> EraseInstrCB;
354 std::optional<Context::CallbackID> MoveInstrCB;
355 std::optional<Context::CallbackID> SetUseCB;
356
357 std::unique_ptr<BatchAAResults> BatchAA;
358
359 enum class DependencyType {
360 ReadAfterWrite, ///> Memory dependency write -> read
361 WriteAfterWrite, ///> Memory dependency write -> write
362 WriteAfterRead, ///> Memory dependency read -> write
363 Control, ///> Control-related dependency, like with PHI/Terminator
364 Other, ///> Currently used for stack related instrs
365 None, ///> No memory/other dependency
366 };
367 /// \Returns the dependency type depending on whether instructions may
368 /// read/write memory or whether they are some specific opcode-related
369 /// restrictions.
370 /// Note: It does not check whether a memory dependency is actually correct,
371 /// as it won't call AA. Therefore it returns the worst-case dep type.
372 static DependencyType getRoughDepType(Instruction *FromI, Instruction *ToI);
373
374 // TODO: Implement AABudget.
375 /// \Returns true if there is a memory/other dependency \p SrcI->DstI.
376 bool alias(Instruction *SrcI, Instruction *DstI, DependencyType DepType);
377
378 bool hasDep(sandboxir::Instruction *SrcI, sandboxir::Instruction *DstI);
379
380 /// Go through all mem nodes in \p SrcScanRange and try to add dependencies to
381 /// \p DstN.
382 void scanAndAddDeps(MemDGNode &DstN, const Interval<MemDGNode> &SrcScanRange);
383
384 /// Sets the UnscheduledSuccs of all DGNodes in \p NewInterval based on
385 /// def-use edges.
386 void setDefUseUnscheduledSuccs(const Interval<Instruction> &NewInterval);
387
388 /// Create DAG nodes for instrs in \p NewInterval and update the MemNode
389 /// chain.
390 void createNewNodes(const Interval<Instruction> &NewInterval);
391
392 /// Helper for `notify*Instr()`. \Returns the first MemDGNode that comes
393 /// before \p N, skipping \p SkipN, including or excluding \p N based on
394 /// \p IncludingN, or nullptr if not found.
395 MemDGNode *getMemDGNodeBefore(DGNode *N, bool IncludingN,
396 MemDGNode *SkipN = nullptr) const;
397 /// Helper for `notifyMoveInstr()`. \Returns the first MemDGNode that comes
398 /// after \p N, skipping \p SkipN, including or excluding \p N based on \p
399 /// IncludingN, or nullptr if not found.
400 MemDGNode *getMemDGNodeAfter(DGNode *N, bool IncludingN,
401 MemDGNode *SkipN = nullptr) const;
402
403 /// Called by the callbacks when a new instruction \p I has been created.
404 LLVM_ABI void notifyCreateInstr(Instruction *I);
405 /// Called by the callbacks when instruction \p I is about to get
406 /// deleted.
407 LLVM_ABI void notifyEraseInstr(Instruction *I);
408 /// Called by the callbacks when instruction \p I is about to be moved to
409 /// \p To.
410 LLVM_ABI void notifyMoveInstr(Instruction *I, const BBIterator &To);
411 /// Called by the callbacks when \p U's source is about to be set to \p NewSrc
412 LLVM_ABI void notifySetUse(const Use &U, Value *NewSrc);
413
414public:
415 /// This constructor also registers callbacks.
417 : Ctx(&Ctx), BatchAA(std::make_unique<BatchAAResults>(AA)) {
418 CreateInstrCB = Ctx.registerCreateInstrCallback(
419 [this](Instruction *I) { notifyCreateInstr(I); });
420 EraseInstrCB = Ctx.registerEraseInstrCallback(
421 [this](Instruction *I) { notifyEraseInstr(I); });
422 MoveInstrCB = Ctx.registerMoveInstrCallback(
423 [this](Instruction *I, const BBIterator &To) {
424 notifyMoveInstr(I, To);
425 });
426 SetUseCB = Ctx.registerSetUseCallback(
427 [this](const Use &U, Value *NewSrc) { notifySetUse(U, NewSrc); });
428 }
430 if (CreateInstrCB)
431 Ctx->unregisterCreateInstrCallback(*CreateInstrCB);
432 if (EraseInstrCB)
433 Ctx->unregisterEraseInstrCallback(*EraseInstrCB);
434 if (MoveInstrCB)
435 Ctx->unregisterMoveInstrCallback(*MoveInstrCB);
436 if (SetUseCB)
437 Ctx->unregisterSetUseCallback(*SetUseCB);
438 }
439
441 auto It = InstrToNodeMap.find(I);
442 return It != InstrToNodeMap.end() ? It->second.get() : nullptr;
443 }
444 /// Like getNode() but returns nullptr if \p I is nullptr.
446 if (I == nullptr)
447 return nullptr;
448 return getNode(I);
449 }
451 auto [It, NotInMap] = InstrToNodeMap.try_emplace(I);
452 if (NotInMap) {
454 It->second = std::make_unique<MemDGNode>(I);
455 else
456 It->second = std::make_unique<DGNode>(I);
457 }
458 return It->second.get();
459 }
460 /// Build/extend the dependency graph such that it includes \p Instrs. Returns
461 /// the range of instructions added to the DAG.
463 /// \Returns the range of instructions included in the DAG.
464 Interval<Instruction> getInterval() const { return DAGInterval; }
465 void clear() {
466 InstrToNodeMap.clear();
467 DAGInterval = {};
468 }
469#ifndef NDEBUG
470 /// \Returns true if the DAG's state is clear. Used in assertions.
471 bool empty() const {
472 bool IsEmpty = InstrToNodeMap.empty();
473 assert(IsEmpty == DAGInterval.empty() &&
474 "Interval and InstrToNodeMap out of sync!");
475 return IsEmpty;
476 }
477 void print(raw_ostream &OS) const;
478 LLVM_DUMP_METHOD void dump() const;
479#endif // NDEBUG
480};
481} // namespace llvm::sandboxir
482
483#endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_DEPENDENCYGRAPH_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_ABI
Definition Compiler.h:213
#define LLVM_TEMPLATE_ABI
Definition Compiler.h:214
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Definition Compiler.h:661
This file defines the DenseMap class.
#define I(x, y, z)
Definition MD5.cpp:57
std::pair< uint64_t, uint64_t > Interval
uint64_t IntrinsicInst * II
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR ch...
Represent a node in the directed graph.
Implements a dense probed hash-table based set.
Definition DenseSet.h:279
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
bool isUsedWithInAlloca() const
Return true if this alloca is used as an inalloca argument to a call.
A DependencyGraph Node that points to an Instruction and contains memory dependency edges.
static bool isMemDepCandidate(Instruction *I)
We consider I as a Memory Dependency Candidate instruction if it reads/write memory or if it has side...
virtual iterator preds_end(DependencyGraph &DAG)
static bool isMemIntrinsic(IntrinsicInst *I)
\Returns true if intrinsic I touches memory.
iterator preds_begin(DependencyGraph &DAG) const
DGNode(Instruction *I, DGNodeID ID)
unsigned getNumUnscheduledSuccs() const
\Returns the number of unscheduled successors.
void setSchedBundle(SchedBundle &SB)
bool scheduled() const
\Returns true if this node has been scheduled.
bool validUnscheduledSuccs() const
bool ready() const
\Returns true if all dependent successors have been scheduled.
iterator_range< iterator > preds(DependencyGraph &DAG) const
\Returns a range of DAG predecessors nodes.
iterator preds_end(DependencyGraph &DAG) const
SchedBundle * SB
The scheduler bundle that this node belongs to.
bool Scheduled
This is true if this node has been scheduled.
std::optional< unsigned > UnscheduledSuccs
The number of unscheduled successors.
static bool isMemDepNodeCandidate(Instruction *I)
\Returns true if I is a memory dependency candidate instruction.
SchedBundle * getSchedBundle() const
\Returns the scheduling bundle that this node belongs to, or nullptr.
DGNodeID SubclassID
For isa/dyn_cast etc.
DGNode(const DGNode &Other)=delete
static bool isFenceLike(Instruction *I)
\Returns true if I is fence like. It excludes non-mem intrinsics.
Instruction * getInstruction() const
static bool isStackSaveOrRestoreIntrinsic(Instruction *I)
bool comesBefore(const DGNode *Other)
\Returns true if this is before Other in program order.
friend raw_ostream & operator<<(raw_ostream &OS, DGNode &N)
virtual iterator preds_begin(DependencyGraph &DAG)
Interval< Instruction > getInterval() const
\Returns the range of instructions included in the DAG.
bool empty() const
\Returns true if the DAG's state is clear. Used in assertions.
LLVM_DUMP_METHOD void dump() const
DGNode * getNode(Instruction *I) const
DependencyGraph(AAResults &AA, Context &Ctx)
This constructor also registers callbacks.
DGNode * getNodeOrNull(Instruction *I) const
Like getNode() but returns nullptr if I is nullptr.
void print(raw_ostream &OS) const
DGNode * getOrCreateNode(Instruction *I)
LLVM_ABI Interval< Instruction > extend(ArrayRef< Instruction * > Instrs)
Build/extend the dependency graph such that it includes Instrs.
A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction ...
Definition Instruction.h:43
Convenience builders for a MemDGNode interval.
static LLVM_ABI MemDGNode * getBotMemDGNode(const Interval< Instruction > &Intvl, const DependencyGraph &DAG)
Scans the instruction chain in Intvl bottom-up, returning the bottom-most MemDGNode,...
static Interval< MemDGNode > makeEmpty()
static LLVM_ABI MemDGNode * getTopMemDGNode(const Interval< Instruction > &Intvl, const DependencyGraph &DAG)
Scans the instruction chain in Intvl top-down, returning the top-most MemDGNode, or nullptr.
static LLVM_ABI Interval< MemDGNode > make(const Interval< Instruction > &Instrs, DependencyGraph &DAG)
Given Instrs it finds their closest mem nodes in the interval and returns the corresponding mem range...
A DependencyGraph Node for instructions that may read/write memory, or have some ordering constraints...
iterator preds_end(DependencyGraph &DAG) override
iterator preds_begin(DependencyGraph &DAG) override
bool hasMemPred(DGNode *N) const
\Returns true if there is a memory dependency N->this.
static bool classof(const DGNode *Other)
iterator_range< DenseSet< MemDGNode * >::const_iterator > memPreds() const
\Returns all memory dependency predecessors. Used by tests.
MemDGNode * getNextNode() const
\Returns the next Mem DGNode in instruction order.
iterator_range< DenseSet< MemDGNode * >::const_iterator > memSuccs() const
\Returns all memory dependency successors.
void removeMemPred(MemDGNode *PredN)
Removes the memory dependency PredN->this.
MemDGNode * getPrevNode() const
\Returns the previous Mem DGNode in instruction order.
void addMemPred(MemDGNode *PredN)
Adds the mem dependency edge PredN->this.
Iterate over both def-use and mem dependencies.
bool operator!=(const PredIterator &Other) const
LLVM_ABI PredIterator & operator++()
std::input_iterator_tag iterator_category
The nodes that need to be scheduled back-to-back in a single scheduling cycle form a SchedBundle.
Definition Scheduler.h:108
Represents a Def-use/Use-def edge in SandboxIR.
Definition Use.h:33
OperandUseIterator op_iterator
Definition User.h:98
A SandboxIR Value has users. This is the base class.
Definition Value.h:66
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
Abstract Attribute helper functions.
Definition Attributor.h:165
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition CallingConv.h:24
DGNodeID
SubclassIDs for isa/dyn_cast etc.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:643
APInt operator*(APInt a, uint64_t RHS)
Definition APInt.h:2250
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
@ Other
Any other memory.
Definition ModRef.h:68
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:870
#define N