|
MLIR 23.0.0git
|
#include "mlir/Analysis/DataFlow/IntegerRangeAnalysis.h"#include "mlir/Analysis/DataFlow/SparseAnalysis.h"#include "mlir/Analysis/DataFlowFramework.h"#include "mlir/IR/BuiltinAttributes.h"#include "mlir/IR/Dialect.h"#include "mlir/IR/OpDefinition.h"#include "mlir/IR/Operation.h"#include "mlir/IR/OperationSupport.h"#include "mlir/IR/TypeUtilities.h"#include "mlir/IR/Value.h"#include "mlir/Interfaces/ControlFlowInterfaces.h"#include "mlir/Interfaces/InferIntRangeInterface.h"#include "mlir/Interfaces/LoopLikeInterface.h"#include "mlir/Support/DebugStringHelper.h"#include "mlir/Support/LLVM.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Support/Casting.h"#include "llvm/Support/Debug.h"#include "llvm/Support/DebugLog.h"#include <cassert>#include <optional>#include <utility>Go to the source code of this file.
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::dataflow |
Macros | |
| #define | DEBUG_TYPE "int-range-analysis" |
Functions | |
| LogicalResult | mlir::dataflow::staticallyNonNegative (DataFlowSolver &solver, Value v) |
| Succeeds when a value is statically non-negative in that it has a lower bound on its value (if it is treated as signed) and that bound is non-negative. | |
| LogicalResult | mlir::dataflow::staticallyNonNegative (DataFlowSolver &solver, Operation *op) |
| Succeeds if an op can be converted to its unsigned equivalent without changing its semantics. | |
Variables | |
| static constexpr unsigned | kIntegerRangeWideningBudget = 128 |
| Number of merge-site joins a single integer-range lattice element is allowed to absorb before IntegerValueRangeLattice::join forces it to its max as a sound over-approximation. | |
| #define DEBUG_TYPE "int-range-analysis" |
Definition at line 38 of file IntegerRangeAnalysis.cpp.
|
staticconstexpr |
Number of merge-site joins a single integer-range lattice element is allowed to absorb before IntegerValueRangeLattice::join forces it to its max as a sound over-approximation.
Trade-off: high enough that realistic loops with dynamic bounds (which typically converge to a tight range in a small number of merge iterations) are not widened prematurely; low enough that the +1 ratchet pathology this widening exists to cut off (loop-carried ranges growing by one per worklist visit) terminates after at most this many extra solver iterations rather than ~2^31.
Definition at line 71 of file IntegerRangeAnalysis.cpp.
Referenced by mlir::dataflow::IntegerValueRangeLattice::join().