LLVM
15.0.0git
|
This struct is a compact representation of a valid (non-zero power of two) alignment. More...
#include "llvm/Support/Alignment.h"
Public Member Functions | |
constexpr | Align ()=default |
Default is byte-aligned. More... | |
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 . More... | |
constexpr | Align (Align &&Other)=default |
Align & | operator= (const Align &Other)=default |
Align & | operator= (Align &&Other)=default |
Align (uint64_t Value) | |
uint64_t | value () const |
This is a hole in the type system and should not be abused. More... | |
Align | previous () const |
constexpr | Align (LogValue CA) |
Constexpr constructor from LogValue type. More... | |
Static Public Member Functions | |
template<size_t kValue> | |
constexpr static LogValue | Constant () |
Allow constructions of constexpr Align. More... | |
template<typename T > | |
constexpr static LogValue | Of () |
Allow constructions of constexpr Align from types. More... | |
Friends | |
struct | MaybeAlign |
The log2 of the required alignment. More... | |
unsigned | Log2 (Align) |
Returns the log2 of the alignment. More... | |
bool | operator== (Align Lhs, Align Rhs) |
Comparisons operators between Align. More... | |
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. More... | |
struct MaybeAlign | decodeMaybeAlign (unsigned Value) |
Dual operation of the encode function above. More... | |
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.
|
constexprdefault |
Default is byte-aligned.
Do not perform checks in case of copy/move construct/assign, because the checks have been performed when building Other
.
|
constexprdefault |
|
inlineexplicit |
Definition at line 76 of file Alignment.h.
References assert(), llvm::isPowerOf2_64(), and llvm::Log2_64().
|
inlineconstexpr |
Constexpr constructor from LogValue type.
Definition at line 107 of file Alignment.h.
|
inlinestaticconstexpr |
Allow constructions of constexpr Align.
Definition at line 96 of file Alignment.h.
|
inlinestaticconstexpr |
Allow constructions of constexpr Align from types.
Compile time equivalent to Align(alignof(T)).
Definition at line 102 of file Alignment.h.
|
inline |
Definition at line 88 of file Alignment.h.
References assert().
Referenced by getMemcpyLoadsAndStores().
|
inline |
This is a hole in the type system and should not be abused.
Needed to interact with C for instance.
Definition at line 85 of file Alignment.h.
Referenced by llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addStackAlignmentAttr(), adjustByValArgAlignment(), llvm::MachineIRBuilder::buildAssertAlign(), buildFrameDebugInfo(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), llvm::FunctionComparator::cmpAligns(), combineStore(), llvm::MCAssembler::computeFragmentSize(), llvm::MIRPrinter::convert(), llvm::createMemCpyLoopKnownSize(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::SIFrameLowering::emitEpilogue(), llvm::HexagonDAGToDAGISel::emitFunctionEntryCode(), llvm::SIFrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::HexagonEvaluator::evaluate(), llvm::DataLayout::getABITypeAlignment(), llvm::GlobalObject::getAlignment(), llvm::MemSDNode::getAlignment(), llvm::X86TargetLowering::getByValTypeAlignment(), llvm::MachineJumpTableInfo::getEntryAlignment(), llvm::RISCVFrameLowering::getFirstSPAdjustAmount(), llvm::M68kFrameLowering::getFrameIndexReference(), llvm::VNCoercion::getLoadLoadClobberFullWidthSize(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::ARMBaseInstrInfo::getOutliningType(), llvm::SITargetLowering::getPrefLoopAlignment(), llvm::DataLayout::getPrefTypeAlignment(), llvm::NVPTXTargetLowering::getPrototype(), llvm::TargetFrameLowering::getStackAlignment(), llvm::PPCTTIImpl::getVPMemoryOpCost(), hasTocDataAttr(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), isAgainstBoundary(), llvm::isAligned(), llvm::MemOp::isDstAligned(), isGPRShadowAligned(), llvm::MemOp::isSrcAligned(), llvm::AMDGPULegalizerInfo::legalizeLoad(), LowerAsSplatVectorLoad(), llvm::NVPTXTargetLowering::LowerCall(), llvm::ARMTargetLowering::lowerInterleavedLoad(), lowerLoadF128(), llvm::MipsTargetLowering::lowerSTORE(), lowerStoreF128(), llvm::HexagonTargetLowering::LowerUnalignedLoad(), llvm::operator!=(), llvm::operator<(), llvm::operator<=(), llvm::operator==(), llvm::operator>(), llvm::operator>=(), llvm::PPCRegisterInfo::prepareDynamicAlloca(), llvm::MachineMemOperand::print(), llvm::MachineBasicBlock::printName(), replaceFrameSizeAndAlignment(), setAlignFlagsForFI(), llvm::RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign(), and tryToShorten().
|
friend |
Dual operation of the encode function above.
Definition at line 225 of file Alignment.h.
|
friend |
Returns a representation of the alignment that encodes undefined as 0.
Definition at line 222 of file Alignment.h.
|
friend |
Returns the log2 of the alignment.
Definition at line 209 of file Alignment.h.
|
friend |
The log2 of the required alignment.
ShiftValue is less than 64 by construction.
Definition at line 44 of file Alignment.h.
Definition at line 267 of file Alignment.h.
Definition at line 276 of file Alignment.h.
Definition at line 270 of file Alignment.h.
Comparisons operators between Align.
Definition at line 264 of file Alignment.h.
Definition at line 279 of file Alignment.h.
Definition at line 273 of file Alignment.h.