summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx11-thread-local.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [TLS on Darwin] use CXX_FAST_TLS calling convention for tls_init.Manman Ren2016-03-181-4/+8
| | | | | | | | | | This makes sure we don't generate a lot of code to spill/reload CSRs when calling tls_init from the access functions. This helps performance when tls_init is not inlined into the access functions. llvm-svn: 263854
* [CodeGen] Attach attributes to thread local wrapper function.Akira Hatanaka2016-01-151-1/+3
| | | | | | | | | | This commit is a follow-up to r251734, r251476, and r249735, which fixes a bug where function attributes were not attached to thread local wrapper functions. rdar://problem/20828324 llvm-svn: 257865
* [TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.Manman Ren2015-12-171-9/+14
| | | | | | | | Also set nounwind attribute. rdar://problem/9001553 llvm-svn: 255860
* Fix use-after-free when a C++ thread_local variable gets replaced (because itsRichard Smith2015-12-011-0/+12
| | | | | | | type changes when the initializer is attached). Don't hold onto the GlobalVariable*; recompute it from the VarDecl* instead. llvm-svn: 254359
* [TLS on Darwin] change how we handle globals with linkonce or weak linkage.Manman Ren2015-11-111-19/+33
| | | | | | | | | | | | This is about how we handle static member of a template. Before this commit, we use internal linkage for the IR thread-local variable, which is inefficient. With this commit, we will start to follow Itanium C++ ABI. rdar://problem/23415206 Reviewed by John McCall. llvm-svn: 252814
* [TLS] move setting tls_guard in tls_init.Manman Ren2015-11-111-1/+1
| | | | | | | | We used to emit the store prior to branch in the entry block. To make it more efficient, this commit moves it to the init block. We still mark as initialized before initializing anything else. llvm-svn: 252777
* [opaque pointer type] update test cases for explicit pointee types on global ↵David Blaikie2015-09-111-4/+4
| | | | | | aliases llvm-svn: 247380
* Add -femulated-tls flag to select the emulated TLS model.Chih-Hung Hsieh2015-07-281-0/+2
| | | | | | | | | This will be used for old targets like Android that do not support ELF TLS models. Differential Revision: http://reviews.llvm.org/D10524 llvm-svn: 243441
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-9/+9
| | | | llvm-svn: 230795
* Update for llvm change.Rafael Espindola2014-07-301-2/+2
| | | | llvm-svn: 214356
* CodeGen: Don't set hidden visibility on symbols with local linkageDuncan P. N. Exon Smith2014-05-071-2/+2
| | | | llvm-svn: 208258
* AST: Update reference temporary manglingDavid Majnemer2014-05-061-3/+3
| | | | | | | | | | | | | | | Summary: Update our mangling to match the discussion on cxx-abi-dev. This involves using a seq-id instead of an optional number. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3631 llvm-svn: 208140
* CodeGen: Assign linkage to thread-wrappers correctlyDavid Majnemer2014-05-051-0/+8
| | | | | | | | | | We would sometimes incorrectly give a thread-wrapper external linkage instead of internal linkage if we had only CodeGen'd it's declaration, not it's definition. This fixes PR19655. llvm-svn: 207988
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-281-4/+4
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* PR19254: If a thread_local data member of a class is accessed via member accessRichard Smith2014-03-261-0/+10
| | | | | | syntax, don't forget to run its initializer. llvm-svn: 204869
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-6/+6
| | | | | | tests fail. llvm-svn: 188447
* Reapply r183721, reverted in r183776, with a fix for a bug in the former (weRichard Smith2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | were lacking ExprWithCleanups nodes in some cases where the new approach to lifetime extension needed them). Original commit message: Rework IR emission for lifetime-extended temporaries. Instead of trying to walk into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183859
* Revert r183721. It caused cleanups to be delayed too long in some cases.Richard Smith2013-06-111-1/+1
| | | | | | Testcase to follow. llvm-svn: 183776
* Rework IR emission for lifetime-extended temporaries. Instead of trying to walkRichard Smith2013-06-111-1/+1
| | | | | | | | | | | | | | | | | into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. llvm-svn: 183721
* Add testcase omitted from r181998.Richard Smith2013-05-161-0/+7
| | | | llvm-svn: 182043
* Implement CodeGen for C++11 thread_local, following the Itanium ABI ↵Richard Smith2013-04-191-0/+117
| | | | | | specification as discussed on cxx-abi-dev. llvm-svn: 179858
* CodeGen support for function-local static thread_local variables withRichard Smith2013-04-141-0/+56
non-constant constructors or non-trivial destructors. Plus bugfixes for thread_local references bound to temporaries (the temporaries themselves are lifetime-extended to become thread_local), and the corresponding case for std::initializer_list. llvm-svn: 179496
OpenPOWER on IntegriCloud