[llvm] [SandboxVec][DAG] MemDGNode for memory-dependency candidate nodes (PR #109684)
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 09:50:59 PDT 2024
================
@@ -31,6 +31,25 @@ void DGNode::dump() const {
}
#endif // NDEBUG
+Interval<MemDGNode>
+MemDGNodeIntervalBuilder::make(const Interval<Instruction> &Instrs,
+ DependencyGraph &DAG) {
+ // If top or bottom instructions are not mem-dep candidate nodes we need to
+ // walk down/up the chain and find the mem-dep ones.
+ Instruction *MemTopI = Instrs.top();
+ Instruction *MemBotI = Instrs.bottom();
+ while (!DGNode::isMemDepCandidate(MemTopI) && MemTopI != MemBotI)
+ MemTopI = MemTopI->getNextNode();
----------------
alinas wrote:
I'm missing how getNextNode works for an Instruction here.
https://github.com/llvm/llvm-project/pull/109684
More information about the llvm-commits
mailing list