On 22 October 2012 14:53, Chandler Carruth <[email protected]> wrote:
> So, I'm not really sure if this is the right approach. I'd like some
> folks from the LLVM side of things to chime in.
>
> In general, I'm not certain we want to continue growing our dependence
> on the signext and zeroext attributes on return types, or whether we
> want to do the extension in the frontend instead.
>
> Most of the targets in Clang currently eagerly zext or sext the return
> value to make it conform to the ABI. You can look at some of the other
> classify*Type methods in Clang for how.

As far as I know the difference is enabling optimization. If we see a

declare i8 zeroext @foo()

the caller knows that the top bits of the return are 0. There was some
discussion about just using the range metadata, but that is not
available for arguments/returns at the moment.

Cheers,
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to