LLVM 22.0.0git
ScalarEvolutionExpander.cpp File Reference

Go to the source code of this file.

Macros

#define SCEV_DEBUG_WITH_TYPE(TYPE, X)

Functions

static const LoopPickMostRelevantLoop (const Loop *A, const Loop *B, DominatorTree &DT)
 PickMostRelevantLoop - Given two loops pick the one that's most relevant for SCEV expansion.
static bool canBeCheaplyTransformed (ScalarEvolution &SE, const SCEVAddRecExpr *Phi, const SCEVAddRecExpr *Requested, bool &InvertStep)
 Check whether we can cheaply express the requested SCEV in terms of the available PHI SCEV by truncation and/or inversion of the step.
static bool IsIncrementNSW (ScalarEvolution &SE, const SCEVAddRecExpr *AR)
static bool IsIncrementNUW (ScalarEvolution &SE, const SCEVAddRecExpr *AR)
template<typename T>
static InstructionCost costAndCollectOperands (const SCEVOperand &WorkItem, const TargetTransformInfo &TTI, TargetTransformInfo::TargetCostKind CostKind, SmallVectorImpl< SCEVOperand > &Worklist)

Macro Definition Documentation

◆ SCEV_DEBUG_WITH_TYPE

#define SCEV_DEBUG_WITH_TYPE ( TYPE,
X )

Definition at line 35 of file ScalarEvolutionExpander.cpp.

Referenced by llvm::SCEVExpander::replaceCongruentIVs().

Function Documentation

◆ canBeCheaplyTransformed()

bool canBeCheaplyTransformed ( ScalarEvolution & SE,
const SCEVAddRecExpr * Phi,
const SCEVAddRecExpr * Requested,
bool & InvertStep )
static

Check whether we can cheaply express the requested SCEV in terms of the available PHI SCEV by truncation and/or inversion of the step.

Definition at line 915 of file ScalarEvolutionExpander.cpp.

References llvm::dyn_cast(), llvm::Type::getIntegerBitWidth(), llvm::ScalarEvolution::getMinusSCEV(), llvm::SCEVAddRecExpr::getStart(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::SCEVAddRecExpr::getType(), and llvm::Type::isPointerTy().

◆ costAndCollectOperands()

◆ IsIncrementNSW()

◆ IsIncrementNUW()

◆ PickMostRelevantLoop()

const Loop * PickMostRelevantLoop ( const Loop * A,
const Loop * B,
DominatorTree & DT )
static

PickMostRelevantLoop - Given two loops pick the one that's most relevant for SCEV expansion.

If they are nested, this is the most nested. If they are neighboring, pick the later.

Definition at line 434 of file ScalarEvolutionExpander.cpp.

References A(), B(), and llvm::DominatorTree::dominates().