[llvm] [SandboxVec][DAG] Cleanup: Move callback registration from Scheduler to DAG (PR #116455)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 19:47:33 PST 2024


================
@@ -325,9 +328,26 @@ class DependencyGraph {
   /// chain.
   void createNewNodes(const Interval<Instruction> &NewInterval);
 
+  /// Called by the callbacks when a new instruction \p I has been created.
+  void notifyCreateInstr(Instruction *I) {
+    getOrCreateNode(I);
+    // TODO: Update the dependencies for the new node.
+    // TODO: Update the MemDGNode chain to include the new node if needed.
+  }
+
 public:
   DependencyGraph(AAResults &AA)
----------------
vporpo wrote:

Good catch, this is only used by some tests. I removed the constructor and updated the tests.

https://github.com/llvm/llvm-project/pull/116455


More information about the llvm-commits mailing list