[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
================
@@ -45,9 +45,13 @@ void IntegerValueRangeLattice::onUpdate(DataFlowSolver *solver) const {
std::optional<APInt> constant = getValue().getValue().getConstantValue();
auto value = cast<Value>(anchor);
auto *cv = solver->getOrCreateState<Lattice<ConstantValue>>(value);
- if (!constant)
- return solver->propagateIfChanged(
- cv, cv->join(ConstantValue::getUnknownConstant()));
+ if (!constant) {
----------------
Mogball wrote:
This is actually the intended usage of the `propagateIfChanged` method. Data flow variables that depend on each other can issue updates to each other through this method.
https://github.com/llvm/llvm-project/pull/120885
More information about the Mlir-commits
mailing list