[llvm] [SandboxVec][DAG] Implement UnscheduledSuccs (PR #112255)
Sriraman Tallam via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 14:24:40 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;
----------------
tmsri wrote:
What if PredN already exists in MemPreds?
https://github.com/llvm/llvm-project/pull/112255
More information about the llvm-commits
mailing list