[PATCH] D100684: [X86][CostModel] X86TTIImpl::getMemoryOpCost(): rewrite vector handling again
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 12:49:16 PDT 2021
lebedev.ri added a comment.
In D100684#2754935 <https://reviews.llvm.org/D100684#2754935>, @ABataev wrote:
> In D100684#2754919 <https://reviews.llvm.org/D100684#2754919>, @lebedev.ri wrote:
>
>> In D100684#2754166 <https://reviews.llvm.org/D100684#2754166>, @ABataev wrote:
>>
>>> In D100684#2754163 <https://reviews.llvm.org/D100684#2754163>, @lebedev.ri wrote:
>>>
>>>> Thank you for replying!
>>>>
>>>> In D100684#2754152 <https://reviews.llvm.org/D100684#2754152>, @RKSimon wrote:
>>>>
>>>>> IIRC the need for those interleaved costs was because we couldn't determine accurate 'lane crossing' vs 'non lane crossing' general shuffle costs - now that we have access to the shuffle mask it might be possible to recognise these a little better.
>>>>
>>>> So the comment is that i should first try to costmodel generic shuffles? (`X86TTIImpl::getShuffleCost()`)
>>>
>>> I have initial patch for the shuffles D100486 <https://reviews.llvm.org/D100486>
>>
>> That is good to hear!
>> However, i'm not actually sure if we can just use `X86TTIImpl::getShuffleCost()` here directly.
>> Won't the shuffle expansion result in overlapping shuffles, that we'll bill more than once?
>> I.e., don't we need to have our own implementation?
>
> If we can generate in a more effective way, than a sequence of shuffles, then probably yes.
I'm not sure that is an answer for the the question i asked.
Let me reformulate the question:
Interleaved load, in IR, will have as many shuffles as the interleaving step.
Let's call then IL0, IL1, ...
But each one of those it won't be lowered into a single shuffle instruction,
but into a number of other instructions, let's call them ILI00, ILI01, ILI10, ILI10.
The question is: won't there be common instructions in lowered forms of each of the IL0, IL1,
i.e. could it be that ILI00 == ILI10?
If that happens, and we calculated the costs of IL0 and IL1 separately,
both of these costs will include ILI00, while it should only be included once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100684/new/
https://reviews.llvm.org/D100684
More information about the llvm-commits
mailing list