A pass that sets load/store/mem‐intrinsic alignments from assume bundles.

Synopsis

Declared in <llvm/Transforms/Scalar/AlignmentFromAssumptions.h>

struct AlignmentFromAssumptionsPass
    : OptionalPassInfoMixin<AlignmentFromAssumptionsPass>

Description

Uses ScalarEvolution to interpret align operand bundles on @llvm.assume calls and strengthen the alignments of dominated loads, stores, and memory intrinsics. The main motivation is complex alignment assumptions on vector memory operations that appear after vectorization and unrolling.

Base Classes

Name

Description

OptionalPassInfoMixin<AlignmentFromAssumptionsPass>

A CRTP mix‐in for passes that can be skipped.

Member Functions

Name

Description

extractAlignmentInfo

Extract pointer, alignment, and offset SCEVs from an assume align bundle.

processAssumption

Apply one assume align bundle to dominated users of the aligned pointer.

run

Run the pass over F using analyses from AM.

runImpl

Run the transformation using already‐fetched analyses (legacy PM glue).

Static Member Functions

Name

Description

isRequired

Return false; optional passes may be skipped.

Data Members

Name

Description

DT

Dominator tree used to check whether an assume applies at a use.

SE

ScalarEvolution used while extracting and applying alignment info.

Created with MrDocs