summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[OPENMP 4.0] Codegen for array sections."Daniel Jasper2015-08-283-169/+7
| | | | | | | 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-287-235/+120
| | | | | | These two commits causes llvm LTO bootstrap to hang in ScalarEvolution. llvm-svn: 246282
* [OPENMP 4.0] Codegen for array sections.Alexey Bataev2015-08-283-7/+169
| | | | | | 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-281-17/+51
| | | | | | 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-282-31/+35
| | | | | | and replace all callers. llvm-svn: 246259
* Fix macro backtrace printing.Richard Trieu2015-08-271-8/+14
| | | | | | | | 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-271-4/+6
| | | | | | | | | | | 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-271-2/+19
| | | | | | | | | 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-271-1/+1
| | | | | | | | | | | | | | | 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
* 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-275-11/+18
| | | | | | | | | | | | | 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-276-110/+218
| | | | | | | | | | | | | | | 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
* 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
* Remove a dead assert, we'd have gotten the case above.Eric Christopher2015-08-271-1/+0
| | | | llvm-svn: 246202
* Target attribute syntax compatibility fix - gcc uses no- rather than mno-.Eric Christopher2015-08-271-1/+1
| | | | llvm-svn: 246197
* Rewrite the code generation handling for function feature and cpu attributes.Eric Christopher2015-08-271-62/+70
| | | | | | | | | | | | | | | | | | | | 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-272-8/+14
| | | | | | 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-278-9/+19
| | | | | | | | | | | | | 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
* [Static Analyzer] Make NonNullParamChecker emit implicit null dereference ↵Gabor Horvath2015-08-273-21/+34
| | | | | | | | events. Differential Revision: http://reviews.llvm.org/D11433 llvm-svn: 246182
* const-ify TargetInfo::handleUserFeatures.Eric Christopher2015-08-271-2/+2
| | | | llvm-svn: 246180
* [CUDA] Improve CUDA compilation pipeline creation.Artem Belevich2015-08-271-36/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-0/+3
| | | | | | | | | | | | | | | | | 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-271-9/+16
| | | | | | | | | 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-263-111/+67
| | | | | | | | 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-263-0/+864
| | | | | | Differential Revision: http://reviews.llvm.org/D11468 llvm-svn: 246105
* 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
* Corrected 3 typos. NFCCharles Li2015-08-261-3/+3
| | | | llvm-svn: 246093
* [ms-inline-asm] Add field access to MS inline asm identifier lookupReid Kleckner2015-08-262-10/+75
| | | | | | | | | | | | | | Now we can parse code like this: struct A { int field; }; int f(A o) { __asm mov eax, o.field } Fixes PR19117. llvm-svn: 246088
* [X86][SSE] Add _mm_undefined_* intrinsicsSimon Pilgrim2015-08-265-0/+64
| | | | | | | | | | | | | | | | Added missing SSE/AVX 'undefined' intrinsics (PR24040): _mm_undefined_pd, _mm_undefined_ps + _mm_undefined_si128 _mm256_undefined_pd, _mm256_undefined_ps + _mm256_undefined_si256 _mm512_undefined, _mm512_undefined_ps, _mm512_undefined_pd + _mm512_undefined_epi32 Added builtin intrinsicss: __builtin_ia32_undef128, __builtin_ia32_undef256 + __builtin_ia32_undef512 Differential Revision: http://reviews.llvm.org/D12052 llvm-svn: 246083
* [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.Akira Hatanaka2015-08-261-4/+15
| | | | | | | | | | | | | | | | Error out if -mfloat-abi=hard or -mhard-float is specified on the command line and the target ABI is APCS. Previously clang issued no warnings or errors and just passed the option to the backend, which had no effect on code generation for targets using APCS. This commit corrects the patch commited in r245866, which didn't take into account the fact that not all darwin targets use APCS. rdar://problem/22257950 http://reviews.llvm.org/D12344 llvm-svn: 246054
* Change Native Client x86 usr include and link path to match SDK expectationsDerek Schuff2015-08-261-4/+13
| | | | | | | | | | | | GNU multilib style uses x86_64-nacl/include and x86_64-nacl/usr/include but the SDK expects i686-nacl/usr/include for its files. Change the driver to use this. Fixes https://code.google.com/p/nativeclient/issues/detail?id=4108 Differential Revision: http://reviews.llvm.org/D11271 llvm-svn: 246040
* [ASTMatchers] Add type matcher for SubstTemplateTypeParmType.Samuel Benzaquen2015-08-261-0/+1
| | | | llvm-svn: 246037
* Convert a bunch of loops to ranged-for and clean up accordingly.Eric Christopher2015-08-261-170/+69
| | | | llvm-svn: 246027
* Make FileManager::getFileSystemOptions consistent with ↵Yaron Keren2015-08-261-2/+2
| | | | | | | | | | CompilerInstance::getFileSystemOpts and CompilerInvocation::getFileSystemOpts by renaming it to getFileSystemOpts, marking the const-returning access method const and adding a non-const version, making the function prototypes identical to CompilerInstance::getFileSystemOpts. llvm-svn: 246026
* Remove dead code associated with parsing and setting ABI based onEric Christopher2015-08-261-15/+0
| | | | | | string name. llvm-svn: 246021
* Remove a TODO that isn't going to get fixed in this way.Eric Christopher2015-08-261-3/+0
| | | | llvm-svn: 246020
* [Sema] Don't assume CallExpr::getDirectCallee will succeedDavid Majnemer2015-08-261-1/+1
| | | | | | | | | | We tried to provide a very nice diagnostic when diagnosing an assignment to a const int & produced by a function call. However, we cannot always determine what function was called. This fixes PR24568. llvm-svn: 246014
* Update file comment to more accurately describe what's implemented.Eric Christopher2015-08-261-1/+1
| | | | llvm-svn: 246006
* Modify DeclaratorChuck::getFunction to be passed an Exception Specification ↵Nathan Wilson2015-08-266-11/+29
| | | | | | | | | | | | | | | | | SourceRange Summary: - Store the exception specification range's begin and end SourceLocation in DeclaratorChuck::FunctionTypeInfo. These SourceLocations can be used in a FixItHint Range. - Add diagnostic; function concept having an exception specification. Reviewers: hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11789 llvm-svn: 246005
* Add missing newline.Ted Kremenek2015-08-261-1/+1
| | | | llvm-svn: 246003
* Make sure that we evaluate __attribute__((enable_if)) on a method with no ↵Nick Lewycky2015-08-251-1/+34
| | | | | | overloads. Patch by Ettore Speziale! llvm-svn: 245985
* Clarify the error message when the reason the conversion is not viable is ↵Nick Lewycky2015-08-252-1/+2
| | | | | | because the returned value does not match the function return type. llvm-svn: 245979
* [X86] Remove unnecessary MMX declarations from Intrin.hSimon Pilgrim2015-08-251-3/+0
| | | | | | | | | | | | As discussed in PR23648 - the intrinsics _m_from_int, _m_to_int and _m_prefetch are defined in mmintrin.h and prfchwintrin.h so we don't need to in Intrin.h Added tests for _m_from_int and _m_to_int D11338 already added a test for _m_prefetch Differential Revision: http://reviews.llvm.org/D12272 llvm-svn: 245975
* Revert r245879. Speculative, might have caused crbug.com/524604Nico Weber2015-08-252-1/+16
| | | | llvm-svn: 245965
* [Sema] Handle leading and trailing __ for GNU attributesDavid Majnemer2015-08-251-8/+16
| | | | | | | | | | GNU attributes can have a leading and trailing __ appended/prepended to the attribute name. While the parser and AttributeList::getKind did the right thing, AttributeList::getAttributeSpellingListIndex did not. This fixes PR24565. llvm-svn: 245953
OpenPOWER on IntegriCloud