class InterleavedAccessInfo

Declaration

class InterleavedAccessInfo { /* full declaration omitted */ };

Description

Drive the analysis of interleaved memory accesses in the loop. Use this class to analyze interleaved accesses only when we can vectorize a loop. Otherwise it's meaningless to do analysis as the vectorization on interleaved accesses is unsafe. The analysis collects interleave groups and records the relationships between the member and the group in a map.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:560

Method Overview

Methods

InterleavedAccessInfo(
    llvm::PredicatedScalarEvolution& PSE,
    llvm::Loop* L,
    llvm::DominatorTree* DT,
    llvm::LoopInfo* LI,
    const llvm::LoopAccessInfo* LAI)

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:562

Parameters

llvm::PredicatedScalarEvolution& PSE
llvm::Loop* L
llvm::DominatorTree* DT
llvm::LoopInfo* LI
const llvm::LoopAccessInfo* LAI

void analyzeInterleaving(
    bool EnableMaskedInterleavedGroup)

Description

Analyze the interleaved accesses and collect them in interleave groups. Substitute symbolic strides using \p Strides. Consider also predicated loads/stores in the analysis if\p EnableMaskedInterleavedGroup is true.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:573

Parameters

bool EnableMaskedInterleavedGroup

InterleaveGroup<llvm::Instruction>*
getInterleaveGroup(
    const llvm::Instruction* Instr) const

Description

Get the interleave group that \p Instr belongs to.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:597

Parameters

const llvm::Instruction* Instr

Returns

nullptr if doesn't have such group.

iterator_range<SmallPtrSetIterator<
    llvm::InterleaveGroup<Instruction>*>>
getInterleaveGroups()

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:604

void invalidateGroupsRequiringScalarEpilogue()

Description

Invalidate groups that require a scalar epilogue (due to gaps). This can happen when optimizing for size forbids a scalar epilogue, and the gap cannot be filtered by masking the load/store.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:615

bool isInterleaved(llvm::Instruction* Instr) const

Description

Check if \p Instr belongs to any interleave group.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:589

Parameters

llvm::Instruction* Instr

bool requiresScalarEpilogue() const

Description

Returns true if an interleaved group that may access memory out-of-bounds requires a scalar epilogue iteration for correctness.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:610

void reset()

Description

Invalidate groups, e.g., in case all blocks in loop will be predicated contrary to original assumption. Although we currently prevent group formation for predicated accesses, we may be able to relax this limitation in the future once we handle more complicated blocks.

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:579

~InterleavedAccessInfo()

Declared at: llvm/include/llvm/Analysis/VectorUtils.h:567