[Mlir-commits] [mlir] [mlir][dataflow] disallow outside use of propagateIfChanged for DataFlowSolver (PR #120885)

Jeff Niu llvmlistbot at llvm.org
Thu Dec 26 17:08:43 PST 2024


https://github.com/Mogball requested changes to this pull request.

Thanks for the PR and I agree that this being a public method is a bit of a footgun. However, directly invoking this method inside other dataflow variables is the intended usage of the method. Do you have a better idea on how an API can be exposed that way? `propagateIfChanged` is supposed to be a shorthand so that users don't forget to check the result of `join`, for example. Maybe it should be marked as `nodiscard`? (Unless it already is...). Alternatively, placing an assert inside `propagateIfChanged` checking that the solver is running might do the trick.

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


More information about the Mlir-commits mailing list