summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] NFC: Use buildCompilerInvocation in CodeCompleteKadir Cetinkaya2019-01-225-59/+46
| | | | | | | | | | | | Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56860 llvm-svn: 351793
* [clangd] Support clang-tidy configuration in clangd.Haojian Wu2019-01-2212-20/+62
| | | | | | | | | | | | | | | | | | | | | Summary: This patch adds some basic supports for clang-tidy configurations in clangd: - clangd will respect .clang-tidy configurations for each file - we don't aim to support all clang-tidy options in clangd, only a small subset of condfigurations (options related to which checks will be enabled) are supported. - add a `clang-tidy-checks` CLI option that can override options from .clang-tidy file Reviewers: ilya-biryukov, sammccall Reviewed By: sammccall Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55256 llvm-svn: 351792
* [NFC] Add detector for guards expressed as branch by widenable conditionsMax Kazantsev2019-01-222-2/+33
| | | | | | | | | | | | | | | | | | | | | This patch adds a function to detect guards expressed in explicit control flow form as branch by `and` with widenable condition intrinsic call: %wc = call i1 @llvm.experimental.widenable.condition() %guard_cond = and i1, %some_cond, %wc br i1 %guard_cond, label %guarded, label %deopt deopt: <maybe some non-side-effecting instructions> deoptimize() This form can be used as alternative to implicit control flow guard representation expressed by `experimental_guard` intrinsic. Differential Revision: https://reviews.llvm.org/D56074 Reviewed By: reames llvm-svn: 351791
* [LLD][ELF]Fix tests for D56910James Henderson2019-01-223-5/+6
| | | | | | | | | | | r351789 changes the output of llvm-readelf --dyn-symbols. This causes 3 LLD tests to break. This patch fixes them. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D56911 llvm-svn: 351790
* [llvm-readelf]Revert --dyn-symbols behaviour to make it GNU compatible, and ↵James Henderson2019-01-225-49/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add new --hash-symbols switch for old behaviour In r287786, the behaviour of --dyn-symbols in llvm-readelf (but not llvm-readobj) was changed to print the dynamic symbols as derived from the hash table, rather than to print the dynamic symbol table contents directly. The original change was initially submitted without review, and some comments were made on the commit mailing list implying that the new behavious is GNU compatible. I argue that it is not: 1) It does not include a null symbol. 2) It prints the symbols based on an order derived from the hash table. 3) It prints an extra column indicating which bucket it came from. This could break parsers that expect a fixed number of columns, with the first column being the symbol index. 4) If the input happens to have both .hash and .gnu.hash section, it prints interpretations of them both, resulting in most symbols being printed twice. 5) There is no way of just printing the raw dynamic symbol table, because --symbols also prints the static symbol table. This patch reverts the --dyn-symbols behaviour back to its old behaviour of just printing the contents of the dynamic symbol table, similar to what is printed by --symbols. As the hashed interpretation is still desirable to validate the hash table, it puts it under a new switch "--hash-symbols". This is a no-op on all output forms except for GNU output style for ELF. If there is no hash table, it does nothing, unlike the previous behaviour which printed the raw dynamic symbol table, since the raw dynsym is available under --dyn-symbols. The yaml input for the test is based on that in test/tools/llvm-readobj/demangle.test, but stripped down to the bare minimum to provide a valid dynamic symbol. Note: some LLD tests needed updating. I will commit a separate patch for those. Reviewed by: grimar, rupprecht Differential Revision: https://reviews.llvm.org/D56910 llvm-svn: 351789
* [clangd] Filter out plugin related flags and move all commandline ↵Kadir Cetinkaya2019-01-229-42/+86
| | | | | | | | | | | | | | | | | | | | manipulations into OverlayCDB. Summary: Some projects make use of clang plugins when building, but clangd is not aware of those plugins therefore can't work with the same compile command arguments. There were multiple places clangd performed commandline manipulations, this one also moves them all into OverlayCDB. Reviewers: ilya-biryukov Subscribers: klimek, sammccall, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56841 llvm-svn: 351788
* Revert "Remove static_assert(value == std::is_trivially_copyable<T>::value)"Vitaly Buka2019-01-221-0/+4
| | | | | | | | Upgraded the bot as workaround. This reverts commit r351784. llvm-svn: 351786
* [RISCV][NFC] Add break to case statement in RISCVDAGToDAGISel::SelectAlex Bradbury2019-01-221-0/+1
| | | | | | | The break isn't strictly needed yet as there is no subsequent entry in the case. But adding to prevent mistakes further down the road. llvm-svn: 351785
* Remove static_assert(value == std::is_trivially_copyable<T>::value)Vitaly Buka2019-01-221-4/+0
| | | | | | This fails to compile with clang ang libstdc++ 4.6 llvm-svn: 351784
* [safestack] Return syscalls for mmap, munmap and mprotectVitaly Buka2019-01-222-4/+31
| | | | | | This function can be already intercepted by instrumented code. llvm-svn: 351783
* [RISCV] Fix build after r351778Alex Bradbury2019-01-221-3/+6
| | | | | | | Also add a comment to explain the expansion strategy for atomicrmw {fadd,fsub}. llvm-svn: 351782
* breakpad: Add FUNC records to the symtabPavel Labath2019-01-226-41/+135
| | | | | | | | | | | | | | | | | | | | This patch extends SymbolFileBreakpad::AddSymbols to include the symbols from the FUNC records too. These symbols come from the debug info and have a size associated with them, so they are given preference in case there is a PUBLIC record for the same address. To achieve this, I first pre-process the symbols into a temporary DenseMap, and then insert the uniqued symbols into the module's symtab. Reviewers: clayborg, lemo, zturner Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56590 llvm-svn: 351781
* [Test] Fix up tests affected by the new LLVM header.Jonas Devlieghere2019-01-227-16/+16
| | | | | | | | | The new LLVM header is one line shorter than the old one, which lead to some test failures. Ideally tests should rely on line numbers for breakpoints or output, but that's a different discussion. Hopefully this turns the bots green again. llvm-svn: 351779
* IR: Add fp operations to atomicrmwMatt Arsenault2019-01-2226-22/+392
| | | | | | Add just fadd/fsub for now. llvm-svn: 351778
* [ARM] Combine ands+lsls to lsls+lsrs for Thumb1.Eli Friedman2019-01-222-4/+130
| | | | | | | | | | | | | | | | | | | This patch may seem familiar... but my previous patch handled the equivalent lsls+and, not this case. Usually instcombine puts the "and" after the shift, so this case doesn't come up. However, if the shift comes out of a GEP, it won't get canonicalized by instcombine, and DAGCombine doesn't have an equivalent transform. This also modifies isDesirableToCommuteWithShift to suppress DAGCombine transforms which would make the overall code worse. I'm not really happy adding a bunch of code to handle this, but it would probably be tricky to substantially improve the behavior of DAGCombine here. Differential Revision: https://reviews.llvm.org/D56032 llvm-svn: 351776
* [CVP] Use LVI to constant fold deopt operandsPhilip Reames2019-01-223-9/+35
| | | | | | | | Deopt operands are generally intended to record information about a site in code with minimal perturbation of the surrounding code. Idiomatically, they also tend to appear down rare paths. Putting these together, we have an obvious case for extending CVP w/deopt operand constant folding. Arguably, we should be doing this for all operands on all instructions, but that's definitely a much larger and risky change. Differential Revision: https://reviews.llvm.org/D55678 llvm-svn: 351774
* Updated issue 3144Marshall Clow2019-01-221-2/+2
| | | | llvm-svn: 351773
* [LangRef] Clarify semantics of volatile operations.Eli Friedman2019-01-221-0/+18
| | | | | | | | | | | | | | | | | | Specifically, clarify the following: 1. Volatile load and store may access addresses that are not memory. 2. Volatile load and store do not modify arbitrary memory. 3. Volatile load and store do not trap. Prompted by recent volatile discussion on llvmdev. Currently, there's sort of a split in the source code about whether volatile operations are allowed to trap; this resolves that dispute in favor of not allowing them to trap. Differential Revision: https://reviews.llvm.org/D53184 llvm-svn: 351772
* [safestack] Fix NetBSD buildVitaly Buka2019-01-221-4/+15
| | | | llvm-svn: 351771
* Update with issues to be moved in San DiegoMarshall Clow2019-01-221-67/+32
| | | | llvm-svn: 351770
* GlobalISel: Fix out of bounds crashes in verifierMatt Arsenault2019-01-223-3/+59
| | | | llvm-svn: 351769
* [AArch64] Add patterns for zext/sext of shift amount.Eli Friedman2019-01-222-9/+56
| | | | | | | | | Not sure this is the best fix, but it saves an instruction for certain constructs involving variable shifts. Differential Revision: https://reviews.llvm.org/D55572 llvm-svn: 351768
* AMDGPU/GlobalISel: Legalize more fp<->int conversionsMatt Arsenault2019-01-225-17/+94
| | | | llvm-svn: 351767
* [CodeGen] Always use string computed in Sema for PredefinedExprEli Friedman2019-01-223-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | We can't use any other string, anyway, because its type wouldn't match the type of the PredefinedExpr. With this change, we don't compute a "nice" name for the __func__ global when it's used in the initializer for a constant. This doesn't seem like a great loss, and I'm not sure how to fix it without either storing more information in the AST, or somehow threading through the information from ExprConstant.cpp. This could break some situations involving BlockDecl; currently, CodeGenFunction::EmitPredefinedLValue has some logic to intentionally emit a string different from what Sema computed. This code skips that logic... but that logic can't work correctly in general anyway. (For example, sizeof(__func__) returns the wrong result.) Hopefully this doesn't affect practical code. Fixes https://bugs.llvm.org/show_bug.cgi?id=40313 . Differential Revision: https://reviews.llvm.org/D56821 llvm-svn: 351766
* Document toolchain update policyJF Bastien2019-01-213-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Capture the current agreed-upon toolchain update policy based on the following discussions: - LLVM dev meeting 2018 BoF "Migrating to C++14, and beyond!" llvm.org/devmtg/2018-10/talk-abstracts.html#bof3 - A Short Policy Proposal Regarding Host Compilers lists.llvm.org/pipermail/llvm-dev/2018-May/123238.html - Using C++14 code in LLVM (2018) lists.llvm.org/pipermail/llvm-dev/2018-May/123182.html - Using C++14 code in LLVM (2017) lists.llvm.org/pipermail/llvm-dev/2017-October/118673.html - Using C++14 code in LLVM (2016) lists.llvm.org/pipermail/llvm-dev/2016-October/105483.html - Document and Enforce new Host Compiler Policy llvm.org/D47073 - Require GCC 5.1 and LLVM 3.5 at a minimum llvm.org/D46723 Subscribers: jkorous, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D56819 llvm-svn: 351765
* [x86] add another test for xor with undefs; NFCSanjay Patel2019-01-211-0/+19
| | | | llvm-svn: 351764
* [x86] add tests for vector ops with undef lanes; NFCSanjay Patel2019-01-211-0/+119
| | | | llvm-svn: 351763
* [X86] Use X86ISD::VFPROUND instead of ISD::FP_ROUND for 256 and 512 bit ↵Craig Topper2019-01-215-47/+76
| | | | | | | | | | | | | | | | | | | cvtpd2ps intrinsics. Summary: Use X86ISD::VFPROUND in the instruction isel patterns. Add new patterns for ISD::FP_ROUND to maintain support for fptrunc in IR. In the process I found a couple duplicate isel patterns which I also deleted in this patch. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56991 llvm-svn: 351762
* [X86] Change avx512 COMPRESS and EXPAND lowering to use a single masked node ↵Craig Topper2019-01-213-14/+35
| | | | | | | | | | | | | | | | | | | | | | | instead of expand/compress+select. Summary: For compress, a select node doesn't semantically reflect the behavior of the instruction. The mask would have holes in it, but the resulting write is to contiguous elements at the bottom of the vector. Furthermore, as far as the compressing and expanding is concerned the behavior is depended on the mask. You can't just have an expand/compress node that only reads the input vector. That node would have no meaning by itself. This all only works because we pattern match the compress/expand+select back to the instruction. But conceivably an optimization of the select could break the pattern and leave something meaningless. This patch modifies the expand and compress node to take the mask and passthru as additional inputs and gets rid of the select all together. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57002 llvm-svn: 351761
* Fix test after AST dump output changeStephen Kelly2019-01-211-1/+1
| | | | llvm-svn: 351760
* [AMDGPU] Fixed hazard recognizer to walk predecessorsStanislav Mekhanoshin2019-01-215-32/+356
| | | | | | | | | | | | | | | | | | | | Fixes two problems with GCNHazardRecognizer: 1. It only scans up to 5 instructions emitted earlier. 2. It does not take control flow into account. An earlier instruction from the previous basic block is not necessarily a predecessor. At the same time a real predecessor block is not scanned. The patch provides a way to distinguish between scheduler and hazard recognizer mode. It is OK to work with emitted instructions in the scheduler because we do not really know what will be emitted later and its order. However, when pass works as a hazard recognizer the schedule is already finalized, and we have full access to the instructions for the whole function, so we can properly traverse predecessors and their instructions. Differential Revision: https://reviews.llvm.org/D56923 llvm-svn: 351759
* gn build: Stop passing -DLLVM_LIBXML2_ENABLED to some targetsNico Weber2019-01-211-1/+0
| | | | | | | | | | | | | | | | This is a remnant from before the gn build had a working config.h. Defining LLVM_LIBXML2_ENABLED only for targets that depend on build/libs/xml is nice in that only some of the codebase needs to be rebuilt when llvm_enable_libxml2 changes -- but config.h already defines it and defining it there and then redundantly a second time for some targets is worse than having it just in config.h. No behavior change. Differential Revision: https://reviews.llvm.org/D56908 llvm-svn: 351758
* gn build: Merge r351627, r351548, r351701Nico Weber2019-01-213-0/+3
| | | | llvm-svn: 351757
* Fix compilation error with gcc 4.8Pavel Labath2019-01-211-4/+4
| | | | | | | This version of gcc seems to be having issues with raw literals inside macro arguments. I change the string to use regular string literals instead. llvm-svn: 351756
* [X86][BtVer2] Update latency of mmx horizontal operationsSimon Pilgrim2019-01-213-25/+25
| | | | | | | | D56777 added +1cy local forwarding penalty for horizontal operations, but this penalty only affects sse2/xmm variants, the mmx variants don't suffer the penalty. Confirmed with @andreadb llvm-svn: 351755
* [AArch64] add more tests for buildvec to shuffle transform; NFCSanjay Patel2019-01-211-0/+419
| | | | | | | | These are copied from the sibling x86 file. I'm not sure which of the current outputs (if any) is considered optimal, but someone more familiar with AArch may want to take a look. llvm-svn: 351754
* [DAGCombiner] fix crash when converting build vector to shuffleSanjay Patel2019-01-212-5/+33
| | | | | | | | | | The regression test is reduced from the example shown in D56281. This does raise a question as noted in the test file: do we want to handle this pattern? I don't have a motivating example for that on x86 yet, but it seems like we could have that pattern there too, so we could avoid the back-and-forth using a shuffle. llvm-svn: 351753
* [test] Pass -ccc-install-dir in mac compilation db testMichal Gorny2019-01-211-1/+6
| | | | | | | | | | | | Pass -ccc-install-dir explicitly as the compilation database code does not pass argv[0] to getMainExecutable(), while some systems require it to return the correct path. Since the relevant code is apparently only applicable to Darwin, just pass correct -ccc-install-dir to make the tests pass on *BSD systems. Differential Revision: https://reviews.llvm.org/D56976 llvm-svn: 351752
* [clang-tidy] Work around http://llvm.org/PR40392Alexander Kornienko2019-01-212-4/+22
| | | | | | | | | The readability-else-after-return check should be smarter about cases where the variable defined in the condition is used in the `else` branch. This patch makes it just ignore such cases, but alternative solutions may be better (added a FIXME). llvm-svn: 351751
* Mark the lambda function pointer conversion operator as noexcept.Aaron Ballman2019-01-215-9/+30
| | | | | | This implements CWG DR 1722 and fixes PR40309. Patch by Ignat Loskutov. llvm-svn: 351750
* Regenerating the C++ DR status page from the latest Core issues list.Aaron Ballman2019-01-211-14010/+14172
| | | | llvm-svn: 351749
* NFC: fixed formatting to be consistent across the fileAndrey Churbanov2019-01-211-1/+2
| | | | llvm-svn: 351748
* [OpenCL] Allow address spaces as method qualifiers.Anastasia Stulova2019-01-219-60/+187
| | | | | | | | | | | | | | | Methods can now be qualified with address spaces to prevent undesirable conversions to generic or to provide custom implementation to be used if the object is located in certain memory segments. This commit extends parsing and standard C++ overloading to work for an address space of a method (i.e. implicit 'this' parameter). Differential Revision: https://reviews.llvm.org/D55850 llvm-svn: 351747
* [Analyzer] Remove extra blank line from Iterator Checker (test commit)Adam Balogh2019-01-211-1/+0
| | | | llvm-svn: 351746
* Fixed https://reviews.llvm.org/D55078 broken Fortran fixed form.Andrey Churbanov2019-01-211-4/+6
| | | | | | | | Long lines split in order to obey Fortran fixed form compilation. Differential Revision: https://reviews.llvm.org/D57017 llvm-svn: 351745
* [NFC] Fix comparison warning issues by MSVCJohannes Doerfert2019-01-211-1/+3
| | | | llvm-svn: 351744
* [clang] add tests to ExprMutAnalyzer that reproduced a crash in ASTMatchersJonas Toth2019-01-211-0/+19
| | | | | | | | | | | | | | | | | Summary: This patch adds two unit-tests that are the result of reducing a crashing TU when running ExprMutAnalyzer over it. They are added only to ensure the regression that has been fixed with https://reviews.llvm.org/D56444 don't creep back. Reviewers: aaron.ballman, sammccall, rsmith, george.karpenkov Reviewed By: sammccall Subscribers: baloghadamsoftware, a.sidorin, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56917 llvm-svn: 351743
* [X86][BtVer2] Update the WriteLoad latency.Andrea Di Biagio2019-01-2113-143/+142
| | | | | | | | | | | | | | | | | | r327630 introduced new write definitions for float/vector loads. Before that revision, WriteLoad was used by both integer/float (scalar/vector) load. So, WriteLoad had to conservatively declare a latency to 5cy. That is because the load-to-use latency for float/vector load is 5cy. Now that we have dedicated writes for float/vector loads, there is no reason why we should keep the latency of WriteLoad to 5cy. At the moment, WriteLoad is only used by scalar integer loads only; we can assume an optimstic 3cy latency for them. This patch changes that latency from 5cy to 3cy, and regenerates the affected scheduling/mca tests. Differential Revision: https://reviews.llvm.org/D56922 llvm-svn: 351742
* [CostModel][X86] Add XOP icmp cost tests (PR40376)Simon Pilgrim2019-01-211-0/+462
| | | | llvm-svn: 351741
* [AArch64] Use LL for 64-bit intrinsic argumentsSam Parker2019-01-213-15/+20
| | | | | | | | | | The ACLE states that 64-bit crc32, wsr, rsr and rbit operands are uint64_t so we should have the clang builtin match this description - which is what we already do for AArch32. Differential Revision: https://reviews.llvm.org/D56852 llvm-svn: 351740
OpenPOWER on IntegriCloud