[PATCH] D100893: [FuncAttrs] Always preserve FunctionAnalysisManagerCGSCCProxy

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 16:38:09 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG326da4adcb8d: [FuncAttrs] Always preserve FunctionAnalysisManagerCGSCCProxy (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100893/new/

https://reviews.llvm.org/D100893

Files:
  llvm/lib/Transforms/IPO/FunctionAttrs.cpp


Index: llvm/lib/Transforms/IPO/FunctionAttrs.cpp
===================================================================
--- llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1632,8 +1632,12 @@
     Functions.push_back(&N.getFunction());
   }
 
-  if (deriveAttrsInPostOrder(Functions, AARGetter))
-    return PreservedAnalyses::none();
+  if (deriveAttrsInPostOrder(Functions, AARGetter)) {
+    // We have not changed the call graph or removed/added functions.
+    PreservedAnalyses PA;
+    PA.preserve<FunctionAnalysisManagerCGSCCProxy>();
+    return PA;
+  }
 
   return PreservedAnalyses::all();
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100893.339047.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/5dd2dae9/attachment.bin>


More information about the llvm-commits mailing list