mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 12:30:57 +00:00
[GISel] LegalizerInfo: Rename MemDesc::Size to SizeInBits to make the value clearer
Requested in D53679. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e662a68784
commit
af0086ca57
@ -121,7 +121,7 @@ struct LegalityQuery {
|
||||
ArrayRef<LLT> Types;
|
||||
|
||||
struct MemDesc {
|
||||
uint64_t Size;
|
||||
uint64_t SizeInBits;
|
||||
AtomicOrdering Ordering;
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ LegalityPredicate LegalityPredicates::typePairAndMemSizeInSet(
|
||||
SmallVector<TypePairAndMemSize, 4> TypesAndMemSize = TypesAndMemSizeInit;
|
||||
return [=](const LegalityQuery &Query) {
|
||||
TypePairAndMemSize Match = {Query.Types[TypeIdx0], Query.Types[TypeIdx1],
|
||||
Query.MMODescrs[MMOIdx].Size};
|
||||
Query.MMODescrs[MMOIdx].SizeInBits};
|
||||
return std::find(TypesAndMemSize.begin(), TypesAndMemSize.end(), Match) !=
|
||||
TypesAndMemSize.end();
|
||||
};
|
||||
@ -82,7 +82,7 @@ LegalityPredicate LegalityPredicates::sizeNotPow2(unsigned TypeIdx) {
|
||||
|
||||
LegalityPredicate LegalityPredicates::memSizeInBytesNotPow2(unsigned MMOIdx) {
|
||||
return [=](const LegalityQuery &Query) {
|
||||
return !isPowerOf2_32(Query.MMODescrs[MMOIdx].Size /* In Bytes */);
|
||||
return !isPowerOf2_32(Query.MMODescrs[MMOIdx].SizeInBits / 8);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ raw_ostream &LegalityQuery::print(raw_ostream &OS) const {
|
||||
|
||||
OS << Opcode << ", MMOs={";
|
||||
for (const auto &MMODescr : MMODescrs) {
|
||||
OS << MMODescr.Size << ", ";
|
||||
OS << MMODescr.SizeInBits << ", ";
|
||||
}
|
||||
OS << "}";
|
||||
|
||||
|
@ -167,7 +167,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST) {
|
||||
.unsupportedIfMemSizeNotPow2()
|
||||
// Lower any any-extending loads left into G_ANYEXT and G_LOAD
|
||||
.lowerIf([=](const LegalityQuery &Query) {
|
||||
return Query.Types[0].getSizeInBits() != Query.MMODescrs[0].Size;
|
||||
return Query.Types[0].getSizeInBits() != Query.MMODescrs[0].SizeInBits;
|
||||
})
|
||||
.clampNumElements(0, v2s32, v2s32);
|
||||
|
||||
@ -185,7 +185,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST) {
|
||||
.unsupportedIfMemSizeNotPow2()
|
||||
.lowerIf([=](const LegalityQuery &Query) {
|
||||
return Query.Types[0].isScalar() &&
|
||||
Query.Types[0].getSizeInBits() != Query.MMODescrs[0].Size;
|
||||
Query.Types[0].getSizeInBits() != Query.MMODescrs[0].SizeInBits;
|
||||
})
|
||||
.clampNumElements(0, v2s32, v2s32);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user