[LLVMdev] Troubling promotion of return value to Integer ...
Evan Cheng
evan.cheng at apple.com
Thu May 15 11:11:29 PDT 2008
On May 14, 2008, at 10:43 AM, Alireza.Moshtaghi at microchip.com wrote:
> In this thread I’m trying to merge two email threads into one,
> because both discuss the same problem that’s troubling us and I
> would like to reach a conclusion on what would be the best approach.
> To minimize the size of this thread I only mention the subject of
> the other two threads:
> (1) [LLVMdev] Integer promotion of return node operand
> (initiated by Sachin)
> (2) [LLVMdev] trouble with 32-bit promotion of return value
> (initiated by myself)
>
> To summarize:
> Evan has replied to thread (1) and suggested to add a calling
> convention and check for it in visitRet
> Dan replied to thread (2) and suggested to add a new field to the
> TargetLowering class, and then let each target specify the minimum
> integer type to promote return types to
>
> Either way, I think we all agree that the root of the problem is the
> FIXME in SelectionDAGLowering::visitRet()
>
> But what is the preferred method?
Both. :-)
If you are using a non-C ABI, then you may not need to do the
promotion at all. However, if you do need to do the promotion, you
need to know the type of "int". It's not entirely clear to me what is
the best way to accomplish. To me, I don't think TargetLowering is the
right place to add the hook. How about TargetData.h ? There is a
getIntPtrType(), perhaps we need a getIntType()?
Evan
>
> Thanks
> Ali
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080515/58d8b356/attachment.html>
More information about the llvm-dev
mailing list