[PATCH] D40718: [LSR] Complexity tradeoff in GenerateReassociationsImpl

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 05:49:37 PST 2017


mkazantsev created this revision.

During its work, `GenerateReassociationsImpl` may end up trying calculating a sum
of a huge amount of huge SCEVs. Attempts to simplify them lead to huge compile
time problem. This patch applies a heuristic that limits simplification recursion depth
depending on number of arguments in this method to get an acceptible compile time
in corner cases while it should not affect most of real situations.


https://reviews.llvm.org/D40718

Files:
  lib/Transforms/Scalar/LoopStrengthReduce.cpp
  test/Transforms/LoopStrengthReduce/2017-12-01-long_compilation_corner_case.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40718.125117.patch
Type: text/x-patch
Size: 20492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171201/daa5e1e7/attachment.bin>


More information about the llvm-commits mailing list