MLIR  21.0.0git
Namespaces | Macros | Functions
UnsignedWhenEquivalent.cpp File Reference
#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/IR/PatternMatch.h"
#include "mlir/Transforms/WalkPatternRewriteDriver.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 isCmpIConvertable (DataFlowSolver &solver, CmpIOp op)
 Succeeds when the comparison predicate is a signed operation and all the operands are non-negative, 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...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENT

#define GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENT

Definition at line 21 of file UnsignedWhenEquivalent.cpp.

Function Documentation

◆ isCmpIConvertable()

static LogicalResult isCmpIConvertable ( DataFlowSolver solver,
CmpIOp  op 
)
static

Succeeds when the comparison predicate is a signed operation and all the operands are non-negative, indicating that the cmpi operation op can have its predicate changed to an unsigned equivalent.

Definition at line 33 of file UnsignedWhenEquivalent.cpp.

◆ toUnsignedPred()

static CmpIPredicate toUnsignedPred ( CmpIPredicate  pred)
static

Return the unsigned equivalent of a signed comparison predicate, or the predicate itself if there is none.

Definition at line 50 of file UnsignedWhenEquivalent.cpp.