[PATCH] D90219: [SVE] Deal with SVE tuple call arguments correctly when running out of registers
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 08:12:47 PST 2020
david-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4172
+ unsigned ExtraArgLocs = 0;
+ for (unsigned i = 0, j = 0, e = ArgLocs.size(); i != e; ++i, ++j) {
CCValAssign &VA = ArgLocs[i];
----------------
sdesmalen wrote:
> Is there a possibility to express `j` as `i` when combining it with `ExtraArgLocs`?
Sure, the least ugly solution is to change everywhere from 'j' to 'i' except the statement below where we would have:
CCValAssign &VA = ArgLocs[i - ExtraArgLocs];
if this is acceptable?
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4934
// Walk the register/memloc assignments, inserting copies/loads.
- for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
+ for (unsigned i = 0, j = 0, e = ArgLocs.size(); i != e; ++i, ++j) {
CCValAssign &VA = ArgLocs[i];
----------------
sdesmalen wrote:
> Same question about `unsigned j` as above.
So here I don't have the benefit of ExtraArgLocs (which was needed in order to keep the assert at the end of the loop). I can certainly get rid of 'j' if I add an extra variable such as ExtraArgLocs as I did for the other loop, but there needs to be two variables I think.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90219/new/
https://reviews.llvm.org/D90219
More information about the llvm-commits
mailing list