mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[pmo] Eliminate dead flat namespace tuple numbering from PMOMemoryUseCollector.
TLDR: This does not eliminate the struct/tuple flat namespace from Predictable Mem Opts. Just the tuple specific flat namespace code from PMOMemoryUseCollector that we were computing and then throwing away. I explain below in more detail. First note that this is cruft from when def-init and pmo were one pass. What we were doing here was maintaing a flattened tuple namespace while we were collecting uses in PMOMemoryUseCollector. We never actually used them for anything since we recomputed this information including information about structs in PMO itself! So this information was truly completely dead. This commit removes that and related logic and from a maintenance standpoint makes PMOMemoryUseCollector a simple visitor that doesn't have any real special logic in it beyond the tuple scalarization.
This commit is contained in:
@@ -516,8 +516,7 @@ SILValue AvailableValueAggregator::handlePrimitiveValue(SILType LoadTy,
|
||||
if (!Val) {
|
||||
auto *Load =
|
||||
B.createLoad(Loc, Address, LoadOwnershipQualifier::Unqualified);
|
||||
Uses.push_back(PMOMemoryUse(Load, PMOUseKind::Load, FirstElt,
|
||||
getNumSubElements(Load->getType(), M)));
|
||||
Uses.emplace_back(Load, PMOUseKind::Load);
|
||||
return Load;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user