1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Commit Graph

187796 Commits

Author SHA1 Message Date
Sergey Dmitriev
f41015fa25 [yaml2obj][COFF] Add support for extended relocation tables
Summary:
The tool does not correctly handle COFF sections with extended relocation tables (with IMAGE_SCN_LNK_NRELOC_OVFL bit set), this patch fixes this problem.

But I have cheated a bit in the test (to make it smaller) because extended relocation table is supposed to be used when the number of relocations exceeds 65534. Otherwise the test size would be pretty big.

Reviewers: jhenderson, MaskRay, mstorsjo

Reviewed By: mstorsjo

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70251
2019-11-14 12:39:28 -08:00
Daniel Sanders
aa4a5a68ad [globalisel][irtanslator] The IRTranslator should preserve TBAA information 2019-11-14 12:11:27 -08:00
Paul Robinson
d53523508c Fix up lit's tests to run in a multi-config build environment.
Differential Revision: https://reviews.llvm.org/D70239
2019-11-14 11:24:41 -08:00
Sumanth Gundapaneni
63287ca7c2 [Pipeliner] Fix an assertion caused by iterator invalidation. 2019-11-14 13:08:06 -06:00
Sumanth Gundapaneni
8685d2fa08 [Hexagon] Validate the iterators before converting them to mux.
The conditional instructions that are translated to mux instructions
are deleted and the iterators to these deleted instructions are being
used later. This patch fixed this issue.
2019-11-14 13:01:16 -06:00
Sumanth Gundapaneni
a15681f3b2 Update lit infra to detect "MemoryWithOrigins' sanitizer build.
Differential Revision: https://reviews.llvm.org/D68399
2019-11-14 12:57:17 -06:00
Sam Elliott
99e8ed7f33 [RISCV] Use addi rather than add x0
Summary:
The RISC-V backend used to generate `add <reg>, x0, <reg>` in a few
instances. It seems most places no longer generate this sequence.

This is semantically equivalent to `addi <reg>, <reg>, 0`, but the
latter has the advantage of being noted to be the canonical instruction
to be used for moves (which microarchitectures can and should recognise
as such).

The changed testcases use instruction aliases - `mv <reg>, <reg>` is an
alias for `addi <reg>, <reg>, 0`.

Reviewers: luismarques

Reviewed By: luismarques

Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70124
2019-11-14 18:43:38 +00:00
Matthew Voss
d01e45a895 Add support for multi-module bitcode files to llvm-dis
Summary:
This change allows llvm-dis to disassemble multi-module bitcode
files, including the associated module summary.

Reviewers: tejohnson, pcc, mehdi_amini

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70153
2019-11-14 10:40:41 -08:00
Sergey Dmitriev
e22f47fa29 [llvm-objcopy][COFF] Add support for extended relocation tables
Summary: This patch adds support for COFF objects with extended relocation tables to the llvm-objcopy tool.

Reviewers: jhenderson, MaskRay, mstorsjo, alexshap, rupprecht

Reviewed By: mstorsjo

Subscribers: jakehehrlich, abrachet, seiya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70205
2019-11-14 10:31:50 -08:00
Luís Marques
c66d83c8cc [RISCV] Fix wrong CFI directives
Summary: Removes CFI CFA directives that could incorrectly propagate
beyond the basic block they were inteded for. Specifically it removes
the epilogue CFI directives. See the branch_and_tail_call test for an
example of the issue. Should fix the stack unwinding issues caused by
the incorrect directives.

Reviewers: asb, lenary, shiva0217
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69723
2019-11-14 18:29:50 +00:00
Craig Topper
15c476d25a [ExpandReductions] Don't push all intrinsics to the worklist. Just push reductions.
We were previously pushing all intrinsics used in a function to the
worklist. This is wasteful for memory in a function with a lot of
intrinsics.

We also ask TTI if we should expand every intrinsic, but we only
have expansion support for the reduction intrinsics. This just
wastes time for the non-reduction intrinsics.

This patch only pushes reduction intrinsics into the worklist and
skips other intrinsics.

Differential Revision: https://reviews.llvm.org/D69470
2019-11-14 10:26:53 -08:00
Reid Kleckner
9ae9b60e58 Replace wrongly deleted header banner, fix formatting
I reviewed the diff hunks of 05da2fe52162c80dfa that don't contain
'#include' lines, and found two unintended changes. I deleted a header
banner inadvertently while inserting a header, and changed the
indentation of a constructor in an odd way. Add back the banner, and
reformat the constructor.
2019-11-14 10:21:42 -08:00
Tom Stellard
9c7e12f3ab [cmake] Emit an error for -DBUILD_SHARED_LIBS=ON on Windows
Summary:
The BUILD_SHARED_LIBS=ON build fails on Windows, so prevent users from
enabling it.

Reviewers: beanz, smeenai, compnerd, phosek

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70161
2019-11-14 10:19:02 -08:00
Kevin P. Neal
2dbca15279 Document more specifically the rounding for "llvm.round".
Differential Revision: https://reviews.llvm.org/D68810
2019-11-14 13:15:15 -05:00
Sanjay Patel
70a8540846 [InstCombine] remove duplicate code for simplifying a shuffle; NFCI
The transform is already handled by InstSimplify or earlier
in InstCombine, so trying to do it again is not necessary.
2019-11-14 13:12:25 -05:00
Kevin P. Neal
592d69a8a6 Make the language more consistent since I'm about to commit a content
change next.
2019-11-14 13:10:59 -05:00
Adrian McCarthy
8b5caf1d2e Improve VFS compatibility on Windows
Keys in a virtual file system can be in Posix or Windows form or even
a combination of the two.  Many VFS tests (and a few Clang tests) were
XFAILed on Windows because of false negatives when comparing paths.

First, we default CaseSenstive to false on Windows.  This allows
drive letters like "D:" to match "d:".  Windows filesystems are, by
default, case insensitive, so this makes sense even beyond the drive
letter.

Second, we allow slashes to match backslashes when they're used as the
root component of a path.

Both of these changes are limited to RedirectingFileSystems, so there's
little chance of affecting other path handling.

These changes allow eleven of the VFS tests to pass on Windows as well
as three other Clang tests, so they have re-enabled.

This solves the majority of PR43272.  Additional VFS test failures will
be fixed in separate patches.

Differential Revision: https://reviews.llvm.org/D69958
2019-11-14 08:48:47 -08:00
Lang Hames
2b37eeb76e [ADT] Move drop_begin from iterator_range.h into STLExtras.
Summary:
drop_begin depends on adl_begin/adl_end, which are defined in STLExtras.h,
but we can't just #include STLExtras.h in iterator_range.h as that would
introduce a circular reference (STLExtras.h already depends on
iterator_range.h). The simplest solution is to move drop_begin into
STLExtras.h, which is a reasonable home for it anyway.

Reviewers: dblaikie

Subscribers: dexonsmith, ributzka, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70189
2019-11-14 08:10:59 -08:00
Sanjay Patel
3d7a4708cc [InstCombine] regenerate test CHECKs; NFC
There's a discussion about changing a shufflevector
transform in:
https://bugs.llvm.org/show_bug.cgi?id=43958

It would protect against our current undef/poison
behavior, and these are all tests that could be affected.
2019-11-14 10:23:16 -05:00
Benjamin Kramer
5fe79eb481 Revert "[ThinLTO] Add correctness check for RO/WO variable import"
This reverts commit a2292cc537b561416c21e8d4017715d652c144cc. Breaks
clang selfhost w/ThinLTO.
2019-11-14 16:07:13 +01:00
Ed Maste
d1026cccc3 On FreeBSD use AT_EXECPATH from ELF auxiliary vectors for getExecutablePath
/proc/curproc/file and the KERN_PROC_PATHNAME sysctl may not return the
desired path if there are multiple hardlinks to the file, or if the path has
expired from the namecache.

Reviewed By:	theraven

Differential Revision:	https://reviews.llvm.org/D70198
2019-11-14 09:48:48 -05:00
Tim Northover
21acb96c61 ARM: allow rewriting frame indexes for all prefetch variants.
For some reason we could handle PLD but not PLDW or PLI, but all of them can
potentially refer to the stack region (if weirdly for PLI).
2019-11-14 14:26:28 +00:00
Simon Pilgrim
96432067a7 GCOVProfiling - fix uninitialized variable warnings + make getFuncChecksum() const. NFCI. 2019-11-14 14:21:18 +00:00
Simon Pilgrim
eadb492c3a WholeProgramDevirt - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:18 +00:00
Simon Pilgrim
d86d53173d Fix uninitialized variable warning. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim
ddb5008c42 Fix uninitialized variable warning. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim
051d6cde9e SROA - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:17 +00:00
Simon Pilgrim
e0b1d25108 Fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Simon Pilgrim
7165ac3d03 Hexagon - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Simon Pilgrim
537cf81e49 MSP430 - fix uninitialized variable warnings. NFCI. 2019-11-14 14:21:16 +00:00
Kerry McLaughlin
de674e0de7 [AArch64][SVE] Implement floating-point comparison & reduction intrinsics
Summary:
Adds intrinsics for the following:
 - fadda & faddv
 - fminv, fmaxv, fminnmv & fmaxnmv
 - facge & facgt
 - fcmp[eq|ge|gt|ne|uo]

Reviewers: sdesmalen, huntergr, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69858
2019-11-14 13:47:08 +00:00
Sjoerd Meijer
a2b449b8f5 [LV] PreferPredicateOverEpilog respecting predicate loop hint
The vectoriser queries TTI->preferPredicateOverEpilogue to determine if
tail-folding is preferred for a loop, but it was not respecting loop hint
'predicate' that can disable this, which has now been added. This showed that
we were incorrectly initialising loop hint 'vectorize.predicate.enable' with 0
(i.e. FK_Disabled) but this should have been FK_Undefined, which has been
fixed.

Differential Revision: https://reviews.llvm.org/D70125
2019-11-14 13:10:44 +00:00
Paweł Bylica
893ad6f0bd [DAGCombiner] Drop redundant DAG method param. NFC 2019-11-14 14:02:53 +01:00
Paweł Bylica
5acb4d346f [DAGCombiner] Use TLI field already available. NFC 2019-11-14 14:02:52 +01:00
Miloš Stojanović
869c4a491a [mips][NFC] Remove old FIXME comment
This was fixed in rL229595 but this comment was missed.

Differential Revision: https://reviews.llvm.org/D70231
2019-11-14 13:14:31 +01:00
Kerry McLaughlin
1689d272da [AArch64][SVE] Implement remaining floating-point arithmetic intrinsics
Summary:
Adds intrinsics for the following:
  - fabs & fneg
  - fexpa
  - frint[a|i|m|n|p|x|z]
  - frecpe, frecps & frecpx
  - fsqrt, frsqrte & frsqrts

Reviewers: huntergr, sdesmalen, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69800
2019-11-14 11:59:00 +00:00
Kerry McLaughlin
f08a0f17e4 [AArch64][SVE] Implement additional floating-point arithmetic intrinsics
Summary:
Adds intrinsics for the following:
  - ftssel
  - fcadd, fcmla
  - fmla, fmls, fnmla, fnmls
  - fmad, fmsb, fnmad, fnmsb

Reviewers: sdesmalen, huntergr, dancgr, mgudim

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69707
2019-11-14 11:35:50 +00:00
QingShan Zhang
31cfd0542e [NFC] Add one test for PowerPC to verify the sext_inreg for vector type. 2019-11-14 10:57:05 +00:00
Kevin Petit
da35149d44 Fix use of add_llvm_tool in projects that build no targets
Projects that set LLVM_TARGETS_TO_BUILD to an empty list
can't use add_llvm_tool (and probably other macros).

Here's the error that this change fixes:

list sub-command REMOVE_ITEM requires two or more arguments.

https://reviews.llvm.org/D70167

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-11-14 10:53:46 +00:00
Daniil Suchkov
eace0ab022 Revert "[InstCombine] Fold PHIs with equal incoming pointers"
This reverts commit a2f6ae9abffcba260c22bb235879f0576bf3b783.
It is reverted due to clang-cmake-armv7-selfhost buildbot failure.
2019-11-14 17:42:01 +07:00
Daniil Suchkov
8cab69aed5 [InstCombine] Fold PHIs with equal incoming pointers
This is a resubmission of bbb29738b58aaf6f6518269abdcf8f64131665a9 that
was reverted due to clang tests failures. It includes the fix and
additional IR tests for the missed case.

Summary:
In case when all incoming values of a PHI are equal pointers, this
transformation inserts a definition of such a pointer right after
definition of the base pointer and replaces with this value both PHI and
all it's incoming pointers. Primary goal of this transformation is
canonicalization of this pattern in order to enable optimizations that
can't handle PHIs. Non-inbounds pointers aren't currently supported.

Reviewers: spatel, RKSimon, lebedev.ri, apilipenko

Reviewed By: apilipenko

Tags: #llvm

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D68128
2019-11-14 17:04:32 +07:00
Djordje Todorovic
0335b1b5a6 [AArch64][DebugInfo] Fix incorrect call site param value produced by MOVZXi
This resolves the problem with the truncation of the immediate operand.

Differential Revision: https://reviews.llvm.org/D70168
2019-11-14 11:02:35 +01:00
Anna Welker
d1a6741f19 [NFC] Fix typo in ARMBaseRegisterInfo 2019-11-14 09:56:18 +00:00
evgeny
3ab27f6ce8 [ThinLTO] Add correctness check for RO/WO variable import
This patch adds an assertion check for exported read/write-only
variables to be also in import list for module. If they aren't
we may face linker errors, because read/write-only variables are
internalized in their source modules. The patch also changes
export lists to store ValueInfo instead of GUID for performance
considerations.

Differential revision: https://reviews.llvm.org/D70128
2019-11-14 12:24:05 +03:00
Pavel Labath
74f7478d2b DWARFDebugLoclists: stricter base address handling
Summary:
This removes the use of zero as a base address in section-based dumping.
Although this will often be true for (unlinked) object files with a
single compile unit, it is not true in general. This means that
section-based dumping will not be able to resolve entries referencing
the base address (DW_LLE_offset_pair) -- it wasn't able to do that
correctly before either, but now it will be more explicit about it. One
exception to that is if the location list contains an explicit
DW_LLE_base_address entry -- in this case the dumper will pick it up,
and resolve subsequent entries normally.

The patch also removes the fallback to zero in the "inline" dumping in
case the compile unit does not contain a base address.

Reviewers: dblaikie, probinson, JDevlieghere, aprantl, SouraVX

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70115
2019-11-14 10:01:48 +01:00
Dimitry Andric
f4ae71aa6d Check result of emitStrLen before passing it to CreateGEP
Summary:
This fixes PR43081, where the transformation of `strchr(p, 0) -> p +
strlen(p)` can cause a segfault, if `-fno-builtin-strlen` is used.  In
that case, `emitStrLen` returns nullptr, which CreateGEP is not designed
to handle.  Also add the minimized code from the PR as a test case.

Reviewers: xbolva00, spatel, jdoerfert, efriedma

Reviewed By: efriedma

Subscribers: lebedev.ri, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D70143
2019-11-14 08:04:36 +01:00
Simon Atanasyan
b40d60dd44 [mips] Use local variable to escape repetitive calls of getOpcode. NFC 2019-11-14 09:29:31 +03:00
Simon Atanasyan
3ca1a5f397 [mips] Use isInt<> call instead of explicit range checking. NFC 2019-11-14 09:29:31 +03:00
Tom Stellard
a0be0e14e4 [cmake] Prevent building with BUILD_SHARED_LIBS and LLVM_LINK_LLVM_DYLIB
Summary: This doesn't work, so error early if someone tries it.

Reviewers: beanz, smeenai, compnerd, phosek

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70160
2019-11-13 21:29:31 -08:00
Francesco Petrogalli
07c77a68ae [ModuleUtils] Clean up header file. [NFC]
Summary:
1. Remove unused forward declaration.
2. Remove unnecessary `\defgroup` in docygen documentation.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70218
2019-11-14 04:36:45 +00:00