[PATCH] D123467: [NFC][CodeGen] Use ArrayRef in TargetLowering functions
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 08:09:20 PDT 2022
asb added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:223
+ setOperationAction({ISD::UINT_TO_FP, ISD::STRICT_UINT_TO_FP},
+ {MVT::i8, MVT::i16}, Promote);
// We have an algorithm for SSE2, and we turn this into a 64-bit
----------------
RKSimon wrote:
> I'm really not sure this kind of change makes the code easier to understand or manage, and I'd be surprised if there was a performance gain to be had.
>
> I'm not against adding the ArrayRef<> wrappers but I'd be a lot more careful about where they are used.
To add my 2 cents, I think broadly speaking the increased use of ArrayRef is a minor readability improvement, making the setOperatinAction lines easier to read by better grouping + condensing related expansions. I see what you mean about this particular change not making a big difference...but it doesn't seem like it's any worse than before, and I can see the logic in making use of ArrayRefs wherever possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123467/new/
https://reviews.llvm.org/D123467
More information about the llvm-commits
mailing list