mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	Reimplement removeDeadPasses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -522,7 +522,21 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) { | |||||||
|  |  | ||||||
| /// Remove analysis passes that are not used any longer | /// Remove analysis passes that are not used any longer | ||||||
| void PMDataManager::removeDeadPasses(Pass *P) { | void PMDataManager::removeDeadPasses(Pass *P) { | ||||||
|   // TODO : reimplement |  | ||||||
|  |   std::vector<Pass *> DeadPasses; | ||||||
|  |   TPM->collectLastUses(DeadPasses, P); | ||||||
|  |  | ||||||
|  |   for (std::vector<Pass *>::iterator I = DeadPasses.begin(), | ||||||
|  |          E = DeadPasses.end(); I != E; ++I) { | ||||||
|  |     (*I)->releaseMemory(); | ||||||
|  |      | ||||||
|  |     std::map<AnalysisID, Pass*>::iterator Pos =  | ||||||
|  |       AvailableAnalysis.find((*I)->getPassInfo()); | ||||||
|  |      | ||||||
|  |     // It is possible that deadPass is already removed from the AvailableAnalysis | ||||||
|  |     if (Pos != AvailableAnalysis.end()) | ||||||
|  |       AvailableAnalysis.erase(Pos); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| /// Add pass P into the PassVector. Update  | /// Add pass P into the PassVector. Update  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user