summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Allow TLS vars in dllimport/export functions; only inline dllimport ↵Hans Wennborg2015-08-285-4/+111
| | | | | | | | | | | | | | | | | | | | | functions when safe (PR24593) This patch does two things: 1) Don't error about dllimport/export on thread-local static local variables. We put those attributes on static locals in dllimport/export functions implicitly in case the function gets inlined. Now, for TLS variables this is a problem because we can't import such variables, but it's a benign problem becase: 2) Make sure we never inline a dllimport function TLS static locals. In fact, never inline a dllimport function that references a non-imported function or variable (because these are not defined in the importing library). This seems to match MSVC's behaviour. Differential Revision: http://reviews.llvm.org/D12422 llvm-svn: 246338
* Updating the AST matcher documentation with a new entry; NFC.Aaron Ballman2015-08-281-0/+14
| | | | llvm-svn: 246324
* Revert "[X86][3DNow] Added debug codegen test for 3DNow! intrinsics"Renato Golin2015-08-281-26/+1
| | | | | | This reverts commit r246223, as it broke all ARM/AArch64 bots. llvm-svn: 246323
* Adding an AST matcher for namespaceAliasDecl.Aaron Ballman2015-08-284-0/+29
| | | | llvm-svn: 246322
* Revert "[X86][XOP] Added debug codegen test for XOP intrinsics"Renato Golin2015-08-281-66/+1
| | | | | | This reverts commit r246211, as it broke all ARM/AArch64 bots. llvm-svn: 246321
* Revert "[X86][FMA4] Added debug codegen test for FMA4 intrinsics"Renato Golin2015-08-281-34/+1
| | | | | | This reverts commit r246206, as it broke all ARM/AArch64 bots. llvm-svn: 246320
* Revert "[X86][F16C] Added debug codegen test for F16C intrinsics"Renato Golin2015-08-281-6/+1
| | | | | | This reverts commit r246204, as it was breaking all ARM/AArch64 bots. llvm-svn: 246319
* fix typo; NFCSanjay Patel2015-08-281-1/+1
| | | | llvm-svn: 246303
* Support Debian s390x multiarch pathsSylvestre Ledru2015-08-282-1/+10
| | | | | | | | | | Summary: Patch by Steven Chamberlain <steven@pyro.eu.org> Reviewers: uweigand Differential Revision: http://reviews.llvm.org/D12430 llvm-svn: 246295
* Revert "[OPENMP 4.0] Codegen for array sections."Daniel Jasper2015-08-284-247/+22
| | | | | | | The test is currently failing on bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12747/ llvm-svn: 246288
* Revert r246214 and r246213Steven Wu2015-08-2813-571/+144
| | | | | | These two commits causes llvm LTO bootstrap to hang in ScalarEvolution. llvm-svn: 246282
* [OPENMP 4.0] Codegen for array sections.Alexey Bataev2015-08-284-22/+247
| | | | | | Added codegen for array section in 'depend' clause of 'task' directive. It emits to pointers, one for the begin of array section and another for the end of array section. Size of the section is calculated as (end + 1 - start) * sizeof(basic_element_type). llvm-svn: 246278
* PR24597: Fix in-place evaluation of call expressions to provide a proper "this"Richard Smith2015-08-283-17/+64
| | | | | | pointer to an RVO construction of a returned object. llvm-svn: 246263
* Instead of duplicating code, call the base implementation.Eric Christopher2015-08-281-7/+1
| | | | llvm-svn: 246260
* Merge the two feature map setting functions into a single functionEric Christopher2015-08-283-33/+42
| | | | | | and replace all callers. llvm-svn: 246259
* Fix macro backtrace printing.Richard Trieu2015-08-272-8/+64
| | | | | | | | Sometimes, a macro that expands to another macro name will not be printed in the macro backtrace. This patch finds the missed macro expansions and prints them. Fixes PR16799 llvm-svn: 246237
* CGDebugInfo: Instead of uniquing RetainedTypes, just refrain from retainingAdrian Prantl2015-08-271-6/+7
| | | | | | them more than once. (NFC) llvm-svn: 246231
* [X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.Ahmed Bougacha2015-08-272-4/+16
| | | | | | | | | | | Without this, 64-byte vector types (__m512), specified to be 64-byte aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned. This is analoguous to AVX, for which we accept 32-byte max alignment. Differential Revision: http://reviews.llvm.org/D10724 llvm-svn: 246230
* [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.Ahmed Bougacha2015-08-272-15/+45
| | | | | | | | | There's no point in using a larger alignment if we have no instructions that would benefit from it. Differential Revision: http://reviews.llvm.org/D12389 llvm-svn: 246229
* [X86] Use AVX features instead of ABI to init. SimdDefaultAlign.Ahmed Bougacha2015-08-272-1/+4
| | | | | | | | | | | | | | | The ABI string only exists to communicate with TargetCodeGenInfo. Concretely, since we only used "avx*" ABI strings on x86_64 (as AVX doesn't affect the i386 ABIs), this meant that, when initializing SimdDefaultAlign, we would ignore AVX/AVX512 on i386, for no good reason. Instead, directly check the features. A similar change for MaxVectorAlign will follow. Differential Revision: http://reviews.llvm.org/D12390 llvm-svn: 246228
* Use an explicit assignment.Eric Christopher2015-08-271-2/+2
| | | | llvm-svn: 246225
* [X86][3DNow] Added debug codegen test for 3DNow! intrinsicsSimon Pilgrim2015-08-271-1/+26
| | | | | | Part of PR24590 llvm-svn: 246223
* Don't call a member function on a null pointer.Richard Smith2015-08-271-2/+5
| | | | llvm-svn: 246215
* Assume loads fix #2Piotr Padlewski2015-08-279-26/+156
| | | | | | | | | | | | | There was linker problem, and it turns out that it is not always safe to refer to vtable. If the vtable is used, then we can refer to it without any problem, but because we don't know when it will be used or not, we can only check if vtable is external or it is safe to to emit it speculativly (when class it doesn't have any inline virtual functions). It should be fixed in the future. http://reviews.llvm.org/D12385 llvm-svn: 246214
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-08-2713-129/+426
| | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479. http://reviews.llvm.org/D11859 llvm-svn: 246213
* [X86][XOP] Added debug codegen test for XOP intrinsicsSimon Pilgrim2015-08-271-1/+66
| | | | | | Part of PR24590 llvm-svn: 246211
* CGDebugInfo: Factor out a getOrCreateStandaloneType() method.Adrian Prantl2015-08-272-3/+18
| | | | | | | | | | | Usually debug info is created on the fly while during codegen. With this API it becomes possible to create standalone debug info for types that are not referenced by any code, such as emitting debug info for a clang module or for implementing something like -gfull. Because on-the-fly debug info generation may still insert retained types on top of them, all RetainedTypes are uniqued in CGDebugInfo::finalize(). llvm-svn: 246210
* [X86][FMA4] Added debug codegen test for FMA4 intrinsicsSimon Pilgrim2015-08-271-1/+34
| | | | | | Part of PR24590 llvm-svn: 246206
* [X86][F16C] Added debug codegen test for F16C intrinsicsSimon Pilgrim2015-08-271-1/+6
| | | | | | Part of PR24590 llvm-svn: 246204
* Remove a dead assert, we'd have gotten the case above.Eric Christopher2015-08-271-1/+0
| | | | llvm-svn: 246202
* [X86] Add __builtin_ia32_undef* intrinsics to testSimon Pilgrim2015-08-271-0/+3
| | | | | | Minor tweak to rL246083 llvm-svn: 246200
* Target attribute syntax compatibility fix - gcc uses no- rather than mno-.Eric Christopher2015-08-273-4/+4
| | | | llvm-svn: 246197
* Rename this file to have a processor suffix to help identify.Eric Christopher2015-08-271-0/+0
| | | | llvm-svn: 246196
* Rewrite the code generation handling for function feature and cpu attributes.Eric Christopher2015-08-273-63/+78
| | | | | | | | | | | | | | | | | | | | A couple of changes here: a) Do less work in the case where we don't have a target attribute on the function. We've already canonicalized the attributes for the function - no need to do more work. b) Use the newer canonicalized feature adding functions from TargetInfo to do the work when we do have a target attribute. This enables us to diagnose some warnings in the case of conflicting written attributes (only ppc does this today) and also make sure to get all of the features for a cpu that's listed rather than just change the cpu. Updated all testcases accordingly and added a new testcase to verify that we'll error out on ppc if we have some incompatible options using the existing diagnosis framework there. llvm-svn: 246195
* [CUDA] Check register names on appropriate side of cuda compilation only.Artem Belevich2015-08-273-12/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D11950 llvm-svn: 246193
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-2716-14/+49
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* Improve options printed on vectorization analysis diagnostics.Tyler Nowicki2015-08-272-7/+8
| | | | | | | | | | | The LLVM patch changes the analysis diagnostics produced when loops with floating-point recurrences or memory operations are identified. The new messages say "cannot prove it is safe to reorder * operations; allow reordering by specifying #pragma clang loop vectorize(enable)". Depending on the type of diagnostic the message will include additional options such as ffast-math or __restrict__. llvm-svn: 246189
* [Static Analyzer] BugReporter.cpp:2869: Assertion failed: ↵Gabor Horvath2015-08-273-2/+103
| | | | | | | | | | | | | | | | | | | | | | | | | !RemainingNodes.empty() && "No error node found in the trimmed graph" The assertion is caused by reusing a “filler” ExplodedNode as an error node. The “filler” nodes are only used for intermediate processing and are not essential for analyzer history, so they can be reclaimed when the ExplodedGraph is trimmed by the “collectNode” function. When a checker finds a bug, they generate a new transition in the ExplodedGraph. The analyzer will try to reuse the existing predecessor node. If it cannot, it creates a new ExplodedNode, which always has a tag to uniquely identify the creation site. The assertion is caused when the analyzer reuses a “filler” node. In the test case, some “filler” nodes were reused and then reclaimed later when the ExplodedGraph was trimmed. This caused an assertion because the node was needed to generate the report. The “filler” nodes should not be reused as error nodes. The patch adds a constraint to prevent this happening, which solves the problem and makes the test cases pass. Differential Revision: http://reviews.llvm.org/D11433 Patch by Ying Yi! llvm-svn: 246188
* [Tests] Modified Lit Tests to be C++11 compatibileCharles Li2015-08-275-23/+317
| | | | | | | This 2nd patch should not change the test results, but it is useful if clang's default C++ language is ever changed from gnu++98. llvm-svn: 246183
* [Static Analyzer] Make NonNullParamChecker emit implicit null dereference ↵Gabor Horvath2015-08-275-25/+42
| | | | | | | | events. Differential Revision: http://reviews.llvm.org/D11433 llvm-svn: 246182
* const-ify TargetInfo::handleUserFeatures.Eric Christopher2015-08-272-3/+3
| | | | llvm-svn: 246180
* [CUDA] Improve CUDA compilation pipeline creation.Artem Belevich2015-08-272-51/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation tries to guess which Action will result in a job which needs to incorporate device-side GPU binaries. The guessing was attempting to work around the fact that multiple actions may be combined into a single compiler invocation. If CudaHostAction ends up being combined (and thus bypassed during action list traversal) no device-side actions it pointed to were processed. The guessing worked for most of the usual cases, but fell apart when external assembler was used. This change removes the guessing and makes sure we create and pass device-side jobs regardless of how the jobs get combined. * CudaHostAction is always inserted either at Compile phase or the FinalPhase of current compilation, whichever happens first. * If selectToolForJob combines CudaHostAction with other actions, it passes info about CudaHostAction up to the caller * When it sees that CudaHostAction got combined with other actions (and hence will never be passed to BuildJobsForActions), BuildJobsForActions creates device-side jobs the same way they would be created if CudaHostAction was passed to BuildJobsForActions directly. * Added two more test cases to make sure GPU binaries are passed to correct jobs. Differential Revision: http://reviews.llvm.org/D11280 llvm-svn: 246174
* clang-format: Don't let a leading "template <..>" lead to wrapped initializers.Daniel Jasper2015-08-272-0/+10
| | | | | | | | | | | | | | | | | Before: Constructor() : initializer(0) {} template <typename T> Constructor() : initializer(0) {} After: Constructor() : initializer(0) {} template <typename T> Constructor() : initializer(0) {} llvm-svn: 246146
* Pass in a cpu to initDefaultFeatures so that we can share this codeEric Christopher2015-08-272-13/+19
| | | | | | | | | with multiple uses of feature map construction. Note: We could make this a static function on TargetInfo if we fix the x86 port needing to check the triple in an isolated case. llvm-svn: 246128
* const-ify X86TargetInfo::getCPUKind.Eric Christopher2015-08-271-1/+1
| | | | llvm-svn: 246127
* [modules] The key to a DeclContext name lookup table is not actually aRichard Smith2015-08-264-111/+113
| | | | | | | | DeclarationName (because all ctor names are considered the same, and so on). Reflect this in the type used as the lookup table key. As a side-effect, remove one copy of the duplicated code used to compute the hash of the key. llvm-svn: 246124
* Pull out cpu string -> enum parsing for x86 as a separate function,Eric Christopher2015-08-261-66/+70
| | | | | | this is going to see use shortly in unifying feature set construction. llvm-svn: 246122
* [Static Analyzer] Checks to catch nullability related issues.Gabor Horvath2015-08-265-0/+1137
| | | | | | Differential Revision: http://reviews.llvm.org/D11468 llvm-svn: 246105
* DI: Update DISubprogram testcases after LLVM r246098Duncan P. N. Exon Smith2015-08-2610-24/+24
| | | | llvm-svn: 246099
* DI: Clarify meaning of createTempFunctionFwdDecl() arg, NFCDuncan P. N. Exon Smith2015-08-261-1/+1
| | | | | | | | I stared at `false /*declaration*/` for quite some time before giving up and checking the actual function to see what it meant. Replacing with `/* isDefinition = */ false` to save myself effort later. llvm-svn: 246095
OpenPOWER on IntegriCloud