[cfe-commits] [PATCH 1/2] Multiprecision Arithmetic Builtins
Dmitri Gribenko
gribozavr at gmail.com
Sat Jan 12 17:18:36 PST 2013
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