1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

143316 Commits

Author SHA1 Message Date
Kostya Serebryany
2c7301e47a [libFuzzer] copy the options inside MutationDispatcher to avoid use-after-scope in mutator tests
llvm-svn: 292286
2017-01-17 23:05:07 +00:00
Tim Northover
6bb5c42da0 GlobalISel: fix comparison order for G_FCMP
As with G_ICMP we'd written the CSET instructions backwards.

llvm-svn: 292285
2017-01-17 23:04:01 +00:00
Tim Northover
c4d9f99729 GlobalISel: add callseq instructions to record stack usage
llvm-svn: 292284
2017-01-17 22:43:34 +00:00
Tim Northover
478a7d4c52 GlobalISel: correctly handle varargs
Some platforms (notably iOS) use a different calling convention for unnamed vs
named parameters in varargs functions, so we need to keep track of this
information when translating calls.

Since not many platforms are involved, the guts of the special handling is in
the ValueHandler class (with a generic implementation that should work for most
targets).

llvm-svn: 292283
2017-01-17 22:30:10 +00:00
Chandler Carruth
20b27b153a [LoopDeletion] (cleanup, NFC) Use the dedicated helper to get a single
unique exit block if available rather than rolling it ourselves.

This is a little disappointing because that helper doesn't do anything
clever to short-circuit the (surprisingly expensive) computation of all
exit blocks. What's worse is that the way we compute this is hopelessly,
hilariously inefficient. We're literally computing the same information
two different ways and multiple times each way:
- hasDedicatedExits computes the exit block set and then looks at the
  predecessors of each
- getExitingBlocks computes the set of loop blocks which have exiting
  successors
- getUniqueExitBlock(s) computes the set of non-loop blocks reached from
  loop blocks (sound familiar?)

Anyways, at some point we should clean all of this up in the LoopInfo
API, but for now just simplifying the user I'm about to touch.

llvm-svn: 292282
2017-01-17 22:28:52 +00:00
Matthew Simpson
6f0aa3e381 [LV] Add requires asserts to test case
llvm-svn: 292280
2017-01-17 22:21:33 +00:00
Chandler Carruth
45dd52fb0a [LoopDeletion] (cleanup, NFC) Fix another variable name to match LLVM
conventions, missed this one in a previous cleanup patch (sorry).

llvm-svn: 292279
2017-01-17 22:19:56 +00:00
Tim Northover
337b711f4b [GlobalISel] track predecessor mapping during switch lowering.
Correctly populating Machine PHIs relies on knowing exactly how the IR level
CFG was lowered to MachineIR. This needs to be tracked by any translation
phases that meddle (currently only SwitchInst handling).

This reapplies r291973 which was reverted because of testing failures. Fixes:

 + Don't return an ArrayRef to a local temporary.
 + Incorporate Kristof's suggested comment improvements.

llvm-svn: 292278
2017-01-17 22:13:50 +00:00
Simon Pilgrim
9895b41d9d [X86][SSE] Split UMIN and UMAX known bits tests
llvm-svn: 292277
2017-01-17 22:12:25 +00:00
Chandler Carruth
38ac3dd5f7 [LoopDeletion] (cleanup, NFC) Remove a pointless comment.
I hope that for any code, it is changed only with good reason and only
when the author knows what they are doing...

There is of course good reason to comment here about the subtlety of the
process, and I've left that comment in tact.

llvm-svn: 292275
2017-01-17 22:09:28 +00:00
Chandler Carruth
2c6ef126cf [LoopDeletion] (cleanup, NFC) Make simple helper functions static
instead of members.

No state was being provided by the object so this seems strictly
simpler.

I've also tried to improve the name and comments for the functions to
more thoroughly document what they are doing.

llvm-svn: 292274
2017-01-17 22:07:26 +00:00
Chandler Carruth
12d9628416 [LoopDeletion] (cleanup, NFC) Stop passing around reference to a vector
that we know has exactly one element when all we are going to do is get
that one element out of it.

Instead, pass around that one element.

There are more simplifications to come in this code...

llvm-svn: 292273
2017-01-17 22:00:52 +00:00
Chandler Carruth
92b4674546 [PM] Clean up variable and parameter names to match modern LLVM naming
conventions more conistently before hacking on this code to integrate
nicely with new PM's loop pass infrastructure. NFC.

llvm-svn: 292272
2017-01-17 21:51:39 +00:00
Aaron Ballman
fbc92c6824 Silence some Sphinx diagnostics in an attempt to get the documentation builder back to green (http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/1895).
llvm-svn: 292271
2017-01-17 21:48:31 +00:00
Xin Tong
a250638e68 Add a test case for LICM when promoting locals that may be read after the throw within the loop. NFCI.
Summary: Add a test case for LICM when promoting locals that may be read after the throw within the loop.

Reviewers: eli.friedman, hfinkel, sanjoy

Subscribers: llvm-commits

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

llvm-svn: 292261
2017-01-17 21:26:36 +00:00
Sanjay Patel
29a3c9a3aa [InstCombine] refactor foldICmpShlConstant(); NFCI
This reduces the size of and increases the symmetry with the planned functional change in:
https://reviews.llvm.org/D28406

llvm-svn: 292260
2017-01-17 21:25:16 +00:00
Alexei Starovoitov
f0176f8263 [bpf] fix stack-use-after-scope
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 292258
2017-01-17 21:14:00 +00:00
Vitaly Buka
4eabe06f6d Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=Address
Subscribers: mgorny, llvm-commits

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

llvm-svn: 292256
2017-01-17 21:04:23 +00:00
Michal Gorny
b4924fa1d9 [cmake] Update SOVERSION for the new versioning scheme
Update SOVERSION to use just the major version number rather than
major+minor, to match the new versioning scheme where only major is used
to indicate API/ABI version.

Since two-digit SOVERSIONs were introduced post 3.9 branching, this
change does not risk any SOVERSION collisions. In the past,
two-component X.Y SOVERSIONs were shortly used but those will not
interfere with the new ones since the new versions start at 4.

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

llvm-svn: 292255
2017-01-17 21:04:19 +00:00
Matthew Simpson
90e56de383 [LV] Mark non-consecutive-like pointers non-uniform
If a memory instruction will be vectorized, but it's pointer operand is
non-consecutive-like, the instruction is a gather or scatter operation. Its
pointer operand will be non-uniform. This should fix PR31671.

Reference: https://llvm.org/bugs/show_bug.cgi?id=31671
Differential Revision: https://reviews.llvm.org/D28819

llvm-svn: 292254
2017-01-17 20:51:39 +00:00
Dan Gohman
355ce8f653 [WebAssembly] Add triple support for the new wasm object format
Differential Revision: https://reviews.llvm.org/D26701

llvm-svn: 292252
2017-01-17 20:34:09 +00:00
Xin Tong
2213893ec0 Rename scalar_promote.ll to scalar-promote.ll and scalar_promote-unwind.ll to scalar-promote-unwind.ll. NFCI
llvm-svn: 292251
2017-01-17 20:28:36 +00:00
Xin Tong
acffedf36e Refactor out LoopInfo computation so that it can be used by
other test cases.

Summary: Refactor out LoopInfo computation so that it can be
used by other test cases.

So i am changing this test proactively for later commit, which will use
this function.

Reviewers: sanjoy, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 292250
2017-01-17 20:24:39 +00:00
Sanjoy Das
659705e7a7 [EarlyCSE] Don't DSE across readnone functions that may throw
Summary: Depends on D28740

Reviewers: dberlin, chandlerc, hfinkel, majnemer

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 292249
2017-01-17 20:15:47 +00:00
Sanjay Patel
ea4bdd6b81 [InstCombine] add tests for shl nsw + icmp sle; NFC
We want to handle these cases similarly to icmp sgt, so add the tests for it.
See: https://reviews.llvm.org/D28406

llvm-svn: 292248
2017-01-17 20:15:26 +00:00
Ahmed Bougacha
d5e689dc0f [TLI] Appease spurious MSVC warning using llvm_unreachable. NFC.
r292188 confused MSVC because of the combined lack of a default
case and return statement.

Move the unreachable outside of the NumLibFuncs case, to make it
obvious that all cases should be handled.

llvm_unreachable is __declspec(noreturn), so I'm assuming this
does appease MSVC.

llvm-svn: 292246
2017-01-17 19:54:18 +00:00
Joerg Sonnenberger
d75b6a6a2d Remove an overeager assert from r288844.
llvm-svn: 292244
2017-01-17 19:29:15 +00:00
Bob Wilson
62491d9e34 Revert r291640 change to fold X86 comparison with atomic_load_add.
Even with the fix from r291630, this still causes problems. I get
widespread assertion failures in the Swift runtime's WeakRefCount::increment()
function. I sent a reduced testcase in reply to the commit.

llvm-svn: 292242
2017-01-17 19:18:57 +00:00
Chandler Carruth
b786938370 [PM] Teach the LoopPassManager to automatically canonicalize loops by
runnig LCSSA over them prior to running the loop pipeline.

This also teaches the loop PM to verify that LCSSA form is preserved
throughout the pipeline's run across the loop nest.

Most of the test updates just leverage this new functionality. One has to be
relaxed with the new PM as IVUsers is less powerful when it sees LCSSA input.

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

llvm-svn: 292241
2017-01-17 19:18:12 +00:00
Sanjay Patel
d9256d18d9 [ValueTracking] recognize a 'not' of an assumed condition as false
Also, add the corresponding match to the AssumptionCache's 'Affected Values' list.

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

llvm-svn: 292239
2017-01-17 18:15:49 +00:00
David Majnemer
5ce5bd5531 [InstCombine] Fold ((C1 OP zext(X)) & C2) -> zext((C1 OP X) & C2)
This further extends r292179 to support additional binary operators
beyond subtraction.

llvm-svn: 292238
2017-01-17 18:08:06 +00:00
Kuba Mracek
61d1462f99 Revert r292231.
llvm-svn: 292237
2017-01-17 18:06:38 +00:00
Simon Pilgrim
df3a78e117 [X86][AVX512] Add all_of/any_of avx512vl tests
llvm-svn: 292235
2017-01-17 17:33:18 +00:00
Chad Rosier
831d15d618 [ValueTracking] Extend known bits to understand @llvm.bitreverse.
Differential Revision: https://reviews.llvm.org/D28780

llvm-svn: 292233
2017-01-17 17:23:51 +00:00
Kuba Mracek
dc0f3e6b67 [lit] Limit parallelism of sanitizer tests on Darwin [llvm part]
Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests.

This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests.

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

llvm-svn: 292231
2017-01-17 17:15:02 +00:00
Sanjay Patel
2045d62fcd [InstCombine] reduce indent; NFCI
llvm-svn: 292230
2017-01-17 16:59:09 +00:00
George Rimar
cb9ede7cd2 Recommit r292214 "[Support/Compression] - Change zlib API to return Error instead of custom status"
No any changes, will follow up with D28807 commit containing APLi change for clang
to fix build issues happened.

Original commit message:
[Support/Compression] - Change zlib API to return Error instead of custom status.

Previously API returned custom enum values.
Patch changes it to return Error with string description.
That should help users to report errors in universal way.

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

llvm-svn: 292226
2017-01-17 15:45:07 +00:00
Sam Kolton
a2d0111d7d [AMDGPU] Assembler: fix v_mac_f16 immediates
Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

llvm-svn: 292224
2017-01-17 15:26:02 +00:00
Simon Pilgrim
fa295d2c6e [X86][SSE] Tests showing horizontal all_of/any_of of vector comparison results
llvm-svn: 292223
2017-01-17 15:02:01 +00:00
Krasimir Georgiev
0f02f1cb88 [llvm-objdump tests] Copy the inputs of tests closer to tests.
Summary:
Tests under tools/llvm-objdump should not use inputs from Object. Copied the
required inputs and aligned the new tests to be more consistent with the existing
tests in this respect.

Reviewers: ioeric

Reviewed By: ioeric

Subscribers: davide, djasper, cfe-commits

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

llvm-svn: 292222
2017-01-17 14:22:29 +00:00
George Rimar
e514a1b5af Revert r292214 "[Support/Compression] - Change zlib API to return Error instead of custom status."
It broked clang:
http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/34218/consoleFull#46141505449ba4694-19c4-4d7e-bec5-911270d8a58c

llvm-svn: 292217
2017-01-17 13:27:58 +00:00
Boris Ulasevich
9fe65bc2ad BrainF example: fixing output buffering issue
Differential Revision: https://reviews.llvm.org/D27824

llvm-svn: 292216
2017-01-17 13:27:28 +00:00
George Rimar
ba571c82ea [Support/Compression] - Change zlib API to return Error instead of custom status.
Previously API returned custom enum values.
Patch changes it to return Error with string description.
That should help users to report errors in universal way.

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

llvm-svn: 292214
2017-01-17 13:20:17 +00:00
Serge Rogatch
8364a160c3 [XRay][Arm] Repair XRay table emission on Arm32 and add tests to identify such problem earlier
Summary:
Emission of XRay table was occasionally disabled for Arm32, but this bug was not then detected because earlier (also by mistake) testing of XRay was occasionally disabled on 32-bit Arm targets. This patch should fix that problem and detect such problems in the future.
This patch is one of a series, see also
- https://reviews.llvm.org/D28623

Reviewers: rengolin, dberris

Reviewed By: dberris

Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown

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

llvm-svn: 292210
2017-01-17 11:52:10 +00:00
Simon Pilgrim
3b4ac7dc2a [InstCombine][X86][AVX] Add DemandedElts support for VPERMILPD/VPERMILPS instructions
Simplify a vpermilvar shuffle mask based on the elements of the mask that are actually demanded.

llvm-svn: 292209
2017-01-17 11:35:03 +00:00
Vasileios Kalintiris
63fabcfd96 Update the release tester for MIPS. NFC.
llvm-svn: 292208
2017-01-17 11:00:28 +00:00
Pavel Labath
e001603431 Remove pid_t usage from llvm-xray
This type is not available on windows.

llvm-svn: 292206
2017-01-17 09:39:31 +00:00
Matt Arsenault
fddb6ed60b AMDGPU: Add replacement export intrinsics
llvm-svn: 292205
2017-01-17 07:26:53 +00:00
Alexei Starovoitov
2d9650b5d9 [bpf] error when unknown bpf helper is called
Emit error when BPF backend sees a call to a global function or to an external symbol.
The kernel verifier only allows calls to predefined helpers from bpf.h
which are defined in 'enum bpf_func_id'. Such calls in assembler must
look like 'call [1-9]+' where number matches bpf_func_id.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 292204
2017-01-17 07:26:17 +00:00
Shoaib Meenai
dc18fb4440 [utils] Add libc++ and libc++abi config to llvm-lit
This allows us to use bin/llvm-lit to run individual libc++ and
libc++abi tests without having to explicitly specify the site config
paths, similar to other projects.

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

llvm-svn: 292203
2017-01-17 07:10:55 +00:00