[llvm-dev] how to discriminate pointers in calling conventions

Davis, Alan via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 8 15:54:18 PST 2018


I have a target whose calling conventions specify that pointer-typed arguments are passed in different registers than same-sized integers. It appears that in the SelectionDAGBuilder, arguments/formals with pointer type are lowered to the corresponding integer MVT (via this path:
SelectionDAGISel::LowerArguments
llvm::ComputeValueVTs
TargetLoweringBase::getValueType
TargetLoweringBase::getPointerType
)
and from then on there is no way to discriminate them, for example in the CallingConv.td file and so on.

None of the functions in the above list are virtual and anyway it seems like a Bad Idea to just have getPointerType return iPTR or something like that since it's used in many other contexts.

Anyone dealt with something like this? Any ideas?

-Alan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180308/742227c4/attachment.html>


More information about the llvm-dev mailing list