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; }
146 void setScheduled(bool NewVal) {
147 Scheduled = NewVal;
148 if (Scheduled)
149 // UnscheduledSuccs is meaningless from this point on, so prohibit its use
150 UnscheduledSuccs = std::nullopt;
151 }
152 /// \Returns the scheduling bundle that this node belongs to, or nullptr.
153 SchedBundle *getSchedBundle() const { return SB; }
154 /// \Returns true if this is before \p Other in program order.
155 bool comesBefore(const DGNode *Other) { return I->comesBefore(Other->I); }
158 return PredIterator(
159 PredIterator::skipBadIt(I->op_begin(), I->op_end(), DAG), I->op_end(),
160 this, DAG);
161 }
163 return PredIterator(I->op_end(), I->op_end(), this, DAG);
164 }
166 return const_cast<DGNode *>(this)->preds_begin(DAG);
167 }
169 return const_cast<DGNode *>(this)->preds_end(DAG);
170 }
171 /// \Returns a range of DAG predecessors nodes. If this is a MemDGNode then
172 /// this will also include the memory dependency predecessors.
173 /// Please note that this can include the same node more than once, if for
174 /// example it's both a use-def predecessor and a mem dep predecessor.
178
180 if (auto *II = dyn_cast<IntrinsicInst>(I)) {
181 auto IID = II->getIntrinsicID();
182 return IID == Intrinsic::stackrestore || IID == Intrinsic::stacksave;
183 }
184 return false;
185 }
186
187 /// \Returns true if intrinsic \p I touches memory. This is used by the
188 /// dependency graph.
190 auto IID = I->getIntrinsicID();
191 return IID != Intrinsic::sideeffect && IID != Intrinsic::pseudoprobe;
192 }
193
194 /// We consider \p I as a Memory Dependency Candidate instruction if it
195 /// reads/write memory or if it has side-effects. This is used by the
196 /// dependency graph.
199 return I->mayReadOrWriteMemory() &&
201 }
202
203 /// \Returns true if \p I is fence like. It excludes non-mem intrinsics.
204 static bool isFenceLike(Instruction *I) {
206 return I->isFenceLike() &&
208 }
209
210 /// \Returns true if \p I is a memory dependency candidate instruction.
212 AllocaInst *Alloca;
213 return isMemDepCandidate(I) ||
214 ((Alloca = dyn_cast<AllocaInst>(I)) &&
215 Alloca->isUsedWithInAlloca()) ||
217 }
218
219 Instruction *getInstruction() const { return I; }
220
221#ifndef NDEBUG
222 virtual void print(raw_ostream &OS, bool PrintDeps = true) const;
224 N.print(OS);
225 return OS;
226 }
227 LLVM_DUMP_METHOD void dump() const;
228#endif // NDEBUG
229};
230
231/// A DependencyGraph Node for instructions that may read/write memory, or have
232/// some ordering constraints, like with stacksave/stackrestore and
233/// alloca/inalloca.
234class MemDGNode final : public DGNode {
235 MemDGNode *PrevMemN = nullptr;
236 MemDGNode *NextMemN = nullptr;
237 /// Memory predecessors.
238 DenseSet<MemDGNode *> MemPreds;
239 /// Memory successors.
240 DenseSet<MemDGNode *> MemSuccs;
241 friend class PredIterator; // For MemPreds.
242 /// Creates both edges: this<->N.
243 void setNextNode(MemDGNode *N) {
244 assert(N != this && "About to point to self!");
245 NextMemN = N;
246 if (NextMemN != nullptr)
247 NextMemN->PrevMemN = this;
248 }
249 /// Creates both edges: N<->this.
250 void setPrevNode(MemDGNode *N) {
251 assert(N != this && "About to point to self!");
252 PrevMemN = N;
253 if (PrevMemN != nullptr)
254 PrevMemN->NextMemN = this;
255 }
256 friend class DependencyGraph; // For setNextNode(), setPrevNode().
257 void detachFromChain() {
258 if (PrevMemN != nullptr)
259 PrevMemN->NextMemN = NextMemN;
260 if (NextMemN != nullptr)
261 NextMemN->PrevMemN = PrevMemN;
262 PrevMemN = nullptr;
263 NextMemN = nullptr;
264 }
265
266public:
268 assert(isMemDepNodeCandidate(I) && "Expected Mem instruction!");
269 }
270 static bool classof(const DGNode *Other) {
271 return Other->SubclassID == DGNodeID::MemDGNode;
272 }
274 auto OpEndIt = I->op_end();
275 return PredIterator(PredIterator::skipBadIt(I->op_begin(), OpEndIt, DAG),
276 OpEndIt, MemPreds.begin(), this, DAG);
277 }
279 return PredIterator(I->op_end(), I->op_end(), MemPreds.end(), this, DAG);
280 }
281 /// \Returns the previous Mem DGNode in instruction order.
282 MemDGNode *getPrevNode() const { return PrevMemN; }
283 /// \Returns the next Mem DGNode in instruction order.
284 MemDGNode *getNextNode() const { return NextMemN; }
285 /// Adds the mem dependency edge PredN->this. This also increments the
286 /// UnscheduledSuccs counter of the predecessor if this node has not been
287 /// scheduled.
288 void addMemPred(MemDGNode *PredN) {
289 [[maybe_unused]] auto Inserted = MemPreds.insert(PredN).second;
290 assert(Inserted && "PredN already exists!");
291 assert(PredN != this && "Trying to add a dependency to self!");
292 PredN->MemSuccs.insert(this);
293 if (!Scheduled) {
294 if (!PredN->Scheduled)
295 PredN->incrUnscheduledSuccs();
296 }
297 }
298 /// Removes the memory dependency PredN->this. This also updates the
299 /// UnscheduledSuccs counter of PredN if this node has not been scheduled.
301 MemPreds.erase(PredN);
302 PredN->MemSuccs.erase(this);
303 if (!Scheduled) {
304 if (!PredN->Scheduled)
305 PredN->decrUnscheduledSuccs();
306 }
307 }
308 /// \Returns true if there is a memory dependency N->this.
309 bool hasMemPred(DGNode *N) const {
310 if (auto *MN = dyn_cast<MemDGNode>(N))
311 return MemPreds.count(MN);
312 return false;
313 }
314 /// \Returns all memory dependency predecessors. Used by tests.
316 return make_range(MemPreds.begin(), MemPreds.end());
317 }
318 /// \Returns all memory dependency successors.
320 return make_range(MemSuccs.begin(), MemSuccs.end());
321 }
322#ifndef NDEBUG
323 void print(raw_ostream &OS, bool PrintDeps = true) const override;
324#endif // NDEBUG
325};
326
327/// Convenience builders for a MemDGNode interval.
329public:
330 /// Scans the instruction chain in \p Intvl top-down, returning the top-most
331 /// MemDGNode, or nullptr.
333 const DependencyGraph &DAG);
334 /// Scans the instruction chain in \p Intvl bottom-up, returning the
335 /// bottom-most MemDGNode, or nullptr.
337 const DependencyGraph &DAG);
338 /// Given \p Instrs it finds their closest mem nodes in the interval and
339 /// returns the corresponding mem range. Note: BotN (or its neighboring mem
340 /// node) is included in the range.
342 DependencyGraph &DAG);
343 static Interval<MemDGNode> makeEmpty() { return {}; }
344};
345
347private:
349 /// The DAG spans across all instructions in this interval.
350 Interval<Instruction> DAGInterval;
351
352 Context *Ctx = nullptr;
353 std::optional<Context::CallbackID> CreateInstrCB;
354 std::optional<Context::CallbackID> EraseInstrCB;
355 std::optional<Context::CallbackID> MoveInstrCB;
356 std::optional<Context::CallbackID> SetUseCB;
357
358 std::unique_ptr<BatchAAResults> BatchAA;
359
360 enum class DependencyType {
361 ReadAfterWrite, ///> Memory dependency write -> read
362 WriteAfterWrite, ///> Memory dependency write -> write
363 WriteAfterRead, ///> Memory dependency read -> write
364 Control, ///> Control-related dependency, like with PHI/Terminator
365 Other, ///> Currently used for stack related instrs
366 None, ///> No memory/other dependency
367 };
368 /// \Returns the dependency type depending on whether instructions may
369 /// read/write memory or whether they are some specific opcode-related
370 /// restrictions.
371 /// Note: It does not check whether a memory dependency is actually correct,
372 /// as it won't call AA. Therefore it returns the worst-case dep type.
373 static DependencyType getRoughDepType(Instruction *FromI, Instruction *ToI);
374
375 // TODO: Implement AABudget.
376 /// \Returns true if there is a memory/other dependency \p SrcI->DstI.
377 bool alias(Instruction *SrcI, Instruction *DstI, DependencyType DepType);
378
379 bool hasDep(sandboxir::Instruction *SrcI, sandboxir::Instruction *DstI);
380
381 /// Go through all mem nodes in \p SrcScanRange and try to add dependencies to
382 /// \p DstN.
383 void scanAndAddDeps(MemDGNode &DstN, const Interval<MemDGNode> &SrcScanRange);
384
385 /// Sets the UnscheduledSuccs of all DGNodes in \p NewInterval based on
386 /// def-use edges.
387 void setDefUseUnscheduledSuccs(const Interval<Instruction> &NewInterval);
388
389 /// Create DAG nodes for instrs in \p NewInterval and update the MemNode
390 /// chain.
391 void createNewNodes(const Interval<Instruction> &NewInterval);
392
393 /// Helper for `notify*Instr()`. \Returns the first MemDGNode that comes
394 /// before \p N, skipping \p SkipN, including or excluding \p N based on
395 /// \p IncludingN, or nullptr if not found.
396 MemDGNode *getMemDGNodeBefore(DGNode *N, bool IncludingN,
397 MemDGNode *SkipN = nullptr) const;
398 /// Helper for `notifyMoveInstr()`. \Returns the first MemDGNode that comes
399 /// after \p N, skipping \p SkipN, including or excluding \p N based on \p
400 /// IncludingN, or nullptr if not found.
401 MemDGNode *getMemDGNodeAfter(DGNode *N, bool IncludingN,
402 MemDGNode *SkipN = nullptr) const;
403
404 /// Called by the callbacks when a new instruction \p I has been created.
405 LLVM_ABI void notifyCreateInstr(Instruction *I);
406 /// Called by the callbacks when instruction \p I is about to get
407 /// deleted.
408 LLVM_ABI void notifyEraseInstr(Instruction *I);
409 /// Called by the callbacks when instruction \p I is about to be moved to
410 /// \p To.
411 LLVM_ABI void notifyMoveInstr(Instruction *I, const BBIterator &To);
412 /// Called by the callbacks when \p U's source is about to be set to \p NewSrc
413 LLVM_ABI void notifySetUse(const Use &U, Value *NewSrc);
414
415public:
416 /// This constructor also registers callbacks.
418 : Ctx(&Ctx), BatchAA(std::make_unique<BatchAAResults>(AA)) {
419 CreateInstrCB = Ctx.registerCreateInstrCallback(
420 [this](Instruction *I) { notifyCreateInstr(I); });
421 EraseInstrCB = Ctx.registerEraseInstrCallback(
422 [this](Instruction *I) { notifyEraseInstr(I); });
423 MoveInstrCB = Ctx.registerMoveInstrCallback(
424 [this](Instruction *I, const BBIterator &To) {
425 notifyMoveInstr(I, To);
426 });
427 SetUseCB = Ctx.registerSetUseCallback(
428 [this](const Use &U, Value *NewSrc) { notifySetUse(U, NewSrc); });
429 }
431 if (CreateInstrCB)
432 Ctx->unregisterCreateInstrCallback(*CreateInstrCB);
433 if (EraseInstrCB)
434 Ctx->unregisterEraseInstrCallback(*EraseInstrCB);
435 if (MoveInstrCB)
436 Ctx->unregisterMoveInstrCallback(*MoveInstrCB);
437 if (SetUseCB)
438 Ctx->unregisterSetUseCallback(*SetUseCB);
439 }
440
442 auto It = InstrToNodeMap.find(I);
443 return It != InstrToNodeMap.end() ? It->second.get() : nullptr;
444 }
445 /// Like getNode() but returns nullptr if \p I is nullptr.
447 if (I == nullptr)
448 return nullptr;
449 return getNode(I);
450 }
452 auto [It, NotInMap] = InstrToNodeMap.try_emplace(I);
453 if (NotInMap) {
455 It->second = std::make_unique<MemDGNode>(I);
456 else
457 It->second = std::make_unique<DGNode>(I);
458 }
459 return It->second.get();
460 }
461 /// Build/extend the dependency graph such that it includes \p Instrs. Returns
462 /// the range of instructions added to the DAG.
464 /// \Returns the range of instructions included in the DAG.
465 Interval<Instruction> getInterval() const { return DAGInterval; }
466 void clear() {
467 InstrToNodeMap.clear();
468 DAGInterval = {};
469 }
470#ifndef NDEBUG
471 /// \Returns true if the DAG's state is clear. Used in assertions.
472 bool empty() const {
473 bool IsEmpty = InstrToNodeMap.empty();
474 assert(IsEmpty == DAGInterval.empty() &&
475 "Interval and InstrToNodeMap out of sync!");
476 return IsEmpty;
477 }
478 void print(raw_ostream &OS) const;
479 LLVM_DUMP_METHOD void dump() const;
480#endif // NDEBUG
481};
482} // namespace llvm::sandboxir
483
484#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
void setScheduled(bool NewVal)
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