|
LLVM 24.0.0git
|
A DependencyGraph Node that points to an Instruction and contains memory dependency edges. More...
#include "llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h"
Public Types | |
| using | iterator = PredIterator |
| using | succ_iterator = SuccIterator |
Static Public Member Functions | |
| static bool | isStackSaveOrRestoreIntrinsic (Instruction *I) |
| static bool | isMemIntrinsic (IntrinsicInst *I) |
\Returns true if intrinsic I touches memory. | |
| static bool | isMemDepCandidate (Instruction *I) |
We consider I as a Memory Dependency Candidate instruction if it reads/write memory or if it has side-effects. | |
| static bool | isFenceLike (Instruction *I) |
\Returns true if I is fence like. It excludes non-mem intrinsics. | |
| static bool | isMemDepNodeCandidate (Instruction *I) |
\Returns true if I is a memory dependency candidate instruction. | |
Protected Member Functions | |
| void | setSchedBundle (SchedBundle &SB) |
| void | clearSchedBundle () |
| DGNode (Instruction *I, DGNodeID ID) | |
Protected Attributes | |
| Instruction * | I |
| DGNodeID | SubclassID |
| For isa/dyn_cast etc. | |
| std::optional< unsigned > | UnscheduledSuccs = 0 |
| The number of unscheduled successors. | |
| std::optional< unsigned > | UnscheduledPreds = 0 |
| bool | Scheduled = false |
| This is true if this node has been scheduled. | |
| SchedBundle * | SB = nullptr |
| The scheduler bundle that this node belongs to. | |
Friends | |
| class | SchedBundle |
| class | MemDGNode |
| class | DependencyGraph |
| raw_ostream & | operator<< (raw_ostream &OS, DGNode &N) |
A DependencyGraph Node that points to an Instruction and contains memory dependency edges.
Definition at line 146 of file DependencyGraph.h.
Definition at line 224 of file DependencyGraph.h.
Definition at line 247 of file DependencyGraph.h.
|
inlineprotected |
Definition at line 165 of file DependencyGraph.h.
References I, and SubclassID.
Referenced by llvm::sandboxir::MemDGNode::classof(), comesBefore(), DGNode(), DGNode(), llvm::sandboxir::MemDGNode::hasMemPred(), llvm::sandboxir::MemDGNode::MemDGNode(), operator<<, preds_begin(), preds_end(), succs_begin(), and succs_end().
|
inline |
Definition at line 170 of file DependencyGraph.h.
References assert(), DGNode(), I, isMemDepNodeCandidate(), and SubclassID.
References DGNode(), and llvm::Other.
|
virtual |
Definition at line 149 of file DependencyGraph.cpp.
References SB.
|
inlineprotected |
Definition at line 162 of file DependencyGraph.h.
\Returns true if this is before Other in program order.
Definition at line 223 of file DependencyGraph.h.
References DGNode(), I, and llvm::Other.
|
inline |
Definition at line 197 of file DependencyGraph.h.
References assert(), and UnscheduledPreds.
Referenced by llvm::sandboxir::MemDGNode::removeMemPred().
|
inline |
Definition at line 192 of file DependencyGraph.h.
References assert(), and UnscheduledSuccs.
Referenced by llvm::sandboxir::MemDGNode::removeMemPred().
| void llvm::sandboxir::DGNode::dump | ( | ) | const |
Definition at line 160 of file DependencyGraph.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 310 of file DependencyGraph.h.
References I.
Referenced by llvm::sandboxir::SchedBundle::getBot(), llvm::sandboxir::SchedBundle::getTop(), llvm::sandboxir::PriorityCmp::operator()(), and llvm::sandboxir::DependencyGraph::print().
|
inline |
\Returns the number of unscheduled predecessors.
Definition at line 181 of file DependencyGraph.h.
References assert(), and UnscheduledPreds.
|
inline |
\Returns the number of unscheduled successors.
Definition at line 176 of file DependencyGraph.h.
References assert(), and UnscheduledSuccs.
|
inline |
\Returns the scheduling bundle that this node belongs to, or nullptr.
Definition at line 221 of file DependencyGraph.h.
References SB, and SchedBundle.
|
inline |
Definition at line 201 of file DependencyGraph.h.
References UnscheduledPreds.
Referenced by llvm::sandboxir::MemDGNode::addMemPred().
|
inline |
Definition at line 196 of file DependencyGraph.h.
References UnscheduledSuccs.
Referenced by llvm::sandboxir::MemDGNode::addMemPred().
|
inlinestatic |
\Returns true if I is fence like. It excludes non-mem intrinsics.
Definition at line 295 of file DependencyGraph.h.
References llvm::dyn_cast(), I, II, and isMemIntrinsic().
Referenced by isMemDepNodeCandidate(), and llvm::sandboxir::isOrdered().
|
inlinestatic |
We consider I as a Memory Dependency Candidate instruction if it reads/write memory or if it has side-effects.
This is used by the dependency graph.
Definition at line 288 of file DependencyGraph.h.
References llvm::dyn_cast(), I, II, and isMemIntrinsic().
Referenced by isMemDepNodeCandidate(), and llvm::sandboxir::isOrdered().
|
inlinestatic |
\Returns true if I is a memory dependency candidate instruction.
Definition at line 302 of file DependencyGraph.h.
References llvm::dyn_cast(), I, isFenceLike(), isMemDepCandidate(), isStackSaveOrRestoreIntrinsic(), and llvm::sandboxir::AllocaInst::isUsedWithInAlloca().
Referenced by DGNode(), llvm::sandboxir::MemDGNodeIntervalBuilder::getBotMemDGNode(), llvm::sandboxir::DependencyGraph::getOrCreateNode(), llvm::sandboxir::MemDGNodeIntervalBuilder::getTopMemDGNode(), and llvm::sandboxir::MemDGNode::MemDGNode().
|
inlinestatic |
\Returns true if intrinsic I touches memory.
This is used by the dependency graph.
Definition at line 280 of file DependencyGraph.h.
References I.
Referenced by isFenceLike(), and isMemDepCandidate().
|
inlinestatic |
Definition at line 270 of file DependencyGraph.h.
References llvm::dyn_cast(), I, and II.
Referenced by isMemDepNodeCandidate().
|
inline |
\Returns a range of DAG predecessors nodes.
If this is a MemDGNode then this will also include the memory dependency predecessors. Please note that this can include the same node more than once, if for example it's both a use-def predecessor and a mem dep predecessor.
Definition at line 243 of file DependencyGraph.h.
References DependencyGraph, llvm::make_range(), preds_begin(), and preds_end().
|
inlinevirtual |
Reimplemented in llvm::sandboxir::MemDGNode.
Definition at line 225 of file DependencyGraph.h.
References DependencyGraph, and I.
Referenced by preds(), and preds_begin().
|
inline |
Definition at line 233 of file DependencyGraph.h.
References DependencyGraph, DGNode(), and preds_begin().
|
inlinevirtual |
Reimplemented in llvm::sandboxir::MemDGNode.
Definition at line 230 of file DependencyGraph.h.
References DependencyGraph, and I.
Referenced by preds(), and preds_end().
|
inline |
Definition at line 236 of file DependencyGraph.h.
References DependencyGraph, DGNode(), and preds_end().
|
virtual |
Reimplemented in llvm::sandboxir::MemDGNode.
Definition at line 156 of file DependencyGraph.cpp.
References I, Scheduled, UnscheduledPreds, and UnscheduledSuccs.
Referenced by dump(), and llvm::sandboxir::MemDGNode::print().
|
inline |
\Returns true if all dependent successors (or predecessors during top-down scheduling) have been scheduled.
Definition at line 210 of file DependencyGraph.h.
References UnscheduledSuccs.
|
inline |
Definition at line 211 of file DependencyGraph.h.
References UnscheduledPreds.
|
inline |
Definition at line 203 of file DependencyGraph.h.
References Scheduled, UnscheduledPreds, and UnscheduledSuccs.
|
inline |
\Returns true if this node has been scheduled.
Definition at line 213 of file DependencyGraph.h.
References Scheduled.
|
protected |
Definition at line 143 of file DependencyGraph.cpp.
References SB, and SchedBundle.
|
inline |
Definition at line 214 of file DependencyGraph.h.
References Scheduled, UnscheduledPreds, and UnscheduledSuccs.
|
inline |
\Returns a range of DAG successor nodes.
If this is a MemDGNode then this will also include the memory dependency successors. Please note that this can include the same node more than once, if for example it's both a use-def predecessor and a mem dep successor.
Definition at line 266 of file DependencyGraph.h.
References DependencyGraph, llvm::make_range(), succs_begin(), and succs_end().
|
inlinevirtual |
Reimplemented in llvm::sandboxir::MemDGNode.
Definition at line 248 of file DependencyGraph.h.
References DependencyGraph, and I.
Referenced by succs(), and succs_begin().
|
inline |
Definition at line 256 of file DependencyGraph.h.
References DependencyGraph, DGNode(), and succs_begin().
|
inlinevirtual |
Reimplemented in llvm::sandboxir::MemDGNode.
Definition at line 253 of file DependencyGraph.h.
References DependencyGraph, and I.
Referenced by succs(), and succs_end().
|
inline |
Definition at line 259 of file DependencyGraph.h.
References DependencyGraph, DGNode(), and succs_end().
|
inline |
Definition at line 189 of file DependencyGraph.h.
References UnscheduledPreds.
|
inline |
Definition at line 187 of file DependencyGraph.h.
References UnscheduledSuccs.
|
friend |
Definition at line 167 of file DependencyGraph.h.
References DependencyGraph.
Referenced by DependencyGraph, preds(), preds_begin(), preds_begin(), preds_end(), preds_end(), succs(), succs_begin(), succs_begin(), succs_end(), and succs_end().
|
friend |
|
friend |
Definition at line 314 of file DependencyGraph.h.
|
friend |
Definition at line 163 of file DependencyGraph.h.
References SchedBundle.
Referenced by getSchedBundle(), SchedBundle, and setSchedBundle().
|
protected |
Definition at line 148 of file DependencyGraph.h.
Referenced by comesBefore(), DGNode(), DGNode(), getInstruction(), isFenceLike(), isMemDepCandidate(), isMemDepNodeCandidate(), isMemIntrinsic(), isStackSaveOrRestoreIntrinsic(), llvm::sandboxir::MemDGNode::MemDGNode(), preds_begin(), llvm::sandboxir::MemDGNode::preds_begin(), preds_end(), llvm::sandboxir::MemDGNode::preds_end(), print(), succs_begin(), llvm::sandboxir::MemDGNode::succs_begin(), succs_end(), and llvm::sandboxir::MemDGNode::succs_end().
|
protected |
The scheduler bundle that this node belongs to.
Definition at line 159 of file DependencyGraph.h.
Referenced by getSchedBundle(), setSchedBundle(), and ~DGNode().
|
protected |
This is true if this node has been scheduled.
Definition at line 157 of file DependencyGraph.h.
Referenced by llvm::sandboxir::MemDGNode::addMemPred(), print(), llvm::sandboxir::MemDGNode::removeMemPred(), resetScheduleState(), scheduled(), and setScheduled().
|
protected |
For isa/dyn_cast etc.
Definition at line 151 of file DependencyGraph.h.
|
protected |
Definition at line 155 of file DependencyGraph.h.
Referenced by decrUnscheduledPreds(), getNumUnscheduledPreds(), incrUnscheduledPreds(), print(), readyTopDown(), resetScheduleState(), setScheduled(), and validUnscheduledPreds().
|
protected |
The number of unscheduled successors.
Optional represents whether the value is meaningless, e.g., after a node gets scheduled.
Definition at line 154 of file DependencyGraph.h.
Referenced by decrUnscheduledSuccs(), getNumUnscheduledSuccs(), incrUnscheduledSuccs(), print(), readyBottomUp(), resetScheduleState(), setScheduled(), and validUnscheduledSuccs().