summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add cost model test for masked load an store with ↵Craig Topper2018-11-271-0/+606
| | | | | | -x86-experimental-vector-widening-legalization llvm-svn: 347696
* [X86] Add cost model tests for fp_to_int/int_to_fp with ↵Craig Topper2018-11-275-0/+1765
| | | | | | -x86-experimental-vector-widening-legalization llvm-svn: 347695
* [X86] Add cost model tests for shifts with ↵Craig Topper2018-11-273-0/+1589
| | | | | | -x86-experimental-vector-widening-legalization. llvm-svn: 347694
* [CMake] Pass full libedit path to linkerTatyana Krasnukha2018-11-272-2/+2
| | | | | | Otherwise, linker fails with "cannot find -ledit" in case of custom libedit installation. llvm-svn: 347693
* Don't speculatively emit VTTs for classes unless we are able to correctly ↵Richard Smith2018-11-272-2/+53
| | | | | | | | | | | | | | | | | | emit references to all the functions they will (directly or indirectly) reference. Summary: This fixes a miscompile where we'd emit a VTT for a class that ends up referencing an inline virtual member function that we can't actually emit a body for (because we never instantiated it in the current TU), which in a corner case of a corner case can lead to link errors. Reviewers: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D54768 llvm-svn: 347692
* [lit] Pass more environment variables through to child processes.Zachary Turner2018-11-271-10/+10
| | | | | | | | | | | | | | This arose when I was trying to have a substitution which invoked a python script P, and that python script tried to invoke clang-cl (or even cl). Since we invoke P with a custom environment, it doesn't inherit the environment of the parent, and then when we go to invoke clang-cl, it's unable to find the MSVC installation directory. There were many more I could have passed through which are set by vcvarsall, but I tried to keep it simple and only pass through the important ones. Differential Revision: https://reviews.llvm.org/D54963 llvm-svn: 347691
* Add missing error checking code intended for r347687Reid Kleckner2018-11-271-2/+4
| | | | llvm-svn: 347690
* Revert "[RISCV] Mark unit tests as "requires: riscv-registered-target""Mandeep Singh Grang2018-11-276-12/+0
| | | | | | This reverts commit 1a6a0c9ea2716378d55858c11adf5941608531f8. llvm-svn: 347689
* [RISCV] Mark unit tests as "requires: riscv-registered-target"Mandeep Singh Grang2018-11-276-0/+12
| | | | | | | | | | | | | | Summary: Some of these tests break if the RISCV backend has not been built. Reviewers: asb, apazos, sabuasal Reviewed By: sabuasal Subscribers: rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Differential Revision: https://reviews.llvm.org/D54816 llvm-svn: 347688
* [PDB] Add symbol records in bulkReid Kleckner2018-11-273-45/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This speeds up linking clang.exe/pdb with /DEBUG:GHASH by 31%, from 12.9s to 9.8s. Symbol records are typically small (16.7 bytes on average), but we processed them one at a time. CVSymbol is a relatively "large" type. It wraps an ArrayRef<uint8_t> with a kind an optional 32-bit hash, which we don't need. Before this change, each DbiModuleDescriptorBuilder would maintain an array of CVSymbols, and would write them individually with a BinaryItemStream. With this change, we now add symbols that happen to appear contiguously in bulk. For each .debug$S section (roughly one per function), we allocate two copies, one for relocation, and one for realignment purposes. For runs of symbols that go in the module stream, which is most symbols, we now add them as a single ArrayRef<uint8_t>, so the vector DbiModuleDescriptorBuilder is roughly linear in the number of .debug$S sections (O(# funcs)) instead of the number of symbol records (very large). Some stats on symbol sizes for the curious: PDB size: 507M sym bytes: 316,508,016 sym count: 18,954,971 sym byte avg: 16.7 As future work, we may be able to skip copying symbol records in the linker for realignment purposes if we make LLVM write them aligned into the object file. We need to double check that such symbol records are still compatible with link.exe, but if so, it's definitely worth doing, since my profile shows we spend 500ms in memcpy in the symbol merging code. We could potentially cut that in half by saving a copy. Alternatively, we could apply the relocations *after* we iterate the symbols. This would require some careful re-engineering of the relocation processing code, though. Reviewers: zturner, aganea, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54554 llvm-svn: 347687
* [TableGen] Preprocessing supportVyacheslav Zakharin2018-11-2727-31/+1136
| | | | | | Differential Revision: https://reviews.llvm.org/D54926 llvm-svn: 347686
* [ASTImporter] Added Import functions for transition to new API.Balazs Keri2018-11-272-32/+167
| | | | | | | | | | | | | | | | | | | | | | | Summary: These Import_New functions should be used in the ASTImporter, and the old Import functions should not be used. Later the Import_New should be renamed to Import again and the old Import functions must be removed. But this can happen only after LLDB was updated to use the new Import interface. This commit is only about introducing the new Import_New functions. These are not implemented now, only calling the old Import ones. Reviewers: shafik, rsmith, a_sidorin, a.sidorin Reviewed By: a_sidorin Subscribers: spyffe, a_sidorin, gamesh411, shafik, rsmith, dkrupp, martong, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53751 llvm-svn: 347685
* [X86] Replace an APInt that is guaranteed to be 8-bits with just an 'unsigned'Craig Topper2018-11-271-8/+8
| | | | | | | | We're already mixing this APInt with other 'unsigned' variables. This allows us to use regular comparison operators instead of needing to use APInt::ult or APInt::uge. And it removes a later conversion from APInt to unsigned. I might be adding another combine to this function and this will probably simplify the logic required for that. llvm-svn: 347684
* [PartialInliner] Make PHIs free in cost computation.Florian Hahn2018-11-272-10/+49
| | | | | | | | | | | | | | | | InlineCost also treats them as free and the current implementation can cause assertion failures if PHI nodes are moved outside the region from entry BBs to the region. It also updates the code to use the instructionsWithoutDebug iterator. Reviewers: davidxl, davide, vsk, graham-yiu-huawei Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D54748 llvm-svn: 347683
* [X86] Add -march=cascadelake support in clang.Craig Topper2018-11-275-4/+117
| | | | | | | | | | This is skylake-avx512 with the addition of avx512vnni ISA. Patch by Jianping Chen Differential Revision: https://reviews.llvm.org/D54792 llvm-svn: 347682
* [X86] Add cascade lake arch in X86 target.Craig Topper2018-11-274-0/+19
| | | | | | | | | | This is skylake-avx512 with the addition of avx512vnni ISA. Patch by Jianping Chen Differential Revision: https://reviews.llvm.org/D54785 llvm-svn: 347681
* Remove SaveAndRestore and SmallVectorImpl from lld/Common/LLVM.h. NFC.Rui Ueyama2018-11-271-17/+4
| | | | llvm-svn: 347680
* Documentation: add \file markup as needed.James Dennett2018-11-271-1/+1
| | | | | | | This makes Doxygen correctly associate the doc comment with the current file rather than adding to the documentation for namespace llvm. llvm-svn: 347679
* Make a member function non-member. NFC.Rui Ueyama2018-11-271-8/+4
| | | | llvm-svn: 347678
* Fix linker option for -fprofile-arcs -ftest-coverageMarco Castelluccio2018-11-272-1/+5
| | | | | | | | | | | | | | | | Summary: Linux toolchain accidentally added "-u__llvm_runtime_variable" when "-fprofile-arcs -ftest-coverage", this is not added when "--coverage" option is used. Using "-u__llvm_runtime_variable" generates an empty default.profraw file while an application built with "-fprofile-arcs -ftest-coverage" is running. Reviewers: calixte, marco-c, sylvestre.ledru Reviewed By: marco-c Subscribers: vsk, cfe-commits Differential Revision: https://reviews.llvm.org/D54195 llvm-svn: 347677
* Revert "[clang] - Simplify tools::SplitDebugName."Jonas Toth2018-11-275-9/+20
| | | | | | | | This reverts commit r347035 as it introduced assertion failures under certain conditions. More information can be found here: https://reviews.llvm.org/rL347035 llvm-svn: 347676
* [clangd] textDocument/SymbolInfo extensionJan Korous2018-11-2711-0/+504
| | | | | | | | | | New method returning symbol info for given source position. Differential Revision: https://reviews.llvm.org/D54799 rdar://problem/46050281 llvm-svn: 347675
* [clangd][NFC] Move SymbolID to a separate fileJan Korous2018-11-276-77/+126
| | | | | | | | Prerequisity for textDocument/SymbolInfo Differential Revision: https://reviews.llvm.org/D54799 llvm-svn: 347674
* Catch up with EvaluateAsInt() clang API change.Davide Italiano2018-11-271-6/+5
| | | | llvm-svn: 347673
* Implement P1085R2 - Should Span be Regular?. This consists entirely of deletionsMarshall Clow2018-11-278-996/+2
| | | | llvm-svn: 347672
* [clang-tidy] Ignore bool -> single bit bitfield conversion in ↵Malcolm Parsons2018-11-273-6/+26
| | | | | | | | | | | | | | | | readability-implicit-bool-conversion Summary: There is no ambiguity / information loss in this conversion Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D54941 llvm-svn: 347671
* [Demangle] remove itaniumFindTypesInMangledNamePavel Labath2018-11-276-61/+0
| | | | | | | | | | | | | | | | Summary: This (very specialized) function was added to enable an LLDB use case. Now that a more generic interface (overriding of parser functions - D52992) is available, and LLDB has been converted to use that (D54074), the function is unused and can be removed. Reviewers: erik.pilkington, sgraenitz, rsmith Subscribers: mgorny, hiraditya, christof, libcxx-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54893 llvm-svn: 347670
* [clangd] Put direct headers into srcs section.Kadir Cetinkaya2018-11-279-62/+148
| | | | | | | | | | | | | | | | | | | Summary: Currently, there's no way of knowing about header files using compilation database, since it doesn't contain header files as entries. Using this information, restoring from cache using compile commands becomes possible instead of doing directory traversal. Also, we can issue indexing actions for out-of-date headers even if source files depending on them haven't changed. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54817 llvm-svn: 347669
* travis: Add cmake buildJan Vesely2018-11-271-1/+89
| | | | | | | Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 347668
* Add cmake build systemJan Vesely2018-11-2710-0/+501
| | | | | | | | | | | | | | Add cmake support for CLC and ll asm language, the latter includes clang preprocessing stage. Add ctests to check for external function calls. v2: fix typos, style Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> Acked-by: Vedran Miletić <vedran@miletic.net> llvm-svn: 347667
* r600: Remove empty OVERRIDES fileJan Vesely2018-11-271-0/+0
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347666
* amdgcn: Consolidate atomic minmax helpersJan Vesely2018-11-2711-57/+4
| | | | | | | | Removes most overrides Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347665
* configure: Add target specific asm rule.Jan Vesely2018-11-271-1/+3
| | | | | | | | Run the file through target specific preprocessing stage. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347664
* configure: provide llvm_as helper variableJan Vesely2018-11-271-2/+2
| | | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewer: Aaron Watry llvm-svn: 347663
* [llvm-mca] pass -dispatch-stats flag to a couple of tests. NFCAndrea Di Biagio2018-11-272-2/+202
| | | | | | | | | | | | | | | | This change is in preparation for a patch that fixes PR36666. llvm-mca currently doesn't know if a buffered processor resource describes a load or store queue. So, any dynamic dispatch stall caused by the lack of load/store queue entries is normally reported as a generic SCHEDULER stall. See for example the -dispatch-stats output from the two tests modified by this patch. In future, processor models will be able to tag processor resources that are used to describe load/store queues. That information would then be used by llvm-mca to correctly classify dynamic dispatch stalls caused by the lack of tokens in the LS. llvm-svn: 347662
* [x86] regenerate checks; NFCSanjay Patel2018-11-271-13/+14
| | | | llvm-svn: 347661
* Move time cast to SymbolFileDWARFDebugMapJonas Devlieghere2018-11-273-23/+12
| | | | | | | | | When trying to fix the bots we expected that the cast would be needed in different places. Ultimately it turned out only the SymbolFileDWARFDebugMap was affected so, as Pavel correctly notes, it makes more sense to do the cast just there instead of in teh FS. llvm-svn: 347660
* [AMDGPU] Disable DAG combine at -O0Stanislav Mekhanoshin2018-11-273-61/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D54358 llvm-svn: 347659
* Derive builtin return type from its definitionMarco Antognini2018-11-274-32/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this patch, OpenCL code such as the following would attempt to create a BranchInst with a non-bool argument: if (enqueue_kernel(get_default_queue(), 0, nd, ^(void){})) /* ... */ This patch is a follow up on a similar issue with pipe builtin operations. See commit r280800 and https://bugs.llvm.org/show_bug.cgi?id=30219. This change, while being conservative on non-builtin functions, should set the type of expressions invoking builtins to the proper type, instead of defaulting to `bool` and requiring manual overrides in Sema::CheckBuiltinFunctionCall. In addition to tests for enqueue_kernel, the tests are extended to check other OpenCL builtins. Reviewers: Anastasia, spatel, rsmith Reviewed By: Anastasia Subscribers: kristina, cfe-commits, svenvh Differential Revision: https://reviews.llvm.org/D52879 llvm-svn: 347658
* Revert r347419 "Update call to EvaluateAsInt() to the new syntax."Hans Wennborg2018-11-273-23/+16
| | | | | | It's pre-requisite was reverted in r347656. llvm-svn: 347657
* Revert r347417 "Re-Reinstate 347294 with a fix for the failures."Hans Wennborg2018-11-2738-567/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a miscompile in Chrome (see crbug.com/908372) that's illustrated by this small reduction: static bool f(int *a, int *b) { return !__builtin_constant_p(b - a) || (!(b - a)); } int arr[] = {1,2,3}; bool g() { return f(arr, arr + 3); } $ clang -O2 -S -emit-llvm a.cc -o - g() should return true, but after r347417 it became false for some reason. This also reverts the follow-up commits. r347417: > Re-Reinstate 347294 with a fix for the failures. > > Don't try to emit a scalar expression for a non-scalar argument to > __builtin_constant_p(). > > Third time's a charm! r347446: > The result of is.constant() is unsigned. r347480: > A __builtin_constant_p() returns 0 with a function type. r347512: > isEvaluatable() implies a constant context. > > Assume that we're in a constant context if we're asking if the expression can > be compiled into a constant initializer. This fixes the issue where a > __builtin_constant_p() in a compound literal was diagnosed as not being > constant, even though it's always possible to convert the builtin into a > constant. r347531: > A "constexpr" is evaluated in a constant context. Make sure this is reflected > if a __builtin_constant_p() is a part of a constexpr. llvm-svn: 347656
* [clangd] Prevent thread starvation in tests on loaded systems.Sam McCall2018-11-274-3/+20
| | | | | | | | | | | | | | Summary: Background index deliberately runs low-priority, but for tests this may stop them making progress. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D54938 llvm-svn: 347655
* [libclang] Fix clang_Cursor_getNumArguments and clang_Cursor_getArgument for ↵Ivan Donchevskii2018-11-272-0/+13
| | | | | | | | | | | CXXConstructExpr Constructors have the same methods for arguments as call expressions. Let's provide a way to get their arguments the same way. Differential Revision: https://reviews.llvm.org/D54934 llvm-svn: 347654
* InstCombine: add comment explaining malloc deletion. NFC.Tim Northover2018-11-271-3/+10
| | | | | | | | I tried to change this, not quite realising the logic behind what we were doing. Hopefully this comment will help the next person to come along. llvm-svn: 347653
* [clang-tidy] Avoid inconsistent notes in readability-container-size-emptyAlexander Kornienko2018-11-272-2/+15
| | | | | | | | | When a warning is issued in a template instantiation, the check would previously use template arguments in a note, which would result in inconsistent or duplicate warnings (depending on how deduplication was done). This patch removes template arguments from the note. llvm-svn: 347652
* [clang-tidy] Minor fixes in a testAlexander Kornienko2018-11-271-8/+8
| | | | | | | Use CHECK-FIXES where it was intended instead of CHECK-MESSAGES. Fixed compiler warnings to pacify YouCompleteMe. llvm-svn: 347651
* [ELF] - Fix R_AARCH64_ADR_GOT_PAGE, R_AARCH64_LD64_GOT_LO12 handling against ↵George Rimar2018-11-274-4/+77
| | | | | | | | | | | | | | | | | | | | IFUNC symbols. This is https://bugs.llvm.org/show_bug.cgi?id=38074. The issue is that when calling a function, LLD generates a .got entry that points to the IFUNC resolver function when instead, it should use the PLT entries properly for handling the IFUNC. So we should create a got entry that points to PLT entry, which itself loads the value from .got.plt, relocated with R_*_IRELATIVE to make things work. Patch do that. Differential revision: https://reviews.llvm.org/D54314 llvm-svn: 347650
* [AArch64] Cortex-a53-843419 erratum should not apply to relaxed TLS.Peter Smith2018-11-272-4/+46
| | | | | | | | | | | | | | | | The changes to the instructions performed by TLS relaxation and the errata patching are performed with relocations. As these are applied so late the errata scanning won't see the changes in the section data made by the TLS relaxation. This can lead to a TLS relaxed sequence being patched when it doesn't need to be. The fix checks to see if there is a R_RELAX_TLS_IE_TO_LE instruction at the same address as the ADRP as this indicates the presence of a relaxation of a sequence that might get recognised as a patch. Differential Revision: https://reviews.llvm.org/D54854 llvm-svn: 347649
* [ASTImporter] Typedef import brings in the complete typeGabor Marton2018-11-272-2/+41
| | | | | | | | | | | | | | | | | | | | | Summary: When we already have an incomplete underlying type of a typedef in the "To" context, and the "From" context has the same typedef, but the underlying type is complete, then the imported type should be complete. Fixes an assertion in CTU analysis of Xerces: Assertion `DD && "queried property of class with no definition"' failed. This assert is happening in the analyzer engine, because that attempts to query an underlying type of a typedef, which happens to be incomplete. Reviewers: a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53693 llvm-svn: 347648
* [ELF] - Implement -z nodefaultlibGeorge Rimar2018-11-275-5/+13
| | | | | | | | | | | | | | | | | | | | This is https://bugs.llvm.org//show_bug.cgi?id=38978 Spec says that: "Objects may be built with the -z nodefaultlib option to suppress any search of the default locations at runtime. Use of this option implies that all the dependencies of an object can be located using its runpaths. Without this option, which is the most common case, no matter how you augment the runtime linker's library search path, its last element is always /usr/lib for 32-bit objects and /usr/lib/64 for 64-bit objects." The patch implements this option. Differential revision: https://reviews.llvm.org/D54577 llvm-svn: 347647
OpenPOWER on IntegriCloud