mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first. llvm-svn: 32319
This commit is contained in:
parent
318adc0e9d
commit
0117a3e391
@ -436,8 +436,11 @@ void PMDataManager::recordAvailableAnalysis(Pass *P) {
|
||||
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
||||
AnalysisUsage AnUsage;
|
||||
P->getAnalysisUsage(AnUsage);
|
||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||
|
||||
if (AnUsage.getPreservesAll())
|
||||
return;
|
||||
|
||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
||||
E = AvailableAnalysis.end(); I != E; ++I ) {
|
||||
if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) ==
|
||||
@ -470,8 +473,8 @@ void PMDataManager::removeDeadPasses(Pass *P) {
|
||||
|
||||
/// Add pass P into the PassVector. Update
|
||||
/// AvailableAnalysis appropriately if ProcessAnalysis is true.
|
||||
void PMDataManager::addPassToManager (Pass *P,
|
||||
bool ProcessAnalysis) {
|
||||
void PMDataManager::addPassToManager(Pass *P,
|
||||
bool ProcessAnalysis) {
|
||||
|
||||
if (ProcessAnalysis) {
|
||||
// Take a note of analysis required and made available by this pass
|
||||
|
Loading…
Reference in New Issue
Block a user