Anders Carlsson
093f1a099f
Generate code for the various __builtin_ctz functions.
...
llvm-svn: 46811
2008-02-06 07:19:27 +00:00
Nate Begeman
3399bb424c
simple implementation of __builtin_alloca
...
llvm-svn: 46783
2008-02-06 00:02:50 +00:00
Anders Carlsson
f4f3679eea
Generate correct code for __builtin_huge_val
...
llvm-svn: 46639
2008-02-01 16:06:34 +00:00
Anders Carlsson
b49fdfb5f0
Implement __builtin_huge_val.
...
llvm-svn: 46627
2008-02-01 00:44:41 +00:00
Eli Friedman
9d92ce8b3a
Make sure to emit all the arguments to a function call. This fixes the
...
codegen of calls to functions without a prototype and varargs functions,
including printf.
llvm-svn: 46543
2008-01-30 01:32:06 +00:00
Nate Begeman
1c075a1c9d
Match change in EmitCallExpr
...
llvm-svn: 46136
2008-01-17 18:06:09 +00:00
Nate Begeman
1e36a85f64
Implement basic overload support via a new builtin, __builtin_overload.
...
__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.
The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:
float a;
float sinf(float);
int sini(int);
float b = __builtin_overload(1, a, sini, sinf);
Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);
llvm-svn: 46132
2008-01-17 17:46:27 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Chris Lattner
6c9ffe9529
Implement codegen for ordered comparison builtins.
...
llvm-svn: 45243
2007-12-20 00:44:32 +00:00
Chris Lattner
b8be97e239
introduce a new CodeGenModule::getIntrinsic method, which wraps
...
Intrinsic::getDeclaration, allowing much more terse code.
llvm-svn: 45136
2007-12-18 00:25:38 +00:00
Christopher Lamb
77560fbde7
Update to use new PointerType::getUnqual() api.
...
llvm-svn: 45081
2007-12-17 01:11:20 +00:00
Anders Carlsson
ca6bcae0be
Start generating SSE intrinsics.
...
llvm-svn: 45079
2007-12-16 22:33:50 +00:00
Anders Carlsson
f5f6544edc
We now support all MMX intrinsics. SSE intrinsics are next.
...
llvm-svn: 45062
2007-12-15 21:23:30 +00:00
Anders Carlsson
4d3094a9bb
Simplify the vector code. Add more shift intrinsics.
...
llvm-svn: 45035
2007-12-14 17:48:24 +00:00
Chris Lattner
eb13c73c36
minor cleanups
...
llvm-svn: 44996
2007-12-13 07:47:54 +00:00
Chris Lattner
13653d7668
simplify some code.
...
llvm-svn: 44994
2007-12-13 07:34:23 +00:00
Chris Lattner
63ba2c06c4
fix a build issue with non-apple-gcc-4.0 compilers.
...
llvm-svn: 44844
2007-12-11 04:33:00 +00:00
Anders Carlsson
f1c18350e3
Generate more builtins.
...
llvm-svn: 44841
2007-12-11 03:09:22 +00:00
Anders Carlsson
eee7566205
Generate code for some more intrinsics.
...
llvm-svn: 44839
2007-12-11 02:25:54 +00:00
Anders Carlsson
92c4e44da1
Address Chris's comments.
...
llvm-svn: 44749
2007-12-09 23:39:18 +00:00
Anders Carlsson
895af08562
Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp
...
llvm-svn: 44748
2007-12-09 23:17:02 +00:00
Anders Carlsson
8e1d8cf241
Implement __builtin_ia32_mulps.
...
llvm-svn: 44745
2007-12-09 21:51:19 +00:00
Anders Carlsson
a020c43034
Generate code for target specific intrinsics.
...
llvm-svn: 44744
2007-12-09 21:20:04 +00:00
Anders Carlsson
e8ee04c0bc
Implement codegen for builtin infinity functions.
...
llvm-svn: 44604
2007-12-05 07:22:48 +00:00
Anders Carlsson
ef93b9d011
Implement __builtin_bswap32 and __builtin_bswap64.
...
llvm-svn: 44521
2007-12-02 21:58:10 +00:00
Chris Lattner
f0780fae43
convert the rest of the stderr users in codegen to use diagnostics.
...
llvm-svn: 44503
2007-12-02 01:49:16 +00:00
Oliver Hunt
a96fe8d5c5
Add support for __builtin_expect which is needed for assert,
...
among other things.
Also change a codegen warning to dump to stderr so it doesn't
mess with -emit-llvm output
llvm-svn: 44497
2007-12-02 01:03:24 +00:00
Anders Carlsson
4f8eb127e1
Add __builtin_abs
...
llvm-svn: 44254
2007-11-20 19:05:17 +00:00
Anders Carlsson
1e27f9b296
Stub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the call to __builtin___CFStringMakeConstantString.
...
llvm-svn: 43592
2007-11-01 00:39:26 +00:00
Anders Carlsson
ceced4ca73
Generate code for __builtin_classify_type.
...
llvm-svn: 43429
2007-10-29 02:59:40 +00:00
Anders Carlsson
24ebce6fca
Generate code for va_start and va_end.
...
llvm-svn: 42939
2007-10-12 23:56:29 +00:00
Chris Lattner
69de3f4af6
When dumping out errors about unsupported stuff, emit loc info.
...
llvm-svn: 41907
2007-09-13 01:17:29 +00:00
Chris Lattner
9e47ead594
Implement codegen support for lowering "library builtins" like __builtin_isinf
...
to their corresponding library routines (e.g. isinf). This allows us to handle
all the stuff in macos math.h, and other stuff as it's added to *Builtins.def.
llvm-svn: 41634
2007-08-31 04:44:06 +00:00
Chris Lattner
1eec6601d9
add the ability to get the llvm function corresponding to a library builtin.
...
llvm-svn: 41633
2007-08-31 04:31:45 +00:00
Chris Lattner
881440f5d2
Don't make unknown builtins fatal errors yet.
...
llvm-svn: 41419
2007-08-26 04:17:05 +00:00
Anders Carlsson
b04ea61b79
Implement code generation for constant CFStrings.
...
llvm-svn: 41206
2007-08-21 00:21:21 +00:00
Anders Carlsson
1d8e521022
Add support for code generation of builtins.
...
llvm-svn: 41188
2007-08-20 18:05:56 +00:00