[PATCH] D136180: [FuncSpec] Compute specialisation gain even when forcing specialisation

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 02:59:24 PDT 2022


ChuanqiXu added a comment.

In D136180#3867731 <https://reviews.llvm.org/D136180#3867731>, @chill wrote:

> I don't think it's a problem at all, it's just what is, for a call site with n constants, there are 2^n-1 possible specialisations, that match the call.

But what's the case that we'll get worse gain with more constants? I mean, if a callsite has n constants, then we can get the gain for this callsite by specializing all the constants. For a callsite `foo(1, 2)`, in what case it will be better to specialize it as `foo_1(2)` than `foo_1_2()`? Hope I express my meaning clearly.


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

https://reviews.llvm.org/D136180



More information about the llvm-commits mailing list