[all-commits] [llvm/llvm-project] 11140c: [mlir] mark ChangeResult as nodiscard (#76147)
ftynse via All-commits
all-commits at lists.llvm.org
Thu Dec 21 08:59:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 11140cc238b8c4124e6f9efacb1601f81da096a0
https://github.com/llvm/llvm-project/commit/11140cc238b8c4124e6f9efacb1601f81da096a0
Author: Oleksandr "Alex" Zinenko <zinenko at google.com>
Date: 2023-12-21 (Thu, 21 Dec 2023)
Changed paths:
M mlir/include/mlir/Analysis/DataFlowFramework.h
M mlir/lib/Analysis/DataFlow/LivenessAnalysis.cpp
M mlir/test/lib/Analysis/TestDataFlowFramework.cpp
Log Message:
-----------
[mlir] mark ChangeResult as nodiscard (#76147)
This enum is used by dataflow analyses to indicate whether further
propagation is necessary to reach the fix point. Accidentally discarding
such a value will likely lead to propagation stopping early, leading to
incomplete or incorrect results. The most egregious example is the
duality between `join` on the analysis class, which triggers propagation
internally, and `join` on the lattice class that does not and expects
the caller to trigger it depending on the returned `ChangeResult`.
More information about the All-commits
mailing list