1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[LegacyPM] Simplify PMTopLevelManager::collectLastUses. NFC.

This commit is contained in:
Jay Foad 2020-11-27 17:34:35 +00:00
parent ac61d8e5d1
commit e98f4ccb3f

View File

@ -685,16 +685,12 @@ PMTopLevelManager::setLastUser(ArrayRef<Pass*> AnalysisPasses, Pass *P) {
/// Collect passes whose last user is P
void PMTopLevelManager::collectLastUses(SmallVectorImpl<Pass *> &LastUses,
Pass *P) {
DenseMap<Pass *, SmallPtrSet<Pass *, 8> >::iterator DMI =
InversedLastUser.find(P);
auto DMI = InversedLastUser.find(P);
if (DMI == InversedLastUser.end())
return;
SmallPtrSet<Pass *, 8> &LU = DMI->second;
for (Pass *LUP : LU) {
LastUses.push_back(LUP);
}
auto &LU = DMI->second;
LastUses.append(LU.begin(), LU.end());
}
AnalysisUsage *PMTopLevelManager::findAnalysisUsage(Pass *P) {