[Mlir-commits] [mlir] [MLIR][Affine] Make affine fusion MDG API const correct (PR #125994)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Feb 9 19:03:28 PST 2025


================
@@ -156,10 +158,19 @@ struct MemRefDependenceGraph {
   bool init();
 
   // Returns the graph node for 'id'.
-  Node *getNode(unsigned id);
+  const Node *getNode(unsigned id) const;
+  Node *getNode(unsigned id) {
+    return const_cast<Node *>(
+        static_cast<const MemRefDependenceGraph *>(this)->getNode(id));
+  }
+  bool hasNode(unsigned id) const { return nodes.contains(id); }
----------------
patel-vimal wrote:

Doc comment is missing.

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


More information about the Mlir-commits mailing list