1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Commit Graph

196099 Commits

Author SHA1 Message Date
Julian Lettner
18b974f8de [lit] Don't use Python3 yet
String interpolation is a Python3 feature, we can't use it yet.
2020-05-01 17:36:21 -07:00
Thomas Lively
67397ff9ab [WebAssembly] Renumber SIMD opcodes
Summary:
As described in https://github.com/WebAssembly/simd/pull/209. This is
the final reorganization of the SIMD opcode space before
standardization. It has been landed in concert with corresponding
changes in other projects in the WebAssembly SIMD ecosystem.

Reviewers: aheejin

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79224
2020-05-01 17:20:49 -07:00
Nemanja Ivanovic
c75883c3e9 [PowerPC] Refactor PPCInstrVSX.td
Over time, we have made many additions to this file and it has frankly become a
bit of a mess. This has led to at least one issue - we have a number of
instructions where the side effects flag should be set to false and we neglected
to do this. This patch suggests a refactoring that should make the file much
more maintainable. The file is split up into major sections and the nesting
level is reduced, predicate blocks merged, etc.

Sections:
  - Custom PPCISD node definitions
  - Predicate definitions
  - Instruction formats
  - Instruction definitions
  - Helper DAG definitions
  - Anonymous patterns
  - Instruction aliases

Differential revision: https://reviews.llvm.org/D78132
2020-05-01 19:17:39 -05:00
Julian Lettner
08d05ef4bc [lit] Extract by_suite_and_test_path sort key function 2020-05-01 17:03:55 -07:00
Julian Lettner
36dc482004 [lit] Create report generators during argument parsing 2020-05-01 17:03:55 -07:00
Julian Lettner
c62715658f [lit] Small refinements for xunit report output 2020-05-01 17:03:55 -07:00
Julian Lettner
8c252224cc [lit] Factor out report generators into separate file
Factor out the report generators from main.py into reports.py.

I verified that we generate the exact same output by running `check-all`
and comparing the new and old output for both report flavors.
2020-05-01 17:03:55 -07:00
Julian Lettner
63e5e7b26a [lit] Only update specific fields from remote test object
Don't update whole test object from the remote (pickled) finished test
object.  Doing so also changes the config and suite members, which we
want to avoid.
2020-05-01 17:03:54 -07:00
LLVM GN Syncbot
c626aa36ec [gn build] Port 6cb073133c5 2020-05-02 00:00:04 +00:00
Mircea Trofin
216c18a682 [llvm][NFC] Rename variable as per https://reviews.llvm.org/D79215
Operator error - performed the rename and didn't save.
2020-05-01 16:30:41 -07:00
Mircea Trofin
a529d6ce7e [llvm][NFC] Inliner: simplify inlining decision logic
Summary:
shouldInline makes a decision based on the InlineCost of a call site, as
well as an evaluation on whether the site should be deferred. This means
it's possible for the decision to be not to inline, even for an
InlineCost that would otherwise allow it.

Both uses of shouldInline performed the exact same logic after calling
it. In addition, the decision on whether to inline or not was
communicated through two values of the Option<InlineCost> return value:
None, or an InlineCost evaluating to false.

Simplified by:
- encapsulating the decision in the return object. The bool it evaluates
to communicates unambiguously the decision. The InlineCost is also
available.
- encapsulated the common post-shouldInline code into shouldInline.

Reviewers: davidxl, echristo, eraman

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79215
2020-05-01 16:18:59 -07:00
Fangrui Song
4ae6ca1cf2 [llvm-objcopy] -O binary: skip empty sections
After SHF_ALLOC sections are ordered by LMA:

* If initial sections are empty, GNU objcopy skips their contents while we
  emit leading zeros. (binary-paddr.test %t4)
* If trailing sections are empty, GNU objcopy skips their contents while we
  emit trailing zeros. (binary-paddr.test %t5)

This patch matches GNU objcopy's behavior. Linkers don't keep p_memsz
PT_LOAD segments. Such empty sections would not have a containing
PT_LOAD and `Section::ParentSegment` might be null if linkers fail to
optimize the file offsets (lld D79254).

In particular, without D79254, the arm Linux kernel's multi_v5_defconfig
depends on this behavior: in `vmlinux`, an empty .text_itcm is mapped at
a very high address (0xfffe0000) but the kernel does not expect
`objcopy -O binary` to create a very large `arch/arm/boot/Image`
(0xfffe0000-0xc0000000 ~= 1GiB). See https://bugs.llvm.org/show_bug.cgi?id=45632

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D79229
2020-05-01 14:25:37 -07:00
David Tenty
485cb308d9 [AIX] Skip unsupported ORC JIT RemoteObjectLayerTest on AIX
Summary:
Currently the XCOFF backend does not support writing 64-bit object
files, which the ORC JIT tests will try to exercise if we are on AIX. This patch
selectively disables the tests on AIX for now.

Reviewers: hubert.reinterpretcast, jasonliu, DiggerLin, stevewan, lhames

Reviewed By: hubert.reinterpretcast, lhames

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78813
2020-05-01 17:03:05 -04:00
Christopher Tetreault
5cf24eb9b3 [SVE] Fix invalid use of VectorType::getNumElements() in PatternMatch
Summary:
Update cst_pred_ty to only work on FixedVectorType. It operates on
integers and integer vectors, and returns true if the predicate returns
true for all elements of the vector. This operation is not possible on
scalable vectors. Make this behavior explicit in the code and document
the fact that it only tests fixed width vectors.

Identified by test LLVM.Transforms/InstCombine::nsw.ll

Reviewers: efriedma, c-rhodes, david-arm, spatel

Reviewed By: david-arm

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79195
2020-05-01 12:35:08 -07:00
River Riddle
42b872688a [IndexedAccessorRange] Only offset the base if the index is non-zero.
This is more efficient and removes the need for derived ranges to handle the degenerate empty case.
2020-05-01 11:56:39 -07:00
Vladimir Vereschaka
82c48a86e1 [CMake] Provide a proper default location for llvm-lit for out-of-tree users on Windows host.
llvm-lit gets '.py' extension on Windows host during its configuration.
We need to provide a correct name for llvm-lit including file extension
within LLVM_CONFIG_DEFAULT_EXTERNAL_LIT variable.

Update for commit 45526d29a5b2cf126b83ada3991921970007d16f.

Differential Revision: https://reviews.llvm.org/D79144
2020-05-01 11:48:30 -07:00
Vedant Kumar
efebba70ef [DebugInfo] Update loop metadata in stripNonLineTableDebugInfo
Summary:
Have stripNonLineTableDebugInfo() attach updated !llvm.loop metadata to
an instruction (instead of updating and then discarding the metadata).

This fixes "!dbg attachment points at wrong subprogram for function"
errors seen while archiving an iOS app.

It would be nice -- as a follow-up -- to catch this issue earlier,
perhaps by modifying the verifier to constrain where DILocations are
allowed. Any alternative suggestions appreciated.

rdar://61982466

Reviewers: aprantl, dsanders

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79200
2020-05-01 11:36:05 -07:00
Nico Weber
5d044b8420 Fix pr31836 on Windows too, and correctly handle repeated separators.
The approach in D30000 assumes that the '/' returned by path::begin()
is the first element for absolute paths, but that's not true on
Windows.

Also, on Windows backslashes in include lines often end up escaped
so that there are two of them. Having backslashes in include lines
is undefined behavior in most cases and implementation-defined
behavior in C++20, but since clang treats it as normal repeated
path separators, the diagnostic should too.

Unbreaks -Wnonportable-include-path for absolute paths on Windows,
and unbreaks it on non-Windows in the case of absolute paths with
repeated directory separators.

This affects e.g. the `#include __FILE__` technique if the file
passed to clang has the wrong case for the drive letter. Before:

C:\src\llvm-project>bin\clang-cl.exe c:\src\llvm-project\test.cc
c:\\src\\llvm-project\\test.cc(4,10): warning: non-portable path to file
    '"c\\srccllvm-projectctest.cc.'; specified path differs in case from
    file name on disk [-Wnonportable-include-path]
         ^

Now:

C:\src\llvm-project> out\gn\bin\clang-cl c:\src\llvm-project\test.cc
c:\\src\\llvm-project\\test.cc(4,10): warning: non-portable path to file
    '"C:\\src\\llvm-project\\test.cc"'; specified path differs in case from
    file name on disk [-Wnonportable-include-path]
         ^

Differential Revision: https://reviews.llvm.org/D79223
2020-05-01 14:17:01 -04:00
Craig Topper
19f2437843 [X86] Lower the cost of v4i64->v4i32 truncate with avx512.
We use the vpmovqd instruction which is a single uop. So
the cost should be 1.
2020-05-01 11:09:37 -07:00
Lang Hames
15668dbaec [examples] Fix an incomplete comment. 2020-05-01 11:06:41 -07:00
Lang Hames
950b4bd8f4 [examples] Call setProcessAllSections to ensure debug sections aren't droppped.
Calling setProcessAllSections(true) is required to make sure that all sections,
even those not marked as necessary for execution, are passed to the memory
manager.
2020-05-01 11:06:41 -07:00
Christopher Tetreault
4a87d388fc [SVE] Fix invalid usage of VectorType::getNumElements() in InstCombine
Summary:
Make foldVectorBinop return null if the instruction type is a scalable
vector. It is unclear what, if any, of this function works with scalable
vectors.

Identified by test LLVM.Transforms/InstCombine::nsw.ll

Reviewers: efriedma, david-arm, fpetrogalli, spatel

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79196
2020-05-01 10:56:29 -07:00
Sanjay Patel
ba016a3eaf [InstCombine] fix miscompile from multi-use cttz/ctlz transform
PR45762:
https://bugs.llvm.org/show_bug.cgi?id=45762
2020-05-01 13:52:24 -04:00
Sanjay Patel
53f4697f7c [InstCombine] add test for faulty cttz fold (PR45762); NFC 2020-05-01 13:52:23 -04:00
Melanie Blower
a08454f0aa Revert "Reapply "Add support for #pragma float_control" with improvements to"
This reverts commit 69aacaf699922ffe0450f567e21208c10c84731f.
2020-05-01 10:31:09 -07:00
Fangrui Song
89be05da5c [ADT] Add DenseSetImpl(begin, end) 2020-05-01 10:10:45 -07:00
Simon Pilgrim
d0e265874f [InstCombine] Additional 'concat of ORs' BSWAP/BITREVERSE tests for D79041 2020-05-01 18:05:24 +01:00
Melanie Blower
ffb5a5058c Reapply "Add support for #pragma float_control" with improvements to
test cases
Add support for #pragma float_control

Reviewers: rjmccall, erichkeane, sepavloff

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

This reverts commit 85dc033caccaa6ab919d57f9759290be41240146, and makes
corrections to the test cases that failed on buildbots.
2020-05-01 10:03:30 -07:00
Georgii Rymar
b46eefe880 [llvm-readobj] - Simplify conditions used for printing segment mappings. NFCI.
This patch is a NFC refactoring.

Currently the logic is overcomplicated, contains dead conditions and is very hard to read.
This patch performs a very straightforward simplification. Probably it can be
simplified and improved more, but we need to land test cases documenting/testing
all the current functionality first.

Differential revision: https://reviews.llvm.org/D78709
2020-05-01 18:57:09 +03:00
Georgii Rymar
e1adf90ced [llvm-readelf] - Do not crash when the PT_INTERP has a broken offset.
We do not verify the p_offset of the PT_INTERP header and tool may
crash when a program interpreter name string goes past the end of the file.

Differential revision: https://reviews.llvm.org/D79013
2020-05-01 18:51:46 +03:00
Georgii Rymar
6239837b28 [llvm-readobj][test] - Stop using binaries in gnu-phdrs.test, split and refine it.
gnu-phdrs.test uses 2 precompiled objects and has issues:

* It does not test all possible program headers.
* It does not test target-specific headers (arm, mips).
* It does not use --strict-whitespace --match-full-line to check the format of the output.
* It is possible to check things better/nicer.
* It also tests --section-mapping.

This patch makes gnu-phdrs.test to stop using binaries and addresses issues above.
It splits --section-mapping testing to gnu-section-mapping.test

I am going to use it as a base for a follow-up patch that should also test
section to segment mapping conditions that we currently have
(see the discussion in D78709)

Differential revision: https://reviews.llvm.org/D78805
2020-05-01 18:31:24 +03:00
Simon Pilgrim
4ff4a52788 [DAG] SimplifyDemandedVectorElts - add INSERT_SUBVECTOR SimplifyMultipleUseDemandedBits handling 2020-05-01 16:20:51 +01:00
Simon Pilgrim
6dd47bbcde [DAG] SimplifyDemandedVectorElts - remove INSERT_SUBVECTOR if we don't demand the subvector 2020-05-01 16:20:51 +01:00
Sanjay Patel
85d4a0697c [InstSimplify] allow insertelement-with-undef fold if poison-safe
The more general fold was not poison-safe, so it was removed:
rG5486e00
...but it is ok to have this transform if analysis can determine
the vector contains no poison. The test shows a simple example
of that: constant integer elements are not poison.
2020-05-01 10:34:29 -04:00
Sanjay Patel
800c89a744 [InstSimplify] update test; NFC
Missed this test diff when committing:
rG5486e00dc3
2020-05-01 10:06:56 -04:00
Benjamin Kramer
906fd75443 [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
Florian Hahn
1d38c691e8 [SCCP] Get a copy of the state of CopyOf once.
This fixes potential reference invalidations, when no lattice value is
assigned for CopyOf. As the state of CopyOf won't change while in
handleCallResult, we can get a copy once and use that.

Should fix PR45749.
2020-05-01 14:46:35 +01:00
Melanie Blower
65553e0fc8 Revert "Add support for #pragma float_control"
This reverts commit 4f1e9a17e9d28bdfd035313c96b3a5d4c91a7733.
due to fail on buildbot, sorry for the noise
2020-05-01 06:36:58 -07:00
Sanjay Patel
f6bba37bfb [InstSimplify] remove poison-unsafe insertelement of undef value
PR45481:
https://bugs.llvm.org/show_bug.cgi?id=45481

SDAG has an identical transform to this, so there's little
chance of any real-world impact. OTOH, that means we are
effectively sweeping the bug out of sight because poison
exists in codegen too.
2020-05-01 09:22:05 -04:00
Melanie Blower
f12cbd3a28 Add support for #pragma float_control
Reviewers: rjmccall, erichkeane, sepavloff

Differential Revision: https://reviews.llvm.org/D72841
2020-05-01 06:14:24 -07:00
Simon Pilgrim
7438c422b6 [DAG] SimplifyDemandedVectorElts - add EXTRACT_SUBVECTOR SimplifyMultipleUseDemandedBits handling 2020-05-01 13:48:07 +01:00
Sanjay Patel
b6fcffba6f [InstCombine] adjust tests for pow(); NFC
D68231 would change this, but the existing test
doesn't cover what was probably intended (a libcall test).
2020-05-01 08:42:51 -04:00
Benjamin Kramer
02eef08385 [IR] AttributeList::getContext has a single user, remove it. 2020-05-01 14:18:29 +02:00
Benjamin Kramer
4837b46bfc [IR] Make Attributes and AttributeLists trivially destructible and BumpPtrAllocate them 2020-05-01 14:12:17 +02:00
Eric Astor
7a92ef278e [ms] llvm-lib gives a more useful error if no inputs and no output path are provided
Summary:
If no inputs and no output path are provided, llvm-lib should produce a useful error.

Before this, it would fail by reading from an unitialized StringRef.

Reviewed By: vvereschaka

Differential Revision: https://reviews.llvm.org/D79227
2020-05-01 07:43:32 -04:00
Jay Foad
a751830308 Fix indentation. NFC. 2020-05-01 11:38:07 +01:00
Simon Pilgrim
fe80062bb3 [X86] Improving folding of concat_vectors of subvectors from the same broadcast
Handle concat_vectors(extract_subvector(broadcast(x)), extract_subvector(broadcast(x))) -> broadcast(x)

To expose this we also need collectConcatOps to recognise the insert_subvector(x, extract_subvector(x, lo), hi) subvector splat pattern
2020-05-01 11:23:10 +01:00
James Henderson
40096a8dfd [docs][llvm-cxxfilt] Document --no-strip-underscore option
This option was added several months ago in commit e84468c1.

Reviewed by: MaskRay, erik.pilkington, steven_wu

Differential Revision: https://reviews.llvm.org/D79166
2020-05-01 11:03:06 +01:00
Jay Foad
9bc622a938 [AMDGPU] Remove unnecessary s_waitcnt between VMEM loads
VMEM loads of the same type (sampler vs no sampler) are guaranteed to
write their result registers in order, so there is no need for an
s_waitcnt even if they write to overlapping vgprs.

Differential Revision: https://reviews.llvm.org/D79176
2020-05-01 10:10:23 +01:00
Craig Topper
56c262103b [X86] Update type actions for ISD::TRUNCATE with avx512f to be Legal when possible. NFCI
The Custom handler wasn't doing anything for these cases anyway.
2020-04-30 23:27:29 -07:00