MLIR 22.0.0git
PWMAFunction.cpp File Reference
#include "mlir/Analysis/Presburger/PWMAFunction.h"
#include "mlir/Analysis/Presburger/IntegerRelation.h"
#include "mlir/Analysis/Presburger/PresburgerRelation.h"
#include "mlir/Analysis/Presburger/PresburgerSpace.h"
#include "mlir/Analysis/Presburger/Utils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <optional>

Go to the source code of this file.

Functions

static SmallVector< DynamicAPInt, 8 > subtractExprs (ArrayRef< DynamicAPInt > vecA, ArrayRef< DynamicAPInt > vecB)
template<OrderingKind comp>
static PresburgerSet tiebreakLex (const PWMAFunction::Piece &pieceA, const PWMAFunction::Piece &pieceB)
 A tiebreak function which breaks ties by comparing the outputs lexicographically based on the given comparison operator.
static void addDivisionConstraints (IntegerRelation &rel, const DivisionRepr &divs)
 Adds division constraints corresponding to local variables, given a relation and division representations of the local variables in the relation.

Function Documentation

◆ addDivisionConstraints()

◆ subtractExprs()

SmallVector< DynamicAPInt, 8 > subtractExprs ( ArrayRef< DynamicAPInt > vecA,
ArrayRef< DynamicAPInt > vecB )
static

Definition at line 42 of file PWMAFunction.cpp.

References result.

Referenced by mlir::presburger::MultiAffineFunction::getLexSet().

◆ tiebreakLex()

template<OrderingKind comp>
PresburgerSet tiebreakLex ( const PWMAFunction::Piece & pieceA,
const PWMAFunction::Piece & pieceB )
static

A tiebreak function which breaks ties by comparing the outputs lexicographically based on the given comparison operator.

This is templated since it is passed as a lambda.

Definition at line 371 of file PWMAFunction.cpp.

References mlir::presburger::PWMAFunction::Piece::domain, mlir::presburger::MultiAffineFunction::getLexSet(), mlir::presburger::PWMAFunction::Piece::output, and result.

Referenced by mlir::presburger::PWMAFunction::unionLexMax(), and mlir::presburger::PWMAFunction::unionLexMin().