Commit Graph

296082 Commits

Author SHA1 Message Date
Alexander Polyakov a320e39acd Add documentation for SBTarget::AppendImageSearchPath
llvm-svn: 339189
2018-08-07 21:41:59 +00:00
Douglas Yung be1166a43b Fix one hard coded value I missed in r339185.
llvm-svn: 339188
2018-08-07 21:37:14 +00:00
Richard Smith 96cb356911 Clean up and simplify RequireCompleteType.
No functional change intended, except that we will now produce more
"declared here" notes.

llvm-svn: 339187
2018-08-07 21:35:41 +00:00
Derek Schuff 51ed131ed2 [WebAssembly] Update SIMD binary arithmetic
Add missing SIMD types (v2f64) and binary ops. Also adds
tablegen support for automatically prepending prefix byte to SIMD
opcodes.

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

Patch by Thomas Lively

llvm-svn: 339186
2018-08-07 21:24:01 +00:00
Douglas Yung dca675a0d8 Make test more robust by not checking hard coded debug info values, but instead check the relationships between them.
llvm-svn: 339185
2018-08-07 21:22:49 +00:00
Stella Stamenova 4f03fb1c04 [lit] Disable shtest-timeout on Windows
This test passes on Windows when using Python 3 but fails when using Python 2, so it needs more investigation before it can be enabled as the bots use Python 2.

llvm-svn: 339184
2018-08-07 21:21:30 +00:00
George Karpenkov 1f5fe1132e [analyzer] [tests] Do not be verbose by default when updating reference results.
llvm-svn: 339183
2018-08-07 21:14:35 +00:00
Jim Ingham 7aa4ed9b5f If a function starts with line number 0, don't try to check if a breakpoint crossed function boundaries.
clang doesn't use line number 0 (to mean artifically generated code) very often, but swift does it
quite often.  We were rejecting all by line breakpoints in functions that started at line 0.  But that's
a special marker so we can just not do this test in that case.

llvm-svn: 339182
2018-08-07 21:09:55 +00:00
Jim Ingham b303009b9f Fix the Xcode project for the Core -> Utility moves.
Scalar.{h,cpp}, RegisterValue.{h,cpp}, State.{h,cpp} were moved.

llvm-svn: 339181
2018-08-07 21:05:34 +00:00
Stella Stamenova 5fa14d971d [lit, python] Change the order of the quotes in the lit cfg file
Double quotes are always correct in paths on windows while single quotes only work sometimes. By swapping the order of the quotes in the subsitution we guarantee that the quotes will be correct on Windows. Both sets work correctly on Linux in the test environment.

llvm-svn: 339180
2018-08-07 20:58:02 +00:00
Stella Stamenova 8efc95ac2f [lit, python3] Update lit error logging to work correctly in python3 and other test fixes
Summary:
In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and instead all 'str' objects are Unicode string. This change updates the logic in the test logging for lit to correctly process each of the types, and more importantly, to not just fail in Python3.

This change also reverses the use of quotes in several of the cfg files. By using '""' we are guaranteeing that the resulting path will work correctly on Windows while "''" only works correctly sometimes. This also fixes one of the failing tests.

Reviewers: asmith, zturner

Subscribers: stella.stamenova, delcypher, llvm-commits

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

llvm-svn: 339179
2018-08-07 20:54:38 +00:00
Alexander Polyakov 65bd2f6c85 [lldb-mi] Re-implement target-select command
Now target-select uses SB API instead of HandleCommand.

This patch has been reviewed along with the r339175.

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

llvm-svn: 339178
2018-08-07 20:45:46 +00:00
Krzysztof Parzyszek e7ce247dd7 [Hexagon] Allow use of gather intrinsics even with no-packets
Vgather requires must be in a packet with a store, which contradicts
the no-packets feature. As a consequence, gather/scatter could not be
used with no-packets. Relax this, and allow gather packets as exceptions
to the no-packets requirements.

llvm-svn: 339177
2018-08-07 20:33:47 +00:00
Sanjay Patel 9b07347033 [InstSimplify] fold fsub+fadd with common operand
llvm-svn: 339176
2018-08-07 20:32:55 +00:00
Alexander Polyakov 3e7b9db2d9 Add new API to SBTarget class
Summary:
The new API appends an image search path to the
target's path mapping list.

Reviewers: aprantl, clayborg, labath

Reviewed By: aprantl

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 339175
2018-08-07 20:23:57 +00:00
Sanjay Patel 4364d604c2 [InstSimplify] fold fadd+fsub with common operand
llvm-svn: 339174
2018-08-07 20:23:49 +00:00
Anastasis Grammenos 52d5283483 [Local] Add dbg location on unreachable inst in changeToUnreachable
As show in https://bugs.llvm.org/show_bug.cgi?id=37960
it would be desirable to have debug location in the unreachable
instruction.

Also adds a unti test for this function.

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

llvm-svn: 339173
2018-08-07 20:21:56 +00:00
Heejin Ahn 7fb68d2679 [WebAssembly] CFG sort support for exception handling
Summary:
This patch extends CFGSort pass to support exception handling. Once it
places a loop header, it does not place blocks that are not dominated by
the loop header until all the loop blocks are sorted. This patch extends
the same algorithm to exception 'catch' part, using the information
calculated by WebAssemblyExceptionInfo class.

Reviewers: dschuff, sunfish

Subscribers: sbc100, jgravelle-google, llvm-commits

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

llvm-svn: 339172
2018-08-07 20:19:23 +00:00
Sanjay Patel f7a8fb2dee [InstSimplify] fold fsub+fsub with common operand
llvm-svn: 339171
2018-08-07 20:14:27 +00:00
Martin Storsjo 1662647995 [Headers] Expand _Unwind_Exception for SEH on MinGW/x86_64
This matches how GCC defines this struct.

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

llvm-svn: 339170
2018-08-07 20:02:40 +00:00
Nico Weber 875f6dae86 Update msbuild integration warnings: Don't warn on /Zi and /X
We do need to map /Zi to /Z7 explicitly for msbuild as explained in this file,
but since /Zi is passed by default and since things transparently work fine
with it mapped to /Z7, we shouldn't produce effectively inactionable noise for
it.

Also don't warn on /X since clang-cl supports that (since r326357; the risk of
duplicating a bunch of clang-cl driver logic here).

https://reviews.llvm.org/D50398

llvm-svn: 339169
2018-08-07 19:55:12 +00:00
Sanjay Patel 50976393ed [InstSimplify] add tests for fadd/fsub; NFC
Instcombine gets some, but not all, of these cases via
it's internal reassociation transforms. It fails in
all cases with vector types.

llvm-svn: 339168
2018-08-07 19:49:13 +00:00
Leonard Chan 7add582032 [Sema] Fix for crash on conditional operation with address_space pointer
Compiling the following causes clang to crash

```
char *cmp(__attribute__((address_space(1))) char *x, __attribute__((address_space(2))) char *y) {
  return x < y ? x : y;
}
```

with the message: "wrong cast for pointers in different address
spaces(must be an address space cast)!"

This is because during IR emission, the source and dest type for a
bitcast should not have differing address spaces.

This fix prints an error since the code shouldn't compile in the first place.

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

llvm-svn: 339167
2018-08-07 19:43:53 +00:00
Alexey Bataev 0edcd0278d [SLP] Fix insert point for reused extract instructions.
Summary:
Reworked the previously committed patch to insert shuffles for reused
extract element instructions in the correct position. Previous logic was
incorrect, and might lead to the crash with PHIs and EH instructions.

Reviewers: efriedma, javed.absar

Subscribers: llvm-commits

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

llvm-svn: 339166
2018-08-07 19:21:05 +00:00
Nico Weber f4f5b7eea3 lld-link: Take /SUBSYSTEM into account for automatic /ENTRY detection.
If /subsystem:windows is passed, link.exe only looks for WinMain and wWinMain,
and if /subsystem:console is passed it only looks for main and wmain. lld-link
used to look for all 4 in both cases. This patch makes lld-link match
link.exe's behavior.

This requires that the subsystem is known by the time findDefaultEntry() gets
called. findDefaultEntry() is called before the main link loop, so that the
loop can mark the entry point as undefined. That means inferSubsystem() has to
be called above the main loop as well. This in turn means /subsystem: from
.drectve sections only has an effect on entry point inference for obj files
passed to lld-link directly (and not in obj files found later in .lib files).
link.exe seems to ignore /subsystem: for obj files from lib files completely
(while in lld it's ignored only for entry point detection but it still
overrides /subsystem: flags passed on the command line for the value that gets
written in the output file).

Also, if the subsytem isn't needed (e.g. when only writing a /def: lib file and
not writing a coff file), link.exe doesn't complain if the subsystem isn't
known, so both subsystem and entry point handling should be below the early
return lld has for that case.

Fixes PR36523.
https://reviews.llvm.org/D50316

llvm-svn: 339165
2018-08-07 19:10:28 +00:00
Volodymyr Sapsai 3b2f6a4b29 [VFS] Emit an error when entry at root level uses a relative path.
Entries with only a filename prevent us from building a file system tree and
cause the assertion

> Assertion failed: (NewParentE && "Parent entry must exist"), function uniqueOverlayTree, file clang/lib/Basic/VirtualFileSystem.cpp, line 1303.

Entries with a relative path are simply not discoverable during header search.

rdar://problem/28990865

Reviewers: bruno, benlangmuir

Reviewed By: bruno

Subscribers: dexonsmith, cfe-commits

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

llvm-svn: 339164
2018-08-07 19:05:41 +00:00
Sam Clegg 98dbbfd851 [WebAssembly] Remove use of lld -flavor flag
This flag is deprecated. The preferred way to select the lld
flavor is by calling it by one of its aliases.

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

llvm-svn: 339163
2018-08-07 18:55:41 +00:00
Wei Mi b1ef2cc53d [SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold
getOrCompHotCountThreshold/getOrCompColdCountThreshold introduced in
https://reviews.llvm.org/D45377 contain a bad mistake and will only return 1 or 0
instead of the true hot/cold cutoff value. The patch fixes the mistake. But the
mistake seems not causing big performance difference according to internal server
benchmarks testing.

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

llvm-svn: 339162
2018-08-07 18:13:10 +00:00
Leonard Mosescu 9ba51579fb Misc module/dwarf logging improvements
This change improves the logging for the lldb.module category to note a few interesting cases:

1. Local object file found, but specs not matching
2. Local object file not found, using a placeholder module

The handling and logging for the cases wehre we fail to load compressed dwarf
symbols is also improved.

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

llvm-svn: 339161
2018-08-07 18:00:30 +00:00
Alexander Polyakov 57e6dd7222 [lldb-mi] Re-implement MI HandleProcessEventStateSuspended.
Summary: Now this function uses SB API instead of HandleCommand.

Reviewers: aprantl, clayborg, labath

Reviewed By: aprantl

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 339160
2018-08-07 17:55:26 +00:00
Philip Reames c792e197b4 [LICM] Strengthen assume hoisting tests [NFC]
As requested in review of https://reviews.llvm.org/D50364

llvm-svn: 339159
2018-08-07 17:54:36 +00:00
David Greene 8d819a9973 [WebAssembly] Force use of lld for test/Driver/wasm-toolchain.c(pp)
lld is the only supported linker that works for WebAssembly, so ensure
clang is using it for this test. This gets the tests passing when
configuring clang to use a different linker by default.

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

llvm-svn: 339158
2018-08-07 17:44:43 +00:00
Craig Topper 49ed49fcb1 [SelectionDAG] When splitting scatter nodes during DAGCombine, create a serial chain dependency.
Scatter could have multiple identical indices. We need to maintain sequential order. We get this right in LegalizeVectorTypes, but not in this code.

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

llvm-svn: 339157
2018-08-07 17:35:02 +00:00
Craig Topper deb2899b2d [SelectionDAG][X86][SystemZ] Add a generic nonvolatile_store/nonvolatile_load pattern fragment in TargetSelectionDAG.td
Differential Revision: https://reviews.llvm.org/D50358

llvm-svn: 339156
2018-08-07 17:34:59 +00:00
Alex Langford 8e5e2af33b Add instructions for building LLDB on Mac OS X with CMake
Summary:
There were previously no instructions for building LLDB on Mac OS X
with CMake. It's sufficiently close to building on Linux/FreeBSD/NetBSD that a
well-motivated developer could figure out the steps themselves. However, having
an explicit guide is better and can provide Mac OS X specific configurations
(e.g. LLDB_BUILD_FRAMEWORK).

Reviewers: labath, clayborg

Subscribers: emaste, krytarowski

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

llvm-svn: 339155
2018-08-07 17:34:13 +00:00
Tatyana Krasnukha f174259ec2 Check result after setting PC value.
llvm-svn: 339153
2018-08-07 16:46:11 +00:00
Alexey Bataev bf8fe71b91 [OPENMP] Mark variables captured in declare target region as implicitly
declare target.

According to OpenMP 5.0, variables captured in lambdas in declare target
regions must be considered as implicitly declare target.

llvm-svn: 339152
2018-08-07 16:14:36 +00:00
David Bolvansky ab2cbad6fe [RFC] Build LLVM-C.dll on MSVC that exports only the C API
Summary:
Hello!

This commit adds a LLVM-C target that is always built on MSVC. A big fat warning, this is my first cmake code ever so there is a fair bit of I-have-no-idea-what-I'm-doing going on here. Which is also why I placed it outside of llvm-shlib as I was afraid of breaking things of other people. Secondly llvm-shlib builds a LLVM.so which exports all symbols and then does a thin library that points to it, but on Windows we do not build a LLVM.dll so that would have complicated the code more.

The patch includes a python script that calls dumpbin.exe to get all of the symbols from the built libraries. It then grabs all the symbols starting with LLVM and generates the export file from those. The export file is then used to create the library just like the LLVM-C that is built on darwin.

Improvements that I need help with, to follow up this review.
  - Get cmake to make sure that dumpbin.exe is on the path and wire the full path to the script.
  - Use LLVM-C.dll when building llvm-c-test so we can verify that the symbols are exported.
  - Bundle the LLVM-C.dll with the windows installer.

Why do this?  I'm building a language frontend which is self-hosting, and on windows because of various tooling issues we have a problem of consuming the LLVM*.lib directly on windows. Me and the users of my projects using LLVM would be greatly helped by having LLVM-C.dll built and shipped by the Windows installer. Not only does LLVM takes forever to build, you have to run a extra python script in order to get the final DLL.

Any comments, thoughts or help is greatly appreciated.

Cheers, Jakob.

Patch by: Wallbraker (Jakob Bornecrantz)

Reviewers: compnerd, beanz, hans, smeenai

Reviewed By: beanz

Subscribers: xbolva00, bhelyer, Memnarch, rnk, fedor.sergeev, chapuni, smeenai, john.brawn, deadalnix, llvm-commits, mgorny

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

llvm-svn: 339151
2018-08-07 15:54:50 +00:00
Scott Linder f8b3df4dec [OpenCL] Restore r338899 (reverted in r338904), fixing stack-use-after-return
Always emit alloca in entry block for enqueue_kernel builtin.

Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC
later because it is not in the entry block.

llvm-svn: 339150
2018-08-07 15:52:49 +00:00
Florian Hahn 950576bdf8 [GVN,NewGVN] Keep nonnull if K does not move.
In combineMetadata, we should be able to preserve K's nonnull metadata,
if K does not move. This condition should hold for all replacements by
NewGVN/GVN, but I added a bunch of assertions to verify that.

Fixes PR35038.

There probably are additional kinds of metadata that could be preserved
using similar reasoning. This is follow-up work.

Reviewers: dberlin, davide, efriedma, nlopes

Reviewed By: efriedma

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

llvm-svn: 339149
2018-08-07 15:36:11 +00:00
Sjoerd Meijer b39cd886b9 [ARM] FP16: codegen support for VACGT
Differential Revision: https://reviews.llvm.org/D50236

llvm-svn: 339148
2018-08-07 15:11:47 +00:00
Simon Pilgrim 1bfadb0499 [DAG] Allow non-uniform constant vectors to call BuildSDIV
This was missed in D50185.

NFC until we add actual non-uniform support to BuildSDIV (similar BuildUDIV support in D49248) - for now it just early outs.

llvm-svn: 339147
2018-08-07 14:50:39 +00:00
Simon Pilgrim 6943e39353 [TargetLowering] Use pre-computed Shift value type in BuildUDIV (NFCI)
This was missed in D49248

llvm-svn: 339146
2018-08-07 14:40:21 +00:00
Andrew V. Tischenko 1fe3375620 [X86] MCA tests for XCHG*, XADD* and CMPXCHG* instructions
Differential Revision: https://reviews.llvm.org/D49912

llvm-svn: 339145
2018-08-07 14:36:43 +00:00
Sanjay Patel 948ff87d7d [InstSimplify] move minnum/maxnum with common op fold from instcombine
llvm-svn: 339144
2018-08-07 14:36:27 +00:00
Max Moroz e03993e6c7 [libFuzzer] Disable print_unstable_stats.test for aarch64.
Summary:
Follow-up for https://reviews.llvm.org/D50264. Reported by testbots:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5592

Reviewers: morehouse, kevinwkt, metzman, javed.absar, Dor1s

Reviewed By: Dor1s

Subscribers: kristof.beyls, delcypher, #sanitizers, llvm-commits, kcc

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

llvm-svn: 339143
2018-08-07 14:22:00 +00:00
Sanjay Patel b06d283909 [InstSimplify] add tests for minnum/maxnum with shared op; NFC
llvm-svn: 339142
2018-08-07 14:13:40 +00:00
Sanjay Patel b802d18df7 [InstSimplify] move misplaced minnum/maxnum tests; NFC
llvm-svn: 339141
2018-08-07 14:12:08 +00:00
Jonas Paulsson 5438f1debc [SystemZ] Comment update.
Update the comment in nextGroup since the ProcResourceCounters are not anymore
always decremented with '1'.

llvm-svn: 339140
2018-08-07 13:48:09 +00:00
Jonas Paulsson 25cbfdd423 [SystemZ] NFC: Remove redundant check in SystemZHazardRecognizer.
Remove the redundant check against zero when updating ProcResourceCounters in
nextGroup(), as pointed out in https://reviews.llvm.org/D50187.

Review: Ulrich Weigand.
llvm-svn: 339139
2018-08-07 13:44:11 +00:00