LLVM 24.0.0git
SLPReductionUtils.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::slpvectorizer
 A private "module" namespace for types and utilities used by this pass.

Functions

static bool llvm::slpvectorizer::matchRdxBop (Instruction *I, Value *&V0, Value *&V1)
Instruction * llvm::slpvectorizer::getNonPhiOperand (Instruction *I, PHINode *Phi)
bool llvm::slpvectorizer::isReductionCandidate (Instruction *I)
Type * llvm::slpvectorizer::getBoolReduxWideTy (RecurKind RdxKind, Type *RootTy, Type *LeafTy)
BoolBitmask llvm::slpvectorizer::isBoolBitmaskRdx (RecurKind RdxKind, const SmallDenseMap< Value *, NarrowedLeafInfo > &NarrowedLeafShifts, const DataLayout &DL)
bool llvm::slpvectorizer::matchPackedFields (Value *V, unsigned MaxDepth, SmallVectorImpl< Value * > &Fields, SmallVectorImpl< Instruction * > &Chain)
 Matches V as the zero-extended fields, placed one after another from the lowest bit and filling V completely.
Value * llvm::slpvectorizer::tryEmitBoolReduxBitcastCmp (IRBuilderBase &Builder, const TargetTransformInfo &TTI, RecurKind RdxKind, Value *Vec, const Value *Root, FastMathFlags FMF, TargetTransformInfo::TargetCostKind CostKind)
 Emits the booleanized logical and/or reduction of Vec with the i1 root Root as trunc+bitcast+cmp (all-ones comparison for And, zero for Or) if it is cheaper than the wide reduction plus the result trunc.
Instruction * llvm::slpvectorizer::getReductionInstr (const DominatorTree *DT, PHINode *P, BasicBlock *ParentBB, LoopInfo *LI)
 Try to get a reduction instruction from phi node P in block ParentBB, considering incoming values from ParentBB or the containing loop latch.
bool llvm::slpvectorizer::isReductionOfConsecutiveAccumulators (Instruction *Root, const LoopInfo &LI, const DataLayout &DL, ScalarEvolution &SE, unsigned MaxDepth, SmallVectorImpl< unsigned > &Shape, SmallPtrSetImpl< PHINode * > &Accs)
 Checks if the reduction, rooted at Root, reduces the loop accumulators, whose updates are the same expressions Shape in the same block, loading from consecutive addresses at each position.
RecurKind llvm::slpvectorizer::getRdxKind (Value *V)
 Gets recurrence kind from the specified value.