Determine if the target supports unaligned memory accesses.

Synopsis

Declared in <llvm/Analysis/TargetTransformInfo.h>

bool
allowsMisalignedMemoryAccesses(
    LLVMContext& Context,
    unsigned int BitWidth,
    unsigned int AddressSpace = 0,
    Align Alignment = Align(1),
    unsigned int* Fast = nullptr) const;

Return Value

True if the target supports unaligned memory accesses of the given type.

Parameters

Name

Description

Context

LLVM context.

BitWidth

Access size in bits.

AddressSpace

Address space of the access.

Alignment

Alignment of the access.

Fast

Optional out‐parameter set if the access is fast.

Created with MrDocs