[PATCH] D153432: [SDAGBuilder] Handle multi-part arguments in argument copy elision (PR63430)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 06:01:44 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:10928
+ for (EVT VT : ValueVTs)
+ NumParts += TLI->getNumRegistersForCallingConv(*CurDAG->getContext(),
+ F.getCallingConv(), VT);
----------------
pengfei wrote:
> nikic wrote:
> > arsenm wrote:
> > > For some reason this is split into two hooks for the register type and the number of registers. Wouldn't you need to account for the split and promoted / demoted case?
> > Not sure which case you have in mind here, but this is doing the same as the code below (line 10954).
> IIUC, we cannot assume all `ValueVTs` are the same VT. So it doesn't look correct to sum them together.
> How about iterate Ins[i] and check for `isSplitEnd`?
This doesn't assume that the VTs are the same, it just sums of the parts for all the (potentially different) VTs. We don't care about the types, just how many there are.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153432/new/
https://reviews.llvm.org/D153432
More information about the llvm-commits
mailing list