[PATCH] D81026: Inline Cost improvement - GetElementPtr with constant operands

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 14:16:11 PDT 2020


mtrofin added a comment.

In D81026#2069569 <https://reviews.llvm.org/D81026#2069569>, @knaumov wrote:

> Answering @mtrofin 's comments:
>
> As such cases (GEPs from a constant address with constant operands) will be simplified by the pipeline to a constant, InlineCost should be able to see this to apply the correct cost to the instruction. As eventually, the instruction will turn to a constant, the cost is 0.


That sounds fine, my point is that having some run on benchmarks to quantify the benefit would help understand the value of this particular omission from the cost analysis (or at minimum show there's no regression, or understand where the regressions may be). It could shed important insights into what matters for the cost analysis, basically.

Having an optin/out flag would help teams quickly handle any unexpected regressions they may encounter in the field.


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

https://reviews.llvm.org/D81026





More information about the llvm-commits mailing list