[llvm] 694ded3 - [OpenMPOpt] Fix preserved analyses return

Giorgis Georgakoudis via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 23:20:26 PDT 2020


Author: Giorgis Georgakoudis
Date: 2020-07-14T23:18:43-07:00
New Revision: 694ded37b9d70e385addfc482d298b054073ebe1

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

LOG: [OpenMPOpt] Fix preserved analyses return

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/OpenMPOpt.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index bc7e1dc6236e..f664a2417374 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -1367,7 +1367,9 @@ PreservedAnalyses OpenMPOptPass::run(LazyCallGraph::SCC &C,
   // TODO: Compute the module slice we are allowed to look at.
   OpenMPOpt OMPOpt(SCC, CGUpdater, OREGetter, InfoCache, A);
   bool Changed = OMPOpt.run();
-  (void)Changed;
+  if (Changed)
+    return PreservedAnalyses::none();
+
   return PreservedAnalyses::all();
 }
 


        


More information about the llvm-commits mailing list