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

150134 Commits

Author SHA1 Message Date
Frederich Munch
14d98ce03b Force RegisterStandardPasses to construct std::function in the IPO library.
Summary: Fixes an issue using RegisterStandardPasses from a statically linked object before PassManagerBuilder::addGlobalExtension is called from a dynamic library.

Reviewers: efriedma, theraven

Reviewed By: efriedma

Subscribers: mehdi_amini, mgorny, llvm-commits

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

llvm-svn: 305303
2017-06-13 16:48:41 +00:00
Krzysztof Parzyszek
62e8d9cca2 [Hexagon] Generate multiply-high instruction in isel
llvm-svn: 305302
2017-06-13 16:21:57 +00:00
Yonghong Song
d9a0ad1d72 bpf: clang-format on BPFAsmPrinter.cpp
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 305301
2017-06-13 16:17:20 +00:00
Krzysztof Parzyszek
79e80dc931 [Hexagon] Don't kill live registers when creating mux out of tfr
When a mux instruction is created from a pair of complementary conditional
transfers, it can be placed at the location of either the earlier or the
later of the transfers. Since it will use the operands of the original
transfers, putting it in the earlier location may hoist a kill of a source
register that was originally further down. Make sure the kill flag is
removed if the register is still used afterwards.

llvm-svn: 305300
2017-06-13 16:07:36 +00:00
Reid Kleckner
e5ca9f3c69 [PDB] Add a module descriptor for every object file
Summary:
Expose the module descriptor index and fill it in for section
contributions.

Reviewers: zturner

Subscribers: llvm-commits, ruiu, hiraditya

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

llvm-svn: 305296
2017-06-13 15:49:13 +00:00
Simon Dardis
d61b9ed9eb [MIPS] BuildCondBr should preserve MO flags
While simplifying branches in the MachineInstr representation, the
routine BuildCondBr must preserve flags on register MachineOperands. In
particular, it must preserve the <undef> flag.

This fixes a bug that is unlikely to occur in any real scenario, but
which bugpoint is likely to introduce.

Patch By Nick Johnson!

Reviewers: ahatanak, sdardis

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

llvm-svn: 305290
2017-06-13 14:11:29 +00:00
Krzysztof Parzyszek
4e374da708 [Hexagon] Stop pmpy recognition when shift conversion fails
The conversion of shifts from right shifts to left shifts may fail.
In such case, the pmpy recognition cannot proceed.

llvm-svn: 305289
2017-06-13 13:51:49 +00:00
Oliver Stannard
1272836e65 [ARM] Add scheduling classes for VFNM[AS]
The VFNM[AS] instructions did not have scheduling information attached, which
was causing assertion failures with the Cortex-A57 scheduling model and
-fp-contract=fast, because the Cortex-A57 sched model claims to be complete.

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

llvm-svn: 305288
2017-06-13 13:04:32 +00:00
Simon Pilgrim
73ef01f9e3 Strip UTF8 BOM that got added in rL305091
Seems my recent move to VS2017 has resulted in a few text editor issues.....

llvm-svn: 305285
2017-06-13 10:17:57 +00:00
Simon Pilgrim
c10711a471 [X86][SSE] Refactor getTargetConstantBitsFromNode to avoid large APInts (PR32037)
Much of PR32037's compile time regression is due to getTargetConstantBitsFromNode always creating large (>64bit) APInts during the bitcasting from the source data to the destination bitwidth.

This commit avoids this bitcast stage if the data is already the correct bitwidth.

llvm-svn: 305284
2017-06-13 10:13:48 +00:00
Simon Pilgrim
bba8aa74ec Strip UTF8 BOM that got added for some reason in rL305163
llvm-svn: 305282
2017-06-13 09:58:27 +00:00
NAKAMURA Takumi
12674933d2 PPCISelLowering.cpp: Fix warnings in r305214. [-Wdocumentation]
llvm-svn: 305277
2017-06-13 07:34:32 +00:00
Craig Topper
8c6acba7d5 [AVX-512] Mark masked VPCMP instructions as commutable.
llvm-svn: 305276
2017-06-13 07:13:50 +00:00
Craig Topper
f2e7ed1ad9 [AVX-512] Mark masked version of vpcmpeq as being commutable.
llvm-svn: 305275
2017-06-13 07:13:47 +00:00
Craig Topper
6f0ba35877 [X86] Add masked integer compare instructions to load folding tables.
llvm-svn: 305274
2017-06-13 07:13:44 +00:00
Daniel Jasper
d0a767ea37 Read /out:%t which was (accidentally?) removed in r305258.
Without it, the source directory gets polluted.

llvm-svn: 305271
2017-06-13 07:00:05 +00:00
Brian Gesiak
aa9f37889f [Lexicon] Add GVN
Summary: Add a lexicon entry for global value numbering.

Reviewers: davide, majnemer

Reviewed By: davide

Subscribers: llvm-commits, inouehrs

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

llvm-svn: 305270
2017-06-13 03:06:16 +00:00
David Blaikie
6a6cb1bca8 Inliner: Avoid calling shouldInline until it's absolutely necessary
This restores the order of evaluation (& conditionalized evaluation) of
isTriviallyDeadInstruction, InlineHistoryIncludes, and shouldInline
(with the addition of a shouldInline call after
isTriviallyDeadInstruction) from before r305245.

llvm-svn: 305267
2017-06-13 02:24:09 +00:00
Sam Clegg
4974348d43 [WebAssembly] Fix symbol type for addresses of external functions
These symbols were previously not being marked as functions
so were appearing as globals instead, and with the incorrect
relocation type.

Without this fix, objects that take address of external
functions include them as global imports rather than function
imports which then fails at link time.

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

llvm-svn: 305263
2017-06-13 01:42:21 +00:00
George Burgess IV
bde7e3cf51 Fix signed/unsigned comparison warning; NFC
llvm-svn: 305262
2017-06-13 01:28:49 +00:00
Wolfgang Pieb
2375da374a Adding one test that I forgot to include with the commit for https://reviews.llvm.org/D32779.
NFC

llvm-svn: 305261
2017-06-13 00:42:03 +00:00
Eric Beckmann
afc26ee36f Revert "Revert "Fix alignment bug in COFF emission.""
This revert was done so that my other patch to add test framework could
land separately.  Now the revert can be reverted and this patch can
reland.

This reverts commit 18b3c75b2b0d32601fb60a06b9672c33d6f0dff9.

llvm-svn: 305259
2017-06-13 00:19:43 +00:00
Eric Beckmann
b3c9a7e396 Update the test framework for llvm-cvtres to be more comprehensive.
Summary: Added test cases for multiple machine types, file merging, multiple languages, and more resource types.  Also fixed new bugs these tests exposed.

Subscribers: javed.absar, llvm-commits, hiraditya

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

llvm-svn: 305258
2017-06-13 00:16:32 +00:00
Eric Beckmann
6c8eb1b63d Revert "Fix alignment bug in COFF emission."
I accidentally combined this patch with one for adding more tests, they
should be separated.

This reverts commit 3da218a523be78df32e637d3446ecf97c9ea0465.

llvm-svn: 305257
2017-06-13 00:15:47 +00:00
Eric Beckmann
1689a04f57 Fix alignment bug in COFF emission.
Summary: Fix alignment issue in D34020, by aligning all sections to 8 bytes.

Reviewers: zturner

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 305256
2017-06-13 00:06:10 +00:00
Craig Topper
9a2bcc12c4 [IR] Remove override of operator new from PHINode.
This just forwarded to the same signature in User. The version in User is protected so there's no danger of anyone outside of PHINode constructing with the wrong operator new. All PHINodes are created by a static Create function in PHINode.

I believe at one point in history this called User::operator new(s, 0) so it was useful then.

llvm-svn: 305255
2017-06-13 00:00:19 +00:00
Adrian Prantl
cd9f983fb4 Update LangRef for PR27284.
And reverse the ownership between DICompileUnit and DISubprogram.

llvm-svn: 305254
2017-06-12 23:59:43 +00:00
Sam Clegg
c2658e8d8e [WebAssembly] MC: Fix value of R_WEBASSEMBLY_TABLE_INDEX relocations
Previously we were writing the value function index space
value but for these types of relocations we want to be
writing the table element index space value.

Add a test case for these relocation types that fails
without this change.

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

llvm-svn: 305253
2017-06-12 23:52:44 +00:00
Adrian Prantl
268602ff58 Use a fixed target triple to s to appease windows bots
llvm-svn: 305252
2017-06-12 23:47:27 +00:00
Craig Topper
c0cd99d6f3 [IR] Stop deleting other signatures of User::operator new when we override one signature in a class derived from User
User has 3 signatures for operator new today. They take a single size, a size and a number of users, and a size, number of users, and descriptor size.

Historically there used to only be one signature that took size and a number of uses. Long ago derived classes implemented their own versions that took just a size and would call the size and use count version. Then they left an unimplemented signature for the size and use count signature from User. As we moved to C++11 this unimplemented signature because = delete.

Since then operator new has picked up two new signatures for operator new. But when the 3 argument version was added it was never added to the delete list in all of the derived classes where the 2 argument version is deleted. This makes things inconsistent.

I believe once one version of operator new is created in a derived class name hiding will take care of making all of the base class signatures unavailable. So I don't think the deleted lines are needed at all.

This patch removes all of the deletes in cases where there is an override or there is already a delete of another signature (that should trigger name hiding too).

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

llvm-svn: 305251
2017-06-12 23:25:15 +00:00
Zachary Turner
9c7655d8c6 Fix line endings.
llvm-svn: 305249
2017-06-12 23:15:47 +00:00
Zachary Turner
5e40a3b39c [pdb] Don't choke on unknown symbol types.
When we get an unknown symbol type, we might as well at least
dump it.  Same goes for round-tripping through YAML, we can
dump the record contents as raw bytes even if we don't know
how to interpret it semantically.

llvm-svn: 305248
2017-06-12 23:10:31 +00:00
David Blaikie
7ca4288dde Inliner: Don't remove calls to readnone+nounwind (but not always_inline) functions in the AlwaysInliner
llvm-svn: 305245
2017-06-12 23:01:17 +00:00
Adrian Prantl
41b1f2f8c0 Fix an assertion failure when duplicate dbg.declares are present.
This fixes PR33157.
https://bugs.llvm.org//show_bug.cgi?id=33157

We might also think about disallowing duplicate dbg.declare intrinsics
entirely, but this may complicate some passes needlessly.

llvm-svn: 305244
2017-06-12 22:41:06 +00:00
Sanjay Patel
cb72dcdc5d fix typos/formatting; NFC
llvm-svn: 305243
2017-06-12 22:34:37 +00:00
David Blaikie
429e34129f Support: Don't set RLIMIT_AS on child processes when applying a memory limit
It doesn't seem relevant to set an address space limit - this isn't
important in any sense that I'm aware & it gets in the way of things
that use a lot of address space, like llvm-symbolizer.

This came up when I realized that bugpoint regression tests were much
slower with -gsplit-dwarf than plain -g. Turned out that bugpoint
subprocesses (opt, etc) were crashing and doing symbolization - but
bugpoint runs those subprocesses with a 400MB memory limit. So with
plain -g, mmaping the opt binary would exceed the memory limit, fail,
and thus be really fast - no symbolization occurred. Whereas with
-gsplit-dwarf, comically, having less to map in, it would succeed and
then spend lots of time symbolizing.

I've fixed at least the critical part of bugpoint's perf problem there
by adding an option to allow bugpoint to disable symbolization. Thus
improving the perfromance for -gsplit-dwarf and making the -g-esque
speed available without this quirk/accidental benefit.

llvm-svn: 305242
2017-06-12 22:16:49 +00:00
George Burgess IV
02c7539eb9 [ADT] Add type-safe methods to FoldingSetImpl; NFC.
Thankfully, this hasn't uncovered any new bugs. With this, issues like
the one fixed in r305207 (hopefully) shouldn't happen again.

llvm-svn: 305241
2017-06-12 22:08:08 +00:00
Zachary Turner
07bcf68edb Fix printing error.
llvm-svn: 305240
2017-06-12 22:08:03 +00:00
Zachary Turner
573db15cd2 [llvm-pdbutil] Fix one more issue with no-id-stream PDBs.
This one occurred when we were dumping symbols, we have code
that is prepared to dump many different types of symbols,
including symbols which reference an ID stream.  So when creating
the dumper object, we assume that there is an ID stream.  Fix
this assumption.

llvm-svn: 305237
2017-06-12 21:57:41 +00:00
Zachary Turner
f1b7f3b2be Slightly better fix for dealing with no-id-stream PDBs.
The last fix required the user to manually add the required
feature.  This caused an LLD test to fail because I failed to
update LLD.  In practice we can hide this logic so it can just
be transparently added when we write the PDB.

llvm-svn: 305236
2017-06-12 21:46:51 +00:00
Zachary Turner
e433c4fcea [llvm-pdbdump] Don't fail on PDBs with no ID stream.
Older PDBs don't have this.  Its presence is detected by using
the various "feature" flags that come at the end of the PDB
Stream.  Detect this, and don't try to dump the ID stream if the
features tells us it's not present.

llvm-svn: 305235
2017-06-12 21:34:53 +00:00
Anna Thomas
de4f8bdd8d [RS4GC] Drop invalid metadata after pointers are relocated
Summary:
After RS4GC, we should drop metadata that is no longer valid. These metadata
is used by optimizations scheduled after RS4GC, and can cause a miscompile.
One such metadata is invariant.load which is used by LICM sinking transform.
After rewriting statepoints, the address of a load maybe relocated. With
invariant.load metadata on a load instruction, LICM sinking assumes the
loaded value (from a dererenceable address) to be invariant, and
rematerializes the load operand and the load at the exit block.
This transforms the IR to have an unrelocated use of the
address after a statepoint, which is incorrect.
Other metadata we conservatively remove are related to
dereferenceability and noalias metadata.

This patch drops such metadata on store and load instructions after
rewriting statepoints.

Reviewers: reames, sanjoy, apilipenko

Reviewed by: reames

Subscribers: llvm-commits

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

llvm-svn: 305234
2017-06-12 21:26:53 +00:00
Tom Stellard
e6fc9ee805 AMDGPU/GlobalISel: Mark 32-bit G_ADD as legal
Reviewers: arsenm

Reviewed By: arsenm

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

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

llvm-svn: 305232
2017-06-12 20:54:56 +00:00
George Burgess IV
2606aeca30 [ADT] Reduce duplication between {Contextual,}FoldingSet; NFC
This is a precursor to another change (coming soon) that aims to make
FoldingSet's API more type-safe. Without this, the type-safety change
would just duplicate 4 more public methods between the already very
similar classes.

This renames FoldingSetImpl to FoldingSetBase so it's consistent with
the FooBase -> FooImpl<T> -> Foo<T> convention we seem to have with
other containers.

llvm-svn: 305231
2017-06-12 20:52:53 +00:00
Tim Northover
45477d3671 AArch64: don't try to emit an add (shifted reg) for SP.
The "Add/sub (shifted reg)" instructions use the 31 encoding for xzr and wzr
rather than the SP, so we need to use different variants.

Situations where this actually comes up are rare enough (see test-case) that I
think falling back to DAG is fine.

llvm-svn: 305230
2017-06-12 20:49:53 +00:00
Zachary Turner
f6333be573 Fix a null pointer dereference in llvm-pdbutil pretty.
Static data members were causing a problem because I mistakenly
assumed all members would affect a class's layout and so the
Layout member would be non-null.

llvm-svn: 305229
2017-06-12 20:46:35 +00:00
Matthias Braun
b21f8848ef SplitKit: Fix partially live subreg splitting
Fix thinko/typo in subreg aware liverange splitting logic. I'm not sure
how to write a proper testcase for this. The original problem only
happens on an out-of-tree target. Forcing subreg enabled targets to
spill and split in a predictable way is near impossible.

llvm-svn: 305228
2017-06-12 20:30:52 +00:00
Peter Collingbourne
54103de7c1 IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.

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

llvm-svn: 305227
2017-06-12 20:10:48 +00:00
David Blaikie
87969b4f1e Remove unneeded conditionals - the code is already conditional on the same condition
llvm-svn: 305226
2017-06-12 20:09:53 +00:00
Tim Hammerquist
0980178d03 Add EOL at EOF to appease source utils like unifdef
<rdar://problem/32511256>

llvm-svn: 305225
2017-06-12 20:08:55 +00:00