Commit Graph

315458 Commits

Author SHA1 Message Date
Jonathan Peyton 71abe28e81 [OpenMP] Add OpenMP 5.0 nonmonotonic code
This patch adds:
* New omp_sched_monotonic flag to omp_sched_t which is handled within the runtime
* Parsing of monotonic/nonmonotonic in OMP_SCHEDULE
* Tests for the monotonic flag and envirable parsing
* Logic to force monotonic when hierarchical scheduling is used

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

llvm-svn: 359601
2019-04-30 19:20:35 +00:00
Dan Gohman 3a7532e645 [WebAssembly] Support f16 libcalls
Add support for f16 libcalls in WebAssembly. This entails adding signatures
for the remaining F16 libcalls, and renaming gnu_f2h_ieee/gnu_h2f_ieee to
truncsfhf2/extendhfsf2 for consistency between f32 and f64/f128 (compiler-rt
already supports this).

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

Reviewer: dschuff
llvm-svn: 359600
2019-04-30 19:17:59 +00:00
Jonathan Peyton 1ca746170b [OpenMP] Eliminate some compiler warnings
* Remove accidental == for =
* Assign values to variables to appease compiler
* Surround debug code with KMP_DEBUG
* Remove unused local typedefs

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

llvm-svn: 359599
2019-04-30 19:13:37 +00:00
Yaxun Liu 9e67d129f0 Add requires amdgpu-registered-target for amdgpu-float16.cpp
llvm-svn: 359598
2019-04-30 19:06:15 +00:00
Craig Topper cad318014e [X86] Remove if that's always true
It's been like this since it was added in a refactor of this code.

Fixes PR41659

llvm-svn: 359597
2019-04-30 19:02:15 +00:00
Eric Fiselier 71aa67506b Support overaligned types in `aligned_storage`.
Summary:
The current implementation of aligned storage was written before we had `alignas`, so it used a list of builtin types to force the alignment. But this doesn't work overaligned requests.

This patch adds a fallback case supporting over-alignment. It only affects case that were previously ill-formed.

Reviewers: rsmith, ldionne, dlj, mclow.lists

Reviewed By: mclow.lists

Subscribers: mclow.lists, dexonsmith, libcxx-commits

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

llvm-svn: 359596
2019-04-30 18:44:45 +00:00
Evandro Menezes ea349f3ef5 [SimplifyLibCalls] Clean up code (NFC)
Fix pointer check after dereferencing (PR41665).

llvm-svn: 359595
2019-04-30 18:35:38 +00:00
Yaxun Liu 4469701207 AMDGPU: Enable _Float16
llvm-svn: 359594
2019-04-30 18:35:37 +00:00
Jonas Devlieghere 4e6fd3ba91 Add CxxModuleHandler to Xcode project
llvm-svn: 359593
2019-04-30 18:21:14 +00:00
Sanjay Patel 3ec1c51716 [AArch64] add more tests for constant folding failures; NFC
llvm-svn: 359592
2019-04-30 18:15:18 +00:00
Petr Hosek 999bb5ac27 Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation"
Clang relies on existence of certain symbols that are normally
provided by crtbegin.o/crtend.o. However, LLVM does not currently
provide implementation of these files, instead relying on either
libgcc or implementations provided as part of the system.

This change provides an initial implementation of crtbegin.o/crtend.o
that can be used on system that don't provide crtbegin.o/crtend.o as
part of their C library.

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

llvm-svn: 359591
2019-04-30 18:13:22 +00:00
Jonathan Metzman 7a2ce3790b fix broken test
llvm-svn: 359590
2019-04-30 17:58:59 +00:00
Jonathan Metzman 17bd74d406 remove extra zeros
llvm-svn: 359589
2019-04-30 17:58:58 +00:00
Jonathan Metzman 5a271cd758 remove stale comment
llvm-svn: 359588
2019-04-30 17:58:58 +00:00
Jonathan Metzman d61084901c change order
llvm-svn: 359587
2019-04-30 17:58:57 +00:00
Jonathan Metzman 1fbc6116e1 fix comment
llvm-svn: 359586
2019-04-30 17:58:57 +00:00
Jonathan Metzman 2697664582 [libFuzzer] Enable for i386
Summary: Get libFuzzer to build on i386 and fix tests.

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359585
2019-04-30 17:58:56 +00:00
Jonathan Metzman 6fa864b7a6 Fix issues with testing for i386
llvm-svn: 359584
2019-04-30 17:58:55 +00:00
Jonathan Metzman f721230831 Enable x86 builds
llvm-svn: 359583
2019-04-30 17:58:54 +00:00
Craig Topper 3958719dda [X86] If PreprocessISelDAG reorders a load before a call, make sure we remove dead nodes from the graph
The reordering can leave at least a dead TokenFactor in the graph. This cause the linearize scheduler to fail with something like the assert seen in PR22614. This is only one of many ways we can break the linearize scheduler today so I can't say for sure that any of the other failures in that bug were caused by this issue.

This takes the heavy hammer approach of just running RemoveDeadNodes unconditionally at the end of the PreprocessISelDAG. If this turns out to be a compile time hit, we can try to refine it.

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

llvm-svn: 359582
2019-04-30 17:56:47 +00:00
Craig Topper 965d1306ae [X86] Initial cleanups on the FixupLEAs pass. Separate Atom LEA creation from other LEA optimizations.
This removes some of the class variables. Merge basic block processing into
runOnMachineFunction to keep the flags local.

Pass MachineBasicBlock around instead of an iterator. We can get the iterator in
the few places that need it. Allows a range-based outer for loop.

Separate the Atom optimization from the rest of the optimizations. This allows
fixupIncDec to create INC/DEC and still allow Atom to turn it back into LEA
when profitable by its heuristics.

I'd like to improve fixupIncDec to turn LEAs into ADD any time the base or index
register is equal to the destination register. This is profitable regardless of
the various slow flags. But again we would want Atom to be able to undo that.

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

llvm-svn: 359581
2019-04-30 17:56:28 +00:00
Nico Weber 98ca8da55e Re-reland "[Option] Fix PR37006 prefix choice in findNearest"
This was first reviewed in https://reviews.llvm.org/D46776 and
landed in r332299, but got reverted because it broke the PS4
bots.

https://reviews.llvm.org/D50410 fixed this, and then this
change was re-reviewed at https://reviews.llvm.org/D50515 and
relanded in r341329. It got reverted due to causing MSan issues.
However, nobody wrote down the error message and the bot link
is dead, so I'm relanding this to capture the MSan error.
I'll then either fix it, or copy it somewhere and revert if
fixing looks difficult.

llvm-svn: 359580
2019-04-30 17:46:00 +00:00
Petr Hosek 9300f60c8c Revert "[compiler-rt] Simple crtbegin.o and crtend.o implementation"
This reverts commit r359576 since it's failing on Windows bots.

llvm-svn: 359579
2019-04-30 17:32:05 +00:00
Yitzhak Mandelbaum a5dadbe1aa [LibTooling] Fix broken test after r359574.
r359574 changed the way that failures are reported, which broke the test TransformerTest.NodePartNameDeclRefFailure which detects a faiure.

llvm-svn: 359578
2019-04-30 17:24:36 +00:00
Jonas Devlieghere 2795490b1a Sort Symbol/CMakeLists.txt
This makes resolving merge conflicts downstream a tad easier.

llvm-svn: 359577
2019-04-30 17:22:29 +00:00
Petr Hosek c8be6e670e [compiler-rt] Simple crtbegin.o and crtend.o implementation
Clang relies on existence of certain symbols that are normally
provided by crtbegin.o/crtend.o. However, LLVM does not currently
provide implementation of these files, instead relying on either
libgcc or implementations provided as part of the system.

This change provides an initial implementation of crtbegin.o/crtend.o
that can be used on system that don't provide crtbegin.o/crtend.o as
part of their C library.

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

llvm-svn: 359576
2019-04-30 17:21:13 +00:00
Jonas Devlieghere 9fa970a27b XFAIL x86-64-zmm-read on Darwin
llvm-svn: 359575
2019-04-30 17:21:05 +00:00
Yitzhak Mandelbaum aecc59c5f9 [LibTooling] Change Transformer's TextGenerator to a partial function.
Summary:
Changes the signature of the TextGenerator std::function to return an Expected<std::string>
instead of std::string to allow for (non-fatal) failures.  Previously, we
expected that any failures would be expressed with assertions. However, that's
unfriendly to running the code in servers or other places that don't want their
library calls to crash the program.

Correspondingly, updates Transformer's handling of failures in TextGenerators
and the signature of `ChangeConsumer`.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 359574
2019-04-30 16:48:33 +00:00
Stella Stamenova be323ef571 Un-xfail the TestMiniDump tests on Windows
After Aaron's commit for ObjectFilePECOFF:: GetUUID, the tests are now passing

llvm-svn: 359573
2019-04-30 16:42:39 +00:00
Michal Gorny d14a0de9ad [lldb] [Process/NetBSD] Fix handling piod_len from PT_IO calls
Fix bugs in piod_len return value processing in ReadMemory()
and WriteMemory() methods.  In particular, add support for piod_len == 0
indicating EOF, and fix summing bytes_read/bytes_written when PT_IO does
partial reads/writes.

The EOF condition could happen if LLDB attempts to read past
vm.maxaddress, e.g. as a result of RBP containing large (invalid) value.
Previously, the 0 return caused the function to retry reading via PT_IO
indefinitely, effectively deadlooping lldb-server.

Partial reads probably did not occur in practice, yet they would cause
ReadMemory() to return incorrect bytes_read and/or overwrite previously
read data.

WriteMemory() suffered from analoguous problems.

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

llvm-svn: 359572
2019-04-30 16:30:32 +00:00
Louis Dionne 68924e6be7 [libc++][CMake] Refactor how we link against system libraries
Summary:
Instead of populating the global LIBCXX_LIBRARIES, we use the link-time
dependency management built into CMake to propagate link flags. This
leads to a cleaner and easier-to-follow build.

Reviewers: phosek, smeenai, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, mstorsjo, libcxx-commits

Tags: #libc

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

llvm-svn: 359571
2019-04-30 15:44:19 +00:00
Nico Weber 2e78c5a883 gn build: Add check-clangd target after r3359424
r359527 already merged some of that to the GN build,
but it was missing some bits as well.

The check-clangd target works (at least for now) differently than all
the other check-foo targets, see https://reviews.llvm.org/D61187

For that reason, there's no gni file and the generated lit configs are
not (yet?) added to llvm-lit/BUILD.gn.

llvm-svn: 359570
2019-04-30 15:36:02 +00:00
Russell Gallop 9b3acea16c Add llvm-profdata to LLVM_TOOLCHAIN_TOOLS
This is required for using PGO on Windows but isn't in the Windows
release packages. Windows packages are built with
LLVM_INSTALL_TOOLCHAIN_ONLY so only includes llvm "tools" listed here.

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

llvm-svn: 359569
2019-04-30 15:35:16 +00:00
Jordan Rupprecht 96bbb1dc2b [llvm-objcopy] Add RISC-V support for -B/-O
Reviewers: jorgbrown, espindola, alexshap, jhenderson

Subscribers: emaste, arichardson, fedor.sergeev, jakehehrlich, kito-cheng, shiva0217, MaskRay, rogfer01, rkruppe, llvm-commits

Tags: #llvm

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

llvm-svn: 359568
2019-04-30 15:21:36 +00:00
Kostya Kortchinsky 21c31f5e7b [scudo][standalone] Add the memory reclaiming mechanism
Summary:
This CL implements the memory reclaiming function `releaseFreeMemoryToOS`
and its associated classes. Most of this code was originally written by
Aleksey for the Primary64 in sanitizer_common, and I made some changes to
be able to implement 32-bit reclaiming as well. The code has be restructured
a bit to accomodate for freelist of batches instead of the freearray used
in the current sanitizer_common code.

Reviewers: eugenis, vitalybuka, morehouse, hctim

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 359567
2019-04-30 14:56:18 +00:00
Sanjay Patel 0387bf5269 [SelectionDAG] remove div-by-zero constant folding restriction
We don't have this restriction in IR, so it should not be here
either simply out of consistency. Code that wants to handle FP
exceptions is expected to use the 'strict' variants of these
nodes.

We don't get the frem case because frem by 0.0 produces NaN (invalid),
and that's the remaining check here (so the removed check for frem
was dead code AFAIK).

This is the only place in SDAG that uses "HasFPExceptions", so I
think we should remove that entirely as a follow-up patch.

llvm-svn: 359566
2019-04-30 14:37:15 +00:00
Andrew Ng 24896d304d [LLD][ELF] /DISCARD/ output sections should not be orphans
/DISCARD/ output sections were being treated as orphans. As a result, if
a /DISCARD/ output section has been assigned a PHDR, it could cause
incorrect assignment of sections to segments.

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

llvm-svn: 359565
2019-04-30 14:31:22 +00:00
Sam McCall 5b54006be6 [clangd] gen_std uses multiprocessing pool to be fast. While here, log ambiguous symbols. NFC
llvm-svn: 359564
2019-04-30 14:21:10 +00:00
Eugene Leviant fd0831d0f5 [llvm-nm] Add --special-syms no-op flag
Differential revision: https://reviews.llvm.org/D60502

llvm-svn: 359563
2019-04-30 13:51:48 +00:00
Nico Weber 5c45094eaa gn build: Merge r359455
llvm-svn: 359562
2019-04-30 13:45:16 +00:00
Sanjay Patel c16fd75e44 [AArch64] add tests for fdiv/frem constant folding (PR41668); NFC
llvm-svn: 359561
2019-04-30 13:43:17 +00:00
Pavel Labath 03db32b303 PostfixExpression: Introduce InitialValueNode
Summary:
This node represents can be used to refer to the initial value, which is
sometimes pushed onto the DWARF stack as the "input" to the DWARF
expression. The typical use case (and the reason why I'm introducing it)
is that the "Canonical Frame Address" is passed this way to the DWARF
expressions computing the values of registers during frame unwind.

The nodes are converted into dwarf by keeping track of DWARF stack depth
an any given point, and then copying the initial value from the bottom
of the stack via the DW_OP_pick opcode. This could be made more
efficient for simple expressions, but here I chose to start with the
most general implementation possible.

Reviewers: amccarth, clayborg, aleksandr.urakov

Subscribers: aprantl, jasonmolenda, lldb-commits, markmentovai

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

llvm-svn: 359560
2019-04-30 13:33:18 +00:00
Simon Pilgrim 123e04b8a8 [TableGen] Fix null pointer dereferencing in token parser.
Reported in https://www.viva64.com/en/b/0629/

llvm-svn: 359559
2019-04-30 13:09:55 +00:00
Russell Gallop a7c2e580c7 Fix inconsistency in calculating DIAG_START_ values.
This was introduced at r313975. As DIAG_SIZE_CROSSTU and
DIAG_SIZE_COMMENT are both 100 this should be NFC.

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

llvm-svn: 359558
2019-04-30 12:53:19 +00:00
Hans Wennborg 6014107702 vs integration: vs2019 support
llvm-svn: 359557
2019-04-30 12:41:33 +00:00
Russell Gallop f7e1fe563a [cmake] Fix error message on simulated VS version check
For clang-cl self hosts in VS2015 environment this was reporting: "Host
Clang must have at least -fms-compatibility-version=19.00.24213.1, your
version is 9.0.0".

This check fires as CMake detects the simulated environment as _MSC_VER
1900, which is truncated. This makes it less than the required
19.00.24213.1.

Differential revision: https://reviews.llvm.org/D61188

llvm-svn: 359556
2019-04-30 12:37:10 +00:00
Simon Pilgrim f5e8f222d6 Revert rL359519 : [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.

Reviewers: george.burgess.iv, chandlerc

Subscribers: jlebar, Prazek, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61043
........
This was causing windows build bot failures

llvm-svn: 359555
2019-04-30 12:34:21 +00:00
Andrew Ng 0f4c58f6f4 [LLD][ELF] Fix getRankProximity to "ignore" not live sections
This is a follow up to r358979 which made findOrphanPos only consider
live sections. Unfortunately, this required change to getRankProximity,
used by findOrphanPos, was missed.

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

llvm-svn: 359554
2019-04-30 12:27:06 +00:00
Simon Pilgrim 83098d28a1 [SLP] Lit test that cannot get vectorized due to lack of look-ahead operand reordering heuristic.
The code in this test is not vectorized by SLP because its operand reordering cannot look beyond the immediate predecessors.
This will get fixed in a follow-up patch that introduces the look-ahead operand reordering heuristic.

Committed on behalf of @vporpo (Vasileios Porpodas)

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

llvm-svn: 359553
2019-04-30 11:03:09 +00:00
George Rimar 67f590e286 [llvm-objcopy] - Check dynamic relocation sections for broken references.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41371.

Currently, it is possible to break the sh_link field of the dynamic relocation section
by removing the section it refers to. The patch fixes an issue and adds 2 test cases.

One of them shows that it does not seem possible to break the sh_info field.
I added an assert to verify this.

Differential revision: https://reviews.llvm.org/D60825

llvm-svn: 359552
2019-04-30 11:02:09 +00:00