struct BoUpSLP::TreeEntry

Declaration

struct BoUpSLP::TreeEntry { /* full declaration omitted */ };

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2216

Member Variables

public llvm::slpvectorizer::BoUpSLP::ValueList Scalars
A vector of scalars.
public llvm::Value* VectorizedValue = nullptr
The Scalars are vectorized into this value. It is initialized to Null.
public llvm::slpvectorizer::BoUpSLP::TreeEntry:: EntryState State
public SmallVector<int, 4> ReuseShuffleIndices
Does this sequence require some shuffling?
public SmallVector<unsigned int, 4> ReorderIndices
Does this entry require reordering?
public llvm::slpvectorizer::BoUpSLP::TreeEntry:: VecTreeTy& Container
Only used for Graphviz right now. Unfortunately GraphTrait::NodeRef has to be a pointer and needs to be able to initialize the child iterator. Thus we need a reference back to the container to translate the indices to entries.
public SmallVector< llvm::slpvectorizer::BoUpSLP::EdgeInfo, 1> UserTreeIndices
The TreeEntry index containing the user of this entry. We can actually have multiple users so the data structure is not truly a tree.
public int Idx = -1
The index of this treeEntry in VectorizableTree.
private SmallVector< llvm::slpvectorizer::BoUpSLP::ValueList, 2> Operands
The operands of each instruction in each lane Operands[op_index][lane]. Note: This helps avoid the replication of the code that performs the reordering of operands during buildTree_rec() and vectorizeTree().
private llvm::Instruction* MainOp = nullptr
The main/alternate instruction.
private llvm::Instruction* AltOp = nullptr

Method Overview

Methods

TreeEntry(llvm::slpvectorizer::BoUpSLP::
              TreeEntry::VecTreeTy& Container)

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2218

Parameters

llvm::slpvectorizer::BoUpSLP::TreeEntry:: VecTreeTy& Container

void dump() const

Description

Debug printer.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2440

int findLaneForValue(llvm::Value* V) const

Description

When ReuseReorderShuffleIndices is empty it just returns position of \p V within vector of Scalars. Otherwise, try to remap on its reuse index.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2425

Parameters

llvm::Value* V

llvm::Instruction* getAltOp() const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2410

unsigned int getAltOpcode() const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2419

llvm::Instruction* getMainOp() const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2406

unsigned int getNumOperands() const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2373

Returns

the number of operands.

unsigned int getOpcode() const

Description

The main/alternate opcodes for the list of instructions.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2415

llvm::slpvectorizer::BoUpSLP::ValueList&
getOperand(unsigned int OpIdx)

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2361

Parameters

unsigned int OpIdx

Returns

the \p OpIdx operand of this TreeEntry.

ArrayRef<llvm::Value*> getOperand(
    unsigned int OpIdx) const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2367

Parameters

unsigned int OpIdx

Returns

the \p OpIdx operand of this TreeEntry.

llvm::Value* getSingleOperand(
    unsigned int OpIdx) const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2376

Parameters

unsigned int OpIdx

Returns

the single \p OpIdx operand.

unsigned int getVectorFactor() const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2275

Returns

Final vectorization factor for the node. Defined by the total number of vectorized scalars, including those, used several times in the entry and counted in the \a ReuseShuffleIndices, if any.

bool hasEqualOperands(
    const llvm::slpvectorizer::BoUpSLP::TreeEntry&
        TE) const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2251

Parameters

const llvm::slpvectorizer::BoUpSLP::TreeEntry& TE

Returns

true if current entry has same operands as \p TE.

bool isAltShuffle() const

Description

Some of the instructions in the list have alternate opcodes.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2383

llvm::Value* isOneOf(llvm::Value* Op) const

Description

Chooses the correct key for scheduling data. If \p Op has the same (or alternate) opcode as \p OpValue, the key is \p Op. Otherwise the key is\p OpValue.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2394

Parameters

llvm::Value* Op

bool isOpcodeOrAlt(llvm::Instruction* I) const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2385

Parameters

llvm::Instruction* I

bool isSame(ArrayRef<llvm::Value*> VL) const

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2221

Parameters

ArrayRef<llvm::Value*> VL

Returns

true if the scalars in VL are equal to this entry.

void reorderOperands(ArrayRef<int> Mask)

Description

Reorders operands of the node to the given mask \p Mask.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2355

Parameters

ArrayRef<int> Mask

void setOperand(unsigned int OpIdx,
                ArrayRef<llvm::Value*> OpVL)

Description

Set this bundle's \p OpIdx'th operand to \p OpVL.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2326

Parameters

unsigned int OpIdx
ArrayRef<llvm::Value*> OpVL

void setOperandsInOrder()

Description

Set the operands of this bundle in their original order.

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2337

void setOperations(const(
    anonymous namespace)::InstructionsState& S)

Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2401

Parameters

const(anonymous namespace)::InstructionsState& S