summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' ↵Alexey Bataev2014-07-2317-10/+158
| | | | | | directive. llvm-svn: 213717
* test: add an explicit target tripleSaleem Abdulrasool2014-07-231-1/+1
| | | | | | | Now that we support WoA, this test fails on ARM build bots as __va_start has a different signature on different architectures. llvm-svn: 213714
* PR14615: add (passing) tests for this already-fixed bugRichard Smith2014-07-221-0/+28
| | | | llvm-svn: 213709
* Use the correct from type in a SCSEhsan Akhgari2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | Summary: If during constructing a standard conversion sequence, we resolve an overload, we need to adjust the from type in the SCS according to the resolved operator. I found this bug when debugging PR20218. This doesn't seem to be observable, so there is no good way of testing it. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4402 llvm-svn: 213680
* remove hardcoded metadata numbers from testsRobert Lytton2014-07-221-42/+50
| | | | llvm-svn: 213659
* Improve the checkUInt32Argument() helper function so that it diagnoses ↵Aaron Ballman2014-07-222-0/+7
| | | | | | integer constants larger than 32-bits. llvm-svn: 213658
* Provide extra information in the "integer constant is too large" diagnostic. ↵Aaron Ballman2014-07-226-12/+18
| | | | | | This will be used to improve other diagnostics. llvm-svn: 213657
* Adding a heading to the loop hint attributes so that attribute documentation ↵Aaron Ballman2014-07-221-0/+1
| | | | | | can be generated again. llvm-svn: 213652
* Escaping an RST character to correct a Sphinx warning.Aaron Ballman2014-07-221-1/+1
| | | | llvm-svn: 213651
* Disallowing GNU-style attributes in new expressions, since they are ↵Aaron Ballman2014-07-224-21/+56
| | | | | | prohibited by GCC as well. llvm-svn: 213650
* [OPENMP] Tests for nesting of regions for 'atomic' directive.Alexey Bataev2014-07-221-4/+340
| | | | llvm-svn: 213648
* AVX-512: I added new headers to makefiles. It should resolve tests fail.Elena Demikhovsky2014-07-222-0/+13
| | | | | | If it will not, I'm reverting the both commits. llvm-svn: 213645
* AVX-512: Added intrinsics to clang.Elena Demikhovsky2014-07-226-0/+974
| | | | | | | The set is small, that what I have right now. Everybody is welcome to add more. llvm-svn: 213641
* [OPENMP] Initial parsing and sema analysis for 'atomic' directive.Alexey Bataev2014-07-2226-9/+285
| | | | llvm-svn: 213639
* [OPENMP] Initial parsing and sema analysis for 'ordered' directive.Alexey Bataev2014-07-2227-21/+598
| | | | llvm-svn: 213616
* Fix '&' printing for template arguments in parentheses in template diffing.Richard Trieu2014-07-222-5/+12
| | | | llvm-svn: 213613
* More gracefully handle parentheses in templare arguments in template diffing.Richard Trieu2014-07-222-2/+7
| | | | llvm-svn: 213611
* Fix a template diffing problem were an '&' is unexpectedly printed inRichard Trieu2014-07-222-6/+42
| | | | | | a template argument. llvm-svn: 213609
* Sema: correct handling for __va_start for WoASaleem Abdulrasool2014-07-224-1/+131
| | | | | | | | | | | | | | | | | | Windows ARM indicates __va_start as a variadic function. However, the function itself is treated as having 4 formal arguments: - (out) pointer to the va_list - (in) address of the last named argument - (in) slot size for the type of the last argument - address of the last named argument The last argument does not seem to have any bearing on codegen, and thus is not explicitly type checked at this point. Unlike the previous handling for __va_start, it does not currently validate if the parameter is the last named parameter (it seems that MSVC currently accepts this). llvm-svn: 213595
* Avoid crash if default argument parsed with errors.Serge Pavlov2014-07-225-5/+12
| | | | | | | | | | | | | | If function parameters have default values, and that of the second parameter is parsed with errors, function declaration would have a parameter without default value that follows a parameter with that. Such declaration breaks logic of selecting overloaded function. As a solution, put opaque object as default value in such case. This patch fixes PR20055. Differential Revision: http://reviews.llvm.org/D4378 llvm-svn: 213594
* -fms-extensions: Implement half of #pragma init_segReid Kleckner2014-07-2214-25/+232
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This pragma is very rare. We could *hypothetically* lower some uses of it down to @llvm.global_ctors, but given that GlobalOpt isn't able to optimize prioritized global ctors today, there's really no point. If we wanted to do this in the future, I would check if the section used in the pragma started with ".CRT$XC" and had up to two characters after it. Those two characters could form the 16-bit initialization priority that we support in @llvm.global_ctors. We would have to teach LLVM to lower prioritized global ctors on COFF as well. This should let us compile some silly uses of this pragma in WebKit / Blink. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4549 llvm-svn: 213593
* clang-cl: ignore /showIncludes when combined with /E (PR20336)Hans Wennborg2014-07-212-2/+9
| | | | | | | | Both /showIncludes and /E write to stdout. Allowing both results in interleaved output and an error when double-closing the file descriptor, intended to catch issues like this. llvm-svn: 213589
* Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.Mark Heffernan2014-07-214-6/+6
| | | | llvm-svn: 213587
* clang-format vs plugin: set version number from cmake (PR20307)Hans Wennborg2014-07-212-4/+11
| | | | | | | | | | | | | | | Previously it was hard-coded to 1.0, which meant the installer would not install the plugin over previous versions. This commit makes us use LLVM's major.minor.patch version from cmake, or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build. It's pretty dirty to update a configuration file in the source directory from the cmake build like this. However, the plugin build is already dirty in this regard since it builds in the source dir when visual studio, and then copies out the resulting vsix. llvm-svn: 213584
* Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary ↵Arnaud A. de Grandmaison2014-07-214-210/+24
| | | | | | | | | objects." This commit did break the sanitizer-x86 bot. Revert it while investigating. llvm-svn: 213579
* Fix build breakage caused by use of std::to_string(int). Replace with ↵Mark Heffernan2014-07-211-14/+19
| | | | | | raw_string_ostream. llvm-svn: 213578
* Emit lifetime.start / lifetime.end markers for unnamed temporary objects.Arnaud A. de Grandmaison2014-07-214-24/+210
| | | | | | This will give more information to the optimizers so that they can reuse stack slots. llvm-svn: 213576
* Add support for '#pragma unroll'.Mark Heffernan2014-07-2116-149/+566
| | | | llvm-svn: 213574
* Sema: Handle C11 atomics when diagnosing out of range comparisonsJustin Bogner2014-07-213-0/+30
| | | | | | | | This fixes a couple of asserts when analyzing comparisons involving C11 atomics that were uncovered by r205608 when we extended the applicability of -Wtautological-constant-out-of-range-compare. llvm-svn: 213573
* [OPENMP] Initial parsing and sema analysis for 'flush' directive.Alexey Bataev2014-07-2128-11/+673
| | | | llvm-svn: 213512
* [OPENMP] Parsing/Sema of the OpenMP directive 'critical'.Alexander Musman2014-07-2128-24/+779
| | | | llvm-svn: 213510
* Trivial doc fixes: add missing whitespace, and s/overriden/overridden/g.James Dennett2014-07-211-5/+6
| | | | llvm-svn: 213502
* Add clang::DesignatedInitExpr::designators() for range-based access,James Dennett2014-07-211-0/+11
| | | | | | with overloads for designators_range and designators_const_range. llvm-svn: 213500
* Add missing initialization found due to a valgrind false positive.Richard Smith2014-07-211-1/+1
| | | | | | | | This field is never inspected in the object state initialized by this constructor; however, initializing it seems reasonable, since it has a meaningful value. llvm-svn: 213499
* [modules] Fix some of the confusion when computing the override set for a macroRichard Smith2014-07-2115-27/+79
| | | | | | | introduced by finalization. This is still not entirely correct; more fixes to follow. llvm-svn: 213498
* [OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if ↵Alexey Bataev2014-07-215-42/+82
| | | | | | there are more than one 'nowait' or 'ordered' clause an error message is expected. llvm-svn: 213496
* [PowerPC] Optimize passing certain aggregates by valueUlrich Weigand2014-07-214-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | In addition to enabling ELFv2 homogeneous aggregate handling, LLVM support to pass array types directly also enables a performance enhancement. We can now pass (non-homogeneous) aggregates that fit fully in registers as direct integer arrays, using an element type to encode the alignment requirement (that would otherwise go to the "byval align" field). This is preferable since "byval" forces the back-end to write the aggregate out to the stack, even if it could be passed fully in registers. This is particularly annoying on ELFv2, if there is no parameter save area available, since we then need to allocate space on the callee's stack just to hold those aggregates. Note that to implement this optimization, this patch does not attempt to fully anticipate register allocation rules as (defined in the ABI and) implemented in the back-end. Instead, the patch is simply passing *any* aggregate passed by value using the array mechanism if its size is up to 64 bytes. This means that some of those will end up being passed in stack slots anyway, but the generated code shouldn't be any worse either. (*Large* aggregates remain passed using "byval" to enable optimized copying via memcpy etc.) llvm-svn: 213495
* [PowerPC] Support the ELFv2 ABIUlrich Weigand2014-07-212-9/+591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements clang support for the PowerPC ELFv2 ABI. Together with a series of companion patches in LLVM, this makes clang/LLVM fully usable on powerpc64le-linux. Most of the ELFv2 ABI changes are fully implemented on the LLVM side. On the clang side, we only need to implement some changes in how aggregate types are passed by value. Specifically, we need to: - pass (and return) "homogeneous" floating-point or vector aggregates in FPRs and VRs (this is similar to the ARM homogeneous aggregate ABI) - return aggregates of up to 16 bytes in one or two GPRs The second piece is trivial to implement in any case. To implement the first piece, this patch makes use of infrastructure recently enabled in the LLVM PowerPC back-end to support passing array types directly, where the array element type encodes properties needed to handle homogeneous aggregates correctly. Specifically, the array element type encodes: - whether the parameter should be passed in FPRs, VRs, or just GPRs/stack slots (for float / vector / integer element types, respectively) - what the alignment requirements of the parameter are when passed in GPRs/stack slots (8 for float / 16 for vector / the element type size for integer element types) -- this corresponds to the "byval align" field With this support in place, the clang part simply needs to *detect* whether an aggregate type implements a float / vector homogeneous aggregate as defined by the ELFv2 ABI, and if so, pass/return it as array type using the appropriate float / vector element type. llvm-svn: 213494
* If a module build reports errors, don't try to load itBen Langmuir2014-07-191-13/+21
| | | | | | ... just to find out that it didn't build. llvm-svn: 213454
* Revert D3908 due to issues on Mac platformsViktor Kutuzov2014-07-193-218/+0
| | | | llvm-svn: 213450
* Cleanup comparisons to VariableArrayType::Static for non-VLAsHal Finkel2014-07-192-2/+2
| | | | | | | The enum is part of ArrayType, so there is no functional change, but comparing to ArrayType::Static for non-VLAs makes more sense. llvm-svn: 213446
* TypePrinter should not ignore IndexTypeCVRQualifiers on constant-sized arraysHal Finkel2014-07-192-0/+14
| | | | | | | | | | C99 array parameters can have index-type CVR qualifiers, and the TypePrinter should print them when present (and we were not for constant-sized arrays). Otherwise, we'd drop the restrict in: int foo(int a[restrict static 3]) { ... } llvm-svn: 213445
* Use the dereferenceable attribute on C99 array parameters with staticHal Finkel2014-07-192-1/+46
| | | | | | | | | | | | | | In C99, an array parameter declarator might have the form: direct-declarator '[' 'static' type-qual-list[opt] assign-expr ']' where the static keyword indicates that the caller will always provide a pointer to the beginning of an array with at least the number of elements specified by the assignment expression. For constant sizes, we can use the new dereferenceable attribute to pass this information to the optimizer. For VLAs, we don't know the size, but (for addrspace(0)) do know that the pointer must be nonnull (and so we can use the nonnull attribute). llvm-svn: 213444
* PR20356: Fix all Sema warnings with mismatched ext_/warn_ versusRichard Smith2014-07-1914-55/+54
| | | | | | | | ExtWarn/Warnings. Mostly the name of the warning was changed to match the semantics, but in the PR20356 cases, the warning was about valid code, so the diagnostic was changed from ExtWarn to Warning instead. llvm-svn: 213443
* clang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.NAKAMURA Takumi2014-07-191-1/+2
| | | | | FIXME: Could this be made generic? llvm-svn: 213441
* Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ↵David Blaikie2014-07-196-14/+12
| | | | | | | | | | | ".reset()" It's also possible to just write "= nullptr", but there's some question of whether that's as readable, so I leave it up to authors to pick which they prefer for now. If we want to discuss standardizing on one or the other, we can do that at some point in the future. llvm-svn: 213439
* [MS-ABI] Assign SEH handler indices to __try blocksWarren Hunt2014-07-198-39/+100
| | | | | | | | | Assigns indices to try blocks. These indices will used in constructing tables that the mscrt function __except_handler3 reads during SEH. Testing will occur once we actually emit the tables, in a subsequent patch. llvm-svn: 213437
* CodeGen: Properly null-check typeid expressionsDavid Majnemer2014-07-192-6/+120
| | | | | | | | | | | | Thoroughly check for a pointer dereference which yields a glvalue. Look through casts, comma operators, conditional operators, paren expressions, etc. This was originally D4416. Differential Revision: http://reviews.llvm.org/D4592 llvm-svn: 213434
* Revert r213415, "Merge two lines". It broke tests in -Asserts builds.NAKAMURA Takumi2014-07-181-1/+2
| | | | | | CGBuilder doesn't name instructions with Name. We should use Inst::setName() to name an instruction explicitly here. llvm-svn: 213431
* [X86 inline-asm] Error out on inline-asm constraint "=f".Akira Hatanaka2014-07-182-1/+13
| | | | | | <rdar://problem/17476689> llvm-svn: 213428
OpenPOWER on IntegriCloud