[PATCH] D75981: [LV] Allow large RT checks, if they are a fraction of the scalar cost.

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 26 01:39:59 PDT 2021


ebrevnov added a comment.

Sorry for long silence. Got into hospital with COVID-19 for almost a month.

>> In D75981#2662881 <https://reviews.llvm.org/D75981#2662881>, @ebrevnov wrote:
>>
>>> I don't really understand why we need this separate heuristic for runtime checks. Why don't we simply add cost of runtime checks (possibly with some small scaling to be safe) to total cost of vector loop and just use existing cost model to decide?
>>
>> That's a good point, but I think that would be better as separate change, because that's a more aggressive change than replacing existing limit. IIUC that's more in line with your D71053 <https://reviews.llvm.org/D71053>.

You are right, I'm essentially asking to follow D71053 <https://reviews.llvm.org/D71053>. First of all, in sake of doing progress I'm not going to block this change if you promise continue working on cost model driven approach.
But I personally think that it would save a lot of time with we go with cost model based approach in the first place because most time consuming thing would be fixing performance regressions and not the implementation itself. I will leave it on you to decide :-).

>>> Please add regression tests from https://reviews.llvm.org/D71053 to this change set as well.
>>
>> I'm not sure that there's much benefit at the moment, because there will be no changes. The focus of those tests seems to be more about vectorizing small trip count loops with an epilogue and not the cost of memory runtime checks (there are no memory runtime checks for the test I think)

I believe both test cases have vectorization with runtime checks. Look for "; CHECK:       vector.memcheck:"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75981



More information about the llvm-commits mailing list