[PATCH] D145819: [FuncSpec] Increase the maximum number of times the specializer can run.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 08:43:29 PDT 2023


labrinea added a comment.

In D145819#4186807 <https://reviews.llvm.org/D145819#4186807>, @xbolva00 wrote:

> In D145819#4186533 <https://reviews.llvm.org/D145819#4186533>, @labrinea wrote:
>
>> Bumps the score of `548.exchange2_r` from SPEC2017 by about 60% on Neoverse N1.
>
> Can we achieve this with lower FuncSpecMaxIters than 10 as 10 could be quite constly in terms of compile times?

Exchange requires 8 iterations, but we should be making the specializer as generic as possible. Note that `FuncSpecMaxIters` is the maximum number of times the specializer will run as long as each previous iteration has found specializations. As described in the summary we only consider callsites which reside in the bodies of previous specializations after the propagation of constant arguments. For now, that specialization on literal constants is disabled, this only triggers for recursive functions through promotion of constant stack values to globals which is quite rare. Therefore the impact in compilation times is zero for the general case. Only in code like exchange I would expect significant regression. That said I will post some numbers from the compile time tracker on the LLVM test suite.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145819



More information about the llvm-commits mailing list