summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Fix host tools build in when LLVM_EXPERIMENTAL_TARGETS_TO_BUILD is setAlex Bradbury2017-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | r320413 triggered cmake configure failures when building with -DLLVM_OPTIMIZED_TABLEGEN=True and with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD set (e.g. to RISCV). This is because that patch moved to passing through LLVM_TARGETS_TO_BUILD, and at that point LLVM_EXPERIMENTAL_TARGETS_TO_BUILD has been merged in to it. LLVM_EXPERIMENTAL_TARGETS_TO_BUILD must be also be passed through to avoid errors like below: -- Constructing LLVMBuild project information CMake Error at CMakeLists.txt:682 (message): The target `RISCV' does not exist. It should be one of AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;Sparc;SystemZ;X86;XCore -- Configuring incomplete, errors occurred! See the thread http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171211/509225.html for discussion of this fix. llvm-svn: 320556
* [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positionsSam McCall2017-12-138-44/+102
| | | | | | | | | | | | | | | | | | | Summary: - when the diagnostic has an explicit range, we prefer that - if the diagnostic has a fixit, its RemoveRange is our next choice - otherwise we try to expand the diagnostic location into a whole token. (inspired by VSCode, which does this client-side when given an empty range) - if all else fails, we return the zero-width range as now. (clients react in different ways to this, highlighting a token or a char) - this includes the off-by-one fix from D40860, and borrows heavily from it Reviewers: rwols, hokein Subscribers: klimek, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41118 llvm-svn: 320555
* [clangd] Overload hash_value for SymbolID, fix struct/class warningSam McCall2017-12-131-3/+5
| | | | llvm-svn: 320554
* Revert "[CGP] Enable select in complex addr mode"Serguei Katkov2017-12-132-2/+2
| | | | | | | | Causes: Assertion `ScaledReg == nullptr' failed. This actually a revert of rL320551. llvm-svn: 320553
* [Targets] Don't automatically include the scheduler class enum from ↵Craig Topper2017-12-134-1/+13
| | | | | | | | | | *GenInstrInfo.inc with GET_INSTRINFO_ENUM. Make targets request is separately. Most of the targets don't need the scheduler class enum. I have an X86 scheduler model change that causes some names in the enum to become about 18000 characters long. This is because using instregex in scheduler models causes the scheduler class to get named with every instruction that matches the regex concatenated together. MSVC has a limit of 4096 characters for an identifier name. Rather than trying to come up with way to reduce the name length, I'm just going to sidestep the problem by not including the enum in X86. llvm-svn: 320552
* [CGP] Enable select in complex addr modeSerguei Katkov2017-12-132-2/+2
| | | | | | | | | | | Enable select instruction handling in complex addr modes. Reviewers: john.brawn, reames, aaboud Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40634 llvm-svn: 320551
* [XRay][compiler-rt] Reduce XRay log spamDean Michael Berris2017-12-133-2/+6
| | | | | | | | | | | | This change makes XRay print the log file output only when the verbosity level is higher than 0. It reduces the log spam in the default case when we want XRay running silently, except when there are actual fatal/serious errors. We also update the documentation to show how to get the information after the change to the default behaviour. llvm-svn: 320550
* [NFC] Refactor SafepointIRVerifierSerguei Katkov2017-12-131-236/+317
| | | | | | | | | | | | | | Now two classes are responsible for verification: one of them can track GC pointers and know whether a pointer is relocated or not and another based on that information can verify uses of GC pointers. Patch Author: Daniil Suchkov Reviewers: mkazantsev, anna, apilipenko Reviewed By: mkazantsev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40885 llvm-svn: 320549
* [SLP] Vectorize jumbled memory loads.Mohammad Shahid2017-12-138-135/+665
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch tries to vectorize loads of consecutive memory accesses, accessed in non-consecutive or jumbled way. An earlier attempt was made with patch D26905 which was reverted back due to some basic issue with representing the 'use mask' of jumbled accesses. This patch fixes the mask representation by recording the 'use mask' in the usertree entry. Change-Id: I9fe7f5045f065d84c126fa307ef6ebe0787296df Reviewers: mkuper, loladiro, Ayal, zvi, danielcdh Reviewed By: Ayal Subscribers: mgrang, dcaballe, hans, mzolotukhin Differential Revision: https://reviews.llvm.org/D36130 llvm-svn: 320548
* [CallSiteSplitting] Refactor creating callsites.Florian Hahn2017-12-132-115/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change makes the call site creation more general if any of the arguments is predicated on a condition in the call site's predecessors. If we find a callsite, that potentially can be split, we collect the set of conditions for the call site's predecessors (currently only 2 predecessors are allowed). To do that, we traverse each predecessor's predecessors as long as it only has single predecessors and record the condition, if it is relevant to the call site. For each condition, we also check if the condition is taken or not. In case it is not taken, we record the inverse predicate. We use the recorded conditions to create the new call sites and split the basic block. This has 2 benefits: (1) it is slightly easier to see what is going on (IMO) and (2) we can easily extend it to handle more complex control flow. Reviewers: davidxl, junbuml Reviewed By: junbuml Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40728 llvm-svn: 320547
* Rename LiveIntervalAnalysis.h to LiveIntervals.hMatthias Braun2017-12-1356-59/+61
| | | | | | | | | | Headers/Implementation files should be named after the class they declare/define. Also eliminated an `#include "llvm/CodeGen/LiveIntervalAnalysis.h"` in favor of `class LiveIntarvals;` llvm-svn: 320546
* Remove unnecessary includes; NFCMatthias Braun2017-12-132-4/+2
| | | | llvm-svn: 320545
* Make a test more interesting.Rafael Espindola2017-12-131-3/+9
| | | | | | Before we had no tests for the use of Repl in getSymVA. llvm-svn: 320544
* Remove unnecessary use of Repl.Rafael Espindola2017-12-131-4/+1
| | | | | | This runs before ICF, so Sec->Repl == Sec. llvm-svn: 320543
* Make a method private. NFC.Rafael Espindola2017-12-131-2/+1
| | | | llvm-svn: 320542
* [IRExecutionUnit] Initialize uninititialized member variable.Davide Italiano2017-12-131-2/+2
| | | | | | | | Found by the ubsan build. <rdar://problem/31106358> llvm-svn: 320541
* [DataEncoder] Replace buggy versions of write functions.Davide Italiano2017-12-131-36/+8
| | | | | | | | | This fixes a previously introduced thinko, now that I have a better idea of what's going on :) <rdar://problem/35941757> llvm-svn: 320540
* Fix the type of the Discared section.Rafael Espindola2017-12-132-9/+3
| | | | | | | It is constructed with a kind of Regular and will dyn_cast to InputSection, but is declared to be an InputSectionBase. llvm-svn: 320539
* [hwasan] Inline instrumentation & fixed shadow.Evgeniy Stepanov2017-12-1310-127/+531
| | | | | | | | | | | | Summary: This brings CPU overhead on bzip2 down from 5.5x to 2x. Reviewers: kcc, alekseyshl Subscribers: kubamracek, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D41137 llvm-svn: 320538
* [lldb] Set component when invoking add_llvm_install_targetsPetr Hosek2017-12-131-2/+4
| | | | | | | | | This is needed to ensure that the distribution and install-distribution targets work properly. Differential Revision: https://reviews.llvm.org/D41144 llvm-svn: 320537
* [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.Stephan T. Lavavej2017-12-133-57/+57
| | | | | | | | | | | | | | | benchmarks/util_smartptr.bench.cpp Change CRLF to LF. test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp Consistently comment "\u20ac" as EURO SIGN, its Unicode name, instead of the actual Unicode character. test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp Avoid non-ASCII dash. Fixes D40991. llvm-svn: 320536
* [libcxx] [test] Fix MSVC warnings, null pointer deref.Stephan T. Lavavej2017-12-135-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp Silence MSVC warning C4244. This is expected when passing floating-point values for size. test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp Avoid MSVC "warning C4293: '<<': shift count negative or too big, undefined behavior". MSVC sees (1ULL << N) and warns - being guarded by const bool canFit is insufficient. A small change to the code avoids the warning without the need for a pragma. Remove a spurious printf() declaration from to_ullong.pass.cpp. Change ULL to UL in to_ulong.pass.cpp. The ULL suffix was probably copy-pasted. test/std/utilities/tuple/tuple.general/ignore.pass.cpp Use LIBCPP_STATIC_ASSERT for consistency with other files. test/support/container_test_types.h Fix a null pointer dereference, found by MSVC /analyze warning C6011 "Dereferencing NULL pointer 'm_expected_args'." Fixes D41030. llvm-svn: 320535
* reverting out -r320532 because a warning is breaking the lld buildMichael Trent2017-12-137-371/+11
| | | | llvm-svn: 320534
* [Coverage] Always emit unused coverage mappings in the same order.Eli Friedman2017-12-132-14/+4
| | | | | | | | Non-determinism is confusing at best. Differential Revision: https://reviews.llvm.org/D41140 llvm-svn: 320533
* Updated llvm-objdump to display local relocations in Mach-O binariesMichael Trent2017-12-127-11/+371
| | | | | | | | | | | | | | | | | | Summary: llvm-objdump's Mach-O parser was updated in r306037 to display external relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O parser to display local relocations for MH_PRELOAD files. When used with the -macho option relocations will be displayed in a historical format. rdar://35778019 Reviewers: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41061 llvm-svn: 320532
* [libFuzzer] change the strategy for -experimental_len_control to grow ↵Kostya Serebryany2017-12-125-13/+9
| | | | | | max_len slower llvm-svn: 320531
* [EarlyCSE] add tests for commuted min/max; NFCSanjay Patel2017-12-121-25/+173
| | | | | | See PR35642: https://bugs.llvm.org/show_bug.cgi?id=35642 llvm-svn: 320530
* [Hexagon] Relax some checks in testcases, NFCKrzysztof Parzyszek2017-12-122-95/+95
| | | | llvm-svn: 320529
* [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.John Baldwin2017-12-128-2/+732
| | | | | | | | | | | This supports the soft-float ABI only and has been tested with both clang and gcc on FreeBSD. Reviewed By: sdardis, compnerd Differential Revision: https://reviews.llvm.org/D38110 llvm-svn: 320528
* [OpenMP] Add function attribute for triggering data sharing.Gheorghe-Teodor Bercea2017-12-122-3/+10
| | | | | | | | | | | | | | | | Summary: The backend should only emit data sharing code for the cases where it is needed. A new function attribute is used by Clang to enable data sharing only for the cases where OpenMP semantics require it and there are variables that need to be shared. Reviewers: hfinkel, Hahnfeld, ABataev, carlo.bertolli, caomhin Reviewed By: ABataev Subscribers: cfe-commits, jholewinski Differential Revision: https://reviews.llvm.org/D41123 llvm-svn: 320527
* Use the standard error handling mechanism in MinGW driver.Rui Ueyama2017-12-121-12/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D41127 llvm-svn: 320526
* [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.Alexey Bataev2017-12-122-4/+50
| | | | | | | | | | | | | | | | | Summary: If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1, &V2)))), bitcast)`, but the load is used in other instructions, it leads to looping in InstCombiner. Patch adds additional check that all users of the load instructions are stores and then replaces all uses of load instruction by the new one with new type. Reviewers: RKSimon, spatel, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41072 llvm-svn: 320525
* [clangd] (Attempt to) read clang-format file for document formattingRaoul Wols2017-12-123-36/+75
| | | | | | | | | | | | | | | | | Summary: Takes into account the clang-format file of the project, if any. Reverts to LLVM if nothing is found. Replies with an error if any error occured. For instance, a parse error in the clang-format YAML file. Reviewers: ilya-biryukov, sammccall, Nebiroth, malaperle, krasimir Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41031 llvm-svn: 320524
* [Hexagon] Better detection of identity and undef masks in shufflesKrzysztof Parzyszek2017-12-122-9/+21
| | | | llvm-svn: 320523
* Add an #include to appease an older clang, NFCVedant Kumar2017-12-121-0/+1
| | | | | | | Add in a missing #include that AppleClang-900 complains about when building with -DLLVM_ENABLE_MODULES. llvm-svn: 320522
* [OpenMP] Diagnose function name on the link clauseKelvin Li2017-12-125-9/+22
| | | | | | | | | | | This patch is to add diagnose when a function name is specified on the link clause. According to the OpenMP spec, only the list items that exclude the function name are allowed on the link clause. Differential Revision: https://reviews.llvm.org/D40968 llvm-svn: 320521
* Remove trailing whitespace.Rui Ueyama2017-12-1238-1068/+1068
| | | | llvm-svn: 320520
* [cmake] Follow-up to rL320494.Don Hinton2017-12-121-2/+2
| | | | | | EXISTS requires full paths. llvm-svn: 320519
* [MinGW] Don't pass -dynamicbase:no by default for arm/arm64Martin Storsjo2017-12-122-7/+9
| | | | | | | | | | | The linker refuses using -dynamicbase:no on these architectures. Stop passing -dynamicbase (which just reinforces the lld-link default) for simplicity. Differential Revision: https://reviews.llvm.org/D41052 llvm-svn: 320518
* [COFF] Disallow -dynamicbase:no for arm and arm64Martin Storsjo2017-12-123-0/+16
| | | | | | | | This matches what MSVC link.exe does. Differential Revision: https://reviews.llvm.org/D41051 llvm-svn: 320517
* [Hexagon] Fix wrong order of operands for vmuxKrzysztof Parzyszek2017-12-122-1/+16
| | | | | | | | | | | | Shuffle generation uses vmux to collapse vectors resulting from two individual shuffles into one. The indexes of the elements selected from the first operand were indicated by 0xFF in the constant vector used in the compare instruction, but the compare (veqb) set the bits corresponding to the 0x00 elements, thus inverting the selection. Reverse the order of operands to vmux to get the correct output. llvm-svn: 320516
* Reassociate: add global reassociation algorithmFiona Glaser2017-12-125-6/+137
| | | | | | | | | | | | | | | | | | | | | | | This algorithm (explained more in the source code) takes into account global redundancies by building a "pair map" to find common subexprs. The primary motivation of this is to handle situations like foo = (a * b) * c bar = (a * d) * c where we currently don't identify that "a * c" is redundant. Accordingly, it prioritizes the emission of a * c so that CSE can remove the redundant calculation later. Does not change the actual reassociation algorithm -- only the order in which the reassociated operand chain is reconstructed. Gives ~1.5% floating point math instruction count reduction on a large offline suite of graphics shaders. llvm-svn: 320515
* [msan] LIT: Add lld testing configRoman Lebedev2017-12-122-6/+26
| | | | | | | | | | | | | | | | Summary: A follow-up for D39508, with memory sanitizer changes. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: mgorny, mehdi_amini, kcc, #sanitizers, llvm-commits Tags: #sanitizers, #lld Differential Revision: https://reviews.llvm.org/D40768 llvm-svn: 320514
* Revert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load ↵Alexey Bataev2017-12-122-59/+11
| | | | | | | | bitcast." This reverts commit r320510 - again sanitizers bbots. llvm-svn: 320513
* Reapply "[X86] Flag BroadWell scheduler model as complete"Sanjoy Das2017-12-128-40/+43
| | | | | | | This reverts commit r320508, in effect re-applying r320308. Simon has already reverted the parts that caused the crash that motivated the revert in r320492. llvm-svn: 320512
* Split IndirectBr critical edges before PGO gen/use passes.Hiroshi Yamauchi2017-12-126-14/+87
| | | | | | | | | | | | | | | | | | | | | | Summary: The PGO gen/use passes currently fail with an assert failure if there's a critical edge whose source is an IndirectBr instruction and that edge needs to be instrumented. To avoid this in certain cases, split IndirectBr critical edges in the PGO gen/use passes. This works for blocks with single indirectbr predecessors, but not for those with multiple indirectbr predecessors (splitting an IndirectBr critical edge isn't always possible.) Reviewers: davidxl, xur Reviewed By: davidxl Subscribers: efriedma, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D40699 llvm-svn: 320511
* [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.Alexey Bataev2017-12-122-11/+59
| | | | | | | | | | | | | | | | | Summary: If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1, &V2)))), bitcast)`, but the load is used in other instructions, it leads to looping in InstCombiner. Patch adds additional check that all users of the load instructions are stores and then replaces all uses of load instruction by the new one with new type. Reviewers: RKSimon, spatel, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41072 llvm-svn: 320510
* [libcxx] P0604, invoke_result and is_invocableZhihao Yuan2017-12-1210-319/+407
| | | | | | | | | | | | | | | | | | | | Summary: Introduce a new form of `result_of` without function type encoding. Rename and split `is_callable/is_nothrow_callable` into `is_invocable/is_nothrow_invocable/is_invocable_r/is_nothrow_invocable_r` (and associated types accordingly) Change function type encoding of previous `is_callable/is_nothrow_callable` traits to conventional template type parameter lists. Reviewers: EricWF, mclow.lists, bebuch Reviewed By: EricWF, bebuch Subscribers: lichray, bebuch, cfe-commits Differential Revision: https://reviews.llvm.org/D38831 llvm-svn: 320509
* Revert "[X86] Flag BroadWell scheduler model as complete"Sanjoy Das2017-12-128-43/+40
| | | | | | | This reverts commit r320308. r320308 crashes LLC, please see the llvm-commits thread for a reproducer. llvm-svn: 320508
* [X86] Add a couple TODOs about missing coverage/features motivated by D40335Craig Topper2017-12-121-0/+4
| | | | | | D40335 was wanting to add FMSUBADD support, but it discovered that there are two pieces of code to make FMADDSUB and only one of those is tested. So I've asked that review to implement the one path until we get tests that test the existing code. llvm-svn: 320507
OpenPOWER on IntegriCloud