[cfe-commits] [PATCH 1/2] Multiprecision Arithmetic Builtins

Michael Gottesman mgottesman at apple.com
Sat Jan 12 20:38:31 PST 2013


Committed documentation in r172345.

On Jan 12, 2013, at 6:23 PM, Michael Gottesman <mgottesman at apple.com> wrote:

> k. I will update the documentation and repost in this thread. Committed actual patch with fixes in r172341.
> 
> On Jan 12, 2013, at 5:18 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
>> On Sun, Jan 13, 2013 at 2:44 AM, Michael Gottesman <mgottesman at apple.com> wrote:
>>> This patch is the first of two patches which adds support for Multiprecision arithmetic to clang via builtins. This specific patch contains the addition builtins. I will send the other once I get this one in.
>>> 
>>> *NOTE* In case you are wondering I am also preparing patches for LLVM to perform the proper optimizations in the backend to turn this into the SDNodes addc/adde/subc/sube so a chain of these builtins are lowered properly.
>> 
>> Please add documentation to docs/LanguageExtensions.rst for the
>> benefit of users and reviewers. Thanks in advance.
>> 
>> +  ArrayRef<llvm::Type *> type(X->getType());
>> +  llvm::Value *callee = CGF.CGM.getIntrinsic(IntrinsicID, type);
>> +  llvm::Value *tmp = CGF.Builder.CreateCall2(callee, X, Y);
>> 
>> Variable names should start with an uppercase letter.
>> 
>> Dmitri
>> 
>> -- 
>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> 




More information about the cfe-commits mailing list