MLIR  20.0.0git
Namespaces | Macros | Enumerations | Functions
IntRangeOptimizations.cpp File Reference
#include <utility>
#include "mlir/Analysis/DataFlowFramework.h"
#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/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Transforms/FoldUtils.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.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_ARITHINTRANGEOPTS
 
#define GEN_PASS_DEF_ARITHINTRANGENARROWING
 

Enumerations

enum class  CastKind : uint8_t
 

Functions

static std::optional< APInt > getMaybeConstantValue (DataFlowSolver &solver, Value value)
 
static void copyIntegerRange (DataFlowSolver &solver, Value oldVal, Value newVal)
 
static LogicalResult maybeReplaceWithConstant (DataFlowSolver &solver, PatternRewriter &rewriter, Value value)
 Patterned after SCCP. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_ARITHINTRANGENARROWING

#define GEN_PASS_DEF_ARITHINTRANGENARROWING

Definition at line 30 of file IntRangeOptimizations.cpp.

◆ GEN_PASS_DEF_ARITHINTRANGEOPTS

#define GEN_PASS_DEF_ARITHINTRANGEOPTS

Definition at line 27 of file IntRangeOptimizations.cpp.

Enumeration Type Documentation

◆ CastKind

enum CastKind : uint8_t
strong

Definition at line 241 of file IntRangeOptimizations.cpp.

Function Documentation

◆ copyIntegerRange()

static void copyIntegerRange ( DataFlowSolver solver,
Value  oldVal,
Value  newVal 
)
static

◆ getMaybeConstantValue()

static std::optional<APInt> getMaybeConstantValue ( DataFlowSolver solver,
Value  value 
)
static

◆ maybeReplaceWithConstant()

static LogicalResult maybeReplaceWithConstant ( DataFlowSolver solver,
PatternRewriter rewriter,
Value  value 
)
static