summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Static variables on device must be externally visible.Alexey Bataev2018-07-273-3/+27
| | | | | | | Do not mark static variable as internal on the device as they must be visible from the host to be mapped correctly. llvm-svn: 338139
* [demangler] Support for reference collapsingErik Pilkington2018-07-273-91/+116
| | | | | | llvm.org/PR38323 llvm-svn: 338138
* [ASTMatchers] Introduce a matcher for `ObjCIvarExpr`, support getting it's ↵George Karpenkov2018-07-276-1/+66
| | | | | | | | | | | | | declaration. ObjCIvarExpr is *not* a subclass of MemberExpr, and a separate matcher is required to support it. Adding a hasDeclaration support as well, as it's not very useful without it. Differential Revision: https://reviews.llvm.org/D49701 llvm-svn: 338137
* Revert "Enable MachineOutliner by default under -Oz for AArch64"Jessica Paquette2018-07-2710-97/+12
| | | | | | | | | | It failed an Asan test on a bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/21543/steps/check-llvm%20asan/logs/stdio Fixing that before recommitting. llvm-svn: 338136
* Add missing temporary materialization conversion on left-hand side of .Richard Smith2018-07-2711-279/+325
| | | | | | | | | in some member function calls. Specifically, when calling a conversion function, we would fail to create the AST node representing materialization of the class object. llvm-svn: 338135
* bpf: add missing RegState to notify MachineInstr verifier necessary register ↵Yonghong Song2018-07-272-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | usage Errors like the following are reported by: https://urldefense.proofpoint.com/v2/url?u=http-3A__lab.llvm.org-3A8011_builders_llvm-2Dclang-2Dx86-5F64-2Dexpensive-2Dchecks-2Dwin_builds_11261&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=929oWPCf7Bf2qQnir4GBtowB8ZAlIRWsAdTfRkDaK-g&s=9k-wbEUVpUm474hhzsmAO29VXVvbxJPWD9RTgCD71fQ&e= *** Bad machine code: Explicit definition marked as use *** - function: cal_align1 - basic block: %bb.0 entry (0x47edd98) - instruction: LDB $r3, $r2, 0 - operand 0: $r3 This is because RegState info was missing for ScratchReg inside expandMEMCPY. This caused incomplete register usage information to MachineInstr verifier which then would complain as there could be potential code-gen issue if the complained MachineInstr is used in place where register usage information matters even though the memcpy expanding is not in such case as it happens at the last stage of IR optimization pipeline. We should always specify those register usage information which compiler couldn't deduct automatically whenever we add a hardware register manually. Reported-by: Builder llvm-clang-x86_64-expensive-checks-win Build #11261 Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Yonghong Song <yhs@fb.com> llvm-svn: 338134
* Enable MachineOutliner by default under -Oz for AArch64Jessica Paquette2018-07-2710-12/+97
| | | | | | | | | | | | | | | | This patch enables the MachineOutliner by default in AArch64 under -Oz. The MachineOutliner offers around a 4.5% improvement on the current -Oz code size improvements. We have done work into improving the debuggability of outlined code, so that users of -Oz won't be surprised by the optimization. We have also been executing the LLVM test suite and common external tests such as the SPEC suites continuously with no issue. The outliner has a low compile-time overhead of roughly 1%. At this point, the outliner would be a really good addition to the -Oz pass pipeline! llvm-svn: 338133
* [DAGCombiner] fold 'not' with signbit mathSanjay Patel2018-07-274-59/+84
| | | | | | | | | | | | | | | | | | | This is a follow-up suggested in D48970. Alive proofs: https://rise4fun.com/Alive/sII We can eliminate an instruction in the usual select-of-constants to bit hack transform by adjusting the add/sub with constant. This is always a win. There are more transforms that are likely wins, but they may need target hooks in case some targets do not benefit. This is another step towards making up for canonicalizing to select-of-constants in rL331486. llvm-svn: 338132
* [x86] add more tests for signbit math; NFCSanjay Patel2018-07-271-0/+84
| | | | llvm-svn: 338131
* [PowerPC] add more tests for signbit math; NFCSanjay Patel2018-07-271-0/+96
| | | | llvm-svn: 338130
* [AArch64] add more tests for signbit math; NFCSanjay Patel2018-07-271-0/+81
| | | | llvm-svn: 338129
* [Support] Use unsigned char for xxHash 64-bitFangrui Song2018-07-271-3/+3
| | | | | | Before, the last 3 bytes were char-signedness dependent. llvm-svn: 338128
* AMDGPU/R600: Add MOV instructions to BFE patternsJan Vesely2018-07-272-5/+180
| | | | | | | | | R600 can't handle immediates for BFE, these will be eliminated later. Fixes powr/pow regressions n r600 since r334817 Differential Revision: https://reviews.llvm.org/D49641 llvm-svn: 338127
* [AArch64][SVE] Asm: Predicated integer reductions.Sander de Smalen2018-07-2720-0/+645
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for various integer reduction operations: SADDV signed add reduction to scalar UADDV unsigned add reduction to scalar SMAXV signed maximum reduction to scalar SMINV signed minimum reduction to scalar UMAXV unsigned maximum reduction to scalar UMINV unsigned minimum reduction to scalar ANDV logical AND reduction to scalar ORV logical OR reduction to scalar EORV logical EOR reduction to scalar The reduction is predicated, e.g. smaxv s0, p0, z1.s performs a signed maximum reduction on active elements in z1, and stores the (signed max value) result in s0. llvm-svn: 338126
* [AMDGPU][MC][DOC] Updated AMD GPU assembler descriptionDmitry Preobrazhensky2018-07-274-22/+151
| | | | llvm-svn: 338125
* [clang-tidy] Fix a crash in fuchsia-multiple-inheritanceIlya Biryukov2018-07-272-0/+16
| | | | | | | | | | | | | | Summary: See the test case for a repro. Reviewers: juliehockett, ioeric, hokein, aaron.ballman Reviewed By: hokein Subscribers: lebedev.ri, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D49862 llvm-svn: 338124
* [AArch64][SVE] Asm: Predicated floating point reductions.Sander de Smalen2018-07-2714-1/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for various floating-point reduction operations: FADDA strictly-ordered add reduction, accumulating in scalar FADDV recursive add reduction to scalar FMAXV recursive max reduction to scalar FMINV recursive min reduction to scalar FMAXNMV recursive max number reduction to scalar FMINNMV recursive min number reduction to scalar The reduction is predicated, e.g. fadda d0, p0, d0, z1.d performs the add-reduction in strict order on active elements in z1, accumulating into d0. faddv d0, p0, z1.d performs the add-reduction (not in strict order) on active elements in z1, storing the result in d0. llvm-svn: 338123
* [libc++] Introduce _LIBCPP_HIDE_FROM_ABI to replace _LIBCPP_INLINE_VISIBILITYLouis Dionne2018-07-272-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit introduces a new macro, _LIBCPP_HIDE_FROM_ABI, whose goal is to mark functions that shouldn't be part of libc++'s ABI. It marks the functions as being hidden for dylib visibility purposes, and as having internal linkage using Clang's __attribute__((internal_linkage)) when available, and __always_inline__ otherwise. It replaces _LIBCPP_INLINE_VISIBILITY, which was always using __always_inline__ to achieve similar goals, but suffered from debuggability and code size problems. The full proposal, along with more background information, can be found here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058419.html This commit does not rename uses of _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI: this wide reaching but mechanical change can be done later when we've confirmed we're happy with the new macro. In the future, it would be nice if we could optionally allow dropping any internal_linkage or __always_inline__ attribute, which could result in code size improvements. However, this is currently impossible for reasons explained here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058450.html Reviewers: EricWF, dexonsmith, mclow.lists Subscribers: christof, dexonsmith, llvm-commits, mclow.lists Differential Revision: https://reviews.llvm.org/D49240 llvm-svn: 338122
* [AArch64][SVE] Asm: Support for FEXPA and FTSSEL.Sander de Smalen2018-07-276-0/+124
| | | | | | | | This patch adds support for transcendental acceleration instructions 'FEXPA' (exponential accelerator) and 'FTSSEL' (trigonometric select coefficient). llvm-svn: 338121
* [AArch64][SVE] Asm: Support for FRECPE and FRSQRTE.Sander de Smalen2018-07-276-0/+94
| | | | | | | Support for floating-point instructions for reciprocal estimate (FRECPE) and reciprocal square root estimate (FRSQRTE). llvm-svn: 338120
* [CMake] Followup for r337366: Only export LLVM_LINK_LLVM_DYLIB if it's set to ONPhilip Pfaffe2018-07-272-1/+7
| | | | | | | | | | | | | | | | | | Summary: As it was, always exporting LLVM_LINK_LLVM_DYLIB caused out-of-tree clients to lose the ability to link against the dylib, even if in-tree tools did not. By only exporting the setting if it is enabled, out-of-tree clients get the correct default, but may still choose if they can. Reviewers: mgorny, beanz, labath, bogner, chandlerc Reviewed By: bogner, chandlerc Subscribers: bollu, llvm-commits Differential Revision: https://reviews.llvm.org/D49843 llvm-svn: 338119
* [InstCombine] not(sub X, Y) --> add (not X), YSanjay Patel2018-07-273-10/+12
| | | | | | | | | | | The tests with constants show a missing optimization. Analysis for adds is better than subs, so this can also help with other transforms. And codegen is better with adds for targets like x86 (destructive ops, no sub-from). https://rise4fun.com/Alive/llK llvm-svn: 338118
* [InstCombine] add tests for not+sub; NFCSanjay Patel2018-07-271-0/+110
| | | | llvm-svn: 338117
* [clangd] Return Dex IteratorsKirill Bobyrev2018-07-274-1/+617
| | | | | | | | | | | | | | | The original Dex Iterators patch (https://reviews.llvm.org/rL338017) caused problems for Clang 3.6 and Clang 3.7 due to the compiler bug which prevented inferring template parameter (`Size`) in create(And|Or)? functions. It was reverted in https://reviews.llvm.org/rL338054. In this revision the mentioned helper functions were replaced with variadic templated versions. Proposed changes were tested on multiple compiler versions, including Clang 3.6 which originally caused the failure. llvm-svn: 338116
* [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncsMax Kazantsev2018-07-272-2/+54
| | | | | | | | | | | This is a follow-up for the patch rL335020. When we replace compares against trunc with compares against wide IV, we can also replace signed predicates with unsigned where it is legal. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D48763 llvm-svn: 338115
* [Support] Bring std::errc::not_supported to llvm::errc.Victor Leschuk2018-07-271-0/+1
| | | | llvm-svn: 338114
* AMDGPU: Fix code size for return_to_epilog pseudoMatt Arsenault2018-07-273-3/+10
| | | | llvm-svn: 338113
* DAG: Remove unnecessary .str()Matt Arsenault2018-07-271-1/+1
| | | | llvm-svn: 338112
* PatternMatch: Add wrappers for fabs and canonicalizeMatt Arsenault2018-07-272-3/+13
| | | | llvm-svn: 338111
* Revert "ELF: Make --print-icf-sections output deterministic."Ilya Biryukov2018-07-272-23/+28
| | | | | | | This reverts commit r338088. To unbreak our integrate. The resulting lld output is different if compiled with '-funsigned-char'. llvm-svn: 338110
* Revert "[LV][DebugInfo] Set DL to the middle block Icmp instruction"Anastasis Grammenos2018-07-272-36/+1
| | | | | | This reverts commit r338106. llvm-svn: 338109
* [AST] Sink 'part of explicit cast' down into ImplicitCastExprRoman Lebedev2018-07-276-13/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in IRC with @rsmith, it is slightly not good to keep that in the `CastExpr` itself: Given the explicit cast, which is represented in AST as an `ExplicitCastExpr` + `ImplicitCastExpr`'s, only the `ImplicitCastExpr`'s will be marked as `PartOfExplicitCast`, but not the `ExplicitCastExpr` itself. Thus, it is only ever `true` for `ImplicitCastExpr`'s, so we don't need to write/read/dump it for `ExplicitCastExpr`'s. We don't need to worry that we write the `PartOfExplicitCast` in PCH after `CastExpr::path_iterator`, since the `ExprImplicitCastAbbrev` is only used when the `NumBaseSpecs == 0`, i.e. there is no 'path'. Reviewers: rsmith, rjmccall, erichkeane, aaron.ballman Reviewed By: rsmith, erichkeane Subscribers: vsk, cfe-commits, rsmith Tags: #clang Differential Revision: https://reviews.llvm.org/D49838 llvm-svn: 338108
* [InstSimplify] tests for D48828: fold extraction from std::pairHiroshi Inoue2018-07-273-0/+305
| | | | | | | This commit includes unit tests for D48828, which enhances InstSimplify to enable jump threading with a method whose return type is std::pair<int, bool> or std::pair<bool, int>. I am going to commit the actual transformation later. llvm-svn: 338107
* [LV][DebugInfo] Set DL to the middle block Icmp instructionAnastasis Grammenos2018-07-272-1/+36
| | | | | | | | Reviewers: hsaito Differential Revision: https://reviews.llvm.org/D49746 llvm-svn: 338106
* [Docs] Remove hard tab character from code block in optbisect documentationCraig Topper2018-07-271-1/+1
| | | | llvm-svn: 338105
* [NFC] Remove an empty line.Xin Tong2018-07-271-1/+0
| | | | llvm-svn: 338104
* Move Filesystem namespace definition out of a clang specific ifdef block.Eric Fiselier2018-07-271-13/+14
| | | | llvm-svn: 338103
* AMDGPU/GlobalISel: Fix crash in regbankselect on non-power-of-2 typesTom Stellard2018-07-272-1/+18
| | | | | | | | | | | | Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D49624 llvm-svn: 338102
* [X86] Remove an unnecessary 'if' that prevented treating INT64_MAX and ↵Craig Topper2018-07-272-40/+63
| | | | | | | | -INT64_MAX as power of 2 minus 1 in the multiply expansion code. Not sure why they were being explicitly excluded, but I believe all the math inside the if works. I changed the absolute value to be uint64_t instead of int64_t so INT64_MIN+1 wouldn't be signed wrap. llvm-svn: 338101
* [LTO] Don't internalize declarationsBob Haarman2018-07-272-1/+36
| | | | | | | | | | | | | | | | | | | | Summary: Some links were failing with "Global is external, but doesn't have external or weak linkage!" in ThinLTO builds with debug information. This happened when we elide the body of a global that is referenced by debug info. This results in a declaration, which we would then internalize - but declarations cannot be internal. This change avoids the problem by not internalizing these declarations. Fixes PR38046. Reviewers: pcc, tejohnson Subscribers: mehdi_amini, aprantl, hiraditya, JDevlieghere, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D49777 llvm-svn: 338100
* Replace LLVM_ALIGNAS with alignas as a follow-up of r337330Fangrui Song2018-07-275-12/+12
| | | | | | The minimum required GCC version was raised to 4.8 (which started to support alignas) in r284497. llvm-svn: 338099
* [WWW] Fixing file permissions for the .html pages.Mike Edwards2018-07-2716-0/+0
| | | | llvm-svn: 338098
* [X86] Add matching for another pattern of PMADDWD.Craig Topper2018-07-272-0/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the pattern you get from the loop vectorizer for something like this int16_t A[1024]; int16_t B[1024]; int32_t C[512]; void pmaddwd() { for (int i = 0; i != 512; ++i) C[i] = (A[2*i]*B[2*i]) + (A[2*i+1]*B[2*i+1]); } In this case we will have (add (mul (build_vector), (build_vector)), (mul (build_vector), (build_vector))). This is different than the pattern we currently match which has the build_vectors between an add and a single multiply. I'm not sure what C code would get you that pattern. Reviewers: RKSimon, spatel, zvi Reviewed By: zvi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49636 llvm-svn: 338097
* Add libc++fs to the test deps, and not to the target 'cxx'.Eric Fiselier2018-07-272-8/+7
| | | | llvm-svn: 338096
* Attempt to unbreak *all the bots*Eric Fiselier2018-07-274-7/+10
| | | | | | | | The bots were failing to build the cxx_filesystem target, so the tests were failing. Though this does lead me to wonder how it was ever working with c++experimental. llvm-svn: 338095
* Correctly mark the Filesystem status as complete.Eric Fiselier2018-07-271-2/+2
| | | | llvm-svn: 338094
* Implement <filesystem>Eric Fiselier2018-07-27178-3163/+3980
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the <filesystem> header and uses that to provide <experimental/filesystem>. Unlike other standard headers, the symbols needed for <filesystem> have not yet been placed in libc++.so. Instead they live in the new libc++fs.a library. Users of filesystem are required to link this library. (Also note that libc++experimental no longer contains the definition of <experimental/filesystem>, which now requires linking libc++fs). The reason for keeping <filesystem> out of the dylib for now is that it's still somewhat experimental, and the possibility of requiring an ABI breaking change is very real. In the future the symbols will likely be moved into the dylib, or the dylib will be made to link libc++fs automagically). Note that moving the symbols out of libc++experimental may break user builds until they update to -lc++fs. This should be OK, because the experimental library provides no stability guarantees. However, I plan on looking into ways we can force libc++experimental to automagically link libc++fs. In order to use a single implementation and set of tests for <filesystem>, it has been placed in a special `__fs` namespace. This namespace is inline in C++17 onward, but not before that. As such implementation is available in C++11 onward, but no filesystem namespace is present "directly", and as such name conflicts shouldn't occur in C++11 or C++14. llvm-svn: 338093
* [InstCombine] canonicalize abs patternChen Zheng2018-07-274-77/+171
| | | | | | Differential Revision: https://reviews.llvm.org/D48754 llvm-svn: 338092
* added shared library to fix buildbotEmmett Neyman2018-07-271-0/+2
| | | | | | | | | | Summary: added shared library to fix buildbot Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D49895 llvm-svn: 338091
* [X86] When removing sign extends from gather/scatter indices, make sure we ↵Craig Topper2018-07-272-15/+71
| | | | | | | | handle UpdateNodeOperands finding an existing node to CSE with. If this happens the operands aren't updated and the existing node is returned. Make sure we pass this existing node up to the DAG combiner so that a proper replacement happens. Otherwise we get stuck in an infinite loop with an unoptimized node. llvm-svn: 338090
OpenPOWER on IntegriCloud