class VPlanSlp
Declaration
class VPlanSlp { /* full declaration omitted */ };
Description
Class that maps (parts of) an existing VPlan to trees of combined VPInstructions.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2963
Member Variables
- private DenseMap<SmallVector<llvm::VPValue*, 4>, llvm::VPInstruction*, llvm::VPlanSlp::BundleDenseMapInfo> BundleToCombined
- Mapping of values in the original VPlan to a combined VPInstruction.
- private llvm::VPInterleavedAccessInfo& IAI
- private const llvm::VPBasicBlock& BB
- Basic block to operate on. For now, only instructions in a single BB are considered.
- private bool CompletelySLP = true
- Indicates whether we managed to combine all visited instructions or not.
- private unsigned int WidestBundleBits = 0
- Width of the widest combined bundle in bits.
- private SmallVector<llvm::VPlanSlp::MultiNodeOpTy, 4> MultiNodeOps
- private bool MultiNodeActive = false
- Indicates whether we are building a multi node currently.
Method Overview
- public VPlanSlp(llvm::VPInterleavedAccessInfo & IAI, llvm::VPBasicBlock & BB)
- private void addCombined(ArrayRef<llvm::VPValue *> Operands, llvm::VPInstruction * New)
- private bool areVectorizable(ArrayRef<llvm::VPValue *> Operands) const
- public llvm::VPInstruction * buildGraph(ArrayRef<llvm::VPValue *> Operands)
- private void dumpBundle(ArrayRef<llvm::VPValue *> Values)
- private std::pair<OpMode, VPValue *> getBest(llvm::VPlanSlp::OpMode Mode, llvm::VPValue * Last, SmallPtrSetImpl<llvm::VPValue *> & Candidates, llvm::VPInterleavedAccessInfo & IAI)
- public unsigned int getWidestBundleBits() const
- public bool isCompletelySLP() const
- private llvm::VPInstruction * markFailed()
- private SmallVector<llvm::VPlanSlp::MultiNodeOpTy, 4> reorderMultiNodeOps()
- public ~VPlanSlp()
Methods
¶VPlanSlp(llvm::VPInterleavedAccessInfo& IAI,
llvm::VPBasicBlock& BB)
VPlanSlp(llvm::VPInterleavedAccessInfo& IAI,
llvm::VPBasicBlock& BB)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3041
Parameters
¶void addCombined(
ArrayRef<llvm::VPValue*> Operands,
llvm::VPInstruction* New)
void addCombined(
ArrayRef<llvm::VPValue*> Operands,
llvm::VPInstruction* New)
Description
Add combined instruction \p New for the bundle \p Operands.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3019
Parameters
- ArrayRef<llvm::VPValue*> Operands
- llvm::VPInstruction* New
¶bool areVectorizable(
ArrayRef<llvm::VPValue*> Operands) const
bool areVectorizable(
ArrayRef<llvm::VPValue*> Operands) const
Description
Check if we can vectorize Operands together.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3016
Parameters
- ArrayRef<llvm::VPValue*> Operands
¶llvm::VPInstruction* buildGraph(
ArrayRef<llvm::VPValue*> Operands)
llvm::VPInstruction* buildGraph(
ArrayRef<llvm::VPValue*> Operands)
Description
Tries to build an SLP tree rooted at \p Operands and returns a VPInstruction combining \p Operands, if they can be combined.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3047
Parameters
- ArrayRef<llvm::VPValue*> Operands
¶void dumpBundle(ArrayRef<llvm::VPValue*> Values)
void dumpBundle(ArrayRef<llvm::VPValue*> Values)
Description
Print bundle \p Values to dbgs().
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3037
Parameters
- ArrayRef<llvm::VPValue*> Values
¶std::pair<OpMode, VPValue*> getBest(
llvm::VPlanSlp::OpMode Mode,
llvm::VPValue* Last,
SmallPtrSetImpl<llvm::VPValue*>& Candidates,
llvm::VPInterleavedAccessInfo& IAI)
std::pair<OpMode, VPValue*> getBest(
llvm::VPlanSlp::OpMode Mode,
llvm::VPValue* Last,
SmallPtrSetImpl<llvm::VPValue*>& Candidates,
llvm::VPInterleavedAccessInfo& IAI)
Description
Choose the best candidate to use for the lane after \p Last. The set of candidates to choose from are values with an opcode matching \p Last's or loads consecutive to \p Last.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3031
Parameters
- llvm::VPlanSlp::OpMode Mode
- llvm::VPValue* Last
- SmallPtrSetImpl<llvm::VPValue*>& Candidates
- llvm::VPInterleavedAccessInfo& IAI
¶unsigned int getWidestBundleBits() const
unsigned int getWidestBundleBits() const
Description
Return the width of the widest combined bundle in bits.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3050
¶bool isCompletelySLP() const
bool isCompletelySLP() const
Description
Return true if all visited instruction can be combined.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3053
¶llvm::VPInstruction* markFailed()
llvm::VPInstruction* markFailed()
Description
Indicate we hit a bundle we failed to combine. Returns nullptr for now.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3022
¶SmallVector<llvm::VPlanSlp::MultiNodeOpTy, 4>
reorderMultiNodeOps()
SmallVector<llvm::VPlanSlp::MultiNodeOpTy, 4>
reorderMultiNodeOps()
Description
Reorder operands in the multi node to maximize sequential memory access and commutative operations.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3026
¶~VPlanSlp()
~VPlanSlp()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:3043