[llvm] [LoopStrengthReduce] Mitigation of issues introduced by compilation time optimization in SolveRecurse. (PR #147588)

Sergey Shcherbinin via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 10:16:13 PDT 2025


SergeyShch01 wrote:

This change is not about performance - it fixes random behavior of the pass (please review the change description for more details).  What is changed here is just an order of candidate formulas consideration which is no longer random.

Random changes in regression tests are caused by this elimination of randomness (previously generated code was randomized,  now it's not). If some test became worse that means that pass heuristics did a bad work and should be improved (note that the patch doesn't change heuristics).

The patch includes one more change (see the patch description) - it also doesn't change heuristics but fixes the false early break of decision tree traversal. If you think it shold be moved to a new PR then please let me know.

Compilation time can be further improved by further reduction of MinExpensiveFromulaeNum value - should I do that?

https://github.com/llvm/llvm-project/pull/147588


More information about the llvm-commits mailing list