MLIR
17.0.0git

#include "mlir/Dialect/Arith/Transforms/Passes.h"
#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Analysis/DataFlow/IntegerRangeAnalysis.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Dialect/Arith/Transforms/Passes.h.inc"
Go to the source code of this file.
Namespaces  
mlir  
Include the generated interface declarations.  
mlir::arith  
Macros  
#define  GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENT 
Functions  
static LogicalResult  staticallyNonNegative (DataFlowSolver &solver, Value v) 
Succeeds when a value is statically nonnegative in that it has a lower bound on its value (if it is treated as signed) and that bound is nonnegative. More...  
static LogicalResult  staticallyNonNegative (DataFlowSolver &solver, Operation *op) 
Succeeds if an op can be converted to its unsigned equivalent without changing its semantics. More...  
static LogicalResult  isCmpIConvertable (DataFlowSolver &solver, CmpIOp op) 
Succeeds when the comparison predicate is a signed operation and all the operands are nonnegative, indicating that the cmpi operation op can have its predicate changed to an unsigned equivalent. More...  
static CmpIPredicate  toUnsignedPred (CmpIPredicate pred) 
Return the unsigned equivalent of a signed comparison predicate, or the predicate itself if there is none. More...  
#define GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENT 
Definition at line 20 of file UnsignedWhenEquivalent.cpp.

static 
Succeeds when the comparison predicate is a signed operation and all the operands are nonnegative, indicating that the cmpi operation op
can have its predicate changed to an unsigned equivalent.
Definition at line 55 of file UnsignedWhenEquivalent.cpp.
References mlir::failure(), and mlir::success().

static 
Succeeds if an op can be converted to its unsigned equivalent without changing its semantics.
This is the case when none of its openands or results can be below 0 when analyzed from a signed perspective.
Definition at line 43 of file UnsignedWhenEquivalent.cpp.
References mlir::Operation::getOperands(), mlir::Operation::getResults(), staticallyNonNegative(), mlir::succeeded(), and mlir::success().

static 
Succeeds when a value is statically nonnegative in that it has a lower bound on its value (if it is treated as signed) and that bound is nonnegative.
Definition at line 32 of file UnsignedWhenEquivalent.cpp.
References mlir::failure(), mlir::DataFlowSolver::lookupState(), mlir::ConstantIntRanges::smin(), and mlir::success().
Referenced by staticallyNonNegative().

static 
Return the unsigned equivalent of a signed comparison predicate, or the predicate itself if there is none.
Definition at line 72 of file UnsignedWhenEquivalent.cpp.