summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove TargetInfo::getTargetPrefix().Daniel Dunbar2009-08-241-6/+12
| | | | llvm-svn: 79907
* Update for LLVM API change.Owen Anderson2009-08-131-31/+31
| | | | llvm-svn: 78946
* Update for LLVM API change.Owen Anderson2009-07-311-3/+3
| | | | llvm-svn: 77722
* Update for LLVM API changes.Owen Anderson2009-07-301-2/+2
| | | | llvm-svn: 77638
* Update for LLVM API change.Owen Anderson2009-07-291-9/+9
| | | | llvm-svn: 77514
* Update for LLVM API change.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77249
* Switch to getName()Daniel Dunbar2009-07-261-1/+1
| | | | llvm-svn: 77151
* Update for LLVM API change.Owen Anderson2009-07-241-17/+18
| | | | llvm-svn: 77012
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-32/+33
| | | | llvm-svn: 75705
* Update for LLVM API change.Owen Anderson2009-07-131-3/+4
| | | | llvm-svn: 75446
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-2/+2
| | | | llvm-svn: 73702
* move the various builtins stuff from libast to libbasic. ThisChris Lattner2009-06-141-1/+1
| | | | | | fixes a layering violation in lib/Basic/Targets.cpp. llvm-svn: 73318
* Remove a few more vector builtins.Eli Friedman2009-06-071-23/+0
| | | | llvm-svn: 73022
* Now that LLVM CodeGen can handle the generic variations a bit better, Eli Friedman2009-06-071-22/+0
| | | | | | get rid of a few more clang vector builtins. llvm-svn: 73015
* Get rid of a bunch of dead builtins.Eli Friedman2009-06-061-199/+0
| | | | llvm-svn: 72996
* Add support for __builtin_unwind_init.Eli Friedman2009-06-021-0/+30
| | | | | | | | Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp implementation I've had sitting in my tree for a while. I haven't enabled it because the LLVM backend support isn't complete yet. llvm-svn: 72727
* If we recognize alloca, treat it as a builtin. This fixes uses of Eli Friedman2009-06-021-0/+1
| | | | | | alloca without declaring it. llvm-svn: 72719
* Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar ↵Daniel Dunbar2009-05-271-2/+2
| | | | | | RValue. llvm-svn: 72504
* Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't ↵Anders Carlsson2009-05-271-3/+3
| | | | | | emit an expr. llvm-svn: 72446
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-1/+1
| | | | llvm-svn: 72210
* Remove an unused builtin.Anders Carlsson2009-05-181-4/+0
| | | | llvm-svn: 72033
* Add 'cmp' SSE builtins and get rid of a bunch of other builtins.Anders Carlsson2009-05-181-154/+14
| | | | llvm-svn: 72032
* implement __sync_synchronize and __sync_lock_release,Chris Lattner2009-05-131-3/+15
| | | | | | rdar://6880573 llvm-svn: 71637
* add support for __sync_nand_and_fetch and __sync_fetch_and_nand,Chris Lattner2009-05-131-2/+20
| | | | | | rdar://6880573 llvm-svn: 71636
* reimplement __sync_* builtins to be variadic and to follow the sameChris Lattner2009-05-081-18/+94
| | | | | | | | | semantic rules that gcc and icc use. This implements the variadic and concrete versions as builtins and has sema do the disambiguation. There are probably a bunch of details to finish up but this seems like a large monotonic step forward :) llvm-svn: 71212
* PR4134: Implement __builtin_extract_return_addr.Eli Friedman2009-05-031-1/+4
| | | | llvm-svn: 70794
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-261-2/+1
| | | | llvm-svn: 70145
* fix incorrect lowering of __builtin_ia32_shufpd, rdar://6803924Chris Lattner2009-04-181-1/+2
| | | | llvm-svn: 69428
* Update to use hasAttr() instead of getAttr().Daniel Dunbar2009-04-131-2/+2
| | | | | | - No functionality change. llvm-svn: 68987
* Add a destination type argument to EmitConstantExpr. This will be used for ↵Anders Carlsson2009-04-081-1/+1
| | | | | | when the destination has a reference type. (No functionality change yet) llvm-svn: 68593
* Implement __sync_{add,sub,and,or,xor}_and_fetch andDaniel Dunbar2009-04-071-9/+59
| | | | | | | | __sync_bool_compare_and_swap. - <rdar://problem/6762223> [sema/irgen] support __sync_bool_compare_and_swap and __sync_add_and_fetch llvm-svn: 68482
* Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.Daniel Dunbar2009-02-161-1/+30
| | | | | | | | | | | | | | | | - Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. llvm-svn: 64689
* Fix IRgen of __builtin_memset.Daniel Dunbar2009-02-161-1/+2
| | | | | | - Fix test case to not only have negative tests. llvm-svn: 64674
* Implicitly declare certain C library functions (malloc, strcpy, memmove,Douglas Gregor2009-02-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. llvm-svn: 64504
* Use EmitVAListRef instead of EmitLValue directly to handle array decayDaniel Dunbar2009-02-111-1/+1
| | | | | | case on x86_64. llvm-svn: 64333
* Reapply Daniel's patch to match up with llvm 63765.Dale Johannesen2009-02-051-6/+3
| | | | | | Untested, Daniel or Nate please review. llvm-svn: 63814
* Chase LLVM TOT in circles (i.e., revert r63773 to match revert ofDaniel Dunbar2009-02-041-3/+6
| | | | | | r63765). llvm-svn: 63795
* (llvm up) Update for intrinsic lookup changes.Daniel Dunbar2009-02-041-6/+3
| | | | llvm-svn: 63773
* Make the constant folder aware of Eli Friedman2009-01-251-2/+2
| | | | | | | __builtin___CFStringMakeConstantString. (We get into trouble in GenerateStaticBlockVarDecl if the constant folder isn't accurate.) llvm-svn: 62949
* Slight cleanup, and fix for va_arg on architectures where va_list is a Eli Friedman2009-01-201-14/+3
| | | | | | struct. llvm-svn: 62585
* Do codegen correctly for va_start/end/copy on architectures where Eli Friedman2009-01-201-4/+14
| | | | | | | | | va_list is a struct, like x86-64. If anyone has a better idea for how to do the check in the if statements, suggestions are welcome. llvm-svn: 62582
* Fix for PR3350: add special-casing for "references" to va_lists in Eli Friedman2009-01-201-5/+1
| | | | | | | | builtins. Also, a minor tweak to va_copy for consistency. llvm-svn: 62574
* Vector codegen improvementsNate Begeman2009-01-181-0/+2
| | | | llvm-svn: 62458
* Generate code for __builtin_ia32_pshufwAnders Carlsson2008-12-221-0/+7
| | | | llvm-svn: 61324
* Use the new Expr::EvaluateAnders Carlsson2008-12-011-5/+5
| | | | llvm-svn: 60321
* rename Expr::tryEvaluate to Expr::Evaluate.Chris Lattner2008-11-161-1/+1
| | | | llvm-svn: 59426
* Fix bug in va_copyAnders Carlsson2008-11-041-1/+1
| | | | llvm-svn: 58680
* Fix for PR2966: va_start/va_end use the *address* of the Eli Friedman2008-10-291-1/+1
| | | | | | | | | | | va_list, not the value. Patch fixes an assert on x86-64 and a wrong-code bug on x86. I'm not completely sure, but I think it's a regression from r58306. Does anyone run regression tests regularly on x86-64? The crash should have been picked up there. llvm-svn: 58366
* Added pinsrd, pinsrq, and some other vector intrinsicsMon P Wang2008-10-151-0/+4
| | | | llvm-svn: 57563
OpenPOWER on IntegriCloud