mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[TargetLowering] getABIAlignmentForCallingConv - pass DataLayout by const reference. NFCI.
Avoid unnecessary copies and match every other method in TargetLowering that takes DataLayout as an argument.
This commit is contained in:
parent
fb9c8fd3dd
commit
ffc4cc1eae
@ -1520,10 +1520,10 @@ public:
|
||||
return getNumRegisters(Context, VT);
|
||||
}
|
||||
|
||||
/// Certain targets have context senstive alignment requirements, where one
|
||||
/// Certain targets have context sensitive alignment requirements, where one
|
||||
/// type has the alignment requirement of another type.
|
||||
virtual Align getABIAlignmentForCallingConv(Type *ArgTy,
|
||||
DataLayout DL) const {
|
||||
const DataLayout &DL) const {
|
||||
return DL.getABITypeAlign(ArgTy);
|
||||
}
|
||||
|
||||
|
@ -20110,8 +20110,8 @@ static bool isHomogeneousAggregate(Type *Ty, HABaseType &Base,
|
||||
}
|
||||
|
||||
/// Return the correct alignment for the current calling convention.
|
||||
Align ARMTargetLowering::getABIAlignmentForCallingConv(Type *ArgTy,
|
||||
DataLayout DL) const {
|
||||
Align ARMTargetLowering::getABIAlignmentForCallingConv(
|
||||
Type *ArgTy, const DataLayout &DL) const {
|
||||
const Align ABITypeAlign = DL.getABITypeAlign(ArgTy);
|
||||
if (!ArgTy->isVectorTy())
|
||||
return ABITypeAlign;
|
||||
|
@ -712,7 +712,7 @@ class VectorType;
|
||||
|
||||
/// Return the correct alignment for the current calling convention.
|
||||
Align getABIAlignmentForCallingConv(Type *ArgTy,
|
||||
DataLayout DL) const override;
|
||||
const DataLayout &DL) const override;
|
||||
|
||||
bool isDesirableToCommuteWithShift(const SDNode *N,
|
||||
CombineLevel Level) const override;
|
||||
|
@ -303,7 +303,7 @@ class TargetRegisterClass;
|
||||
|
||||
/// Return the correct alignment for the current calling convention.
|
||||
Align getABIAlignmentForCallingConv(Type *ArgTy,
|
||||
DataLayout DL) const override {
|
||||
const DataLayout &DL) const override {
|
||||
const Align ABIAlign = DL.getABITypeAlign(ArgTy);
|
||||
if (ArgTy->isVectorTy())
|
||||
return std::min(ABIAlign, Align(8));
|
||||
|
Loading…
Reference in New Issue
Block a user