summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] Remove dynarrayLouis Dionne2018-11-2821-1152/+4
| | | | | | | | | | | | | | Summary: std::dynarray had been proposed for C++14, but it was pulled out from C++14 and there are no plans to standardize it anymore. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D54801 llvm-svn: 347783
* [DebugInfo] Give inlinable calls DILocs (PR39807)Jeremy Morse2018-11-282-8/+52
| | | | | | | | | | | | | | | | | | | | In PR39807 we incorrectly handle circumstances where calls are common'd from conditional blocks into the parent BB. Calls that can be inlined must always have DebugLocs, however we strip them during commoning, which the IR verifier asserts on. Fix this by using applyMergedLocation: it will perform the same DebugLoc stripping of conditional Locs, but will also generate an unknown location DebugLoc that satisfies the requirement for inlinable calls to always have locations. Some of the prior logic for selecting a DebugLoc is now likely redundant; I'll generate a follow-up to remove it (involves editing more regression tests). Differential Revision: https://reviews.llvm.org/D54997 llvm-svn: 347782
* Simplify Symbol::getPltVA.Rui Ueyama2018-11-286-21/+11
| | | | | | | | | | | This patch also makes getPltEntryOffset a non-member function because it doesn't depend on any private members of the TargetInfo class. I tried a few different ideas, and it seems this change fits in best to me. Differential Revision: https://reviews.llvm.org/D54981 llvm-svn: 347781
* [libcxx] Use clang-verify in the lit test suite even when availability is ↵Louis Dionne2018-11-284-3/+12
| | | | | | enabled llvm-svn: 347780
* [gcov] Disable instrprof-gcov-fork.test.Matt Morehouse2018-11-281-0/+2
| | | | | | Test has been flaky for over a week and author hasn't fixed. llvm-svn: 347779
* [LICM] Enable control flow hoisting by defaultJohn Brawn2018-11-283-12/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D54949 llvm-svn: 347778
* [analyzer] Cleanup constructors in the Z3 backendMikhail R. Gadelha2018-11-281-96/+31
| | | | | | | | | | | | | | Summary: Left only the constructors that are actually required, and marked the move constructors as deleted. They are not used anymore and we were never sure they've actually worked correctly. Reviewers: george.karpenkov, NoQ Reviewed By: george.karpenkov Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, Szelethus, donat.nagy, dkrupp Differential Revision: https://reviews.llvm.org/D54974 llvm-svn: 347777
* [LICM] Reapply r347190 "Make LICM able to hoist phis" with fixJohn Brawn2018-11-282-15/+1663
| | | | | | | | | | | | | | | This commit caused failures because it failed to correctly handle cases where we hoist a phi, then hoist a use of that phi, then have to rehoist that use. We need to make sure that we rehoist the use to _after_ the hoisted phi, which we do by always rehoisting to the immediate dominator instead of just rehoisting everything to the original preheader. An option is also added to control whether control flow is hoisted, which is off in this commit but will be turned on in a subsequent commit. Differential Revision: https://reviews.llvm.org/D52827 llvm-svn: 347776
* Revert [llvm-mca] Return the total number of cycles from method Pipeline::run().Andrea Di Biagio2018-11-283-9/+5
| | | | | | This reverts commits 347767. llvm-svn: 347775
* [RISCV] Support .option push and .option popAlex Bradbury2018-11-287-2/+146
| | | | | | | | | This adds support in the RISCVAsmParser the storing of Subtarget feature bits to a stack so that they can be pushed/popped to enable/disable multiple features at once. Differential Revision: https://reviews.llvm.org/D46424 Patch by Lewis Revill. llvm-svn: 347774
* [InstCombine] Combine saturating add/sub with constant operandsNikita Popov2018-11-282-52/+64
| | | | | | | | | | | | | | | | | Combine sat(sat(X + C1) + C2) -> sat(X + (C1+C2)) and sat(sat(X - C1) - C2) -> sat(X - (C1+C2)) if the sign of C1 and C2 matches. In the unsigned case we can compute C1+C2 with saturating arithmetic, and InstSimplify will reduce this just to the saturation value. For the signed case, we cannot perform the simplification if the result of the addition overflows. This change is part of https://reviews.llvm.org/D54534. llvm-svn: 347773
* [InstCombine] Canonicalize ssub.sat to sadd.satNikita Popov2018-11-282-28/+39
| | | | | | | | | Canonicalize ssub.sat(X, C) to ssub.sat(X, -C) if C is constant and not signed minimum. This will help further optimizations to apply. This change is part of https://reviews.llvm.org/D54534. llvm-svn: 347772
* [ValueTracking] Determine always-overflow condition for unsigned subNikita Popov2018-11-282-12/+13
| | | | | | | | | | | | Always-overflow was already determined for unsigned addition, but not subtraction. This patch establishes parity. This allows us to perform some additional simplifications for signed saturating subtractions. This change is part of https://reviews.llvm.org/D54534. llvm-svn: 347771
* [InstCombine] Use known overflow information for saturating add/subNikita Popov2018-11-282-18/+52
| | | | | | | | | | | | | If ValueTracking can determine that the add/sub can newer overflow, replace it with the corresponding nuw/nsw add/sub. Additionally, for the unsigned case, if ValueTracking determines that the add/sub always overflows, replace the result with the saturation value. This change is part of https://reviews.llvm.org/D54534. llvm-svn: 347770
* [InstCombine] Canonicalize const arg for saturating addsNikita Popov2018-11-282-6/+12
| | | | | | | | | If a saturating add intrinsic has one constant argument, make sure it is on the RHS. This will simplify further transformations. This change is part of https://reviews.llvm.org/D54534. llvm-svn: 347769
* [Hexagon] Add missing flags to ELF YAMLIOKrzysztof Parzyszek2018-11-281-0/+8
| | | | llvm-svn: 347768
* [llvm-mca] Return the total number of cycles from method Pipeline::run().Andrea Di Biagio2018-11-283-5/+9
| | | | | | | | | | | | | | If a user only cares about the overall latency, then the best/quickest way is to change method Pipeline::run() so that it returns the total number of cycles to the caller. When the simulation pipeline is run, the number of cycles (or an error) is returned from method Pipeline::run(). The advantage is that no hardware event listener is needed for computing that latency. So, the whole process should be faster (and simpler - at least for that particular use case). llvm-svn: 347767
* llvm-git: More tweaks.James Y Knight2018-11-281-36/+19
| | | | | | | | | | | | On python3, use bytes for reading and applying the patch file, rather than str. This fixes encoding issues when applying patches with python3.X (reported by zturner). Also, simplify and speed up "svn update" via svn's "--parents" argument, instead of manually computing and supplying the list of parent directories to update. llvm-svn: 347766
* [libcxx] Apply _LIBCPP_INLINE_VISIBILITY for std::hash for string_viewLouis Dionne2018-11-281-9/+4
| | | | llvm-svn: 347765
* Fix DynamicLibraryTests build on Windows when ↵Michael Platings2018-11-281-0/+7
| | | | | | | | | | | | | | | | | LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON extract_symbols.py (introduced in D18826) expects all of its library arguments to be in the same directory - typically <config>/lib. DynamicLibraryLib.lib is instead to be found in lib/<config>. This patch intended to make DynamicLibraryLib.lib be created in <config>/lib alongside most of the other libraries. I previously tried passing absolute paths to extract_symbols.py but this generated command lines that were too long for Visual Studio 2015: D54587 Differential Revision: https://reviews.llvm.org/D54701 llvm-svn: 347764
* [ThinLTO] Correct linkonce_any function import linkage. NFC.Xin Tong2018-11-281-5/+6
| | | | | | | | | | | | | | Summary: This is a NFC as we do not import non-odr vague linkage when computing for import list for a module. Reviewers: tejohnson, pcc Subscribers: inglorion, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D54928 llvm-svn: 347763
* Fix build error due to missing cctype includeDavid Spickett2018-11-282-1/+1
| | | | | | in ARMTargetParser.cpp. llvm-svn: 347762
* Fix false positive with lambda assignments in cert-err58-cpp.Aaron Ballman2018-11-282-3/+29
| | | | | | This check is about preventing exceptions from being thrown before main() executes, and assigning a lambda (rather than calling it) to a global object cannot throw any exceptions. llvm-svn: 347761
* [clang-tidy] Added a test -export-fixes with relative paths.Ilya Biryukov2018-11-281-0/+19
| | | | | | | | | | | | | | Summary: A test for D51864. Reviewers: ioeric, steveire Reviewed By: steveire Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D51865 llvm-svn: 347760
* [SLP]Fix PR39774: Set ReductionRoot if the original instruction is vectorized.Alexey Bataev2018-11-282-5/+117
| | | | | | | | | | | | | | | | | | | Summary: If the original reduction root instruction was vectorized, it might be removed from the tree. It means that the insertion point may become invalidated and the whole vectorization of the reduction leads to the incorrect output result. The ReductionRoot instruction must be marked as externally used so it could not be removed. Otherwise it might cause inconsistency with the cost model and we may end up with too optimistic optimization. Reviewers: RKSimon, spatel, hfinkel, mkuper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54955 llvm-svn: 347759
* Revert r347673 "Catch up with EvaluateAsInt() clang API change."Hans Wennborg2018-11-281-5/+6
| | | | | | r347417 was re-committed in Clang. llvm-svn: 347758
* Re-commit r347419 "Update call to EvaluateAsInt() to the new syntax."Hans Wennborg2018-11-283-16/+23
| | | | llvm-svn: 347757
* Re-commit r347417 "Re-Reinstate 347294 with a fix for the failures."Hans Wennborg2018-11-2838-197/+567
| | | | | | | This was reverted in r347656 due to me thinking it caused a miscompile of Chromium. Turns out it was the Chromium code that was broken. llvm-svn: 347756
* [clangd] Fix test broken in r347754.Eric Liu2018-11-281-1/+1
| | | | llvm-svn: 347755
* [clangd] Less penalty for cross-namespace completions.Eric Liu2018-11-281-2/+2
| | | | llvm-svn: 347754
* [clangd] Build and test IndexBenchmark in check-clangdHaojian Wu2018-11-283-8/+11
| | | | | | | | | | | | | | Summary: Include IndexBenchmark in check-clangd to make sure we won't forget to update it when doing breaking changes; also fix an out-of-date test input. Reviewers: ilya-biryukov Subscribers: mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54998 llvm-svn: 347753
* [ASTImporter] Changed use of Import to Import_New in ASTImporter.Balazs Keri2018-11-282-320/+377
| | | | | | | | | | | | Reviewers: a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: gamesh411, a_sidorin, dkrupp, martong, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53818 llvm-svn: 347752
* Fix a typo.Haojian Wu2018-11-281-1/+1
| | | | llvm-svn: 347751
* Fix build error.Haojian Wu2018-11-281-15/+15
| | | | llvm-svn: 347750
* Fix -Winfinite-recursion compile error.Haojian Wu2018-11-281-1/+3
| | | | llvm-svn: 347749
* Fix build of r347741 by adding missing vectorDavid Spickett2018-11-281-0/+1
| | | | | | include to ARMTargetParser.h. llvm-svn: 347748
* [MachineScheduler] Add support for clustering mem ops with FI base operandsFrancis Visoiu Mistrih2018-11-284-26/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, the following stores in `merge_fail` would fail to be merged, while they would get merged in `merge_ok`: ``` void use(unsigned long long *); void merge_fail(unsigned key, unsigned index) { unsigned long long args[8]; args[0] = key; args[1] = index; use(args); } void merge_ok(unsigned long long *dst, unsigned a, unsigned b) { dst[0] = a; dst[1] = b; } ``` The reason is that `getMemOpBaseImmOfs` would return false for FI base operands. This adds support for this. Differential Revision: https://reviews.llvm.org/D54847 llvm-svn: 347747
* [CodeGen][NFC] Make `TII::getMemOpBaseImmOfs` return a base operandFrancis Visoiu Mistrih2018-11-2818-170/+216
| | | | | | | | | | | | | | | | | | Currently, instructions doing memory accesses through a base operand that is not a register can not be analyzed using `TII::getMemOpBaseRegImmOfs`. This means that functions such as `TII::shouldClusterMemOps` will bail out on instructions using an FI as a base instead of a register. The goal of this patch is to refactor all this to return a base operand instead of a base register. Then in a separate patch, I will add FI support to the mem op clustering in the MachineScheduler. Differential Revision: https://reviews.llvm.org/D54846 llvm-svn: 347746
* Fix a false-positive with cert-err58-cpp.Aaron Ballman2018-11-282-2/+15
| | | | | | If a variable is declared constexpr then its initializer needs to be a constant expression, and thus, cannot throw. This check is about not throwing exceptions before main() runs, and so it doesn't apply if the initializer cannot throw. This silences the diagnostic when initializing a constexpr variable and fixes PR35457. llvm-svn: 347745
* [DebugInfo] Rename EmitDebugThreadLocal back to EmitDebugValue. NFCSimon Atanasyan2018-11-285-7/+5
| | | | | | | | | This reverts r294500. DwarfCompileUnit::addAddressExpr uses DIEExpr for PCOffset. In that case the expression is unrelated to thread locals and so emitting a value of the DIEExpr does not have to always mean emit-debug-thread-local. llvm-svn: 347744
* [TableGen] Better error checking for TIED_TO constraints.Simon Tatham2018-11-2810-29/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are quite strong constraints on how you can use the TIED_TO constraint between MC operands, many of which are currently not checked until compiler run time. MachineVerifier enforces that operands can only be tied together in pairs (no three-way ties), and MachineInstr::tieOperands enforces that one of the tied operands must be an output operand (def) and the other must be an input operand (use). Now we check these at TableGen time, so that if you violate any of them in a new instruction definition, you find out immediately, instead of having to wait until you compile something that makes code generation hit one of those assertions. Also in this commit, all the error reports in ParseConstraint now include the name and source location of the def where the problem happened, so that if you do trigger any of these errors, it's easier to find the part of your TableGen input where you made the mistake. The trunk sources already build successfully with this additional error check, so I think no in-tree target has any of these problems. Reviewers: fhahn, lhames, nhaehnle, MatzeB Reviewed By: MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53815 llvm-svn: 347743
* [ELF][MIPS] Handle mips in the OUTPUT_FORMAT directiveSimon Atanasyan2018-11-282-16/+100
| | | | | | Differential Revision: http://reviews.llvm.org/D54920 llvm-svn: 347742
* [ARM, AArch64] Move ARM/AArch64 target parsers intoDavid Spickett2018-11-288-1134/+1173
| | | | | | | | | | | | | | | | | separate files to enable future changes. This moves ARM and AArch64 target parsing into their own files. They are still accessible through TargetParser.h as before. Several functions in AArch64 which were just forwarders to ARM have been removed. All except AArch64::getFPUName were unused, and that was only used in a test. Which itself was overlapping one in ARM, so it has also been removed. Differential revision: https://reviews.llvm.org/D53980 llvm-svn: 347741
* [clangd] Canonicalize file path in URIForFile.Eric Liu2018-11-2812-75/+169
| | | | | | | | | | | | | | | | | | | Summary: File paths in URIForFile can come from index or local AST. Path from index goes through URI transformation and the final path is resolved by URI scheme and could be potentially different from the original path. Hence, we should do the same transformation for all paths. We do this in URIForFile, which now converts a path to URI and back to a canonicalized path. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54845 llvm-svn: 347739
* [clangd] Fix backward-compatibility - follow-up to textDocument/SymbolInfoJan Korous2018-11-281-1/+2
| | | | | | Apparently clang 3.6 couldn't build the preceding patch. llvm-svn: 347738
* [clangd] Bump vscode-clangd v0.0.7Haojian Wu2018-11-281-1/+1
| | | | llvm-svn: 347737
* [ELF] Use more specific method to calculate DT_PLTRELSZPeter Smith2018-11-285-1/+194
| | | | | | | | | | | | | | | | | | | | The DT_PLTRELSZ dynamic tag is calculated using the size of the OutputSection containing the In.RelaPlt InputSection. This will work for the default no linker script case and the majority of linker scripts. Unfortunately it doesn't work for some 'almost' sensible linker scripts. It is permitted by ELF to have a single OutputSection containing both In.RelaDyn, In.RelaPlt and In.RelaIPlt. It is also permissible for the range of memory [DT_RELA, DT_RELA + DT_RELASZ) and the range [DT_JMPREL, DT_JMPREL + DT_JMPRELSZ) to overlap as long as the the latter range is at the end. To support this type of linker script use the specific InputSection sizes. Fixes pr39678 Differential Revision: https://reviews.llvm.org/D54759 llvm-svn: 347736
* [SystemZ::TTI] Improve cost for compare of i64 with extended i32 loadJonas Paulsson2018-11-282-8/+26
| | | | | | | | | | | | CGF/CLGF compares an i64 register with a sign/zero extended loaded i32 value in memory. This patch makes such a load considered foldable and so gets a 0 cost. Review: Ulrich Weigand https://reviews.llvm.org/D54944 llvm-svn: 347735
* [SystemZ::TTI] Improve costs for i16 add, sub and mul against memory.Jonas Paulsson2018-11-282-4/+99
| | | | | | | | | | | | | AH, SH and MH costs are already covered in the cases where LHS is 32 bits and RHS is 16 bits of memory sign-extended to i32. As these instructions are also used when LHS is i16, this patch recognizes that the loads will get folded then as well. Review: Ulrich Weigand https://reviews.llvm.org/D54940 llvm-svn: 347734
* [SystemZ::TTI] Improved cost values for comparison against memory.Jonas Paulsson2018-11-282-1/+43
| | | | | | | | | | | | | Single instructions exist for i8 and i16 comparisons of memory against a small immediate. This patch makes sure that if the load in these cases has a single user (the ICmp), it gets a 0 cost (folded), and also that the ICmp gets a cost of 1. Review: Ulrich Weigand https://reviews.llvm.org/D54897 llvm-svn: 347733
OpenPOWER on IntegriCloud