[polly] acf7e55 - [Polly] Fix PM invalidate usage after D100519

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 18:41:25 PDT 2021


Author: Fangrui Song
Date: 2021-04-15T18:41:20-07:00
New Revision: acf7e557836e7a6c83782cfef7a7cd804e977a8f

URL: https://github.com/llvm/llvm-project/commit/acf7e557836e7a6c83782cfef7a7cd804e977a8f
DIFF: https://github.com/llvm/llvm-project/commit/acf7e557836e7a6c83782cfef7a7cd804e977a8f.diff

LOG: [Polly] Fix PM invalidate usage after D100519

Added: 
    

Modified: 
    polly/include/polly/ScopPass.h

Removed: 
    


################################################################################
diff  --git a/polly/include/polly/ScopPass.h b/polly/include/polly/ScopPass.h
index fdcd2a434f802..7e5041e9fb54c 100644
--- a/polly/include/polly/ScopPass.h
+++ b/polly/include/polly/ScopPass.h
@@ -229,8 +229,10 @@ class FunctionToScopPassAdaptor
       // therefore all analyses are preserved. However, we must still free the
       // Scop analysis results which may hold AssertingVH that cause an error
       // if its value is destroyed.
-      AM.invalidate<ScopInfoAnalysis>(F);
-      AM.invalidate<ScopAnalysis>(F);
+      PreservedAnalyses PA = PreservedAnalyses::all();
+      PA.abandon<ScopInfoAnalysis>();
+      PA.abandon<ScopAnalysis>();
+      AM.invalidate(F, PA);
       return PreservedAnalyses::all();
     }
 


        


More information about the llvm-commits mailing list