Class ConstIntBoundAnalyzer#

Class Documentation#

class ConstIntBoundAnalyzer#

Analyzer to get constant integer bound over expression.

Public Types

using BoundMapType = std::unordered_map<PrimExpr, ConstIntBound, ffi::ObjectPtrHash, ffi::ObjectPtrEqual>#

Query results keyed by expression object identity.

Public Functions

ConstIntBound operator()(const PrimExpr &expr) const#

Compute conservative constant bounds under the current premises.

Parameters:

expr – The integer expression to analyze.

Returns:

Inclusive bounds; unproved endpoints use the infinity sentinels.

ConstIntBound operator()(const PrimExpr &expr, BoundMapType *bound)#

Compute bounds and optionally collect intermediate query results.

Parameters:
  • expr – The integer expression to analyze.

  • bound – Optional output map, cleared on entry and borrowed only for this call. Its results describe the current premises and are not updated by later synchronization.

Returns:

Inclusive conservative bounds for expr.

bool IsBound(const Var &var) const#

Check whether a binding or recognized predicate supplies bounds for a variable.

Parameters:

var – The variable.

Returns:

True when such information is recorded, even if its bounds are unbounded.