summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Abstract out emitting the vdtor calls and do it properly when using -cxx-abi ↵Timur Iskhodzhanov2013-02-154-12/+74
| | | | | | microsoft; also fix vdtor calls for the ARM ABI llvm-svn: 175271
* Revert accidental commit.Bill Wendling2013-02-141-13/+0
| | | | llvm-svn: 175143
* Pass the target options through to code generation.Bill Wendling2013-02-145-10/+31
| | | | | | | The code generation stuff is going to set attributes on the functions it generates. To do that it needs the target options. Pass them through. llvm-svn: 175141
* ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,Richard Smith2013-02-134-5/+42
| | | | | | | base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type. llvm-svn: 175078
* Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058Timur Iskhodzhanov2013-02-136-27/+121
| | | | llvm-svn: 175045
* Properly assemble PHIs after a null-checked invoke of objc_msgSend.John McCall2013-02-121-40/+67
| | | | | | rdar://12046763 llvm-svn: 174946
* Call __cxa_begin_catch with the current exception beforeJohn McCall2013-02-121-3/+69
| | | | | | calling std::terminate(). rdar://11904428 llvm-svn: 174940
* Change some CGF parameters to CGMs.John McCall2013-02-121-49/+49
| | | | llvm-svn: 174939
* Backing out r174919 while I investigate a self-host bug on Takumi's builder.Lang Hames2013-02-123-364/+1
| | | | llvm-svn: 174925
* In ARC, emit non-peepholed +1s within the full-expression insteadJohn McCall2013-02-121-17/+19
| | | | | | of immediately afterwards. llvm-svn: 174922
* When generating IR for default copy-constructors, copy-assignment operators,Lang Hames2013-02-113-1/+364
| | | | | | | | | | | | | | | | | | | | move-constructors and move-assignment operators, use memcpy to copy adjacent POD members. Previously, classes with one or more Non-POD members would fall back on element-wise copies for all members, including POD members. This often generated a lot of IR. Without padding metadata, it wasn't often possible for the LLVM optimizers to turn the element-wise copies into a memcpy. This code hasn't yet received any serious tuning. I didn't see any serious regressions on a self-hosted clang build, or any of the nightly tests, but I think it's important to get this out in the wild to get more testing. Insights, feedback and comments welcome. Many thanks to David Blaikie, Richard Smith, and especially John McCall for their help and feedback on this work. llvm-svn: 174919
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-1/+2
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-074-0/+9
| | | | | | restrictions. llvm-svn: 174601
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-051-0/+2
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* Fix typo in commentArnaud A. de Grandmaison2013-02-051-2/+2
| | | | llvm-svn: 174359
OpenPOWER on IntegriCloud