summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Tweak .clang-format configuration.Eric Fiselier2017-01-141-5/+0
| | | | | | | Remove the custom configuration options for brace wrapping. They don't work well for inline functions or type-traits classes. llvm-svn: 291998
* Fix a typo. NFC.George Burgess IV2017-01-141-1/+1
| | | | llvm-svn: 291997
* [X86] Simplify the code that calculates a scaled blend mask. We don't need a ↵Craig Topper2017-01-141-2/+1
| | | | | | second loop. llvm-svn: 291996
* Use __is_identifier to detect Clang extensions instead of __has_extension.Eric Fiselier2017-01-142-3/+15
| | | | | | | | | | | | | | | | | | | | | When -pedantic-errors is specified `__has_extension(<feature>)` is always false when it would otherwise be true. This causes C++03 <atomic> to break along with other issues. This patch avoids the above problem by using __is_identifier(...) instead since it is not affected by -pedantic-errors. For example instead of checking for __has_extension(c_atomics) we now check `!__is_identifier(_Atomic)`, which is only true when _Atomic is not a keyword provided by the compiler. This patch applies similar changes to the detection logic for __decltype and __nullptr as well. Note that it does not apply this change to the C++03 `static_assert` macro since -Wc11-extensions warnings generated by expanding that macro will appear in user code, and will not be suppressed as part of a system header. llvm-svn: 291995
* [AVX-512] Change blend mask in lowerVectorShuffleAsBlend to a 64-bit value. ↵Craig Topper2017-01-142-349/+738
| | | | | | | | Also add 32-bit mode command lines to the test case that exercises this just to make sure we sanely handle the 64-bit immediate there. This fixes a undefined sanitizer failure from r291888. llvm-svn: 291994
* Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier2017-01-141-1/+2
| | | | | | | | This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. llvm-svn: 291993
* Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier2017-01-141-1/+2
| | | | | | | | This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. llvm-svn: 291992
* Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier2017-01-141-1/+2
| | | | | | | | This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. llvm-svn: 291991
* COFF: Change the /lldmap output format to be more like the ELF linker.Peter Collingbourne2017-01-1414-90/+224
| | | | | | Differential Revision: https://reviews.llvm.org/D28717 llvm-svn: 291990
* Try to fix the windows bots.Rafael Espindola2017-01-141-5/+5
| | | | llvm-svn: 291989
* Give more accurate descriptions of what kind of template we found in ↵Richard Smith2017-01-146-12/+52
| | | | | | | | | diagnostics. We were previouly assuming that every type template was a class template, which is not true any more. llvm-svn: 291988
* Don't force use of lld in tests on WindowsEric Fiselier2017-01-141-1/+1
| | | | llvm-svn: 291987
* Remove unused parameters in C++03Eric Fiselier2017-01-141-4/+4
| | | | llvm-svn: 291986
* Fix modules buildbots broken in r291983.Eugene Zelenko2017-01-141-1/+2
| | | | llvm-svn: 291985
* Split writeMapFile2 to reduce indentation level.Rui Ueyama2017-01-141-32/+40
| | | | llvm-svn: 291984
* [Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-01-1412-152/+175
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 291983
* Compute summary before calling extractProfTotalWeightEaswaran Raman2017-01-143-35/+66
| | | | | | | | | | extractProfTotalWeight checks if the profile type is sample profile, but before that we have to ensure that summary is available. Also expanded the unittest to test the case where there is no summar Differential Revision: https://reviews.llvm.org/D28708 llvm-svn: 291982
* NewGVN: Kill unneeded DFSDomMap, cleanup a few comments.Daniel Berlin2017-01-141-13/+7
| | | | llvm-svn: 291981
* Fix update_test_checks not to accidentally believe type names are variable namesDaniel Berlin2017-01-131-1/+1
| | | | llvm-svn: 291980
* NewGVN: Fix PR31613 test regex namingDaniel Berlin2017-01-131-2/+2
| | | | llvm-svn: 291979
* GlobalISel: Abort in ResetMachineFunctionPass if fallback isn't enabledJustin Bogner2017-01-133-6/+16
| | | | | | | | | | When GlobalISel is configured to abort rather than fallback the only thing that resetting the machine function does is make things harder to debug. If we ever get to this point in the abort configuration it indicates that we've already hit a bug, so this changes the behaviour to abort instead. llvm-svn: 291977
* Diagnose invalid memory orderings in <atomic>Eric Fiselier2017-01-133-2/+158
| | | | llvm-svn: 291976
* [InstCombine] optimize unsigned icmp of incrementSanjay Patel2017-01-132-0/+169
| | | | | | | | | | | | | | | | | | | | | | | Allows LLVM to optimize sequences like the following: %add = add nuw i32 %x, 1 %cmp = icmp ugt i32 %add, %y Into: %cmp = icmp uge i32 %x, %y Previously, only signed comparisons were being handled. Decrements could also be handled, but 'sub nuw %x, 1' is currently canonicalized to 'add %x, -1' in InstCombineAddSub, losing the nuw flag. Removing that canonicalization seems like it might have far-reaching ramifications so I kept this simple for now. Patch by Matti Niemenmaa! Differential Revision: https://reviews.llvm.org/D24700 llvm-svn: 291975
* clang-format: Fix bug in making line break decisions.Daniel Jasper2017-01-132-5/+11
| | | | | | | | | | | | | | | | | | | | | Here, the optimization to not line wrap when it would not lead to a reduction in columns was overwriting and enforced break that we want to do no matter what. Before: int i = someFunction( aaaaaaa, 0).aaa(aaaaaaaaaaaaa) * aaaaaaa + aaaaaaa; After: int i = someFunction(aaaaaaa, 0) .aaa(aaaaaaaaaaaaa) * aaaaaaa + aaaaaaa; llvm-svn: 291974
* [GlobalISel] track predecessor mapping during switch lowering.Tim Northover2017-01-133-18/+110
| | | | | | | | Correctly populating Machine PHIs relies on knowing exactly how the IR level CFG was lowered to MachineIR. This needs to be tracked by any translation phases that meddle (currently only SwitchInst handling). llvm-svn: 291973
* [InstCombine] use m_APInt to allow lshr folds for vectors with splat constantsSanjay Patel2017-01-132-24/+21
| | | | llvm-svn: 291972
* [InstCombine / InstSimplify] add and move tests for lshr transforms; NFCSanjay Patel2017-01-133-22/+146
| | | | llvm-svn: 291970
* Diagnose non-const-callable hash functions and comparatorsEric Fiselier2017-01-136-24/+100
| | | | llvm-svn: 291969
* NewGVN: Move leaders around properly to ensure we have a canonical ↵Daniel Berlin2017-01-132-40/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dominating leader. Fixes PR 31613. Summary: This is a testcase where phi node cycling happens, and because we do not order the leaders by domination or anything similar, the leader keeps changing. Using std::set for the members is too expensive, and we actually don't need them sorted all the time, only at leader changes. We could keep both a set and a vector, and keep them mostly sorted and resort as necessary, or use a set and a fibheap, but all of this seems premature. After running some statistics, we are able to avoid the vast majority of sorting by keeping a "next leader" field. Most congruence classes only have leader changes once or twice during GVN. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28594 llvm-svn: 291968
* Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes ↵Greg Clayton2017-01-135-20/+131
| | | | | | | | | | a llvm::ArrayRef<dwarf::Attribute>. This allows us efficiently look for more than one attribute, something that is quite common in DWARF consumption. Differential Revision: https://reviews.llvm.org/D28704 llvm-svn: 291967
* [LoopStrengthReduce] Don't bother rewriting PHIs in catchswitch blocksDavid Majnemer2017-01-132-1/+63
| | | | | | | | | The catchswitch instruction cannot be split, don't bother trying to rewrite it. This fixes PR31627. llvm-svn: 291966
* [CodeGen] Simplify getRecipEstimateForFuncDavid Majnemer2017-01-131-5/+1
| | | | | | It used two attribute lookups when only one was needed. llvm-svn: 291965
* PR31631: fix bad CFG (and bogus warnings) when an if-statement has an ↵Richard Smith2017-01-132-42/+47
| | | | | | init-statement and has binary operator as its condition. llvm-svn: 291964
* [clang] Emit `diagnose_if` warnings from system headersEric Fiselier2017-01-133-1/+16
| | | | | | | | | | | | Summary: In order for libc++ to meaningfully use `diagnose_if` warnings they need to be emitted from system headers by default. This patch changes the `diagnose_if` warning diagnostic to be shown in system headers. Reviewers: george.burgess.iv, rsmith, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28703 llvm-svn: 291963
* COFF: include relocation type in unsupported relocation messageBob Haarman2017-01-131-3/+4
| | | | | | | | | | Summary: When we encouter a relocation type we don't know how to handle, this change causes us to print out the hexadecimal value of the relocation type. This makes troubleshooting a little easier. Reviewers: ruiu, zturner Differential Revision: https://reviews.llvm.org/D28576 llvm-svn: 291962
* Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros.Eric Fiselier2017-01-1310-32/+146
| | | | | | | | | | | | | | | | | | Clang recently added a `diagnose_if(cond, msg, type)` attribute which can be used to generate diagnostics when `cond` is a constant expression that evaluates to true. Otherwise no attribute has no effect. This patch adds _LIBCPP_DIAGNOSE_ERROR/WARNING macros which use this new attribute. Additionally this patch implements a diagnostic message when a non-const-callable comparator is given to a container. Note: For now the warning version of the diagnostic is useless within libc++ since warning diagnostics are suppressed by the system header pragma. I'm going to work on fixing this. llvm-svn: 291961
* ScopInfo: use correct enum type in type definitionTobias Grosser2017-01-131-2/+3
| | | | | | | | | Instead of a plain 'int' we use the correct enum type. This does not give us type safety yet, but at least makes the code more correct in terms of typing. To avoid such mismatches it might sense to switch these enums to C++11 typed enums. llvm-svn: 291960
* Cleanup how DWARFDie attributes are accessed and decoded.Greg Clayton2017-01-139-326/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed all DWARFDie::getAttributeValueAs*() calls. Renamed: Optional<DWARFFormValue> DWARFDie::getAttributeValue(dwarf::Attribute); To: Optional<DWARFFormValue> DWARFDie::find(dwarf::Attribute); Added: Optional<DWARFFormValue> DWARFDie::findRecursively(dwarf::Attribute); All decoding of Optional<DWARFFormValue> values are now done using the dwarf::to*() functions from DWARFFormValue.h: Old code: auto DeclLine = DWARFDie.getAttributeValueAsSignedConstant(DW_AT_decl_line).getValueOr(0); New code: auto DeclLine = toUnsigned(DWARFDie.find(DW_AT_decl_line), 0); This composition helps us since we can now easily do: auto DeclLine = toUnsigned(DWARFDie.findRecursively(DW_AT_decl_line), 0); This allows us to easily find attribute values in the current DIE only (the first new code above) or in any DW_AT_abstract_origin or DW_AT_specification Dies using the line above. Note that the code line length is shorter and more concise. Differential Revision: https://reviews.llvm.org/D28581 llvm-svn: 291959
* Implement -Map.Rafael Espindola2017-01-1313-2/+249
| | | | | | | The format is not exactly the same as the one in bfd since bfd always follows a linker script and prints it along. llvm-svn: 291958
* "Use" lambda captures which are otherwise only used in asserts. NFCDavid L. Jones2017-01-133-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The LLVM coding standards recommend "using" values that are only needed by asserts: http://llvm.org/docs/CodingStandards.html#assert-liberally Without this change, LLVM cannot bootstrap with -Werror as the second stage fails with this new warning: https://reviews.llvm.org/rL291905 See also the previous fixes: https://reviews.llvm.org/rL291916 https://reviews.llvm.org/rL291939 https://reviews.llvm.org/rL291940 https://reviews.llvm.org/rL291941 Reviewers: rsmith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28695 llvm-svn: 291957
* [NVPTX] Added support for half-precision floating point.Artem Belevich2017-01-1318-102/+1487
| | | | | | | | | | | | | | | | Only scalar half-precision operations are supported at the moment. - Adds general support for 'half' type in NVPTX. - fp16 math operations are supported on sm_53+ GPUs only (can be disabled with --nvptx-no-f16-math). - Type conversions to/from fp16 are supported on all GPU variants. - On GPU variants that do not have full fp16 support (or if it's disabled), fp16 operations are promoted to fp32 and results are converted back to fp16 for storage. Differential Revision: https://reviews.llvm.org/D28540 llvm-svn: 291956
* PR31606: Generalize our tentative DR resolution for inheriting copy/moveRichard Smith2017-01-1311-78/+104
| | | | | | constructors to better match the pre-P0136R1 behavior. llvm-svn: 291955
* [AMDGPU] Implement f16 fcopysign and fcopysign(f32, f64)Konstantin Zhuravlyov2017-01-133-0/+299
| | | | | | Differential Revision: https://reviews.llvm.org/D28496 llvm-svn: 291954
* Fix shared library build after r291938 by adding missing dependency on libOptionDavid Blaikie2017-01-131-0/+1
| | | | | | Thanks to Reid Kleckner for the help reproducing/fixing. llvm-svn: 291953
* Fix TestRegisterVariables for linux arm/arm64 gcc ver > 5Omair Javaid2017-01-131-1/+1
| | | | | | | | | We are going to turn off buffer overflow introduced by gcc by turning off FORTIFY_SOURCE. Differential revision: https://reviews.llvm.org/D28666 llvm-svn: 291949
* Add a description how to checkout the LLD repository.Rui Ueyama2017-01-131-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D28687 llvm-svn: 291948
* Remove SANITIZER_LINUX ifdefsReid Kleckner2017-01-131-2/+0
| | | | | | | Somehow this causes lots of test failures on Windows. These appear to have been accidentally added back in r291736. llvm-svn: 291947
* [libc++abi] Add a silent terminate handler to libcxxabi.James Y Knight2017-01-133-2/+21
| | | | | | | | | | | | | | | | | | | | The current std::terminate_handler pulls in some string code, some I/O code, and more. Since it is automatically setup as the default, this means that any trivial binary linking against libcxxabi will get this extra bloat. This patch allows disabling it as a build-time option, if you want to avoid the extra bloat. Patch by Tom Rybka! Reviewers: EricWF Subscribers: danalbert, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28497 llvm-svn: 291946
* Don't add DT_INIT/DT_FINI for undef and shared symbols.Rafael Espindola2017-01-134-5/+25
| | | | | | | | | | The freebsd dynamic linker doesn't check if the value is null (and it is reasonable for it to do that). That means that producing a .so with a null DT_INIT/DT_FINI causes the base address to be called. This should fix the libreoffice build. llvm-svn: 291944
* Check for register clobbers when merging a vreg live range with aJames Y Knight2017-01-133-8/+58
| | | | | | | | | | | reserved physreg in RegisterCoalescer. Previously, we only checked for clobbers when merging into a READ of the physreg, but not when merging from a WRITE to the physreg. Differential Revision: https://reviews.llvm.org/D28527 llvm-svn: 291942
OpenPOWER on IntegriCloud