MLIR 22.0.0git
UnsignedWhenEquivalent.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::arith::impl::ArithUnsignedWhenEquivalentPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::arith
namespace  mlir::arith::impl

Macros

#define GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENTPASS

Functions

std::unique_ptr<::mlir::Passmlir::arith::impl::createArithUnsignedWhenEquivalentPass ()
std::unique_ptr<::mlir::Passmlir::arith::createArithUnsignedWhenEquivalentPass ()
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.
static CmpIPredicate toUnsignedPred (CmpIPredicate pred)
 Return the unsigned equivalent of a signed comparison predicate, or the predicate itself if there is none.

Macro Definition Documentation

◆ GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENTPASS

#define GEN_PASS_DEF_ARITHUNSIGNEDWHENEQUIVALENTPASS

Definition at line 21 of file UnsignedWhenEquivalent.cpp.

Function Documentation

◆ isCmpIConvertable()

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.

References success().

◆ toUnsignedPred()

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.