summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLDB] FreeBSD suppress compilation warningDavid Carlier2019-01-311-1/+1
| | | | | | | | | | | | Reviewers: labath, teemperor Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D57506 M source/Plugins/Process/FreeBSD/ProcessMonitor.cpp llvm-svn: 352744
* [X86][AVX] Enable AVX1 broadcasts in shuffle combiningSimon Pilgrim2019-01-318-24/+29
| | | | | | | | Enables 32/64-bit scalar load broadcasts on AVX1 targets The extractelement-load.ll regression will be fixed shortly in a followup commit. llvm-svn: 352743
* [X86][AVX] Fold vt1 concat_vectors(vt2 undef, vt2 broadcast(x)) --> vt1 ↵Simon Pilgrim2019-01-312-9/+9
| | | | | | | | | | broadcast(x) If we're not inserting the broadcast into the lowest subvector then we can avoid the insertion by just performing a larger broadcast. Avoids a regression when we enable AVX1 broadcasts in shuffle combining llvm-svn: 352742
* [clang-tidy] refactor bugprone-exception-escape analysis into classJonas Toth2019-01-315-151/+223
| | | | | | | | | | | | | | | | | | | | | | Summary: The check `bugprone-exception-escape` does an AST-based analysis to determine if a function might throw an exception and warns based on that information. The analysis part is refactored into a standalone class similiar to `ExprMutAnalyzer` that is generally useful. I intent to use that class in a new check to automatically introduce `noexcept` if possible. Reviewers: aaron.ballman, alexfh, hokein, baloghadamsoftware, lebedev.ri Reviewed By: baloghadamsoftware, lebedev.ri Subscribers: lebedev.ri, mgorny, xazax.hun, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D57100 llvm-svn: 352741
* Support attribute used in member funcs of class templatesRafael Auler2019-01-312-0/+33
| | | | | | | | | | | | | | | | Summary: As PR17480 describes, clang does not support the used attribute for member functions of class templates. This means that if the member function is not used, its definition is never instantiated. This patch changes clang to emit the definition if it has the used attribute. Test Plan: Added a testcase Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D56928 llvm-svn: 352740
* Default lowering for experimental.widenable.conditionMax Kazantsev2019-01-319-0/+168
| | | | | | | | | | | Introduces a pass that provides default lowering strategy for the `experimental.widenable.condition` intrinsic, replacing all its uses with `i1 true`. Differential Revision: https://reviews.llvm.org/D56096 Reviewed By: reames llvm-svn: 352739
* Test commit. NFCI.Yevgeny Rouban2019-01-311-1/+2
| | | | llvm-svn: 352738
* [ARM] Thumb2: ConstantMaterializationCostSjoerd Meijer2019-01-312-69/+69
| | | | | | | | | | | | | | | | Constants can also be materialised using the negated value and a MVN, and this case seem to have been missed for Thumb2. To check the constant materialisation costs, we now call getT2SOImmVal twice, once for the original constant and then also for its negated value, and this function checks if the constant can both be splatted or rotated. This was revealed by a test that optimises for minsize: instead of a LDR literal pool load and having a literal pool entry, just a MVN with an immediate is smaller (and also faster). Differential Revision: https://reviews.llvm.org/D57327 llvm-svn: 352737
* [SelectionDAG] Codesize: don't expand SHIFT to SHIFT_PARTSSjoerd Meijer2019-01-318-3/+320
| | | | | | | | | | | | | | | | And instead just generate a libcall. My motivating example on ARM was a simple: shl i64 %A, %B for which the code bloat is quite significant. For other targets that also accept __int128/i128 such as AArch64 and X86, it is also beneficial for these cases to generate a libcall when optimising for minsize. On these 64-bit targets, the 64-bits shifts are of course unaffected because the SHIFT/SHIFT_PARTS lowering operation action is not set to custom/expand. Differential Revision: https://reviews.llvm.org/D57386 llvm-svn: 352736
* Fixup test after r352704 since it changes how paths may be emitted.Douglas Yung2019-01-312-2/+2
| | | | | | | | On Unix/Mac OS X, normpath() returns the path unchanged (FileCheck), but on case-insensitive filesystems (like NTFS on Windows), it converts the path to lowercase (filecheck) which was causing the test to fail. llvm-svn: 352735
* Commit tests for changes in revision D41940Dmitry Venikov2019-01-312-0/+98
| | | | llvm-svn: 352734
* Revert "[CMake] Unify scripts for generating VCS headers"Petr Hosek2019-01-3111-223/+390
| | | | | | This reverts commits r352729 and r352731: this broke Sanitizer Windows bots llvm-svn: 352733
* [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_randKostya Serebryany2019-01-311-3/+3
| | | | llvm-svn: 352732
* [CMake] Migrate lldb to the new VCS scriptPetr Hosek2019-01-312-24/+18
| | | | | | This was accidentaly omitted from r352729 and broke lldb bots. llvm-svn: 352731
* [InstCombine] Missed optimization in math expression: simplify calls exp ↵Dmitry Venikov2019-01-313-30/+42
| | | | | | | | | | | | | | | | functions Summary: This patch enables folding following expressions under -ffast-math flag: exp(X) * exp(Y) -> exp(X + Y), exp2(X) * exp2(Y) -> exp2(X + Y). Motivation: https://bugs.llvm.org/show_bug.cgi?id=35594 Reviewers: hfinkel, spatel, efriedma, lebedev.ri Reviewed By: spatel, lebedev.ri Subscribers: lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D41342 llvm-svn: 352730
* [CMake] Unify scripts for generating VCS headersPetr Hosek2019-01-319-366/+205
| | | | | | | | | | | | | | | | Previously, there were two different scripts for generating VCS headers: one used by LLVM and one used by Clang. They were both similar, but different. They were both broken in their own ways, for example the one used by Clang didn't properly handle monorepo resulting in an incorrect version information reported by Clang. This change unifies two the scripts by introducing a new script that's used from both LLVM and Clang, ensures that the new script supports both monorepo and standalone SVN and Git setups, and removes the old scripts. Differential Revision: https://reviews.llvm.org/D57063 llvm-svn: 352729
* [SCEV] Prohibit SCEV transformations for huge SCEVsMax Kazantsev2019-01-313-4/+62
| | | | | | | | | | | | | | | | | | | | | | Currently SCEV attempts to limit transformations so that they do not work with big SCEVs (that may take almost infinite compile time). But for this, it uses heuristics such as recursion depth and number of operands, which do not give us a guarantee that we don't actually have big SCEVs. This situation is still possible, though it is not likely to happen. However, the bug PR33494 showed a bunch of simple corner case tests where we still produce huge SCEVs, even not reaching big recursion depth etc. This patch introduces a concept of 'huge' SCEVs. A SCEV is huge if its expression size (intoduced in D35989) exceeds some threshold value. We prohibit optimizing transformations if any of SCEVs we are dealing with is huge. This gives us a reliable check that we don't spend too much time working with them. As the next step, we can possibly get rid of old limiting mechanisms, such as recursion depth thresholds. Differential Revision: https://reviews.llvm.org/D35990 Reviewed By: reames llvm-svn: 352728
* Add namespace to some types.Richard Trieu2019-01-313-18/+21
| | | | llvm-svn: 352725
* Fix missing C++ mode comment in headerMatt Arsenault2019-01-311-1/+1
| | | | llvm-svn: 352724
* [CMake][compiler-rt] Enable statically linking unwinder and c++abiPetr Hosek2019-01-311-6/+25
| | | | | | | | | | Rather than guessing whether to use static or shared version of unwinder and c++abi when using linking against the in-tree versions, provide a CMake option to control this. Differential Revision: https://reviews.llvm.org/D57492 llvm-svn: 352723
* Revert "Reapply "[CGP] Check for existing inttotpr before creating new one""David L. Jones2019-01-312-158/+4
| | | | | | | | This change reverts r351626. The changes in r351626 cause quadratic work in several cases. (See r351626 thread on llvm-commits for details.) llvm-svn: 352722
* [libFuzzer] Update Darwin testJulian Lettner2019-01-311-13/+3
| | | | | | | | | | | Support for -fsanitize-coverage=trace-pc[-guard] was removed from libFuzzer, which makes this currently fail. This commit aligns this Darwin-specific test with its Linux counterpart which changed in this commit: https://github.com/llvm/llvm-project/commit/3a94519a777b9ac407a1d5ff5c31ec48b3768eec llvm-svn: 352721
* GlobalISel: Handle odd splits in fewerElementsVector for load/storeMatt Arsenault2019-01-315-154/+442
| | | | llvm-svn: 352720
* GlobalISel: Implement narrowScalar for bswapMatt Arsenault2019-01-313-1/+155
| | | | llvm-svn: 352719
* GlobalISel: Don't call changingInstruction before giving upMatt Arsenault2019-01-311-1/+1
| | | | llvm-svn: 352718
* GlobalISel: Allow bitcount ops to have different result typeMatt Arsenault2019-01-3112-56/+551
| | | | | | For AMDGPU the result is always 32-bit for 64-bit inputs. llvm-svn: 352717
* GlobalISel: Use helper function for MMO splittingMatt Arsenault2019-01-312-26/+21
| | | | | | | | Also fix an alignment bug getMachineMemOperand. If the tracked value is null, the offset isn't tracked so the base alignment needs to be reduced. llvm-svn: 352716
* [libFuzzer] update docsKostya Serebryany2019-01-311-5/+6
| | | | llvm-svn: 352715
* [InstCombine] Expand testing for Windows (NFC)Evandro Menezes2019-01-311-48/+67
| | | | | | Added the checks to the existing cases when the target is Win64. llvm-svn: 352714
* [libFuzzer] set libFuzzer's own SEGV handler even one is already present, ↵Kostya Serebryany2019-01-315-13/+19
| | | | | | but call that handler from ours (unless we are unprotecting lazy counters). Call ProtectLazyCounters later, so that it runs after the initialization code in the target. llvm-svn: 352713
* GlobalISel: Fix creating MMOs with align 0Matt Arsenault2019-01-3119-143/+154
| | | | llvm-svn: 352712
* [libFuzzer] Set default sanitizer options in fuzzer testsJulian Lettner2019-01-316-7/+15
| | | | | | | | | | | | | | | | | | | | | Summary: Set default `ASAN_OPTIONS` when running libFuzzer tests. This allows us to remove special casing in code for Darwin where we usually pass `abort_on_error=0` to override platform defaults for tests. A previous commit changed the code to make the tests pass: https://github.com/llvm/llvm-project/commit/7764a04af007eca68eafcf5caaea560ed05e35a9 Adapted a few tests to use `%env_asan_opts=` instead of directly setting the environment variable. rdar://problem/47515276 Reviewers: kcc, george.karpenkov Differential Revision: https://reviews.llvm.org/D57465 llvm-svn: 352711
* [testsuite] Fix TestAppleSimulator so that it works with Python 3.Davide Italiano2019-01-312-3/+3
| | | | llvm-svn: 352710
* [Python] Fix gdb-remote and lldb-server utilities to work with Py3.Davide Italiano2019-01-312-5/+5
| | | | llvm-svn: 352709
* [X86] Add a 32-bit command line to avx512-intrinsics.ll. Move all 64-bit ↵Craig Topper2019-01-312-2265/+4569
| | | | | | | | mode only intrinsics to avx512-intrinsics-x86_64.ll. Most of the other intrinsic tests have a 32-bit command lines. llvm-svn: 352708
* [InstCombine] Simplify check clauses in test (NFC)Evandro Menezes2019-01-311-71/+57
| | | | llvm-svn: 352707
* [Python] Python 2 and Python 3 disagree on `/`.Davide Italiano2019-01-311-1/+1
| | | | | | | | One considers it integer division, the other doesn't. Move to `//` (floor division) so that this test passes independently from the version. llvm-svn: 352706
* Reland "gn build: Add BPF target."Peter Collingbourne2019-01-317-0/+241
| | | | | | Differential Revision: https://reviews.llvm.org/D57436 llvm-svn: 352705
* lit: Let lit.util.which() return a normcase()ed pathNico Weber2019-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | LLVMConfig.with_environment() uses os.path.normcase(os.path.normpath(x)) to normalize temporary env vars. LLVMConfig.use_clang() uses with_environment() to temporarily set PATH and then look for clang there. This means that on Windows, clang will be run with a path like c:\foo\bin\clang.EXE (with a lower-case "C:"). lit.util.which() used to not do this, which means the executables added in clang/test/lit.cfg.py (e.g. c-index-test) were run with a path like C:\foo\bin\c-index-test.EXE (because both CMake and GN happen to write clang_tools_dir with an upper-case C to lit.site.cfg.py). clang/test/Index/pch-from-libclang.c requires that both c-index-test and clang use _exactly_ the same resource dir path (same case and everything), because a hash of the resource directory is used as module cache path. This patch is necessary but not sufficient to make pch-from-libclang.c pass on Windows. Differential Revision: https://reviews.llvm.org/D57343 llvm-svn: 352704
* Add Sphinx generated html files as output to the build phase.Jonas Devlieghere2019-01-311-1/+23
| | | | | | This will ensure we don't rerun Sphinx when the files exist. llvm-svn: 352703
* [LegalizeVectorTypes] Allow illegal indices when splitting extract_vector_eltThomas Lively2019-01-312-1/+22
| | | | | | | | | | | | | | | | | Summary: Fixes PR40267, in which the removed assertion was triggering on perfectly valid IR. As far as I can tell, constant out of bounds indices should be allowed when splitting extract_vector_elt, since they will simply be propagated as out of bounds indices in the resulting split vector and handled appropriately elsewhere. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya Differential Revision: https://reviews.llvm.org/D57471 llvm-svn: 352702
* [Python] String(s) and bytes are two different entities in 3.7.Davide Italiano2019-01-311-1/+1
| | | | | | | So, we need an explicit call to decode() here to let it work with both interpreters. Fixes TestXMMRegisters on 3.7. llvm-svn: 352701
* [libFuzzer] experimental performance optimization -lazy_counters, off by ↵Kostya Serebryany2019-01-3112-1/+82
| | | | | | default. Posix-only for now, tested on Linux llvm-svn: 352700
* [LegalizeTypes] Use report_fatal_error instead of llvm_unreachable in the ↵Craig Topper2019-01-311-2/+3
| | | | | | | | | | default case of some type legalization handlers that can be reached with intrinsics with result or operands that aren't legal types. These can be triggered by mistakenly using a 64-bit mode only intrinsics with a -mtriple=i686. Using report_fatal_error gives a better experience for this mistake in release builds instead of probably crashing. We already do this for some of the vector type legalization handles. llvm-svn: 352699
* [X86] Remove handling of ISD::INTRINSIC_WO_CHAIN in ReplaceNodeResults.Craig Topper2019-01-311-6/+0
| | | | | | I believe this was there to handle avx512bw intrinsics that returned i64 type in 32-bit mode. But all those intrinsics have since been changed to v64i1 results or replaced with generic IR. llvm-svn: 352698
* [X86] Add test case for pr40539. NFCCraig Topper2019-01-311-0/+36
| | | | llvm-svn: 352697
* Add lldb-docs target to Xcode projectJonas Devlieghere2019-01-301-0/+96
| | | | | | | This patch adds the lldb-docs target which generates the Sphinx html documentation. llvm-svn: 352696
* [WebAssembly] Remove TODO on wasm.extract.exception intrinsic (NFC)Heejin Ahn2019-01-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We planned to delete this intrinsic and do custom lowering from `wasm.get.exception`, which has a token argument, to `EXTRACT_EXCEPTION`, a wasm pseudo instruction that simulates popping a value from the wasm stack. To do that, we need to introduce a new `WebAssemblyISD` node for this, which itself is not a problem, but also have to introduce the `WebAssemblyISD` namespace in SelectionDAGBuilder.cpp. I don't think any other targets are doing that in the file. And also putting a target-specific intrinsic in the common file is a little weird too. (All other intrinsic functions in this `visitIntrinsicCall` functions are not target-specific ones. Other target-specific intrinsics are usually handled in `lib/Target/[TargetName]/[TargetName]ISelLowering.cpp`. The reason we can't do this is it has a token argument. Anyway, so I think I prefer the current code with one redundant intrinsic more than adding one more `WebAssemblyISD` node and also introducing the `WebAssemblyISD` namespace into SelectionDAGBuilder.cpp. What do you think? Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D57480 llvm-svn: 352695
* [RuntimeDyld] Don't try to allocate sections with align 0.Zachary Turner2019-01-301-0/+5
| | | | | | | | | | | | | ELF sections allow 0 for the alignment, which is specified to be the same as 1. However many clients do not expect this and will behave poorly in the presence of a 0-aligned section (for example by trying to modulo something by the section alignment). We can be more polite by making sure that we always pass a non-zero value to clients. Differential Revision: https://reviews.llvm.org/D57482 llvm-svn: 352694
* [analyzer] Make NullReturnedFromNonnullChecker depend on NullabilityBaseKristof Umann2019-01-302-0/+4
| | | | | | Accidentally left this dependency out after D54438. llvm-svn: 352693
OpenPOWER on IntegriCloud