summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix comment.Eli Friedman2011-09-141-1/+1
| | | | llvm-svn: 139678
* Fix typo.Eric Christopher2011-09-131-1/+1
| | | | llvm-svn: 139668
* Correctly generate IR for casted "builtin" functions, whereJohn McCall2011-09-132-37/+41
| | | | | | | the builtin is really just a predefined declaration. These are totally valid to cast. llvm-svn: 139657
* Re-commit r139643.Eli Friedman2011-09-132-30/+20
| | | | | | Make clang use Acquire loads and Release stores where necessary. llvm-svn: 139650
* Revert r139643 while I look into it; it's breaking selfhost.Eli Friedman2011-09-132-20/+30
| | | | llvm-svn: 139648
* Make clang use Acquire loads and Release stores where necessary.Eli Friedman2011-09-132-30/+20
| | | | llvm-svn: 139643
* Turn off the generation of unaligned atomic load/store; I'm going to ↵Eli Friedman2011-09-131-1/+3
| | | | | | explicitly error out on such cases in the backend, at least for the moment. llvm-svn: 139640
* Refactoring, mostly to give ObjCPropertyDecls stronger invariants forJohn McCall2011-09-131-9/+8
| | | | | | their semantic attributes and then to take advantage of that. llvm-svn: 139615
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-138-24/+24
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Don't use native atomics on ivars whose size is not a power of two,John McCall2011-09-131-0/+8
| | | | | | | | even on architectures that support unaligned access (which is the only way this is otherwise legal, given that ivars apparently do not honor alignment attributes). llvm-svn: 139590
* Handle reference properties correctly in the trivial-getter check.John McCall2011-09-131-2/+8
| | | | llvm-svn: 139585
* Always emit bitfield properties using expression behavior, even if they'reJohn McCall2011-09-131-0/+7
| | | | | | atomic. This is probably something we should warn about. llvm-svn: 139584
* Unify the decision of how to emit property getters and setters into aJohn McCall2011-09-132-205/+340
| | | | | | | | single code path. Use atomic loads and stores where necessary. Load and store anything of the appropriate size and alignment with primitive operations instead of going through the call. llvm-svn: 139580
* Privatize the setter/getter call generation methods, plus some minorJohn McCall2011-09-122-72/+70
| | | | | | modernization. No functionality change. llvm-svn: 139555
* By popular demand, enumerate all builtin types!Devang Patel2011-09-121-2/+14
| | | | llvm-svn: 139521
* Add an assert so that new builtins do not sneak without proper debug info.Devang Patel2011-09-121-0/+2
| | | | llvm-svn: 139514
* Fix debug info encodings for char16_t and char32_t.Devang Patel2011-09-121-2/+2
| | | | llvm-svn: 139502
* Modernize and comment; no functionality change.John McCall2011-09-101-31/+27
| | | | llvm-svn: 139470
* Simplify the generation of Objective-C setters, at least a little.John McCall2011-09-103-134/+209
| | | | | | | | | Use a more portable heuristic for deciding when to emit a single atomic store; it's possible that I've lost information here, but I'm not sure how much of the logic before was intentionally arch-specific and how much was just not quite consistent. llvm-svn: 139468
* Rename the ARC cast kinds to start with "ARC".John McCall2011-09-106-28/+28
| | | | llvm-svn: 139466
* When converting a block pointer to an Objective-C pointer type, extendJohn McCall2011-09-106-2/+80
| | | | | | | | | | | the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. llvm-svn: 139451
* Emit debug info for wchar_t.Devang Patel2011-09-101-0/+4
| | | | llvm-svn: 139443
* Clean up our handling of Objective-C definitions in AST files. RatherDouglas Gregor2011-09-101-7/+0
| | | | | | | | | than having CodeGen check whether a declaration comes from an AST file (which it shouldn't know or care about), make sure that the AST writer and reader pass along "interesting" declarations that CodeGen needs to know about. llvm-svn: 139441
* Introduce a new predicate Decl::isFromASTFile() to determine whether aDouglas Gregor2011-09-091-1/+1
| | | | | | | | declaration was deserialized from an AST file. Use this instead of Decl::getPCHLevel() wherever possible. This is a simple step toward killing off Decl::getPCHLevel(). llvm-svn: 139427
* Remove trailing } in comment.Julien Lerouge2011-09-091-1/+1
| | | | llvm-svn: 139424
* Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge2011-09-097-75/+187
| | | | | | | annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. llvm-svn: 139423
* Carry the debug information from single exit unified return blockEric Christopher2011-09-091-1/+2
| | | | | | | | along with the new insert point. Fixes PR10829 llvm-svn: 139416
* Treat the weak export of block runtime symbols as a deployment-targetJohn McCall2011-09-092-90/+55
| | | | | | | | feature akin to the ARC runtime checks. Removes a terrible hack where IR gen needed to find the declarations of those symbols in the translation unit. llvm-svn: 139404
* Do a lookup for the blocks runtime globals to see if they were declared,Argyrios Kyrtzidis2011-09-092-49/+36
| | | | | | | | | instead of codegen waiting to consume such a declaration, which won't happen if that decls are coming from a PCH. Fixes rdar://10028656. llvm-svn: 139359
* Give conversions of block pointers to ObjC pointers a different cast kindJohn McCall2011-09-096-6/+12
| | | | | | | | than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. llvm-svn: 139352
* Formatting.Eric Christopher2011-09-081-1/+2
| | | | llvm-svn: 139296
* Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics ↵Eli Friedman2011-09-071-65/+40
| | | | | | | | | | (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything. There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now. I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic. llvm-svn: 139216
* When extracting the callee declaration from a call expression, be sureDouglas Gregor2011-09-061-8/+4
| | | | | | | | | | to look through SubstNonTypeTemplateParmExprs. Then, update the IR generation of CallExprs to actually use CallExpr::getCalleeDecl() rather than attempting to mimick its behavior (badly). Fixes <rdar://problem/10063539>. llvm-svn: 139185
* Rearrange code so that we pass the right pointer to delete[] when an ↵Eli Friedman2011-09-061-9/+9
| | | | | | exception is thrown constructing the array elements in an array new expression. Fixes PR10870. llvm-svn: 139158
* When performing a derived-to-base cast on the right-hand side of theDouglas Gregor2011-09-062-11/+9
| | | | | | | | | | | | | | | | synthesized move assignment within an implicitly-defined move assignment operator, be sure to treat the derived-to-base cast as an xvalue (rather than an lvalue). Otherwise, we'll end up getting the wrong constructor. Optimize a direct call to a trivial move assignment operator to an aggregate copy, as we do for trivial copy assignment operators, and update the the assertion in CodeGenFunction::EmitAggregateCopy() to cope with this optimization. Fixes PR10860. llvm-svn: 139143
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-0/+1
| | | | | | // rdar://10033896 llvm-svn: 139041
* revert patch in r139020Fariborz Jahanian2011-09-021-1/+5
| | | | llvm-svn: 139029
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-5/+1
| | | | | | // rdar://10033896 llvm-svn: 139020
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-0218-46/+46
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Don't try to emit unsupported templated friend declarations. They're unsupportedNick Lewycky2011-09-011-2/+3
| | | | | | | and may very well be dependent-types, triggering an assertion in debug info codegen. llvm-svn: 138970
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-303-10/+20
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-302-3/+31
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* Be sure to emit lvalue-to-rvalue casts for loads from x-values.John McCall2011-08-301-24/+18
| | | | | | | Doing this happens to disrupt the pattern that ARC was looking for for move optimizations, so we need to fix that simultaneously. llvm-svn: 138789
* Remove unused variables noticed by GCC.Benjamin Kramer2011-08-271-1/+0
| | | | llvm-svn: 138707
* Slight optimization enabled by the previous assert: John McCall2011-08-262-3/+4
| | | | | | emit all gl-value arguments as reference bindings. llvm-svn: 138655
* Assert that a call argument is a gl-value iff the parameter is a reference type.John McCall2011-08-261-0/+3
| | | | llvm-svn: 138639
* What say we document some of these AggValueSlot flags a bitJohn McCall2011-08-263-29/+43
| | | | | | better. llvm-svn: 138628
* Since the 'is aliased' bit is critical for correctness in C++, itJohn McCall2011-08-263-6/+10
| | | | | | | | | really shouldn't be optional. Fix the remaining place where a temporary was being passed as potentially-aliased memory. Fixes PR10756. llvm-svn: 138627
* An initialization does not alias.John McCall2011-08-261-1/+2
| | | | llvm-svn: 138624
* The allocated exception slot does not alias anything; should fix self-host.John McCall2011-08-261-1/+2
| | | | llvm-svn: 138615
OpenPOWER on IntegriCloud