[cfe-dev] [RFC] Introduce overflow builtins
Xi Wang
xi.wang at gmail.com
Tue Mar 27 20:22:56 PDT 2012
On Mar 24, 2012, at 10:04 PM, Chris Lattner wrote:
> On Mar 22, 2012, at 6:12 AM, Xi Wang wrote:
>> Actually I used __builtin_saddo (__builtin_sadd_with_overflow is just too long). Since this "saddo" looked a little bizarre to me, I changed it to __overflow_sadd.
>
> I don't think a long name is a bad thing. These builtins will be rarely used, it's just that they are important when they do get used.
>
>> I was also wondering which would be better, __overflow_*(T*, T, T) or __overflow_*(T, T, T*).
>
> I don't have a preference one way or the other. Are there any precedents?
Okay. Let's try
__builtin_*_with_overflow(T, T, T*);
to keep the names consistent with the LLVM counterparts. Also it's probably more intuitive to let the output parameter come after the inputs.
Does this sound good?
- xi
More information about the cfe-dev
mailing list