1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

152213 Commits

Author SHA1 Message Date
Daniel Sanders
6c59dcec86 Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together.
Summary:
Now that we have control flow in place, fuse the per-rule tables into a
single table. This is a compile-time saving at this point. However, this will
also enable the optimization of a table so that similar instructions can be
tested together, reducing the time spent on the matching the code.

This is NFC in terms of externally visible behaviour but some internals have
changed slightly. State.MIs is no longer reset between each rule that is
attempted because it's not necessary to do so. As a consequence of this the
restriction on the order that instructions are added to State.MIs has been
relaxed to only affect recorded instructions that require new elements to be
added to the vector. GIM_RecordInsn can now write to any element from 1 to
State.MIs.size() instead of just State.MIs.size().

The compile-time regressions from the last commit were caused by the ARM target
including a non-const variable (zero_reg) in the table and therefore generating
an initializer for it. That variable is now const.

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

llvm-svn: 309264
2017-07-27 11:03:45 +00:00
Simon Pilgrim
a11c2e55fe [X86] Adding test cases for LEA factorization (PR32755 / D35014)
Differential Revision: https://reviews.llvm.org/D35886

llvm-svn: 309262
2017-07-27 10:36:09 +00:00
Simon Pilgrim
3dd2aba47c [X86] Tidyup MaskedLoad/Store mask creation. NFCI.
Assign all concat elements to zero and then just replace the first element, instead of setting them all to null and copying everything in.

llvm-svn: 309261
2017-07-27 10:29:04 +00:00
Mohammed Agabaria
63de05fc82 [TTI] fixing a bug in the isLegalMaskedScatter API
isLegalMaskedScatter called the Gather version which is a bug.
use test case is provided within the patch of AVX2 gathers at: https://reviews.llvm.org/D35772

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

llvm-svn: 309260
2017-07-27 10:28:16 +00:00
Hiroshi Inoue
4a193c9d63 [PowerPC] enable optimizeCompareInstr for branch with static branch hint
In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible.
If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.

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

llvm-svn: 309255
2017-07-27 08:14:48 +00:00
Petr Hosek
575ffaa429 Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
This change is failing tests on Windows bots due to permissions.

This reverts commit r309249.

llvm-svn: 309251
2017-07-27 06:02:05 +00:00
Petr Hosek
c95f0f31bb Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

llvm-svn: 309249
2017-07-27 04:35:30 +00:00
Craig Topper
7c46c09b48 [X86] Improve the unknown stepping support for Intel CPUs in getHostCPUName
This patch improves our guessing of unknown Intel CPUs to support Goldmont and skylake-avx512.

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

llvm-svn: 309246
2017-07-27 03:26:52 +00:00
Aditya Nandakumar
b7bb84f14a [GISel]: Missed passing in a parameter to addUsesFromArgs
llvm-svn: 309243
2017-07-27 02:15:34 +00:00
Eric Beckmann
2c6035b9df Remove check for i686.
libxml2 is supported for 32 bit, so our build system should be checking
the target rather than native os when choosing shared libs.

llvm-svn: 309242
2017-07-27 01:16:19 +00:00
Eric Beckmann
cc7a923891 Re-enable libxml2 tests.
llvm-svn: 309241
2017-07-27 01:11:53 +00:00
Spyridoula Gravani
29c0b5ca42 [DWARF] Minor code style modification, no functionality change.
llvm-svn: 309240
2017-07-27 00:59:33 +00:00
David Blaikie
37a7f2ee7b DebugInfo: Ensure imported entities at the top level of an inlined function don't cause degenerate concrete definitions
Local imported entities at the top level of a subprogram were being
handled differently from those in nested scopes - that different
handling would cause pseudo concrete out-of-line definitions to be
created (but without any of their attributes, nor an abstract_origin) in
the case where there was no real concrete definition.

These local imported entities also only appeared in the concrete
definition where those imported entities in nested scopes appear in all
cases (abstract, concrete, and inlined). This change at least makes top
level case handle the same as the others - though there's a FIXME to
improve this to /only/ emit them into the abstract origin (though this
requires more plumbing - like the abstract subprogram and variable
handling that must defer population until the end of the unit to
discover if there is an abstract origin, or only a standalone concrete
definition).

llvm-svn: 309237
2017-07-27 00:06:53 +00:00
Eugene Zelenko
92b99af10e [Hexagon] Fix expensive checks build bot broken in r309230.
llvm-svn: 309236
2017-07-26 23:56:29 +00:00
Petr Hosek
3f616d5af4 [CMake] Disable -Werror for CMake checks
-Werror may cause some of the CMake checks to fail, so we disable
it even if it's enabled for the build itself.

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

llvm-svn: 309235
2017-07-26 23:49:18 +00:00
Eugene Zelenko
582ffdab99 [Hexagon] Partially revert r309230 which caused some build bots failures.
llvm-svn: 309233
2017-07-26 23:45:28 +00:00
Eugene Zelenko
73ca7f915d [Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 309230
2017-07-26 23:20:35 +00:00
Eric Beckmann
252835f8ae See if disabling libxml tests will pass the i686 bot.
llvm-svn: 309229
2017-07-26 23:15:44 +00:00
Reid Kleckner
0af17bd131 [lit] Fix race between shtest-shell and max-failures tests
Previously these tests would use the same Output directory leading to
flaky non-deterministic failures.

llvm-svn: 309227
2017-07-26 22:57:32 +00:00
Reid Kleckner
89bf4429bc [lit] Fix shtest-shell and max-failures lit tests on Windows
Rewrite the write-to-stderr.sh and write-to-stdout-and-stderr.sh shell
scripts as python scripts and call python on them.

Fixes PR33940

llvm-svn: 309200
2017-07-26 22:21:25 +00:00
Reid Kleckner
4dae734b08 [lit] Fix shtest-output-printing.py on Windows by matching either / or \\
Fixes PR33938

llvm-svn: 309198
2017-07-26 22:11:30 +00:00
Reid Kleckner
33e3709be7 [lit] Fix discovery.py on Windows by matching backslashes when necessary
Fixes PR33932

llvm-svn: 309194
2017-07-26 22:00:38 +00:00
Hiroshi Yamauchi
4147ce4079 Fix a comment (test commit).
llvm-svn: 309192
2017-07-26 21:54:43 +00:00
Reid Kleckner
feb1928c58 [lit] Un-XFAIL selecting.py test on Windows
This passes locally for me, which fails the overall lit test suite. I
can't debug a passing test, but I will try to help debug the test when
we get some failing logs.

llvm-svn: 309190
2017-07-26 21:48:41 +00:00
Stanislav Mekhanoshin
c00e9e688a [AMDGPU] Optimize SI_IF lowering for simple if regions
Currently SI_IF results in a s_and_saveexec_b64 followed by s_xor_b64.
The xor is used to extract only the changed bits. In case of a simple
if region where the only use of that value is in the SI_END_CF to
restore the old exec mask, we can omit the xor and perform an or of
the exec mask with the original exec value saved by the
s_and_saveexec_b64.

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

llvm-svn: 309185
2017-07-26 21:29:15 +00:00
Evandro Menezes
3fd6560997 [ARM] Minor cosmetic edits (NFC)
Change the order of a case and the description for Exynos Mx processors.

llvm-svn: 309184
2017-07-26 21:28:20 +00:00
Evandro Menezes
e9f5ceb19d [AArch64] Adjust the cost model for Exynos M1 and M2
Add the information for the scalar reciprocal square root approximation.

llvm-svn: 309183
2017-07-26 21:28:15 +00:00
Eric Beckmann
b617e67e80 Close if statement in config-ix.cmake while checking for i686 arch.
Reapply "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

This reverts commit e7400d7cbc2b7539de3aa7a20adc8f4ee0cb7bef.

llvm-svn: 309181
2017-07-26 21:20:24 +00:00
Eric Beckmann
4c87dcf654 Revert "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"
This reverts commit 38a6db6397364ee91b04afea2cdcb1b5b4d252bf.

llvm-svn: 309179
2017-07-26 21:11:07 +00:00
Wei Ding
4c170442e6 AMDGPU : Widen extending scalar loads to 32-bits.
Differential Revision: http://reviews.llvm.org/D35146

llvm-svn: 309178
2017-07-26 21:07:28 +00:00
Eric Beckmann
1b209b2dd2 Set a different var for checking I686, because LLVM_NATIVE_ARCH is
overwritten.

llvm-svn: 309177
2017-07-26 21:03:55 +00:00
Davide Italiano
36a4ea6daf [gold] Relax this tests a little more.
Thanks to Peter for the report!

llvm-svn: 309176
2017-07-26 21:01:57 +00:00
Davide Italiano
0b4aecac50 [gold] Relax tests to account for difference in layout across versions.
llvm-svn: 309174
2017-07-26 20:40:33 +00:00
Matt Arsenault
4ec54d0c9f AMDGPU: Fix using SMRD instructions for argument loads in functions
These are not actually uniform values except in kernels.

llvm-svn: 309172
2017-07-26 20:39:42 +00:00
Jakub Kuderski
1ab3b67c7a [Dominators] Fix typos. NFC.
llvm-svn: 309170
2017-07-26 20:26:13 +00:00
Eric Beckmann
aa30d408ff Disable libxml on i686, because it is a 32 bit architecture and
libxml2.so is for 64 bit.

llvm-svn: 309169
2017-07-26 20:22:26 +00:00
Tom Stellard
fc08a62082 AMDGPU/GlobalISel: Mark 32-bit G_OR as legal
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 309165
2017-07-26 20:00:53 +00:00
Aditya Nandakumar
7351149d5d [GISel]: Avoid zero length array when building Instrs that don't have
uses.

Also splitting the buildSources part allows more overloads such as
adding MachineOperands directly in the arguments for buildInstr.

llvm-svn: 309163
2017-07-26 19:58:03 +00:00
Peter Collingbourne
b84653db71 Change CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.
This was a use-after-free waiting to happen.

llvm-svn: 309159
2017-07-26 19:15:29 +00:00
Adam Nemet
7b7de60cec Migrate SimplifyLibCalls to new OptimizationRemarkEmitter
Summary:
This changes SimplifyLibCalls to use the new OptimizationRemarkEmitter
API.

In fact, as SimplifyLibCalls is only ever called via InstCombine,
(as far as I can tell) the OptimizationRemarkEmitter is added there,
and then passed through to SimplifyLibCalls later.

I have avoided changing any remark text.

This closes PR33787

Patch by Sam Elliott!

Reviewers: anemet, davide

Reviewed By: anemet

Subscribers: davide, mehdi_amini, eraman, fhahn, llvm-commits

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

llvm-svn: 309158
2017-07-26 19:03:18 +00:00
Andrew V. Tischenko
9cd287f79d This patch returns proper value to indicate the case when instruction throughput can't be calculated.
Differential revision https://reviews.llvm.org/D35831

llvm-svn: 309156
2017-07-26 18:55:14 +00:00
Adrian Prantl
88c4ea2b5f Do a better job at emitting prefrabricated skeleton CUs.
This is a better fix than r308708 for the problem introduced in
r304020. It restores the skeleton CU testcases modified by that commit
to their original form and most importantly ensures that
frontend-generated skeleton CUs (such as used to point to Clang
modules) come after the regular CUs. This broke for DICompileUnit
nodes that don't have any immediate children because they are now
constructed lazily instead of the order in which they are listed in
!llvm.dbg.cu. After this commit we still don't guarantee that order,
but we do guarantee that empty skeletons come last.

Shipping versions of LLDB are very sensitive to the ordering of
CUs. I'll track a fix for LLDB to be more permissive separately.
This fixes a test failure in the LLDB testsuite.

rdar://problem/33357252

llvm-svn: 309154
2017-07-26 18:48:32 +00:00
Eric Beckmann
93561cd605 Unlink nodes instead of copying, to avoid memory problems.
llvm-svn: 309151
2017-07-26 18:33:21 +00:00
Jakub Kuderski
fc07484cd4 [Dominators] Change Roots type to SmallVector
Summary: We can use the template parameter `IsPostDom` to pick an appropriate SmallVector size to store DomTree roots for dominators and postdominators. Before, the code would always allocate memory with `std::vector`.

Reviewers: dberlin, davide, sanjoy, grosser

Reviewed By: grosser

Subscribers: llvm-commits

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

llvm-svn: 309148
2017-07-26 18:27:39 +00:00
Jakub Kuderski
5ad1cf8f51 [Dominators] Move root-finding out of DomTreeBase and simplify it
Summary:
This patch moves root-finding logic from DominatorTreeBase to GenericDomTreeConstruction.h.
It makes the behavior simpler and more consistent by always adding a virtual root to PostDominatorTrees.

Reviewers: dberlin, davide, grosser, sanjoy

Reviewed By: dberlin

Subscribers: llvm-commits

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

llvm-svn: 309146
2017-07-26 18:07:40 +00:00
Reid Kleckner
c4e1589a7b Un-XFAIL some internal lit tests on Windows, they pass for me locally
llvm-svn: 309144
2017-07-26 18:04:18 +00:00
Eric Beckmann
6a6a789661 Diffing against a file that is itself used in the test seems to be a bad
idea, because it might get locked down and rendered unopenable.

llvm-svn: 309142
2017-07-26 17:47:44 +00:00
Rafael Espindola
5ab55f1b92 Simplify. NFC.
llvm-svn: 309141
2017-07-26 17:27:27 +00:00
George Karpenkov
d71b450489 Fix LIT test breakage
Differential Revision: https://reviews.llvm.org/D35867

llvm-svn: 309140
2017-07-26 17:19:36 +00:00
Simon Pilgrim
2c06f255fd [X86][AVX512] Regenerated and cleaned up extension tests.
llvm-svn: 309139
2017-07-26 16:47:00 +00:00