[PATCH] D42465: [RFC][CallingConv] Add CCAssignToRegWithType Calling Convention Interface

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 07:33:56 PST 2018


shiva0217 added inline comments.


================
Comment at: include/llvm/Target/TargetCallingConv.td:93
 
+/// CCAssignToRegWithType - Same as CCAssignToReg, but split the argument to
+/// multiple destTy type arguments if the first part of destTy assigns to the
----------------
chenwj wrote:
> If f64 has to be passed with even/odd register pair (i.e., r0 + r1, but not r1 + r2), can `CCAssignToRegWithType` handle such case? 
Hi Wei-Ren, the patch can't handle the case, it would be a useful feature for supporting even pair register allocation. We could try to add a RegAlign field and write a new function something like AllocateRegWithAlign (Reglist, RegAlign) in CCstate class to handle it. As a prototype implementation, I would like to make sure the concept is practical and the split logic is robust enough. Once the concept is accepted, I'll try to extend the interface to support the case. Thanks for your input.


Repository:
  rL LLVM

https://reviews.llvm.org/D42465





More information about the llvm-commits mailing list