[PATCH] D53245: Teach the DominatorTree fallback to recalculation when applying updates to speedup JT (PR37929)

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 08:06:55 PDT 2018


NutshellySima added a comment.

In https://reviews.llvm.org/D53245#1265431, @kuhar wrote:

> In https://reviews.llvm.org/D53245#1265405, @NutshellySima wrote:
>
> > For `k>n` you mentioned, I think you mean `k>n/α` (α is a constant) because for the reproducer in 37929, the minimum value of α to make the time consumed by clang acceptable is about 3 (α should definitely be larger than 3). But selecting a higher value like "75" can also boost other inputs more (about 2x~4.5x on `clang*.bc`s).
>
>
> OK, makes sense if that the case in the bug report.
>
> Would you be able to produce some numbers for clang for a heuristic like this:
>  `if (n > 100) k * a >n; else if (k > n)`
>  with different `a`s?


I have tested heuristic `k>n/α` with `α=10/40/65/70/75/80/100/300/1000` on `clang.bc`s. (But I didn't save them to a file :\) `10/1000` produce very bad result. ("10" is better than the current implementation). `300` produces better result than `1000`. `40/100` produce better ones than `10/300/1000`. And `65-80` don't make much difference.


https://reviews.llvm.org/D53245





More information about the llvm-commits mailing list