[llvm] 63b6efe - [EntryExitInstrumenter] Don't invalidate analyses if no change was made

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 12:52:29 PDT 2024


Author: Arthur Eubanks
Date: 2024-04-24T19:51:00Z
New Revision: 63b6efeebf3003b075f384742ade189d2ed6b429

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

LOG: [EntryExitInstrumenter] Don't invalidate analyses if no change was made

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
index f4207474e9a68a..59a7dd1a00ed48 100644
--- a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
+++ b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
@@ -137,7 +137,8 @@ static bool runOnFunction(Function &F, bool PostInlining) {
 
 PreservedAnalyses
 llvm::EntryExitInstrumenterPass::run(Function &F, FunctionAnalysisManager &AM) {
-  runOnFunction(F, PostInlining);
+  if (!runOnFunction(F, PostInlining))
+    return PreservedAnalyses::all();
   PreservedAnalyses PA;
   PA.preserveSet<CFGAnalyses>();
   return PA;


        


More information about the llvm-commits mailing list