[PATCH] D35664: [SCEV] Limit max size of AddRecExpr during evolving

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 15:09:19 PDT 2017


sanjoy added a comment.

In https://reviews.llvm.org/D35664#817431, @mkazantsev wrote:

> Hi Sanjoy,
>
> Investigating the impact of thresholds may be an interesting idea indeed. But it is not clear where should we measure them. This patch came from evaluation of bugs 33753 and 33494 (and actually is a fix for the 1st one and some subset of tests of the latter). The problem is that the impact of these parameters can differ dramatically on real workloads and fuzzed tests of special forms. For example, some of the tests from bug 33494 pass with only limit for AddRecs set, and others also need reduction of Arith limit to pass in reasonable time. The values of those limits are chosen absolutely randomly, though, and it is not clear what we should use as a reference when chosing their values.


This is what I mean -- let's say in "real" workloads (for some fuzzy definition of "real"), `AddRec->getNumOperands() + OtherAddRec->getNumOperands() - 1` is 18 roughly 30% of the time, and is never more than 20.  In such a universe, we've picked a too low value for `MaxAddRecSize` -- we should have set it to 20.  In other words, I'm interested in the code-quality impact of these thresholds on real world code.  Since "real world code" means different things to different folks, having a somewhat generic method of deriving these limits will be useful.


https://reviews.llvm.org/D35664





More information about the llvm-commits mailing list