[PATCH] D151666: [IPSCCP] Request PostDominatorTreeAnalysis after BlockFrequencyAnalysis.

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 01:14:41 PDT 2023


bjope added a comment.

I made another round of testing to verify that this latest version of the patch (Diff 3) would solve the problems seen by uabelho (crashes/asserts). Could not see any problems.



================
Comment at: llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp:71
 
-    Solver->addAnalysis(*F, GetAnalysis(*F));
+    Solver->addPredicateInfo(*F, GetDT(*F), GetAC(*F));
     Solver->markBlockExecutable(&F->front());
----------------
Order of argument evaluation is not well-defined (might be different depending on which compiler you use when building llvm).
Generally I think we want to make sure that passes are being run in a deterministic order (e.g. to be able to use -debug-pass-manager in lit tests verifying things aound the pass manager).
So I think you want to do these `GetDT()` and `GetAC()` calls outside the argument list to make the order well-defined.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151666



More information about the llvm-commits mailing list