[llvm] [NVPTX][NFC] Refactor and cleanup NVPTXISelLowering call lowering 2/n (PR #137666)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 12:41:18 PDT 2025
================
@@ -444,52 +436,39 @@ enum ParamVectorizationFlags {
// of the same size as ValueVTs indicating how each piece should be
// loaded/stored (i.e. as a scalar, or as part of a vector
// load/store).
-static SmallVector<ParamVectorizationFlags, 16>
+static SmallVector<unsigned, 16>
VectorizePTXValueVTs(const SmallVectorImpl<EVT> &ValueVTs,
const SmallVectorImpl<uint64_t> &Offsets,
Align ParamAlignment, bool IsVAArg = false) {
// Set vector size to match ValueVTs and mark all elements as
// scalars by default.
- SmallVector<ParamVectorizationFlags, 16> VectorInfo;
- VectorInfo.assign(ValueVTs.size(), PVF_SCALAR);
+ SmallVector<unsigned, 16> VectorInfo;
- if (IsVAArg)
+ if (IsVAArg) {
+ VectorInfo.assign(ValueVTs.size(), 1);
return VectorInfo;
+ }
----------------
Artem-B wrote:
We could just return an explicitly contructed temporary array here, and move the `VectorInfo` down to where we actually do something interesting with it.
https://github.com/llvm/llvm-project/pull/137666
More information about the llvm-commits
mailing list