summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* rip out __builtin_overloadChris Lattner2009-02-183-27/+0
| | | | llvm-svn: 64961
* x86_64 ABI: "is passed in regs" computation for va_arg was broken forDaniel Dunbar2009-02-181-1/+1
| | | | | | | | things passed in mixed registers. This knocks out 8 x86_64 failures. llvm-svn: 64958
* Some refactoring and simplificaiotn of objc's gcFariborz Jahanian2009-02-181-17/+10
| | | | | | ir gen. llvm-svn: 64954
* Simplify.Daniel Dunbar2009-02-181-2/+1
| | | | llvm-svn: 64944
* Start generating gc'able code using the newFariborz Jahanian2009-02-181-25/+16
| | | | | | objc gc type attributes. llvm-svn: 64935
* Cleanup objc's gc attributes code no longer needed.Fariborz Jahanian2009-02-181-2/+10
| | | | | | | | This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. llvm-svn: 64925
* x86_64 ABI: Two bug fixes.Daniel Dunbar2009-02-181-4/+36
| | | | | | | | | | | | | | | | | | 1. Return of _Complex long double used wrong type. 2. va_arg of types passed in two SSE registers didn't account for extra space in register save area. Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are: -- === gcc Summary === # of expected passes 1292 # of unexpected failures 34 # of unsupported tests 2 -- llvm-svn: 64880
* Avoid getNameAsCString when the decl doesn't have a name.Mike Stump2009-02-171-2/+3
| | | | | | Build of the parm list with the iterator, not end(). llvm-svn: 64851
* Remove some redundant Decl -> Decl castings.Argyrios Kyrtzidis2009-02-171-5/+1
| | | | llvm-svn: 64804
* Change EmitConstantExpr to allow failure.Daniel Dunbar2009-02-173-21/+49
| | | | | | | | | | | | | | IRgen no longer relies on isConstantInitializer, instead we just try to emit the constant. If that fails then in C we emit an error unsupported (this occurs when Sema accepted something that it doesn't know how to fold, and IRgen doesn't know how to emit) and in C++ we emit a guarded initializer. This ends up handling a few more cases, because IRgen was actually able to emit some of the constants Sema accepts but can't Evaluate(). For example, PR3398. llvm-svn: 64780
* 80-cols.Daniel Dunbar2009-02-171-9/+11
| | | | llvm-svn: 64779
* Renamed ASQualType to ExtQualType to reflect its moreFariborz Jahanian2009-02-172-3/+3
| | | | | | | general use; as for, objc2's gc type attributes. No change in functionality. llvm-svn: 64778
* Be sure to initialize Name.Mike Stump2009-02-171-1/+1
| | | | llvm-svn: 64769
* Fixup spacing a little.Mike Stump2009-02-171-6/+6
| | | | llvm-svn: 64768
* x86_64 ABI: Fix assert on return of _Complex long double.Daniel Dunbar2009-02-171-5/+6
| | | | llvm-svn: 64756
* x86_64 ABI: Implement classification for bit-fields.Daniel Dunbar2009-02-171-2/+26
| | | | llvm-svn: 64727
* x86_64 ABI: Handle va_arg arguments with alignment > 8.Daniel Dunbar2009-02-161-4/+15
| | | | llvm-svn: 64701
* Add support for throwing exceptions to the nonfragile ABIAnders Carlsson2009-02-161-15/+34
| | | | llvm-svn: 64692
* Added implementation of objc2's gc API calls forFariborz Jahanian2009-02-161-16/+70
| | | | | | nonfragile abi. llvm-svn: 64690
* Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.Daniel Dunbar2009-02-163-3/+33
| | | | | | | | | | | | | | | | - 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 volatile handling with ExtVectorElementExpr, so that weChris Lattner2009-02-162-10/+13
| | | | | | | | | | | emit two volatile loads for: typedef __attribute__(( ext_vector_type(4) )) float float4; float test(volatile float4 *P) { return P->x+P->y; } llvm-svn: 64683
* introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's ↵Chris Lattner2009-02-161-4/+5
| | | | | | suggestion llvm-svn: 64681
* Fix IRgen of __builtin_memset.Daniel Dunbar2009-02-161-1/+2
| | | | | | - Fix test case to not only have negative tests. llvm-svn: 64674
* enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyyChris Lattner2009-02-161-8/+12
| | | | llvm-svn: 64667
* assert/ErrorUnsupported in unimplemented stub functions instead ofDaniel Dunbar2009-02-161-16/+25
| | | | | | miscompiling. llvm-svn: 64647
* Obj-C non-fragile ABI: Fix types of a few globals; these were notDaniel Dunbar2009-02-151-20/+26
| | | | | | creating valid LLVM structures (although they work fined). llvm-svn: 64580
* Use getNameAsCString instead of getNameAsString and reflow the type.Mike Stump2009-02-143-7/+7
| | | | | | Thanks Anders. llvm-svn: 64571
* Generate the helper function for blocks. Now basic codegen isMike Stump2009-02-145-15/+25
| | | | | | starting to work for blocks. llvm-svn: 64570
* Fixed a bad ir-gen bug which caused a dejagnu test to fail.Fariborz Jahanian2009-02-141-1/+1
| | | | | | | Now we are pretty close to be in sync with objc's classic abi when it comes to passing dejagnu objc executable tests. llvm-svn: 64569
* Fixed a problem caused by foreward @class useFariborz Jahanian2009-02-141-2/+2
| | | | | | | | which consequently caused a Seg fault. during meta-data generation. It also addresses an issue related to late binding of newly synthesize ivars (when we support it). llvm-svn: 64563
* Add hook to add attributes to function declarations that we knowDouglas Gregor2009-02-142-2/+3
| | | | | | | | | | | | | | | | about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. llvm-svn: 64561
* x86_64 ABI: Need to use canonical types when comparing againstDaniel Dunbar2009-02-141-2/+6
| | | | | | ASTContext types. llvm-svn: 64533
* x86_64 ABI: Pass simple types directly when possible. This isDaniel Dunbar2009-02-141-2/+32
| | | | | | | important for both keeping the generated LLVM simple and for ensuring that integer types are passed/promoted correctly. llvm-svn: 64529
* Make it possible for builtins to expression FILE* arguments, so thatDouglas Gregor2009-02-141-1/+4
| | | | | | | | we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. llvm-svn: 64526
* fix rdar://6586493, a bug in codegen of the GNU Chris Lattner2009-02-131-9/+19
| | | | | | missing-?:-true-value extension. llvm-svn: 64505
* Implicitly declare certain C library functions (malloc, strcpy, memmove,Douglas Gregor2009-02-133-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Set constant bit on static block vars as well. Patch by Anders Johnson!qDaniel Dunbar2009-02-131-1/+1
| | | | llvm-svn: 64502
* Simplify predicate.Daniel Dunbar2009-02-131-3/+1
| | | | llvm-svn: 64500
* IRgen support for attribute used.Daniel Dunbar2009-02-133-8/+29
| | | | | | - PR3566 llvm-svn: 64492
* Pull MayDeferGeneration out of EmitGlobal.Daniel Dunbar2009-02-132-16/+39
| | | | | | | | - Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly llvm-svn: 64488
* Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructureDaniel Dunbar2009-02-132-20/+61
| | | | | | | for attribute used support. - No functionality change. llvm-svn: 64487
* Let the backend unique these.Mike Stump2009-02-133-6/+2
| | | | llvm-svn: 64486
* Fix spelling.Mike Stump2009-02-131-2/+2
| | | | llvm-svn: 64482
* Move DescriptorUniqueCount into CGM.Mike Stump2009-02-133-4/+5
| | | | llvm-svn: 64481
* Move NSConcreteStackBlock into CGM.Mike Stump2009-02-132-10/+26
| | | | llvm-svn: 64479
* Eliminate an unused variableDouglas Gregor2009-02-131-3/+0
| | | | llvm-svn: 64476
* Reflow to 80col.Mike Stump2009-02-131-91/+84
| | | | llvm-svn: 64475
* Move GlobalUniqueCount up into CGM.Mike Stump2009-02-133-5/+8
| | | | llvm-svn: 64473
* Fixed a 64bit code gen bug of a cateogoryFariborz Jahanian2009-02-131-11/+17
| | | | | | implementation with no category declaration! llvm-svn: 64470
* x86_64 ABI: Support va_arg passed in mixed registers.Daniel Dunbar2009-02-131-1/+22
| | | | | | - Now at 1274 passes on gcc compat suite vs 1262. llvm-svn: 64469
OpenPOWER on IntegriCloud