[cfe-commits] [PATCH/RFC, PowerPC] Extend 32-bit function arguments / return values
rafael.espindola at gmail.com
Mon Oct 22 12:12:03 PDT 2012
On 22 October 2012 14:53, Chandler Carruth <chandlerc at google.com> 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.
More information about the cfe-commits