[SROA] Make order of analysis fetching more predictable
authorArthur Eubanks <aeubanks@google.com>
Mon, 6 Mar 2023 17:00:33 +0000 (09:00 -0800)
committerArthur Eubanks <aeubanks@google.com>
Mon, 6 Mar 2023 17:01:29 +0000 (09:01 -0800)
For pipeline tests.

llvm/lib/Transforms/Scalar/SROA.cpp

index e2e0d03..d315910 100644 (file)
@@ -5069,8 +5069,9 @@ PreservedAnalyses SROAPass::runImpl(Function &F, DominatorTree &RunDT,
 }
 
 PreservedAnalyses SROAPass::run(Function &F, FunctionAnalysisManager &AM) {
-  return runImpl(F, AM.getResult<DominatorTreeAnalysis>(F),
-                 AM.getResult<AssumptionAnalysis>(F));
+  DominatorTree &DT = AM.getResult<DominatorTreeAnalysis>(F);
+  AssumptionCache &AC = AM.getResult<AssumptionAnalysis>(F);
+  return runImpl(F, DT, AC);
 }
 
 void SROAPass::printPipeline(