[PATCH] D151977: [X86][NFC]Use ref instead copy in for loop for SDValue::op_values()
Wang, Xin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 2 00:58:18 PDT 2023
XinWang10 added a comment.
In D151977#4390175 <https://reviews.llvm.org/D151977#4390175>, @craig.topper wrote:
> In D151977#4390131 <https://reviews.llvm.org/D151977#4390131>, @XinWang10 wrote:
>
>> In D151977#4390071 <https://reviews.llvm.org/D151977#4390071>, @craig.topper wrote:
>>
>>> We pass SDValue by value all over the SelectionD
>>> AG code. And it looks pretty easy for a compiler to see the unsigned field is unused. Does this change really make a difference?
>>
>> I don't know about if compiler will do this opt to ignore the unused field for a class obj.
>
> I would expect SROA to break up the memcpy into scalar stores after that dead store elimination should be able to remove it.
>
> For the pointer, I expect store to load forwarding should make it we don’t have to load from the stored copy. Then the store also becomes eligible for dead store elimination.
Thanks for the explanation! I will give up this revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151977/new/
https://reviews.llvm.org/D151977
More information about the llvm-commits
mailing list