LLVM 20.0.0git
|
#include "llvm/Analysis/ScalarEvolution.h"
Public Member Functions | |
const SCEV * | rewrite (const SCEV *Expr) const |
Try to apply the collected loop guards to Expr . | |
Static Public Member Functions | |
static LoopGuards | collect (const Loop *L, ScalarEvolution &SE) |
Collect rewrite map for loop guards for loop L , together with flags indicating if NUW and NSW can be preserved during rewriting. | |
Definition at line 1301 of file ScalarEvolution.h.
|
static |
Collect rewrite map for loop guards for loop L
, together with flags indicating if NUW and NSW can be preserved during rewriting.
Definition at line 15115 of file ScalarEvolution.cpp.
References llvm::append_range(), assert(), llvm::AssumptionCache::assumptions(), llvm::CallingConv::C, Cond, llvm::ConstantRange::contains(), llvm::ScalarEvolution::containsAddRecurrence(), llvm::DominatorTree::dominates(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorBase< Size_T >::empty(), From, llvm::ScalarEvolution::getAddExpr(), llvm::BranchInst::getCondition(), llvm::ScalarEvolution::getConstant(), llvm::Module::getFunction(), llvm::ScalarEvolution::getMinMaxExpr(), llvm::ScalarEvolution::getMinusSCEV(), llvm::ScalarEvolution::getMulExpr(), llvm::Intrinsic::getName(), llvm::ScalarEvolution::getOne(), llvm::GlobalValue::getParent(), llvm::ScalarEvolution::getSCEV(), llvm::ScalarEvolution::getSignedRange(), llvm::ScalarEvolution::getSMaxExpr(), llvm::ScalarEvolution::getSMinExpr(), llvm::BranchInst::getSuccessor(), llvm::CmpInst::getSwappedPredicate(), llvm::Value::getType(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUMaxExpr(), llvm::ScalarEvolution::getUMinExpr(), llvm::ScalarEvolution::getUnsignedRange(), llvm::ScalarEvolution::getURemExpr(), llvm::SCEVConstant::getValue(), I, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::ScalarEvolution::isKnownNonNegative(), llvm::Constant::isNullValue(), llvm::Type::isPointerTy(), llvm::BranchInst::isUnconditional(), llvm::APInt::isZero(), llvm::SCEV::isZero(), LHS, llvm::PatternMatch::m_LogicalAnd(), llvm::PatternMatch::m_LogicalOr(), llvm::PatternMatch::m_Value(), llvm::ConstantRange::makeExactICmpRegion(), llvm::PatternMatch::match(), llvm::Mul, llvm::SCEV::operands(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::reverse(), rewrite(), RHS, llvm::SmallVectorBase< Size_T >::size(), llvm::SMax, llvm::SMin, llvm::ConstantRange::sub(), std::swap(), llvm::UMax, llvm::UMin, and llvm::APInt::urem().
Referenced by llvm::ScalarEvolution::applyLoopGuards().
Try to apply the collected loop guards to Expr
.
A rewriter to replace SCEV expressions in Map with the corresponding entry in the map. It skips AddRecExpr because we cannot guarantee that the replacement is loop invariant in the loop of the AddRec.
Definition at line 15553 of file ScalarEvolution.cpp.
References llvm::SCEV::FlagAnyWrap, llvm::SCEV::FlagNSW, llvm::SCEV::FlagNUW, llvm::IntegerType::get(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getContext(), llvm::ScalarEvolution::getMulExpr(), llvm::SCEVNAryExpr::getNoWrapFlags(), llvm::SCEVCastExpr::getOperand(), llvm::Type::getScalarSizeInBits(), llvm::SCEVCastExpr::getType(), llvm::ScalarEvolution::getZeroExtendExpr(), I, llvm::ScalarEvolution::maskFlags(), llvm::SCEVNAryExpr::operands(), Operands, Rewriter, llvm::ScalarEvolution::setFlags(), llvm::SCEVRewriteVisitor< SC >::visitSignExtendExpr(), llvm::SCEVRewriteVisitor< SC >::visitSMinExpr(), llvm::SCEVRewriteVisitor< SC >::visitUMinExpr(), and llvm::SCEVRewriteVisitor< SC >::visitZeroExtendExpr().
Referenced by llvm::ScalarEvolution::applyLoopGuards(), and collect().