LLVM: llvm::Align Struct Reference (original) (raw)

This struct is a compact representation of a valid (non-zero power of two) alignment. More...

#include "[llvm/Support/Alignment.h](Alignment%5F8h%5Fsource.html)"

Public Member Functions
constexpr Align ()=default
Default is byte-aligned.
constexpr Align (const Align &Other)=default
Do not perform checks in case of copy/move construct/assign, because the checks have been performed when building Other.
constexpr Align (Align &&Other)=default
constexpr Align & operator= (const Align &Other)=default
constexpr Align & operator= (Align &&Other)=default
Align (uint64_t Value)
constexpr uint64_t value () const
This is a hole in the type system and should not be abused.
Align previous () const
Static Public Member Functions
template<size_t kValue>
static constexpr Align Constant ()
Allow constructions of constexpr Align.
template<typename T>
static constexpr Align Of ()
Allow constructions of constexpr Align from types.
Friends
struct MaybeAlign
The log2 of the required alignment.
unsigned Log2 (Align A)
Returns the log2 of the alignment.
bool operator== (Align Lhs, Align Rhs)
Comparisons operators between Align.
bool operator!= (Align Lhs, Align Rhs)
bool operator<= (Align Lhs, Align Rhs)
bool operator>= (Align Lhs, Align Rhs)
bool operator< (Align Lhs, Align Rhs)
bool operator> (Align Lhs, Align Rhs)
unsigned encode (struct MaybeAlign A)
Returns a representation of the alignment that encodes undefined as 0.
struct MaybeAlign decodeMaybeAlign (unsigned Value)
Dual operation of the encode function above.

This struct is a compact representation of a valid (non-zero power of two) alignment.

It is suitable for use as static global constants.

Definition at line 39 of file Alignment.h.

Align() [1/4]

llvm::Align::Align ( ) constexprdefault

Default is byte-aligned.

Referenced by Constant().

Align() [2/4]

llvm::Align::Align ( const Align & Other) constexprdefault

Do not perform checks in case of copy/move construct/assign, because the checks have been performed when building Other.

References llvm::Other.

Align() [3/4]

llvm::Align::Align ( Align && Other) constexprdefault

Align() [4/4]

llvm::Align::Align ( uint64_t Value) inlineexplicit

Constant()

template<size_t kValue>

constexpr Align llvm::Align::Constant ( ) inlinestaticconstexpr

Of()

template<typename T>

constexpr Align llvm::Align::Of ( ) inlinestaticconstexpr

Allow constructions of constexpr Align from types.

Compile time equivalent to Align(alignof(T)).

Definition at line 94 of file Alignment.h.

References Constant().

Referenced by llvm::SpecificBumpPtrAllocator< T >::DestroyAll(), llvm::cas::MappedFileRegionArena::getAlign(), llvm::trailing_objects_internal::TrailingObjectsImpl< Align, BaseTy, TopTrailingObj, PrevTy, NextTy, MoreTys... >::getTrailingObjectsImpl(), llvm::trailing_objects_internal::TrailingObjectsImpl< Align, BaseTy, TopTrailingObj, PrevTy, NextTy, MoreTys... >::getTrailingObjectsImpl(), llvm::FixedStreamArray< CrossModuleExport >::operator, llvm::cas::ondisk::OnDiskGraphDB::print(), llvm::BinaryStreamReader::readArray(), and llvm::cas::ondisk::OnDiskGraphDB::validate().

operator=() [1/2]

Align & llvm::Align::operator= ( Align && Other) constexprdefault

operator=() [2/2]

previous()

Align llvm::Align::previous ( ) const inline

value()

uint64_t llvm::Align::value ( ) const inlineconstexpr

This is a hole in the type system and should not be abused.

Needed to interact with C for instance.

Definition at line 77 of file Alignment.h.

Referenced by llvm::AArch64FunctionInfo::AArch64FunctionInfo(), addEmuTlsVar(), adjustByValArgAlignment(), llvm::RISCVRegisterInfo::adjustReg(), llvm::alignAddr(), llvm::BumpPtrAllocatorImpl< MallocAllocator, 65536 >::AllocateSlow(), llvm::AMDGPURegisterBankInfo::applyMappingDynStackAlloc(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), llvm::MachineIRBuilder::buildAssertAlign(), llvm::MachineIRBuilder::buildDynStackAlloc(), buildFrameDebugInfo(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), CC_ARM_AAPCS_Custom_Aggregate(), combineStore(), llvm::RuntimeDyldImpl::computeSectionStubBufSize(), llvm::RuntimeDyldImpl::computeTotalAllocSize(), convertMFI(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::MCFragment::dump(), emitAligningInstructions(), llvm::AMDGPUTargetAsmStreamer::emitAMDGPULDS(), llvm::SystemZHLASMAsmStreamer::emitCodeAlignment(), llvm::SIFrameLowering::emitEpilogue(), llvm::HexagonDAGToDAGISel::emitFunctionEntryCode(), llvm::ARMFrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::XtensaFrameLowering::emitPrologue(), llvm::RuntimeDyldImpl::emitSection(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::BPFSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemmove(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemset(), llvm::MCObjectStreamer::emitValueToAlignment(), llvm::SystemZHLASMAsmStreamer::emitValueToAlignment(), llvm::MachineFunction::estimateFunctionSizeInBytes(), llvm::MipsTargetELFStreamer::finish(), getAlignment(), llvm::GlobalVariable::getAlignment(), llvm::LegalizerHelper::getDynStackAllocTargetPtr(), getELFSectionNameForGlobal(), llvm::MCSymbolMachO::getEncodedFlags(), llvm::MachineJumpTableInfo::getEntryAlignment(), llvm::LoongArchFrameLowering::getFirstSPAdjustAmount(), llvm::RISCVFrameLowering::getFirstSPAdjustAmount(), llvm::M68kFrameLowering::getFrameIndexReference(), llvm::AMDGPU::getInterestingMemoryOperands(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::WritableMemoryBuffer::getNewUninitMemBuffer(), llvm::RISCVTargetLowering::getOptimalMemOpType(), getOptimalRepType(), llvm::NVPTXTargetLowering::getPrototype(), llvm::RISCVTargetLowering::getStackProbeSize(), llvm::RISCVTTIImpl::getTgtMemIntrinsic(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::AMDGPU::instrumentAddress(), llvm::AMDGPU::instrumentAddressImpl(), isAgainstBoundary(), llvm::isAligned(), isBitAligned(), llvm::isDereferenceableAndAlignedInLoop(), isDereferenceableAndAlignedPointer(), isDereferenceableAndAlignedPointerViaAssumption(), llvm::MemOp::isDstAligned(), isGPRShadowAligned(), llvm::MemOp::isSrcAligned(), llvm::AMDGPULegalizerInfo::legalizeLoad(), LowerAsSplatVectorLoad(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerDYNAMIC_STACKALLOC(), llvm::SITargetLowering::LowerDYNAMIC_STACKALLOC(), llvm::LegalizerHelper::lowerLoad(), llvm::MipsTargetLowering::lowerSTORE(), llvm::HexagonTargetLowering::LowerUnalignedLoad(), llvm::operator!=(), llvm::operator<(), llvm::operator<=(), llvm::operator==(), llvm::operator>(), llvm::operator>=(), llvm::yaml::ScalarTraits< Align >::output(), llvm::PPCRegisterInfo::prepareDynamicAlloca(), llvm::MachineFrameInfo::print(), llvm::MachineMemOperand::print(), llvm::MachineBasicBlock::printName(), llvm::AArch64FrameLowering::processFunctionBeforeFrameFinalized(), replaceFrameSizeAndAlignment(), llvm::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo(), llvm::CoroSplitPass::run(), setAlignFlagsForFI(), solveDIType(), llvm::SIInstrInfo::splitMUBUFOffset(), tocDataChecks(), TryCombineBaseUpdate(), tryToImproveAlign(), tryToShorten(), and llvm::UnknownPadding().

decodeMaybeAlign

encode

Returns a representation of the alignment that encodes undefined as 0.

Definition at line 206 of file Alignment.h.

References A(), and MaybeAlign.

Log2

Returns the log2 of the alignment.

Definition at line 197 of file Alignment.h.

References A().

MaybeAlign

operator!=

operator<

operator<=

operator==

operator>

operator>=


The documentation for this struct was generated from the following file: