/// Return the minimum stack alignment of an argument.
unsigned getMinStackArgumentAlignment() const {
- return MinStackArgumentAlignment;
+ return MinStackArgumentAlignment.value();
}
/// Return the minimum function alignment.
unsigned getMinFunctionLogAlignment() const {
- return MinFunctionLogAlignment;
+ return Log2(MinFunctionAlignment);
}
/// Return the preferred function alignment.
unsigned getPrefFunctionLogAlignment() const {
- return PrefFunctionLogAlignment;
+ return Log2(PrefFunctionAlignment);
}
/// Return the preferred loop alignment.
virtual unsigned getPrefLoopLogAlignment(MachineLoop *ML = nullptr) const {
- return PrefLoopLogAlignment;
+ return Log2(PrefLoopAlignment);
}
/// Should loops be aligned even when the function is marked OptSize (but not
/// Set the target's minimum function alignment (in log2(bytes))
void setMinFunctionLogAlignment(unsigned LogAlign) {
- MinFunctionLogAlignment = LogAlign;
+ MinFunctionAlignment = llvm::Align(1ULL << LogAlign);
}
/// Set the target's preferred function alignment. This should be set if
/// there is a performance benefit to higher-than-minimum alignment (in
/// log2(bytes))
void setPrefFunctionLogAlignment(unsigned LogAlign) {
- PrefFunctionLogAlignment = LogAlign;
+ PrefFunctionAlignment = llvm::Align(1ULL << LogAlign);
}
/// Set the target's preferred loop alignment. Default alignment is zero, it
/// specified in log2(bytes). The target may also override
/// getPrefLoopAlignment to provide per-loop values.
void setPrefLoopLogAlignment(unsigned LogAlign) {
- PrefLoopLogAlignment = LogAlign;
+ PrefLoopAlignment = llvm::Align(1ULL << LogAlign);
}
/// Set the minimum stack alignment of an argument.
void setMinStackArgumentAlignment(unsigned Align) {
- MinStackArgumentAlignment = Align;
+ MinStackArgumentAlignment = llvm::Align(Align);
}
/// Set the maximum atomic operation size supported by the
Sched::Preference SchedPreferenceInfo;
/// The minimum alignment that any argument on the stack needs to have.
- unsigned MinStackArgumentAlignment;
+ llvm::Align MinStackArgumentAlignment;
/// The minimum function alignment (used when optimizing for size, and to
/// prevent explicitly provided alignment from leading to incorrect code).
- unsigned MinFunctionLogAlignment;
+ llvm::Align MinFunctionAlignment;
/// The preferred function alignment (used when alignment unspecified and
/// optimizing for speed).
- unsigned PrefFunctionLogAlignment;
+ llvm::Align PrefFunctionAlignment;
/// The preferred loop alignment (in log2 bot in bytes).
- unsigned PrefLoopLogAlignment;
+ llvm::Align PrefLoopAlignment;
/// Size in bits of the maximum atomics size the backend supports.
/// Accesses larger than this will be expanded by AtomicExpandPass.
BooleanFloatContents = UndefinedBooleanContent;
BooleanVectorContents = UndefinedBooleanContent;
SchedPreferenceInfo = Sched::ILP;
- MinFunctionLogAlignment = 0;
- PrefFunctionLogAlignment = 0;
- PrefLoopLogAlignment = 0;
GatherAllAliasesMaxDepth = 18;
- MinStackArgumentAlignment = 1;
// TODO: the default will be switched to 0 in the next commit, along
// with the Target-specific changes necessary.
MaxAtomicSizeInBitsSupported = 1024;