[Mlir-commits] [mlir] [mlir][side effect] refactor(*): Include more precise side effects (PR #94213)

donald chen llvmlistbot at llvm.org
Mon Jun 10 04:53:31 PDT 2024


================
@@ -199,7 +217,17 @@ class EffectInstance {
   /// Return the value the effect is applied on, or nullptr if there isn't a
   /// known value being affected.
   Value getValue() const {
-    return value ? llvm::dyn_cast_if_present<Value>(value) : Value();
+    if (!value || llvm::isa_and_present<SymbolRefAttr>(value)) {
+      return Value();
+    }
+    if (Value v = llvm::dyn_cast_if_present<Value>(value)) {
+      return v;
+    }
+    return cast_if_present<OpOperand *>(value)->get();
+  }
+
+  OpOperand *getOpOperand() const {
----------------
cxy-1993 wrote:

DONE

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


More information about the Mlir-commits mailing list