Commit Graph

308677 Commits

Author SHA1 Message Date
Matt Arsenault 045bc9a4a6 GlobalISel: Support narrowScalar for uneven loads
llvm-svn: 352594
2019-01-30 02:35:38 +00:00
Richard Smith 018ab5fa6f Simplify and modernize this code a little.
No functionality change intended.

llvm-svn: 352593
2019-01-30 02:23:34 +00:00
Thomas Lively 079816efb7 [WebAssembly] Optimize BUILD_VECTOR lowering for size
Summary:
Implements custom lowering logic that finds the optimal value for the
initial splat of the vector and either uses it or uses v128.const if
it is available and if it would produce smaller code. This logic
replaces large TableGen ISEL patterns that would lower all non-splat
BUILD_VECTORs into a splat followed by a fixed number of replace_lane
instructions. This CL fixes PR39685.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D56633

llvm-svn: 352592
2019-01-30 02:23:29 +00:00
Matt Arsenault ccefbbd0f0 GlobalISel: Handle some odd splits in fewerElementsVector
Also add some quick hacks to AMDGPU legality for the tests.

llvm-svn: 352591
2019-01-30 02:22:13 +00:00
Nico Weber 48dc110eea lld/coff: Implement some support for the comdat selection field
LLD used to handle comdats as if the selection field was always set to
IMAGE_COMDAT_SELECT_ANY. This means for obj files produced by `cl /Gy`, LLD
would never report a duplicate symbol error.

This change:
- adds validation for the Selection field (should make no difference in
  practice for compiler-generated obj inputs)
- rejects comdats that have different Selection fields in different obj files
  (likewise). This is a bit more strict but also more self-consistent thank
  link.exe (see comment in code)
- implements handling for all the selection kinds

In practice, compilers only generate comdats with
IMAGE_COMDAT_SELECT_NODUPLICATES (LLD now produces duplicate symbol errors for
these), IMAGE_COMDAT_SELECT_ANY (no behavior change), and
IMAGE_COMDAT_SELECT_LARGEST (for RTTI data; here LLD should no longer create
broken executables when linking some TUs with RTTI enabled and some with it
disabled – but see below).

The implementation of `IMAGE_COMDAT_SELECT_LARGEST` is incomplete: If one
SELECT_LARGEST comdat replaces an earlier one, the comdat symbol is replaced
correctly, but the old section stays loaded and if /opt:ref is disabled (via
/opt:noref or /debug) it's still written to the output. That's not ideal, but
better than the current treatment of just picking any one of those comdats. I
hope to fix this better later.

Fixes most of PR40094.

Differential Revision: https://reviews.llvm.org/D57324

llvm-svn: 352590
2019-01-30 02:17:27 +00:00
Nico Weber bdcefcb241 lld-link: Add test I forgot to add in 332012
Differential Revision: https://reviews.llvm.org/D46693

llvm-svn: 352589
2019-01-30 02:15:08 +00:00
George Karpenkov 77eae6d4c4 [analyzer] [RetainCountChecker] Bugfix for tracking top-level parameters of Objective-C methods
Differential Revision: https://reviews.llvm.org/D57433

llvm-svn: 352588
2019-01-30 02:11:04 +00:00
Sam Clegg fc37198df1 Add enum values to CodeGenOpt::Level
The absolute values of this enum are important at least in that
they get printed by SelectionDAGISel. e.g:
  `Before: -O2 ; After: -O0`

Differential Revision: https://reviews.llvm.org/D57430

llvm-svn: 352587
2019-01-30 02:08:34 +00:00
Petr Hosek 1a1418bfcb [CMake][Fuchsia] Re-enable iOS runtimes for Fuchsia standard
Turned out this is used by Flutter which uses Fuchsia Clang toolchain.

Differential Revision: https://reviews.llvm.org/D57432

llvm-svn: 352586
2019-01-30 02:06:06 +00:00
Matt Arsenault 92c5001136 GlobalISel: Handle more cases for widenScalar for G_STORE
llvm-svn: 352585
2019-01-30 02:04:31 +00:00
Petr Hosek eb6b5ece58 [CMake][Fuchsia] Enable hermetic static libunwind for Fuchsia
In addition to libc++abi and libc++, we also want to use hermetic
static libunwind on Fuchsia.

Differential Revision: https://reviews.llvm.org/D57431

llvm-svn: 352584
2019-01-30 02:02:25 +00:00
Chen Zheng ca26039cc7 [PowerPC] more opportunity for converting reg+reg to reg+imm
Differential Revision: https://reviews.llvm.org/D57314

llvm-svn: 352583
2019-01-30 01:57:01 +00:00
Matt Arsenault 4a4d7a7be8 Add 8.0 release bug to merge request script
llvm-svn: 352579
2019-01-30 01:10:47 +00:00
Matt Arsenault ccb810fb54 GlobalISel: Verify memory size for load/store
llvm-svn: 352578
2019-01-30 01:10:42 +00:00
Kostya Serebryany 3a94519a77 [libFuzzer] update a test
llvm-svn: 352577
2019-01-30 00:36:28 +00:00
George Burgess IV 179f6baa45 Remove a redundant space from an error message; NFC
llvm-svn: 352576
2019-01-30 00:28:56 +00:00
Sam Clegg e320cea5b9 [WebAssembly] Fix undefined weak function symbols in LTO builds
Summary: Fixes PR40219

Subscribers: dschuff, mehdi_amini, inglorion, jgravelle-google, aheejin, sunfish, steven_wu, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D57420

llvm-svn: 352575
2019-01-30 00:25:52 +00:00
Aaron Puchert a15f5d0e4c Fix thread safety tests after r352549
llvm-svn: 352574
2019-01-30 00:18:24 +00:00
Sam Clegg c7d2e5f154 [WebAssembly] Add missing SymbolRef update from rL352551
This change broke some MC tests which are now fixed.

Differential Revision: https://reviews.llvm.org/D57424

llvm-svn: 352573
2019-01-30 00:15:48 +00:00
Artem Dergachev 2a5fb1252e [analyzer] NFC: GenericTaintChecker: Revise rule specification mechanisms.
Provide a more powerful and at the same time more readable way of specifying
taint propagation rules for known functions within the checker.

Now it should be possible to specify an unlimited amount of source and
destination parameters for taint propagation.

No functional change intended just yet.

Patch by Gábor Borsik!

Differential Revision: https://reviews.llvm.org/D55734

llvm-svn: 352572
2019-01-30 00:06:43 +00:00
Kostya Serebryany 2891b257c2 [libFuzzer] remove stale code
llvm-svn: 352571
2019-01-29 23:53:28 +00:00
Jonas Devlieghere 61d35249b1 Add FileCollector + test to Xcode project.
llvm-svn: 352570
2019-01-29 23:48:53 +00:00
Thomas Lively 74c12ceacb [WebAssembly] Lower SCALAR_TO_VECTOR to splats
Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish

Differential Revision: https://reviews.llvm.org/D57269

llvm-svn: 352568
2019-01-29 23:44:48 +00:00
Kostya Serebryany 035c08f73d [libFuzzer] revert an accidental commit
llvm-svn: 352567
2019-01-29 23:41:50 +00:00
Kostya Serebryany 62d7270610 [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard]
llvm-svn: 352566
2019-01-29 23:40:05 +00:00
Matt Arsenault 3de9a96174 GlobalISel: Fix unused variable warning in release builds
llvm-svn: 352565
2019-01-29 23:38:42 +00:00
Kostya Serebryany 50a1c69712 [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard]
llvm-svn: 352564
2019-01-29 23:37:20 +00:00
Craig Topper 0b5e6b11c3 [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
2019-01-29 23:31:54 +00:00
Matt Arsenault d45b03bb81 GlobalISel: Verify pointer casts
Not sure if the old AArch64 tests should be just
deleted or not.

llvm-svn: 352562
2019-01-29 23:29:00 +00:00
Thomas Anderson 7f50dfa6fc [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
2019-01-29 23:19:45 +00:00
Matt Arsenault d8d193d5e2 GlobalISel: Partially implement widenScalar for MERGE_VALUES
llvm-svn: 352560
2019-01-29 23:17:35 +00:00
Petr Hosek 3cfc55cf9c [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
2019-01-29 23:01:08 +00:00
Stephen Kelly aecce85da6 NFC: Move GenericSelectionExpr dump to NodeDumper
Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D56961

llvm-svn: 352558
2019-01-29 22:58:28 +00:00
Zachary Turner 52f8f34377 Fix some warnings in building LLDB.
Differential Revision: https://reviews.llvm.org/D57413

llvm-svn: 352557
2019-01-29 22:55:21 +00:00
Jonas Devlieghere 7d2192ca7b [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
2019-01-29 22:53:47 +00:00
Alina Sbirlea f9027e554a 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
2019-01-29 22:33:20 +00:00
Sam Clegg 37b4ee523b [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
2019-01-29 22:26:31 +00:00
Petr Hosek 7fac51724f 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
2019-01-29 22:26:18 +00:00
Stephen Kelly fbf40f4500 NFC: Implement GenericSelectionExpr::Association dump with Visitor
Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D56960

llvm-svn: 352552
2019-01-29 22:22:55 +00:00
Sam Clegg 2a193e0d12 [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
2019-01-29 22:22:32 +00:00
Shoaib Meenai ed2ebf82e7 [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
2019-01-29 22:17:51 +00:00
Aaron Puchert ffa1d6ad17 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
2019-01-29 22:11:42 +00:00
Adrian Prantl d55102a190 Make a blind attempt at fixing PDBASTParser nullability issues
llvm-svn: 352548
2019-01-29 21:46:34 +00:00
Amara Emerson 102c9ed768 [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
2019-01-29 21:19:33 +00:00
Matt Arsenault a4c33ecd78 OpenCL: Try to fix bot test failure
llvm-svn: 352544
2019-01-29 21:14:56 +00:00
Alexey Bataev c2cdff6ffa [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
2019-01-29 21:12:28 +00:00
Paul Robinson 33c9d9a9fc [cc1as] Test that -g of empty .s file does something sensible.
Depends on LLVM r352541.

llvm-svn: 352542
2019-01-29 20:57:50 +00:00
Paul Robinson 4ca29477d9 [DWARF] Emit reasonable debug info for empty .s files.
llvm-svn: 352541
2019-01-29 20:53:51 +00:00
Matt Arsenault 58fc8082a8 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
2019-01-29 20:49:54 +00:00
Matt Arsenault 297afb14ec 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
2019-01-29 20:49:47 +00:00