Kostya Serebryany [Tue, 29 Jan 2019 23:37:20 +0000 (23:37 +0000)]
[libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard]
llvm-svn: 352564
Craig Topper [Tue, 29 Jan 2019 23:31:54 +0000 (23:31 +0000)]
[IR] Use CallBase to reduce code duplication. NFC
Noticed in the asm-goto patch. Callbr needs to go here too. One cast and call is better than 3.
Differential Revision: https://reviews.llvm.org/D57295
llvm-svn: 352563
Matt Arsenault [Tue, 29 Jan 2019 23:29:00 +0000 (23:29 +0000)]
GlobalISel: Verify pointer casts
Not sure if the old AArch64 tests should be just
deleted or not.
llvm-svn: 352562
Thomas Anderson [Tue, 29 Jan 2019 23:19:45 +0000 (23:19 +0000)]
[libc++] Fix Windows build error in <functional>
On my Windows system, __allocator is defined to nothing. This change fixes build errors of the below form:
In file included from algorithm:644:
functional(1492,31): error: expected member name or ';' after declaration specifiers
const _Alloc& __allocator() const { return __f_.second(); }
Differential Revision: https://reviews.llvm.org/D57355
llvm-svn: 352561
Matt Arsenault [Tue, 29 Jan 2019 23:17:35 +0000 (23:17 +0000)]
GlobalISel: Partially implement widenScalar for MERGE_VALUES
llvm-svn: 352560
Petr Hosek [Tue, 29 Jan 2019 23:01:08 +0000 (23:01 +0000)]
[libunwind] Support building hermetic static library
This is useful when the static libunwind library is being linked into
shared libraries that may be used in with other shared libraries that
use different unwinder. We want to avoid avoid exporting libunwind
symbols in those cases. This achieved by a new CMake option which can be
enabled by libunwind vendors as needed.
The same CMake option has already been added to libc++ and libc++abi in
D55404 and D56026.
Differential Revision: https://reviews.llvm.org/D57107
llvm-svn: 352559
Stephen Kelly [Tue, 29 Jan 2019 22:58:28 +0000 (22:58 +0000)]
NFC: Move GenericSelectionExpr dump to NodeDumper
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56961
llvm-svn: 352558
Zachary Turner [Tue, 29 Jan 2019 22:55:21 +0000 (22:55 +0000)]
Fix some warnings in building LLDB.
Differential Revision: https://reviews.llvm.org/D57413
llvm-svn: 352557
Jonas Devlieghere [Tue, 29 Jan 2019 22:53:47 +0000 (22:53 +0000)]
[test] Use correct macro in FileCollectorTest.cpp
This test was supposed to be skipped on Windows but was using the wrong
macro name.
llvm-svn: 352556
Alina Sbirlea [Tue, 29 Jan 2019 22:33:20 +0000 (22:33 +0000)]
Check bool attribute value in getOptionalBoolLoopAttribute.
Summary:
Check the bool value of the attribute in getOptionalBoolLoopAttribute
not just its existance.
Eliminates the warning noise generated when vectorization is explicitly disabled.
Reviewers: Meinersbur, hfinkel, dmgreen
Subscribers: jlebar, sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D57260
llvm-svn: 352555
Sam Clegg [Tue, 29 Jan 2019 22:26:31 +0000 (22:26 +0000)]
[WebAssembly] Don't load weak undefined symbols from archive files
Summary: Fixes PR40494
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D57370
llvm-svn: 352554
Petr Hosek [Tue, 29 Jan 2019 22:26:18 +0000 (22:26 +0000)]
Drop the dependency on <algorithm>, add placement new inline
We haven't eliminated C++ library dependency altogether in D57251,
UnwindCursor.hpp had an unused dependency on <algorithm> which was
pulling in other C++ headers. Removing that dependency also revealed
(correctly) that we need our own global placement new declaration. Now
libunwind should be independent of the C++ library.
Differential Revision: https://reviews.llvm.org/D57262
llvm-svn: 352553
Stephen Kelly [Tue, 29 Jan 2019 22:22:55 +0000 (22:22 +0000)]
NFC: Implement GenericSelectionExpr::Association dump with Visitor
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56960
llvm-svn: 352552
Sam Clegg [Tue, 29 Jan 2019 22:22:32 +0000 (22:22 +0000)]
[WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null
Store a non-zero value to ref.d.a and use ref.d.b to store the symbol
index. This means that ref.p is never null, which was confusing
llvm-nm.
Fixes PR40497
Differential Revision: https://reviews.llvm.org/D57373
llvm-svn: 352551
Shoaib Meenai [Tue, 29 Jan 2019 22:17:51 +0000 (22:17 +0000)]
[docs] Prevent O0 optnone for opt input
If we just compile with -O0, clang will add optnone attributes
everywhere, so opt won't actually be able to perform any passes.
Instruct clang to not emit the optnone so opt can do its thing.
Differential Revision: https://reviews.llvm.org/D56950
llvm-svn: 352550
Aaron Puchert [Tue, 29 Jan 2019 22:11:42 +0000 (22:11 +0000)]
Thread safety analysis: Improve diagnostics for double locking
Summary:
We use the existing diag::note_locked_here to tell the user where we saw
the first locking.
Reviewers: aaron.ballman, delesley
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56967
llvm-svn: 352549
Adrian Prantl [Tue, 29 Jan 2019 21:46:34 +0000 (21:46 +0000)]
Make a blind attempt at fixing PDBASTParser nullability issues
llvm-svn: 352548
Amara Emerson [Tue, 29 Jan 2019 21:19:33 +0000 (21:19 +0000)]
[AArch64][GlobalISel] Unmerge into scalars from a vector should use FPR bank.
This currently shows up as a selection fallback since the dest regs were given
GPR banks but the source was a vector FPR reg.
Differential Revision: https://reviews.llvm.org/D57408
llvm-svn: 352545
Matt Arsenault [Tue, 29 Jan 2019 21:14:56 +0000 (21:14 +0000)]
OpenCL: Try to fix bot test failure
llvm-svn: 352544
Alexey Bataev [Tue, 29 Jan 2019 21:12:28 +0000 (21:12 +0000)]
[OPENMP]Fix PR40513: lastprivate taskloop counter.
We don't need to use the predetermined data-sharing attributes for the
loop counters if the user explicitly specified correct data-sharing
attributes for such variables.
llvm-svn: 352543
Paul Robinson [Tue, 29 Jan 2019 20:57:50 +0000 (20:57 +0000)]
[cc1as] Test that -g of empty .s file does something sensible.
Depends on LLVM r352541.
llvm-svn: 352542
Paul Robinson [Tue, 29 Jan 2019 20:53:51 +0000 (20:53 +0000)]
[DWARF] Emit reasonable debug info for empty .s files.
llvm-svn: 352541
Matt Arsenault [Tue, 29 Jan 2019 20:49:54 +0000 (20:49 +0000)]
OpenCL: Use length modifier for warning on vector printf arguments
Re-enable format string warnings on printf.
The warnings are still incomplete. Apparently it is undefined to use a
vector specifier without a length modifier, which is not currently
warned on. Additionally, type warnings appear to not be working with
the hh modifier, and aren't warning on all of the special restrictions
from c99 printf.
llvm-svn: 352540
Matt Arsenault [Tue, 29 Jan 2019 20:49:47 +0000 (20:49 +0000)]
Revert "OpenCL: Extend argument promotion rules to vector types"
This reverts r348083. This was based on a misreading of the spec
for printf specifiers.
Also revert r343653, as without a subsequent patch, a correctly
specified format for a vector will incorrectly warn.
Fixes bug 40491.
llvm-svn: 352539
Jonas Devlieghere [Tue, 29 Jan 2019 20:36:38 +0000 (20:36 +0000)]
[Reproducers] Add file provider
This patch adds the file provider which is responsible for capturing
files used by LLDB.
When capturing a reproducer, we use a file collector that is very
similar to the one used in clang. For every file that we touch, we add
an entry with a mapping from its virtual to its real path. When we
decide to generate a reproducer we copy over the files and their
permission into to reproducer folder.
When replaying a reproducer, we load the VFS mapping and instantiate a
RedirectingFileSystem. The latter will transparently use the files
available in the reproducer.
I've tested this on two macOS machines with an artificial example.
Still, it is very likely that I missed some places where we (still) use
native file system calls. I'm hoping to flesh those out while testing
with more advanced examples. However, I will fix those things in
separate patches.
Differential revision: https://reviews.llvm.org/D54617
llvm-svn: 352538
Steven Wu [Tue, 29 Jan 2019 20:13:02 +0000 (20:13 +0000)]
Fix the tests from r350970
Relax the tests from r350970 to allow non-standard path for ld.
llvm-svn: 352537
Sanjay Patel [Tue, 29 Jan 2019 20:02:45 +0000 (20:02 +0000)]
[InstCombine] canonicalize cmp/select form of uadd saturate with constant
I'm circling back around to a loose end from D51929.
The backend (either CGP or DAG) doesn't recognize this pattern, so we end up with different asm for these IR variants.
Regardless of any future changes to canonicalize to saturation/overflow intrinsics, we want to get raw IR variations
into the minimal number of raw IR forms. If/when we can canonicalize to intrinsics, that will make that step easier.
Pre: C2 == ~C1
%a = add i32 %x, C1
%c = icmp ugt i32 %x, C2
%r = select i1 %c, i32 -1, i32 %a
=>
%a = add i32 %x, C1
%c2 = icmp ult i32 %x, C2
%r = select i1 %c2, i32 %a, i32 -1
https://rise4fun.com/Alive/pkH
Differential Revision: https://reviews.llvm.org/D57352
llvm-svn: 352536
James Y Knight [Tue, 29 Jan 2019 19:33:48 +0000 (19:33 +0000)]
Fix the behavior of clang's -w flag.
It is intended to disable _all_ warnings, even those upgraded to
errors via `-Werror=warningname` or `#pragma clang diagnostic error'
Fixes: https://llvm.org/PR38231
Differential Revision: https://reviews.llvm.org/D53199
llvm-svn: 352535
George Karpenkov [Tue, 29 Jan 2019 19:29:59 +0000 (19:29 +0000)]
[analyzer] [RetainCountChecker] Track input parameters to the top-level function
Track them for ISL/OS objects by default, and for NS/CF under a flag.
rdar://
47536377
Differential Revision: https://reviews.llvm.org/D57356
llvm-svn: 352534
George Karpenkov [Tue, 29 Jan 2019 19:29:45 +0000 (19:29 +0000)]
[analyzer] [RetainSummaryManager] [NFC] Split one function into two, as it's really doing two things
Differential Revision: https://reviews.llvm.org/D57201
llvm-svn: 352533
George Karpenkov [Tue, 29 Jan 2019 19:29:33 +0000 (19:29 +0000)]
[analyzer] [ARCMT] [NFC] Unify entry point into RetainSummaryManager
Just use one single entry point, since we have AnyCall utility now.
Differential Revision: https://reviews.llvm.org/D57346
llvm-svn: 352532
George Karpenkov [Tue, 29 Jan 2019 19:29:19 +0000 (19:29 +0000)]
Extend AnyCall to handle callable declarations without the call expressions
That weakens inner invariants, but allows the class to be more generic,
allowing usage in situations where the call expression is not known (or
should not matter).
Differential Revision: https://reviews.llvm.org/D57344
llvm-svn: 352531
George Karpenkov [Tue, 29 Jan 2019 19:29:07 +0000 (19:29 +0000)]
[analyzer] [RetainCountChecker] Support 'taggedRetain' and 'taggedRelease'
Differential Revision: https://reviews.llvm.org/D57211
llvm-svn: 352530
Martin Storsjo [Tue, 29 Jan 2019 19:24:32 +0000 (19:24 +0000)]
[MinGW] Don't define names for ignored options. NFC.
Move them to the same section as the newly added ignored options
without a defined name.
Also move options that actually weren't ignored to the right section.
Differential Revision: https://reviews.llvm.org/D57374
llvm-svn: 352529
Sanjay Patel [Tue, 29 Jan 2019 19:13:39 +0000 (19:13 +0000)]
[DAGCombiner] fold extract_subvector of extract_subvector
This is the sibling fold for insert-of-insert that was added with D56604.
Now that we have x86 shuffle narrowing (D57156), this change shows improvements for
lots of AVX512 reduction code (not sure that we would ever expect extract-of-extract otherwise).
There's a small regression in some of the partial-permute tests (extracting followed by splat).
That is tracked by PR40500:
https://bugs.llvm.org/show_bug.cgi?id=40500
Differential Revision: https://reviews.llvm.org/D57336
llvm-svn: 352528
Michael J. Spencer [Tue, 29 Jan 2019 19:07:15 +0000 (19:07 +0000)]
[VFS] Fix warning and use better check.
llvm-svn: 352527
Alexey Bataev [Tue, 29 Jan 2019 18:51:58 +0000 (18:51 +0000)]
[OPENMP]Make the loop with unsigned counter countable.
According to the report, better to keep the original strict compare
operation as the loop condition with unsigned loop counters to make the
loop countable. This allows further loop transformations.
llvm-svn: 352526
Thomas Anderson [Tue, 29 Jan 2019 18:48:35 +0000 (18:48 +0000)]
[libc++] Fix Windows build error in include/filesystem
_LIBCPP_FUNC_VIS is redundant since the class is already annotated with
_LIBCPP_EXCEPTION_ABI.
Fixes this build error:
In file included from fstream:188:
filesystem(1350,3): error: attribute 'dllimport' cannot be applied to member of 'dllimport' class
_LIBCPP_FUNC_VIS
__config(674,37): note: expanded from macro '_LIBCPP_FUNC_VIS'
#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
__config(666,38): note: expanded from macro '_LIBCPP_DLL_VIS'
# define _LIBCPP_DLL_VIS __declspec(dllimport)
filesystem(1313,7): note: previous attribute is here
class _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
__config(675,37): note: expanded from macro '_LIBCPP_EXCEPTION_ABI'
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
__config(666,38): note: expanded from macro '_LIBCPP_DLL_VIS'
# define _LIBCPP_DLL_VIS __declspec(dllimport)
Differential Revision: https://reviews.llvm.org/D57354
llvm-svn: 352525
Sterling Augustine [Tue, 29 Jan 2019 18:27:51 +0000 (18:27 +0000)]
Rollback unwindlib patch.
llvm-svn: 352524
Matt Arsenault [Tue, 29 Jan 2019 18:13:02 +0000 (18:13 +0000)]
GlobalISel: Fix narrowScalar for load/store with different mem size
This was ignoring the memory size, and producing multiple loads/stores
if the operand size was different from the memory size.
I assume this is the intent of not having an explicit G_ANYEXTLOAD
(although I think that would probably be better).
llvm-svn: 352523
Eric Fiselier [Tue, 29 Jan 2019 18:01:14 +0000 (18:01 +0000)]
Fix PR40495 - is_invokable_v<void> does not compile
The meta-programming that attempted to form the invoke call expression
was not in a SFINAE context. This made it a hard error to provide
non-referencable types like 'void' or 'void (...) const'.
This patch fixes the error by checking the validity of the call
expression within a SFINAE context.
llvm-svn: 352522
Adrian Prantl [Tue, 29 Jan 2019 17:52:34 +0000 (17:52 +0000)]
Make Type::GetByteSize optional (NFC)
This is a continuation of my quest to make the size 0 a supported value.
This reapplies r352394 with additional PDB parser fixes prepared by
Pavel Labath!
Differential Revision: https://reviews.llvm.org/D57273
llvm-svn: 352521
Sanjay Patel [Tue, 29 Jan 2019 17:00:47 +0000 (17:00 +0000)]
[x86] add tests for vector bool math; NFC
llvm-svn: 352520
Sanjay Patel [Tue, 29 Jan 2019 17:00:07 +0000 (17:00 +0000)]
[AArch64] add tests for vector bool math; NFC
llvm-svn: 352519
Andrea Di Biagio [Tue, 29 Jan 2019 16:47:27 +0000 (16:47 +0000)]
[X86][Btver2] Improved latency/throughput model for scalar int-to-float conversions.
Account for bypass delays when computing the latency of scalar int-to-float
conversions.
On Jaguar we need to account for an extra 6cy latency (see AMD fam16h SOG).
This patch also fixes the number of micropcodes for the register-memory variants
of scalar int-to-float conversions.
Differential Revision: https://reviews.llvm.org/D57148
llvm-svn: 352518
Sanjay Patel [Tue, 29 Jan 2019 16:44:05 +0000 (16:44 +0000)]
[InstCombine] regenerate test checks; NFC
llvm-svn: 352517
James Y Knight [Tue, 29 Jan 2019 16:43:16 +0000 (16:43 +0000)]
Add .clang-tidy and .clang-format files to the toplevel of the
repository (the same content as those in llvm/ and clang/).
llvm-svn: 352516
Sanjay Patel [Tue, 29 Jan 2019 16:39:23 +0000 (16:39 +0000)]
[InstCombine] add tests for ext-of-bool + add/sub; NFC
We should choose one of these as canonical:
%z = zext i1 %cmp to i32
%r = sub i32 %x, %z
=>
%s = sext i1 %cmp to i32
%r = add i32 %x, %s
The test comments assume that the zext form is better,
but we can adjust that if we decide to go the other way.
llvm-svn: 352515
James Y Knight [Tue, 29 Jan 2019 16:37:27 +0000 (16:37 +0000)]
Adjust documentation for git migration.
This fixes most references to the paths:
llvm.org/svn/
llvm.org/git/
llvm.org/viewvc/
github.com/llvm-mirror/
github.com/llvm-project/
reviews.llvm.org/diffusion/
to instead point to https://github.com/llvm/llvm-project.
This is *not* a trivial substitution, because additionally, all the
checkout instructions had to be migrated to instruct users on how to
use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of
checking out various projects into various subdirectories.
I've attempted to not change any scripts here, only documentation. The
scripts will have to be addressed separately.
Additionally, I've deleted one document which appeared to be outdated
and unneeded:
lldb/docs/building-with-debug-llvm.txt
Differential Revision: https://reviews.llvm.org/D57330
llvm-svn: 352514
Louis Dionne [Tue, 29 Jan 2019 16:30:11 +0000 (16:30 +0000)]
[NFC] Add missing revision for removal of bad_array_length in ABI changelog
llvm-svn: 352513
Marshall Clow [Tue, 29 Jan 2019 16:12:45 +0000 (16:12 +0000)]
Mark some of the behavior in the move w/allocator constructors of deque/unordered containers as 'libc++-specific'. Thanks to Andrey Maksimov for pointing this out.
llvm-svn: 352512
Ilya Biryukov [Tue, 29 Jan 2019 16:04:39 +0000 (16:04 +0000)]
[clangd] Remove extra ';' to fix -Wpedantic warning. NFC
llvm-svn: 352511
Ilya Biryukov [Tue, 29 Jan 2019 15:57:14 +0000 (15:57 +0000)]
[clangd] Attempt to fix failing buildbots after r352494
For failures see:
http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/38501/steps/build-unified-tree/logs/stdio
llvm-svn: 352510
Ilya Biryukov [Tue, 29 Jan 2019 15:52:05 +0000 (15:52 +0000)]
[clangd] Make -clang-tidy-checks a non-hidden command-line arg
Summary:
This looks like a useful user-facing configuration parameter,
which should be discoverable.
Also fix a small typo in the description.
Reviewers: hokein
Reviewed By: hokein
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D57384
llvm-svn: 352509
Nico Weber [Tue, 29 Jan 2019 15:50:31 +0000 (15:50 +0000)]
lld-link: Allow backward references between associated comdats
References between associated comdats are invalid per COFF spec, but the newest
Windows SDK contains obj files that have these references
(https://bugs.chromium.org/p/chromium/issues/detail?id=925943#c13). So add back
support for them and add tests for them. The old code handled them fine.
This makes lld-link match the behavior of newer link.exe versions as far as I
can tell. (The behavior before this change matched the behavior of older
link.exe versions.)
This mostly reverts r352254.
Differential Revision: https://reviews.llvm.org/D57387
llvm-svn: 352508
Pavel Labath [Tue, 29 Jan 2019 15:39:27 +0000 (15:39 +0000)]
BreakpadRecords: Add parsing code for FILE and LINE records
The two records aren't used by anything yet, but this part can be
separated out easily, so I am comitting it separately to simplify
reviews of the followup patch.
llvm-svn: 352507
Nirav Dave [Tue, 29 Jan 2019 15:14:07 +0000 (15:14 +0000)]
[SelectionDAGBuilder] Remove redundant variable. NFCI.
llvm-svn: 352506
Jordan Rupprecht [Tue, 29 Jan 2019 15:05:38 +0000 (15:05 +0000)]
[llvm-objcopy] Implement --set-section-flags.
Summary:
--set-section-flags is used to change the section flags (e.g. SHF_ALLOC) for given sections. The flags allowed are the same from the existing --rename-section=.old=.new[,flags] feature.
Additionally, make sure that --set-section-flag cannot be used with --rename-section (either the source or destination), since --rename-section accepts flags. This avoids ambiguity for something like "--rename-section=.foo=.bar,alloc --set-section-flag=.bar,code".
Reviewers: jhenderson, jakehehrlich, alexshap, espindola
Reviewed By: jhenderson, jakehehrlich
Subscribers: llvm-commits, emaste, arichardson
Differential Revision: https://reviews.llvm.org/D57198
llvm-svn: 352505
Ayonam Ray [Tue, 29 Jan 2019 15:00:50 +0000 (15:00 +0000)]
Reversing the checkin for version 352484 as tests are failing.
llvm-svn: 352504
Eric Liu [Tue, 29 Jan 2019 14:40:01 +0000 (14:40 +0000)]
[Tooling] Handle #pragma once header guard in include insertion.
Reviewers: ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D57223
llvm-svn: 352503
Nico Weber [Tue, 29 Jan 2019 14:39:54 +0000 (14:39 +0000)]
gn build: Merge r352444, r352431, r352430
llvm-svn: 352502
Ilya Biryukov [Tue, 29 Jan 2019 14:31:19 +0000 (14:31 +0000)]
[clangd] Unit test for sourceLocationInMainFile.
This should have been part of r352494, which added the corresponding
function. The unit test ended up as a separate commit accidentally.
llvm-svn: 352501
Neil Henning [Tue, 29 Jan 2019 14:28:17 +0000 (14:28 +0000)]
[AMDGPU] Fix a weird WWM intrinsic issue.
I found a really strange WWM issue through a very convoluted shader that
essentially boils down to a bug in SIInstrInfo where canReadVGPR did not
correctly identify that WWM is like a copy and can have a VGPR as its
source.
Differential Revision: https://reviews.llvm.org/D56002
llvm-svn: 352500
Fangrui Song [Tue, 29 Jan 2019 14:24:35 +0000 (14:24 +0000)]
[ELF] Simplify. NFC
llvm-svn: 352499
Ilya Biryukov [Tue, 29 Jan 2019 14:17:36 +0000 (14:17 +0000)]
[clangd] Interfaces for writing code tweaks
Summary:
The code tweaks are an implementation of mini-refactorings exposed
via the LSP code actions. They run in two stages:
- Stage 1. Decides whether the action is available to the user and
collects all the information required to finish the action.
Should be cheap, since this will run over all the actions known to
clangd on each textDocument/codeAction request from the client.
- Stage 2. Uses information from stage 1 to produce the actual edits
that the code action should perform. This stage can be expensive and
will only run if the user chooses to perform the specified action in
the UI.
One unfortunate consequence of this change is increased latency of
processing the textDocument/codeAction requests, which now wait for an
AST. However, we cannot avoid this with what we have available in the LSP
today.
Reviewers: kadircet, ioeric, hokein, sammccall
Reviewed By: sammccall
Subscribers: mgrang, mgorny, MaskRay, jkorous, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D56267
llvm-svn: 352494
Hans Wennborg [Tue, 29 Jan 2019 13:43:22 +0000 (13:43 +0000)]
Revert r351833 and r352250.
They were breaking the Windows build when using MSBuild, see the
discussion on D56781.
r351833: "Use response file when generating LLVM-C.dll"
> Use response file when generating LLVM-C.dll
>
> As discovered in D56774 the command line gets to long, so use a response file to give the script the libs. This change has been tested and is confirmed working for me.
>
> Commited on behalf of Jakob Bornecrantz
>
> Differential Revision: https://reviews.llvm.org/D56781
r352250: "Build LLVM-C.dll by default on windows and enable in release package"
> Build LLVM-C.dll by default on windows and enable in release package
>
> With the fixes to the building of LLVM-C.dll in D56781 this should now
> be safe to land. This will greatly simplify dealing with LLVM for people
> that just want to use the C API on windows. This is a follow up from
> D35077.
>
> Patch by Jakob Bornecrantz!
>
> Differential revision: https://reviews.llvm.org/D56774
llvm-svn: 352492
Yaxun Liu [Tue, 29 Jan 2019 13:20:23 +0000 (13:20 +0000)]
[CUDA][HIP] Do not diagnose use of _Float16
r352221 caused regressions in CUDA/HIP since device function may use _Float16 whereas host does not support it.
In this case host compilation should not diagnose usage of _Float16 in device functions or variables.
For now just do not diagnose _Float16 for CUDA/HIP. In the future we should have more precise check.
Differential Revision: https://reviews.llvm.org/D57369
llvm-svn: 352488
Jeremy Morse [Tue, 29 Jan 2019 13:06:17 +0000 (13:06 +0000)]
Add 'REQUIRES: zlib' to a fuzzer test
Fixes tests on build environments that don't have zlib. See also r352483.
llvm-svn: 352487
Bruno Ricci [Tue, 29 Jan 2019 12:57:11 +0000 (12:57 +0000)]
Re-commit "[AST] Introduce GenericSelectionExpr::Association"
This time with a fix to make gcc 4.8 happy.
llvm-svn: 352486
Haojian Wu [Tue, 29 Jan 2019 12:32:32 +0000 (12:32 +0000)]
[clangd] dlog clang-tidy configuration
vlog seems to be too spammy in unittests.
llvm-svn: 352485
Ayonam Ray [Tue, 29 Jan 2019 12:01:32 +0000 (12:01 +0000)]
[CodeGen] Omit range checks from jump tables when lowering switches with unreachable default
During the lowering of a switch that would result in the generation of a
jump table, a range check is performed before indexing into the jump
table, for the switch value being outside the jump table range and a
conditional branch is inserted to jump to the default block. In case the
default block is unreachable, this conditional jump can be omitted. This
patch implements omitting this conditional branch for unreachable
defaults.
Review ID: D52002
Reviewers: Hans Wennborg, Eli Freidman, Roman Lebedev
llvm-svn: 352484
Jeremy Morse [Tue, 29 Jan 2019 12:00:01 +0000 (12:00 +0000)]
Add zlib feature test to lit configuration
Some new tests in libfuzzer have dependencies on zlib: add a feature test
for zlib so that we can add a REQUIRES field to the relevant tests.
Patch by Matthew Voss.
Differential Revision: https://reviews.llvm.org/D57366
llvm-svn: 352483
George Rimar [Tue, 29 Jan 2019 11:46:00 +0000 (11:46 +0000)]
[ELF] - Remove dead `readBfdName` declaration. NFC.
`readBfdName` was removed recently.
llvm-svn: 352482
Kadir Cetinkaya [Tue, 29 Jan 2019 11:19:15 +0000 (11:19 +0000)]
[clangd] Make USRs for macros to be position independent
Summary:
USRs for macros were not cannonical due to usage of cursor location
instead of definition location.
Reviewers: jkorous
Subscribers: ilya-biryukov, ioeric, MaskRay, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D57228
llvm-svn: 352481
Simon Pilgrim [Tue, 29 Jan 2019 10:58:42 +0000 (10:58 +0000)]
[X86] Add PR40483 test case
llvm-svn: 352480
Dan Gohman [Tue, 29 Jan 2019 10:53:42 +0000 (10:53 +0000)]
[WebAssembly] Re-enable main-function signature rewriting
Re-enable the code to rewrite main-function signatures into
"int main(int argc, char *argv[])", but limited to only handling
the case of "int main(void)", so that it doesn't silently strip
an argument in the "int main(int argc, char *argv[], char *envp[])"
case.
This allows main to be called by C startup code, since WebAssembly
requires caller and callee signatures to match, so it can't rely
on passing main a different number of arguments than it expects.
Differential Revision: https://reviews.llvm.org/D57323
llvm-svn: 352479
Aleksandr Urakov [Tue, 29 Jan 2019 10:46:28 +0000 (10:46 +0000)]
[NativePDB] Fix lldb-x64-windows-ninja after r352464
llvm-svn: 352478
James Henderson [Tue, 29 Jan 2019 10:43:48 +0000 (10:43 +0000)]
[llvm-symbolizer][doc] Tweak wording of --adjust-vma switch description
The address isn't dynamically relocated. The object is.
llvm-svn: 352477
Simon Pilgrim [Tue, 29 Jan 2019 10:41:48 +0000 (10:41 +0000)]
[X86] Fix linux32 pic tests to use correct relocation model (PR39684)
Differential Revision: https://reviews.llvm.org/D57301
llvm-svn: 352476
David Green [Tue, 29 Jan 2019 10:40:31 +0000 (10:40 +0000)]
[ARM] Use sub for negative offset load/store in thumb1
This attempts to optimise negative values used in load/store operands
a little. We currently try to selct them as rr, materialising the
negative constant using a MOV/MVN pair. This instead selects ri with
an immediate of 0, forcing the add node to become a simpler sub.
Differential Revision: https://reviews.llvm.org/D57121
llvm-svn: 352475
Simon Pilgrim [Tue, 29 Jan 2019 10:39:02 +0000 (10:39 +0000)]
[X86] Regenerate abi-isel.ll test
Adds note requested in D57301 and fixes some missing GOTPCREL addressmath checks
llvm-svn: 352474
Gabor Horvath [Tue, 29 Jan 2019 10:27:14 +0000 (10:27 +0000)]
[analyzer] Toning down invalidation a bit
When a function takes the address of a field the analyzer will no longer
assume that the function will change other fields of the enclosing structs.
Differential Revision: https://reviews.llvm.org/D57230
llvm-svn: 352473
David Green [Tue, 29 Jan 2019 10:25:56 +0000 (10:25 +0000)]
[ARM] Add extra testcases for D57121. NFC
llvm-svn: 352472
Jeremy Morse [Tue, 29 Jan 2019 10:23:43 +0000 (10:23 +0000)]
Remove 'XFAIL: powerpc64' from a debuginfo test
This test started XPASSing with r352467, and the change in behaviour
performed by that patch does appear to fix the cause of the original XFAIL
(missing FrameIndex DBG_VALUE), which I've replicated locally with
-mtriple=powerpc64--.
I'll write this up in PR21881 which documents the XFAIL, and seek
confirmation I haven't overlooked something here.
llvm-svn: 352471
Gabor Horvath [Tue, 29 Jan 2019 10:21:49 +0000 (10:21 +0000)]
[analyzer] Added a checklist to help checker authors and reviewers
Differential Revision: https://reviews.llvm.org/D52984
llvm-svn: 352470
Bjorn Pettersson [Tue, 29 Jan 2019 10:19:44 +0000 (10:19 +0000)]
[IPCP] Don't crash due to arg count/type mismatch between caller/callee
Summary:
This patch avoids an assert in IPConstantPropagation when
there is a argument count/type mismatch between the caller and
the callee.
While this is actually UB on C-level (clang emits a warning),
the IR verifier seems to accept it. I'm not sure what other
frontends/languages might think about this, so simply bailing out
to avoid hitting an assert (in CallSiteBase<>::getArgOperand or
Value::doRAUW) seems like a simple solution.
The problem is exposed by the fact that AbstractCallSites will look
through a bitcast at the callee position of a call/invoke.
Reviewers: jdoerfert, reames, efriedma
Reviewed By: jdoerfert, efriedma
Subscribers: eli.friedman, efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D57052
llvm-svn: 352469
Gabor Horvath [Tue, 29 Jan 2019 10:15:52 +0000 (10:15 +0000)]
[analyzer] Fix a typo in docs
llvm-svn: 352468
Jeremy Morse [Tue, 29 Jan 2019 09:40:05 +0000 (09:40 +0000)]
[DebugInfo][DAG] Process FrameIndex dbg.values unconditionally
A FrameIndex should be valid throughout a block regardless of what instructions
get selected in that block -- therefore we shouldn't harness dbg.values that
refer to FrameIndexes to an SDNode. There are numerous codegen reasons why
an SDNode never appears or doesn't become a location that a DBG_VALUE can
refer to. None of them actually affect the variable location.
Therefore, before any other tests to encode dbg_values in a SelectionDAG,
identify FrameIndex operands and encode them unattached to any SDNode.
Differential Revision: https://reviews.llvm.org/D57328
llvm-svn: 352467
Max Kazantsev [Tue, 29 Jan 2019 09:39:15 +0000 (09:39 +0000)]
[NFC] Use ArrayRef instead of SmallVectorImpl where possible
llvm-svn: 352466
Martin Storsjo [Tue, 29 Jan 2019 09:36:48 +0000 (09:36 +0000)]
[COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32
Windows ARM64 has PIC relocation model and uses jump table kind
EK_LabelDifference32. This produces jump table entry as
".word LBB123 - LJTI1_2" which represents the distance between the block
and jump table.
A new relocation type (IMAGE_REL_ARM64_REL32) is needed to do the fixup
correctly if they are in different COFF section.
This change saves the jump table to the same COFF section as the
associated code. An ideal fix could be utilizing IMAGE_REL_ARM64_REL32
relocation type.
Patch by Tom Tan!
Differential Revision: https://reviews.llvm.org/D57277
llvm-svn: 352465
Aleksandr Urakov [Tue, 29 Jan 2019 09:32:23 +0000 (09:32 +0000)]
[NativePDB] Add basic support of methods recostruction in AST
Summary:
This patch adds the basic support of methods reconstruction by native PDB
plugin. It contains only most obvious changes (it processes LF_ONEMETHOD and
LF_METHOD records), some things still remain unsolved:
- mangled names retrieving;
- support of template methods.
Reviewers: zturner, labath, lemo, stella.stamenova
Reviewed by: zturner
Differential Revision: https://reviews.llvm.org/D56126
llvm-svn: 352464
Sam Parker [Tue, 29 Jan 2019 09:04:03 +0000 (09:04 +0000)]
[AArch64] Update int64_t ACLE builtin arguments
Re-applying r351740 with fixes (changing LL to W).
Differential Revision: https://reviews.llvm.org/D56852
llvm-svn: 352463
Jonas Paulsson [Tue, 29 Jan 2019 09:03:35 +0000 (09:03 +0000)]
[CodeGenPrepare] Handle all debug calls in dupRetToEnableTailCallOpts()
This patch makes sure that a debug value that is after the bitcast in
dupRetToEnableTailCallOpts() is also skipped.
The reduced test case is from SPEC-2006 on SystemZ.
Review: Vedant Kumar, Wolfgang Pieb
https://reviews.llvm.org/D57050
llvm-svn: 352462
Martin Storsjo [Tue, 29 Jan 2019 09:00:32 +0000 (09:00 +0000)]
Don't define unw_fpreg_t to uint64_t for __ARM_DWARF_EH__
The existing typedef of unw_fpreg_t to uint64_t might work and be
correct for the ARM_EHABI case, but for dwarf, some cases in e.g.
DwarfInstructions.hpp convert between double and unw_fpreg_t.
When converting implicitly between double and unw_fpreg_t (uint64_t),
the values get interpreted as integers and converted to float and vice
versa, while the correct thing would be to keep the same bit pattern.
Avoid the whole issue by using the same definition of unw_fpreg_t
as all other architectures, when using dwarf unwinding on ARM.
Change assembler functions to take a void pointer instead of
unw_fpreg_t pointer, to avoid having a different mangled symbol name
depending on the actual value of this typedef.
Differential Revision: https://reviews.llvm.org/D57001
llvm-svn: 352461
Jeremy Morse [Tue, 29 Jan 2019 08:41:44 +0000 (08:41 +0000)]
Fix an incorrectly configured test.
This should have had a target triple in it, my mistake.
llvm-svn: 352460
Martin Storsjo [Tue, 29 Jan 2019 08:38:48 +0000 (08:38 +0000)]
[MinGW] Ignore the --plugin and --plugin-opt option
GCC can use LLD with -fuse-ld=lld for MinGW these days, but by
default these options are passed to the linker (unless -fno-lto
is passed to the GCC driver).
Differential Revision: https://reviews.llvm.org/D57304
llvm-svn: 352459
Mikael Holmen [Tue, 29 Jan 2019 06:53:31 +0000 (06:53 +0000)]
Remove unused variable to silence compiler warning
llvm-svn: 352456
Mikael Holmen [Tue, 29 Jan 2019 06:51:28 +0000 (06:51 +0000)]
Fix compiler warning when using clang 3.6.0
Without the fix we get the following (with -Werror):
../lib/Target/X86/X86ISelLowering.cpp:14181:58: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
SmallVector<std::array<int, 2>, 2> LaneSrcs(NumLanes, {-1, -1});
^~~~~~
{ }
1 error generated.
llvm-svn: 352455
Philip Reames [Tue, 29 Jan 2019 06:40:02 +0000 (06:40 +0000)]
Correct contents for r352453
I had a local change I hadn't realized when submitting that auto-update. As such, the auto-update was wrong. This should fix it, and with that, it's clearly time to stop submitting changes and go to bed.
llvm-svn: 352454
Philip Reames [Tue, 29 Jan 2019 06:34:46 +0000 (06:34 +0000)]
[Tests] Regen to remove future test diffs
This file appears to have been manually editted at some point after being auto-updated. A future change adjusts this file slightly, and all of the updates makes the diff super confusing.
llvm-svn: 352453