[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:22:58 PDT 2023
XinWang10 added a comment.
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. Previously I mistook the enumerated element with SDUse which has more fields, but now the SDValue only has two fields, I also think this will make big difference. And if compiler would do the opt you said, maybe the program will go worse.
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