summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't emit calls to virtual [[noreturn]] functions as noreturn; overrides of aRichard Smith2013-03-051-1/+4
| | | | | | | | [[noreturn]] function are not required to also be [[noreturn]]. We still emit calls to virtual __attribute__((noreturn)) functions as noreturn; unlike GCC, we do require overriders to also be noreturn for that attribute. llvm-svn: 176476
* Silence a number of static analyzer warnings with assertions and such.Jordan Rose2013-03-051-0/+2
| | | | | | No functionality change. llvm-svn: 176469
* Fix the emission of the copy-initialization of a block captureJohn McCall2013-03-041-2/+10
| | | | | | | | from a lambda capture when the capture is not trivially-copyable. rdar://13295759 llvm-svn: 176431
* Improve C11 atomics support:David Chisnall2013-03-031-7/+89
| | | | | | | | | | | | | | | | | | | | - Generate atomicrmw operations in most of the cases when it's sensible to do so. - Don't crash in several common cases (and hopefully don't crash in more of them). - Add some better tests. We now generate significantly better code for things like: _Atomic(int) x; ... x++; On MIPS, this now generates a 4-instruction ll/sc loop, where previously it generated about 30 instructions in two nested loops. On x86-64, we generate a single lock incl, instead of a lock cmpxchgl loop (one instruction instead of ten). llvm-svn: 176420
* LLVM API changes.Peter Collingbourne2013-03-021-2/+1
| | | | llvm-svn: 176398
* Restore order to placate test. I had no real reason to switch them.John McCall2013-03-011-1/+1
| | | | llvm-svn: 176328
* Re-use bit from superclass and extract stuff into a localJohn McCall2013-03-011-9/+10
| | | | | | function. Serves a patch we're kicking around out-of-tree. llvm-svn: 176327
* Add more of the command line options as attribute flags.Bill Wendling2013-02-281-0/+60
| | | | | | These can be easily queried by the back-end. llvm-svn: 176304
* Use the actual ABI-determined C calling convention for runtimeJohn McCall2013-02-2821-336/+470
| | | | | | | | | | | | | | | | | | | | | | calls and declarations. LLVM has a default CC determined by the target triple. This is not always the actual default CC for the ABI we've been asked to target, and so we sometimes find ourselves annotating all user functions with an explicit calling convention. Since these calling conventions usually agree for the simple set of argument types passed to most runtime functions, using the LLVM-default CC in principle has no effect. However, the LLVM optimizer goes into histrionics if it sees this kind of formal CC mismatch, since it has no concept of CC compatibility. Therefore, if this module happens to define the "runtime" function, or got LTO'ed with such a definition, we can miscompile; so it's quite important to get this right. Defining runtime functions locally is quite common in embedded applications. llvm-svn: 176286
* Improve property metadata generation with the GNUstep runtime.David Chisnall2013-02-281-18/+42
| | | | llvm-svn: 176254
* Better support for constructors with -cxx-abi microsoft, partly fixes PR12784Timur Iskhodzhanov2013-02-278-50/+200
| | | | llvm-svn: 176186
* Update clang for LLVM API change. No functionality change.Nick Lewycky2013-02-271-1/+2
| | | | llvm-svn: 176174
* Use the correct alignment for POD-member memcpys where the first field is aLang Hames2013-02-271-7/+10
| | | | | | | | | | | | bitfield. CGBitField::StorageAlignment holds the alignment in chars, but emitMemcpy had been treating it as if it were held in bits, leading to underaligned memcpys. Related to PR15348. Thanks very much to Chandler for the diagnosis. llvm-svn: 176163
* Rename methods to comply with the LLVM Coding Standards.Rafael Espindola2013-02-271-7/+7
| | | | llvm-svn: 176159
* Move LinkageInfo out of NamedDecl so that it can be used in Type.h.Rafael Espindola2013-02-271-3/+3
| | | | | | | Everything that cares about visibility also cares about linkage, so I just moved it to Visibility.h instead of creating a new .h. llvm-svn: 176155
* Temporarily revert r176116 for compile-time performance regression.Adrian Prantl2013-02-272-32/+2
| | | | | | This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c. llvm-svn: 176151
* Reapply r176133 with testcase fixes.Bill Wendling2013-02-271-13/+0
| | | | llvm-svn: 176145
* Temporarily revert r176133 until testcases are modified.Bill Wendling2013-02-261-0/+13
| | | | llvm-svn: 176137
* Don't set the -target-cpu and -target-features attributes just now.Bill Wendling2013-02-261-13/+0
| | | | | | | This is causing some problems with some of the builders. It's non-trivial to reset the target's features. llvm-svn: 176133
* Ensure that DIType is regenerated after we visited an implementation that ↵Adrian Prantl2013-02-262-2/+32
| | | | | | adds ivars to an interface. Fixes rdar://13175234 llvm-svn: 176116
* Unify clang/llvm attributes for asan/tsan/msan (Clang part)Kostya Serebryany2013-02-262-7/+15
| | | | | | | | | | | | | | | | | | | These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S llvm-svn: 176076
* [ubsan] Emit single check for left shift.Will Dietz2013-02-251-4/+15
| | | | | | Avoids warning twice on same shift. llvm-svn: 176056
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-251-59/+1
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-251-1/+59
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Update Clang for a minor DIBuilder breaking change.David Blaikie2013-02-251-10/+9
| | | | llvm-svn: 176003
* PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incompleteRichard Smith2013-02-241-1/+3
| | | | | | array type. llvm-svn: 175982
* In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the ↵Argyrios Kyrtzidis2013-02-241-0/+2
| | | | | | | | | | | | consumer just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with ASTConsumer::HandleTopLevelDecl. ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls; a consumer can treat an instantiated static data member however it wants of course. llvm-svn: 175976
* Prefer 'and' over '&' in comments.David Blaikie2013-02-231-3/+4
| | | | | | Post commit code review feedback from Matt Beaumont-Gay on r174248. llvm-svn: 175969
* Add streamed versions of getQualifiedNameAsString.Benjamin Kramer2013-02-231-2/+2
| | | | | | Move the cold virtual method getNameForDiagnostic out of line. llvm-svn: 175966
* ubsan: Emit bounds checks for array indexing, vector indexing, and (in ↵Richard Smith2013-02-233-5/+112
| | | | | | really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information. llvm-svn: 175949
* Revert r175912, "Add support for coldcc to clang" at John's request.Peter Collingbourne2013-02-231-4/+0
| | | | llvm-svn: 175936
* Propagate the split dwarf file information through into the backendEric Christopher2013-02-221-1/+8
| | | | | | | | | and through to the debug info in the module. In order to make the testcase a bit more efficient allow the filename to go through compilation for compile and not assemble jobs and turn off the extract for cases where we don't create an object. llvm-svn: 175935
* Make sure we apply attributes to correct places.Bill Wendling2013-02-221-13/+17
| | | | | | | Some attributes make sense only on the function or on the call site, but not both. Make this distinction here. llvm-svn: 175918
* Add support for coldcc to clangPeter Collingbourne2013-02-221-0/+4
| | | | llvm-svn: 175912
* [Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han2013-02-222-0/+2
| | | | | | | | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. llvm-svn: 175900
* Streamify getNameForDiagnostic and remove the string versions of ↵Benjamin Kramer2013-02-221-9/+15
| | | | | | PrintTemplateArgumentList. llvm-svn: 175894
* Apply the 'nobuiltin' attribute to call sites when the user specifies ↵Bill Wendling2013-02-223-5/+11
| | | | | | `-fno-builtin' on the command line. llvm-svn: 175836
* Fix formatting and tabs in file.Eric Christopher2013-02-211-26/+25
| | | | llvm-svn: 175815
* Patch for debug info of qualified-id types is 'id'Fariborz Jahanian2013-02-211-2/+8
| | | | | | By Adrian Pranti. llvm-svn: 175793
* Add support to Sema and CodeGen for floating point vector types in OpenCL.Joey Gouly2013-02-211-10/+21
| | | | llvm-svn: 175734
* objective-C arc IR-gen. Retaining of strongFariborz Jahanian2013-02-211-8/+17
| | | | | | | | | | arguments in function prologue is done with objc_StoreStrong to pair it with similar objc_StoreStrong for release in function epilogue. This is done with -O0 only. // rdar://13145317 llvm-svn: 175698
* Add a new 'type_visibility' attribute to allow users toJohn McCall2013-02-202-2/+2
| | | | | | | | | | | | | | control the visibility of a type for the purposes of RTTI and template argument restrictions independently of how visibility propagates to its non-type member declarations. Also fix r175326 to not ignore template argument visibility on a template explicit instantiation when a member has an explicit attribute but the instantiation does not. The type_visibility work is rdar://11880378 llvm-svn: 175587
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-191-1/+1
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* Temporarily revert r175471 for more review.Bill Wendling2013-02-191-3/+0
| | | | llvm-svn: 175477
* Add a 'no-builtin' attribute if we do not want to simplify calls.Bill Wendling2013-02-181-0/+3
| | | | llvm-svn: 175471
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-181-3/+3
| | | | llvm-svn: 175448
* Re-apply r174919 - smarter copy/move assignment/construction, with fixes forLang Hames2013-02-173-1/+375
| | | | | | | | | | | bitfield related issues. The original commit broke Takumi's builder. The bug was caused by bitfield sizes being determined by their underlying type, rather than the field info. A similar issue with bitfield alignments showed up on closer testing. Both have been fixed in this patch. llvm-svn: 175389
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-171-4/+25
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Emit vtables for an extern template class as available_externally, not asRichard Smith2013-02-161-8/+10
| | | | | | | linkonce_odr. Emit construction vtables as internal in this case, since the ABI does not guarantee that they will be availble externally. llvm-svn: 175330
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-151-0/+13
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
OpenPOWER on IntegriCloud