arsenm added inline comments.
================ Comment at: lib/CodeGen/TargetInfo.cpp:7571 + + // XXX: Should this be i64 instead, and should the limit increase? + llvm::Type *I32Ty = llvm::Type::getInt32Ty(getVMContext()); ---------------- b-sumner wrote: > arsenm wrote: > > b-sumner wrote: > > > What we do here depends on NumRegsLeft when the block is entered and > > > NumRegs. If NumRegsLeft >= NumRegs then we just need 2 adjacent > > > registers. If NumRegsLeft == 1 and NumRegs == 2, then do we pass the low > > > half in a register and the upper half in memory, or all of it in memory? > > > Anyway, I think NumRegsLeft shouldn't be updated until we know it's OK, > > > and then we don't need the min(). > > It's all one or the other. Whether it's passed in memory or not is really > > determined in codegen based on the actual register limit (which is also > > higher than the 16 used here, at least for now). Here selects whether to > > use byval or not. The ABI is slightly different whether it's passed as > > byval or as too many registers. I'm not sure it ever really makes sense to > > use byval yet, so I wasn't trying to be very precise here. > Thanks. Just one more question. If we use memory for an argument, are all > following arguments required to use memory? In that case, the min() is > correct. But if a following argument could use a register, then the amount > to subtract is NumRegs <= NumRegsLeft ? NumRegs : 0. For what this does now, any large aggregates after NumRegsLeft == 0 will use byval. Simple types like int or small structs will still be directly passed arguments. https://reviews.llvm.org/D36171 _______________________________________________ cfe-commits mailing list firstname.lastname@example.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits