[llvm-branch-commits] [llvm] db75326 - [IR] PassManagerTest: Register DominatorTreeAnalysis before running SimplifyCFGPass

Roman Lebedev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 1 14:06:21 PST 2021


Author: Roman Lebedev
Date: 2021-01-02T01:01:18+03:00
New Revision: db753269d912936d9ab27018faf867afce4b16de

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

LOG: [IR] PassManagerTest: Register DominatorTreeAnalysis before running SimplifyCFGPass

Otherwise these particular tests fail when SimplifyCFG requires DomTree

Added: 
    

Modified: 
    llvm/unittests/IR/PassManagerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp
index ea33a0b64ea4..5e24ae3e5410 100644
--- a/llvm/unittests/IR/PassManagerTest.cpp
+++ b/llvm/unittests/IR/PassManagerTest.cpp
@@ -10,6 +10,7 @@
 #include "llvm/Analysis/AssumptionCache.h"
 #include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/AsmParser/Parser.h"
+#include "llvm/IR/Dominators.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
@@ -828,6 +829,7 @@ TEST_F(PassManagerTest, FunctionPassCFGChecker) {
   StandardInstrumentations SI(/*DebugLogging*/ true);
   SI.registerCallbacks(PIC);
   FAM.registerPass([&] { return PassInstrumentationAnalysis(&PIC); });
+  FAM.registerPass([&] { return DominatorTreeAnalysis(); });
   FAM.registerPass([&] { return AssumptionAnalysis(); });
   FAM.registerPass([&] { return TargetIRAnalysis(); });
 
@@ -873,6 +875,7 @@ TEST_F(PassManagerTest, FunctionPassCFGCheckerInvalidateAnalysis) {
   StandardInstrumentations SI(/*DebugLogging*/ true);
   SI.registerCallbacks(PIC);
   FAM.registerPass([&] { return PassInstrumentationAnalysis(&PIC); });
+  FAM.registerPass([&] { return DominatorTreeAnalysis(); });
   FAM.registerPass([&] { return AssumptionAnalysis(); });
   FAM.registerPass([&] { return TargetIRAnalysis(); });
 
@@ -937,6 +940,7 @@ TEST_F(PassManagerTest, FunctionPassCFGCheckerWrapped) {
   StandardInstrumentations SI(/*DebugLogging*/ true);
   SI.registerCallbacks(PIC);
   FAM.registerPass([&] { return PassInstrumentationAnalysis(&PIC); });
+  FAM.registerPass([&] { return DominatorTreeAnalysis(); });
   FAM.registerPass([&] { return AssumptionAnalysis(); });
   FAM.registerPass([&] { return TargetIRAnalysis(); });
 


        


More information about the llvm-branch-commits mailing list