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

149517 Commits

Author SHA1 Message Date
Galina Kistanova
0aca11003c Reverted r303602, as it will be fixed in gtest.
llvm-svn: 304184
2017-05-30 03:17:10 +00:00
Joerg Sonnenberger
037031dde3 Revert r303763, results in asserts i.e. while building Ruby.
llvm-svn: 304179
2017-05-29 22:52:17 +00:00
Craig Topper
956d306274 [TableGen] Use StringMap instead of DenseMap<StringRef> to unique CodeInit and StringInit objects. Override the allocator to keep using the BumpPtrAllocator. NFCI
StringMap is better suited to mapping strings than a DenseMap.

llvm-svn: 304178
2017-05-29 21:49:37 +00:00
Craig Topper
4e4cbf5b26 [TableGen] Introduce DagInit::getArgs that returns an ArrayRef. Use it to fix 80 column violations in arg_begin/arg_end. Remove DagInit::args and use getArgs instead. NFC
llvm-svn: 304177
2017-05-29 21:49:34 +00:00
Benjamin Kramer
7377500edc [ManagedStatic] Avoid putting function pointers in template args.
This is super awkward, but GCC doesn't let us have template visible when
an argument is an inline function and -fvisibility-inlines-hidden is
used.

llvm-svn: 304175
2017-05-29 20:56:27 +00:00
Davide Italiano
9ff683e61e [GlobalIsel] Fix a warning with GCC 7 -Wpedantic. NFCI.
llvm-svn: 304174
2017-05-29 20:13:22 +00:00
Zvi Rackover
cf6675a3ad [X86] Add tests for (ix bitcast (vxi1 and ...)). NFC.
To be improved by D33311.

llvm-svn: 304171
2017-05-29 19:00:57 +00:00
Zvi Rackover
a15dfd3593 [X86] Replace undef value in flaky test
D33311 exposes the flakiness in this test. Replacing the undef placed by
bugpoint, makes it more interesting and robust.

llvm-svn: 304168
2017-05-29 18:27:00 +00:00
Benjamin Kramer
f0294393d2 [ManagedStatic] Make object_creator/object_deleter visible again.
They're now exposed as template args, which creates complications when
ManagedStatics are used across .so boundaries.

llvm-svn: 304166
2017-05-29 18:00:33 +00:00
Benjamin Kramer
7e2d94e18e Don't destroy ManagedStatics in a unit test.
Turns out this is very hostile towards other unit tests running in the
same process, it unregisters all flags.

llvm-svn: 304165
2017-05-29 17:25:37 +00:00
Benjamin Kramer
a5e1e60d70 [wasm] Fix test after r304117.
llvm-svn: 304164
2017-05-29 16:32:52 +00:00
Benjamin Kramer
762b23a6e9 [X86] Don't fold away the memory operand of an xchg.
xchg with a mem operand has different locking semantics. If we unfold it
into a xchg r,r we will loose the implicit lock. Likewise we never want
to fold a register xchg into a memory one as it would be a lot slower.

This triggers during LLVM selfhost.

llvm-svn: 304163
2017-05-29 16:25:20 +00:00
Ayal Zaks
1bc5629c63 [Docs] Add VectorizationPlan to docs/Proposals.
Following the request made in https://reviews.llvm.org/D32871, the
general documentation of the Vectorization Plan is hereby placed
under docs/Proposals.

llvm-svn: 304161
2017-05-29 15:36:23 +00:00
Benjamin Kramer
50f1b689ec Try to work around MSVC being buggy. Attempt #1.
error C2971: 'llvm::ManagedStatic': template parameter 'Creator': 'CreateDefaultTimerGroup': a variable with non-static storage duration cannot be used as a non-type argument

llvm-svn: 304157
2017-05-29 14:28:04 +00:00
Benjamin Kramer
8bf13d6351 [Timer] Move DefaultTimerGroup into a ManagedStatic.
This used to be just leaked. r295370 made it use magic statics. This adds
a global destructor, which is something we'd like to avoid. It also creates
a weird situation where the mutex used by TimerGroup is re-created during
global shutdown and leaked.

Using a ManagedStatic here is also subtle as it relies on the mutex
inside of ManagedStatic to be recursive. I've added a test for that
in a previous change.

llvm-svn: 304156
2017-05-29 14:05:29 +00:00
Benjamin Kramer
b4108258ab [ManagedStatic] Add a way to pass custom creators/deleters.
Also add a test case verifying that nested ManagedStatics work correctly.

llvm-svn: 304155
2017-05-29 14:05:26 +00:00
Sanjay Patel
836497a210 [DAGCombiner] fix load narrowing transform to exclude loads with extension
The extending load possibility was missed in:
https://reviews.llvm.org/rL304072

We might want to handle this cases as a follow-up, but bailing out for now
to avoid miscompiling.

llvm-svn: 304153
2017-05-29 13:24:58 +00:00
Jonas Paulsson
6a3257216c [SystemZ] Improve buildVector() in SystemZISelLowering.cpp.
Use VLREP when inserting one or more loads into a vector. This is more
efficient than to first load and then use a VLVGP.

Review: Ulrich Weigand
llvm-svn: 304152
2017-05-29 13:22:23 +00:00
Mattias Eriksson
8fcda1e4b8 Test commit: fix typos
Just fixing a few typos in comments to test commit access.

llvm-svn: 304149
2017-05-29 11:46:44 +00:00
Nikolai Bozhenov
52efeb45c3 [Nios2] Target registration
Reviewers: craig.topper, hfinkel, joerg, lattner, zvi

Reviewed By: craig.topper

Subscribers: oren_ben_simhon, igorb, belickim, tvvikram, mgorny, llvm-commits, pavel.v.chupin, DavidKreitzer

Differential Revision: https://reviews.llvm.org/D32669
Patch by AndreiGrischenko <andrei.l.grischenko@intel.com>

llvm-svn: 304144
2017-05-29 09:48:30 +00:00
Diana Picus
e8b9fdf26b [ARM] GlobalISel: Extract helper. NFCI.
Create a helper to deal with the common code for merging incoming values
together after they've been split during call lowering. There's likely
more stuff that can be commoned up here, but we'll leave that for later.

llvm-svn: 304143
2017-05-29 09:09:54 +00:00
Hiroshi Inoue
d290fdf07f [trivial] fix a typo in comment, NFC
llvm-svn: 304139
2017-05-29 08:37:42 +00:00
Diana Picus
96c9bfbc32 [ARM] GlobalISel: Support array returns
These are a bit rare in practice, but they don't require anything
special compared to array parameters, so support them as well.

llvm-svn: 304137
2017-05-29 08:19:19 +00:00
Hiroshi Inoue
2ca9f2553a [PPC] Fix assertion failure during binary encoding with -mcpu=pwr9
Summary
clang -c -mcpu=pwr9 test/CodeGen/PowerPC/build-vector-tests.ll causes an assertion failure during the binary encoding.
The failure occurs when a D-form load instruction takes two register operands instead of a register + an immediate.

This patch fixes the problem and also adds an assertion to catch this failure earlier before the binary encoding (i.e. during lit test).
The fix is from Nemanja Ivanovic @nemanjai.

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

llvm-svn: 304133
2017-05-29 07:12:39 +00:00
Diana Picus
5374397bb1 [ARM] GlobalISel: Support array parameters/arguments
Clang coerces structs into arrays, so it's a good idea to support them.
Most of the support boils down to getting the splitToValueTypes helper
to actually split types. We then use G_INSERT/G_EXTRACT to deal with the
parts.

llvm-svn: 304132
2017-05-29 07:01:52 +00:00
Mehdi Amini
ccf1daccce DebugInfo: Include .dwo file name when hashing multiple CUs in a single file
This is really a workaround for ThinLTO in particular - since it can
import partial CUs that may end up looking very similar/the same as
the same partial import in another ThinLTO compile.

An alternative fix would be to change the DICompileUnit metadata to
include a "primary file" or the like - and when importing for ThinLTO
set the primary file to the name of the DICompileUnit that is being
imported into. This involves changing the schema and would reduce the
excessive uniqueness in the hash that this change creates - allowing
diagnosing of more duplicate CUs than will be caught with this change.

But duplicate CUs can still be caught in non-ThinLTO builds & are mostly
a nuisance rather than a particularly deliberate/effective tool for
finding broken code. (arguably the hash could always include the dwo
file and nothing in fission would break, I think..)

Reapply of r304119 after adding a triple to the test and moving it
to the X86 directory.

llvm-svn: 304130
2017-05-29 06:32:34 +00:00
Mehdi Amini
74a1319066 DebugInfo: Omit an empty CU when a subprogram was moved into its use
When the only use of a CU is for a subprogram that's only emitted into
the using CU (to avoid cross-CU references in DWO files), avoid creating
that CU at all.

Reapply of r304111 after adding a triple to the test and moving it
to the X86 directory.

llvm-svn: 304129
2017-05-29 06:25:30 +00:00
Tobias Grosser
5d54610f39 Revert "[IfConversion] Keep the CFG updated incrementally in IfConvertTriangle"
The reverted change introdued assertions ala:

"MachineBasicBlock::succ_iterator
llvm::MachineBasicBlock::removeSuccessor(succ_iterator, bool): Assertion
`I != Successors.end() && "Not a current successor!"'

Mikael, the original committer, wrote me that he is working on a fix, but that
it likely will take some time to get this resolved. As this bug is one of the
last two issues that keep the AOSP buildbot from turning green, I revert the
original commit r302876.

I am looking forward to see this recommitted after the assertion has been
resolved.

llvm-svn: 304128
2017-05-29 06:12:18 +00:00
Mehdi Amini
86f4730576 Revert "DebugInfo: Omit an empty CU when a subprogram was moved into its use"
This reverts commit r304111.
GreenDragon is broken.

llvm-svn: 304126
2017-05-29 05:17:57 +00:00
Mehdi Amini
14cceb2ffc Revert "DebugInfo: Include .dwo file name when hashing multiple CUs in a single file"
This reverts commit r304119 and r304118. GreenDragon is broken.

llvm-svn: 304125
2017-05-29 05:17:54 +00:00
Zachary Turner
2dbeb58c9c Don't capture a temporary std::string in a StringRef.
This fixes the breakages in llvm-tblgen.

llvm-svn: 304123
2017-05-29 02:20:12 +00:00
Zachary Turner
2b08c71118 Resubmit "[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables."
This was reverted due to buildbot breakages and I was not familiar
with this code to investigate it.  But while trying to get a
useful backtrace for the author, it turns out the fix was very
obvious.  Resubmitting this patch as is, and will submit the
fix in a followup so that the fix is not hidden in the larger
CL.

llvm-svn: 304122
2017-05-29 02:19:37 +00:00
Zachary Turner
2b8f4fb1c1 Revert "[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables."
This reverts commit 28cb1003507f287726f43c771024a1dc102c45fe as well
as all subsequent followups.  llvm-tblgen currently segfaults with
this change, and it seems it has been broken on the bots all
day with no fixes in preparation.  See, for example:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/

llvm-svn: 304121
2017-05-29 01:48:53 +00:00
Galina Kistanova
7e7094daa7 Disabled implicit-fallthrough warnings for ConvertUTF.cpp.
ConvertUTF.cpp has a little dependency on LLVM, and since the code extensively uses fall-through switches,
I prefer disabling the warning for the whole file, rather than adding attributes for each case.

llvm-svn: 304120
2017-05-29 01:34:26 +00:00
David Blaikie
1ec05fa8a5 DebugInfo: Include .dwo file name when hashing multiple CUs in a single file
This is really a workaround for ThinLTO in particular - since it can
import partial CUs that may end up looking very similar/the same as
the same partial import in another ThinLTO compile.

An alternative fix would be to change the DICompileUnit metadata to
include a "primary file" or the like - and when importing for ThinLTO
set the primary file to the name of the DICompileUnit that is being
imported into. This involves changing the schema and would reduce the
excessive uniqueness in the hash that this change creates - allowing
diagnosing of more duplicate CUs than will be caught with this change.

But duplicate CUs can still be caught in non-ThinLTO builds & are mostly
a nuisance rather than a particularly deliberate/effective tool for
finding broken code. (arguably the hash could always include the dwo
file and nothing in fission would break, I think..)

llvm-svn: 304119
2017-05-29 00:48:45 +00:00
David Blaikie
d08724e7c4 Attempt to fix buildbots...
llvm-svn: 304118
2017-05-29 00:24:01 +00:00
Saleem Abdulrasool
34765f36e3 Support: adjust the default obj format for wasm
WebAssemly uses a custom object file format.  For the wasm targets,
default to the `Wasm` object file format.

llvm-svn: 304117
2017-05-29 00:14:57 +00:00
Dylan McKay
5f08d43093 [AVR] Remove SREG from CPI's Uses; authored by Florian Zeitz
Summary: CPI does not read the status register, but only writes it.

Reviewers: dylanmckay

Reviewed By: dylanmckay

Subscribers: llvm-commits

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

llvm-svn: 304116
2017-05-29 00:10:14 +00:00
Craig Topper
ba7ab27974 [TableGen][X86] Fix formatting I accidentally messed up in r304099. NFC
llvm-svn: 304115
2017-05-28 23:47:17 +00:00
Erik Pilkington
970bccb2f3 [ItaniumDemangle] Fix a exponential string copying bug
This is a port of libcxxabi's r304113.

llvm-svn: 304114
2017-05-28 23:24:52 +00:00
NAKAMURA Takumi
ca93544710 Prune trailing whitespace. (To regenerate makefiles)
llvm-svn: 304112
2017-05-28 22:54:25 +00:00
David Blaikie
47845e9e96 DebugInfo: Omit an empty CU when a subprogram was moved into its use
When the only use of a CU is for a subprogram that's only emitted into
the using CU (to avoid cross-CU references in DWO files), avoid creating
that CU at all.

llvm-svn: 304111
2017-05-28 22:51:37 +00:00
Geoff Berry
a7dc8119e5 [AArch64][Falkor] Combine sched details files into one. NFC.
llvm-svn: 304109
2017-05-28 22:20:44 +00:00
Geoff Berry
f08bdf2271 [AArch64][Falkor] Fix some sched details.
- Remove all uses of base sched model entries and set them all to
  Unsupported so all the opcodes are described in
  AArch64SchedFalkorDetails.td.
- Remove entries for unsupported half-float opcodes.
- Remove entries for unsupported LSE extension opcodes.
- Add entry for MOVbaseTLS (and set Sched in base td file entry to
  WriteSys) and a few other pseudo ops.
- Fix a few FP load/store with reg offset entries to use the LSLfast
  predicates.
- Add Q size BIF/BIT/BSL entries.
- Fix swapped Q/D sized CLS/CLZ/CNT/RBIT entires.
- Fix pre/post increment address register latency (this operand is
  always dest 0).
- Fix swapped FCVTHD/FCVTHS/FCVTDH/FCVTDS entries.
- Fix XYZ resource over usage on LD[1-4] opcodes.

llvm-svn: 304108
2017-05-28 21:48:31 +00:00
Craig Topper
5330f48935 [TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC
llvm-svn: 304100
2017-05-28 18:24:43 +00:00
Craig Topper
944f3546a3 [TableGen][X86] Mark a couple global tables as const. NFC
llvm-svn: 304099
2017-05-28 18:24:41 +00:00
Craig Topper
47644fbcc3 [TableGen][X86] Improve formatting of the fold table output by indenting the body of the table and adding blank lines between tables. NFC
llvm-svn: 304098
2017-05-28 18:24:39 +00:00
Craig Topper
aa5d72854c [TableGen][X86] Add an llvm_unreachable to a switch so we get an error if we need expansion in the future.
llvm-svn: 304097
2017-05-28 18:24:37 +00:00
Craig Topper
4a8a50dee7 [TableGen][X86] Remove unnecessary std::string creations. NFC
llvm-svn: 304096
2017-05-28 18:24:35 +00:00
Craig Topper
21fd411f97 [TableGen][X86] Replace a global std::vector with a regular array. llvm::find works on arrays, just need to use std::end to check the result.
llvm-svn: 304095
2017-05-28 18:24:32 +00:00