[MLIR][Presburger] Support lexicographic max/min union of two PWMAFunction
authorGroverkss <groverkss@gmail.com>
Wed, 6 Jul 2022 15:08:15 +0000 (16:08 +0100)
committerGroverkss <groverkss@gmail.com>
Wed, 6 Jul 2022 15:08:20 +0000 (16:08 +0100)
commita18f843f075f3fbe461d0f114a28e6e383d7c736
tree4836bf9fe7c7a381afec8fb495ff72d4986b4b3e
parentb5b6d3a41b4eba23b604f37942b892a382caae57
[MLIR][Presburger] Support lexicographic max/min union of two PWMAFunction

This patch implements a lexicographic max/min union of two PWMAFunctions.

The lexmax/lexmin union of two functions is defined as a function defined on
the union of the input domains of both functions, such that when only one of the
functions are defined, it outputs the same as that function, and if both are
defined, it outputs the lexmax/lexmin of the two outputs. On points where
neither function is defined, the union is not defined either.

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D128829
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
mlir/lib/Analysis/Presburger/IntegerRelation.cpp
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
mlir/unittests/Analysis/Presburger/PWMAFunctionTest.cpp