mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[LegacyPM] Simplify PMTopLevelManager::collectLastUses. NFC.
This commit is contained in:
parent
ac61d8e5d1
commit
e98f4ccb3f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user