[llvm] [SandboxVec][DAG] Implement UnscheduledSuccs (PR #112255)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 14:26:21 PDT 2024
================
@@ -215,8 +224,15 @@ class MemDGNode final : public DGNode {
MemDGNode *getPrevNode() const { return PrevMemN; }
/// \Returns the next Mem DGNode in instruction order.
MemDGNode *getNextNode() const { return NextMemN; }
- /// Adds the mem dependency edge PredN->this.
- void addMemPred(MemDGNode *PredN) { MemPreds.insert(PredN); }
+ /// Adds the mem dependency edge PredN->this. This also increments the
+ /// UnscheduledSuccs counter of the predecessor if this node has not been
+ /// scheduled.
+ void addMemPred(MemDGNode *PredN) {
+ MemPreds.insert(PredN);
+ if (!Scheduled) {
+ ++PredN->UnscheduledSuccs;
----------------
vporpo wrote:
That's fine, the same node can exist in MemPreds multiple times.
https://github.com/llvm/llvm-project/pull/112255
More information about the llvm-commits
mailing list