MLIR  19.0.0git
Classes | Namespaces | Enumerations | Functions
Utils.h File Reference
#include "mlir/Analysis/Presburger/MPInt.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallBitVector.h"
#include "mlir/Analysis/Presburger/Matrix.h"
#include <optional>

Go to the source code of this file.

Classes

class  mlir::presburger::MaybeOptimum< T >
 
struct  mlir::presburger::MaybeLocalRepr
 MaybeLocalRepr contains the indices of the constraints that can be expressed as a floordiv of an affine function. More...
 
class  mlir::presburger::DivisionRepr
 Class storing division representation of local variables of a constraint system. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::presburger
 

Enumerations

enum class  mlir::presburger::OptimumKind { mlir::presburger::Empty , mlir::presburger::Unbounded , mlir::presburger::Bounded }
 This class represents the result of operations optimizing something subject to some constraints. More...
 
enum class  mlir::presburger::ReprKind { mlir::presburger::Inequality , mlir::presburger::Equality , mlir::presburger::None }
 ReprKind enum is used to set the constraint type in MaybeLocalRepr. More...
 

Functions

SmallVector< MPInt, 8 > mlir::presburger::getDivUpperBound (ArrayRef< MPInt > dividend, const MPInt &divisor, unsigned localVarIdx)
 If q is defined to be equal to expr floordiv d, this equivalent to saying that q is an integer and q is subject to the inequalities 0 <= expr - d*q <= c - 1 (quotient remainder theorem). More...
 
SmallVector< MPInt, 8 > mlir::presburger::getDivLowerBound (ArrayRef< MPInt > dividend, const MPInt &divisor, unsigned localVarIdx)
 
llvm::SmallBitVector mlir::presburger::getSubrangeBitVector (unsigned len, unsigned setOffset, unsigned numSet)
 
SmallVector< MPInt, 8 > mlir::presburger::getMPIntVec (ArrayRef< int64_t > range)
 Check if the pos^th variable can be expressed as a floordiv of an affine function of other variables (where the divisor is a positive constant). More...
 
SmallVector< int64_t, 8 > mlir::presburger::getInt64Vec (ArrayRef< MPInt > range)
 Return the given array as an array of int64_t. More...
 
MaybeLocalRepr mlir::presburger::computeSingleVarRepr (const IntegerRelation &cst, ArrayRef< bool > foundRepr, unsigned pos, MutableArrayRef< MPInt > dividend, MPInt &divisor)
 Returns the MaybeLocalRepr struct which contains the indices of the constraints that can be expressed as a floordiv of an affine function. More...
 
MaybeLocalRepr mlir::presburger::computeSingleVarRepr (const IntegerRelation &cst, ArrayRef< bool > foundRepr, unsigned pos, SmallVector< int64_t, 8 > &dividend, unsigned &divisor)
 The following overload using int64_t is required for a callsite in AffineStructures.h. More...
 
void mlir::presburger::mergeLocalVars (IntegerRelation &relA, IntegerRelation &relB, llvm::function_ref< bool(unsigned i, unsigned j)> merge)
 Given two relations, A and B, add additional local vars to the sets such that both have the union of the local vars in each set, without changing the set of points that lie in A and B. More...
 
MPInt mlir::presburger::gcdRange (ArrayRef< MPInt > range)
 Compute the gcd of the range. More...
 
MPInt mlir::presburger::normalizeRange (MutableArrayRef< MPInt > range)
 Divide the range by its gcd and return the gcd. More...
 
void mlir::presburger::normalizeDiv (MutableArrayRef< MPInt > num, MPInt &denom)
 Normalize the given (numerator, denominator) pair by dividing out the common factors between them. More...
 
SmallVector< MPInt, 8 > mlir::presburger::getNegatedCoeffs (ArrayRef< MPInt > coeffs)
 Return coeffs with all the elements negated. More...
 
SmallVector< MPInt, 8 > mlir::presburger::getComplementIneq (ArrayRef< MPInt > ineq)
 Return the complement of the given inequality. More...
 
Fraction mlir::presburger::dotProduct (ArrayRef< Fraction > a, ArrayRef< Fraction > b)
 Compute the dot product of two vectors. More...
 
std::vector< Fractionmlir::presburger::multiplyPolynomials (ArrayRef< Fraction > a, ArrayRef< Fraction > b)
 Find the product of two polynomials, each given by an array of coefficients. More...
 
bool mlir::presburger::isRangeZero (ArrayRef< Fraction > arr)