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

158258 Commits

Author SHA1 Message Date
Adrian Prantl
b116a83925 Silence a bunch of implicit fallthrough warnings
llvm-svn: 321114
2017-12-19 22:05:25 +00:00
Francis Visoiu Mistrih
7019d036e5 [CodeGen] Move printing MO_BlockAddress operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

llvm-svn: 321113
2017-12-19 21:47:14 +00:00
Francis Visoiu Mistrih
15126dbcea [CodeGen] Move printing MO_IntrinsicID operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

llvm-svn: 321112
2017-12-19 21:47:10 +00:00
Francis Visoiu Mistrih
7ddd56e68f [CodeGen] Move printing MO_IntrinsicID operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

Also add support for printing with a null TargetIntrinsicInfo and no
MachineFunction.

llvm-svn: 321111
2017-12-19 21:47:05 +00:00
Francis Visoiu Mistrih
11337d2e4a [CodeGen] Move printing MO_FPImmediate operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

llvm-svn: 321110
2017-12-19 21:47:00 +00:00
Francis Visoiu Mistrih
f89d2087e2 [CodeGen] Refactor printOffset from MO and MIRPrinter
llvm-svn: 321109
2017-12-19 21:46:55 +00:00
Haicheng Wu
0a31921c96 [CGP] Format. NFC
Clang-format.

llvm-svn: 321107
2017-12-19 20:53:32 +00:00
Matthias Braun
c4c1d5b0b3 TargetLoweringBase: Fix darwinHasSinCos()
Another followup to my refactoring in r321036: Turns out we can end up
with an x86 darwin target that is not macos (simulator triples can look
like i386-apple-ios) so we need the x86/32bit check in all cases.

llvm-svn: 321104
2017-12-19 20:24:12 +00:00
Jonas Devlieghere
122c4697d0 [dwarfdump][test] Add test case for r321064
Verify that -lookup takes a 64-bit address.

llvm-svn: 321101
2017-12-19 19:42:32 +00:00
Mark Searles
c044523a91 [AMDGPU] Turn off MergeConsecutiveStores() before Instruction Selection for AMDGPU. Commit dbbb6c5fc3642987430866dffdf710df4f616ac7 turned on MergeConsecutiveStores() before Instruction Selection for all targets. Enough AMDGPU compiles go into an infinite loop ( MergeConsecutiveStores() merges two stores; LegalizeStoreOps() un-merges; MergeConsecutiveStores() re-merges, etc. ) to warrant turning it off until the issues can be addressed.
Differential Revision: https://reviews.llvm.org/D41377

llvm-svn: 321100
2017-12-19 19:26:23 +00:00
Haicheng Wu
412f83d1a0 [SeparateConstOffsetFromGEP] Fix a typo. NFC.
do CSE for to => do CSE to

llvm-svn: 321098
2017-12-19 18:49:21 +00:00
Simon Pilgrim
01a1a57616 [X86] Regenerate popcnt tests
llvm-svn: 321093
2017-12-19 18:05:13 +00:00
Amara Emerson
f0ee820679 [GlobalISel][Legalizer] Fix crash when trying to lower G_FNEG of fp128 types.
This doesn't add legalizer support, just prevents crashing so that we
can gracefully fall back to SDAG.

Fixes PR35690.

llvm-svn: 321091
2017-12-19 17:21:35 +00:00
Nirav Dave
dedadf5587 [DAG] Elide overlapping store
Summary:
Extend overlapping store elision to handle overwrites of stores by
larger stores.

Nontemporal tests have been modified to add memory dependencies to
prevent store elision.

Reviewers: craig.topper, rnk, t.p.northover

Subscribers: javed.absar, hiraditya, llvm-commits

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

llvm-svn: 321089
2017-12-19 17:10:56 +00:00
Simon Pilgrim
d4f8c5f95d [X86][AVX512] Attempt target shuffle combining to different types instead of early-out
We try to prevent shuffle combining to value types that would stop the folding of masked operations, but by just returning early, we were failing to try different shuffle types.

The TODOs are all still relevant here to improve codegen but we're lacking test examples.

llvm-svn: 321085
2017-12-19 16:54:07 +00:00
Francis Visoiu Mistrih
1e061bbff4 [CodeGen] Move printing MO_CFIIndex operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

Before this patch we printed "<call frame instruction>" in the debug
output.

llvm-svn: 321084
2017-12-19 16:51:52 +00:00
Francis Visoiu Mistrih
67e6ee03c0 [CFGVPrinter] Fix -dot-cfg-only
The refactoring in r281640 made -dot-cfg-only ignore the "-only" part.

llvm-svn: 321079
2017-12-19 15:20:18 +00:00
Ben Dunbobbin
4a12e46f5f [ThinLTO][C-API] Correct api comments
Negative values never disabled the pruning - they simply set high values for the pruning interval.

The behaviour now is that negative values set the maximum pruning interval (which appears to have been the intention from the start) see https://reviews.llvm.org/D41231.

I have adjusted the comments to reflect this, removed any inaccurate statements, and corrected any typos I spotted in the English.

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

llvm-svn: 321078
2017-12-19 14:49:33 +00:00
Ben Dunbobbin
96703befd6 [Support][CachePruning] Disable cache pruning regression fix
borked by: rL284966 (see: https://reviews.llvm.org/D25730).

Previously, Interval was unsigned (see: CachePruning.h), replacing the type with std::chrono::seconds (which is signed) causes a regression in behaviour because the c-api intends negative values to translate to large positive intervals to *effectively* disable the pruning (see comments on: setCachePruningInterval()).

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

llvm-svn: 321077
2017-12-19 14:42:38 +00:00
Simon Pilgrim
8812d9dc72 [X86] Fix uninitialized variable sanitizer warning from rL321074
llvm-svn: 321076
2017-12-19 14:34:35 +00:00
Haicheng Wu
354d0a92b6 [InlineCost] Skip volatile loads when looking for repeated loads
This is a follow-up fix of r320814.  A test case is also added.

llvm-svn: 321075
2017-12-19 13:42:58 +00:00
Simon Pilgrim
804c89f41f [X86][SSE] Add cpu feature for aggressive combining to variable shuffles
As mentioned in D38318 and D40865, modern Intel processors prefer to combine multiple shuffles to a variable shuffle mask (PSHUFB/VPERMPS etc.) instead of having multiple stage 'fixed' shuffles which put more pressure on Port 5 (at the expense of extra shuffle mask loads).

This patch provides a FeatureFastVariableShuffle target flag for Haswell+ CPUs that prefers combining 2 or more fixed shuffles to a single variable shuffle (default is 3 shuffles).

The long term aim is to drive more of this from schedule data (probably via the MC) but we're not close to being ready for that yet.

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

llvm-svn: 321074
2017-12-19 13:16:43 +00:00
David Green
d048c49d4c [ARM] Register the Thumb2SizeReducePass. NFC
Also adds a simple test case.

llvm-svn: 321072
2017-12-19 12:19:08 +00:00
Pavel Labath
6192ffc4b1 [Support] Add WritableMemoryBuffer class
Summary:
The motivation here is LLDB, where we need to fixup relocations in
mmapped files before their contents can be read correctly.  The
MemoryBuffer class does exactly what we need, *except* that it maps the
file in read-only mode.

WritableMemoryBuffer reuses the existing machinery for opening and
mmapping a file. The only difference is in the argument to the
mapped_file_region constructor -- we create a private copy-on-write
mapping, so that we can make changes to the mapped data, but the changes
aren't carried over to the underlying file.

This patch is based on an initial version by Zachary Turner.

Reviewers: mehdi_amini, rnk, rafael, dblaikie, zturner

Subscribers: llvm-commits

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

llvm-svn: 321071
2017-12-19 12:15:50 +00:00
Simon Pilgrim
6dd49d11df [X86][SSE] Use (V)PHMINPOSUW for vXi8 SMAX/SMIN/UMAX/UMIN horizontal reductions (PR32841)
Extension to D39729 which performed this for vXi16, with the same bit flipping to handle SMAX/SMIN/UMAX cases, vXi8 UMIN horizontal reductions can be performed.

This makes use of the fact that by performing a pair-wise i8 SHUFFLE/UMIN before PHMINPOSUW, we both get the UMIN of each pair but also zero-extend the upper bits ready for v8i16.

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

llvm-svn: 321070
2017-12-19 12:02:40 +00:00
Francis Visoiu Mistrih
859334a80d Fix: [YAML] Always double quote UTF-8 characters
llvm-svn: 321069
2017-12-19 11:59:28 +00:00
Francis Visoiu Mistrih
e1d5d5ba4e [YAML] Always double quote UTF-8 characters
llvm-svn: 321068
2017-12-19 11:51:05 +00:00
Simon Dardis
9c259722df [mips] Handle the emission of microMIPSr6 sll instruction when used as a nop.
This instruction is encoded as zero, so we have handle that case when checking
for unimplemented opcodes when producing the encoding for an instruction.

llvm-svn: 321066
2017-12-19 11:16:22 +00:00
Jonas Devlieghere
c562c1f132 [dwarfdump] Lookup needs to be an unsigned long long parameter.
Before this patch, dwarfdump's lookup parameter only accepts unsigned.
Given that for many current platforms the load address already exceeds
unsigned (e.g. arm64 w/ 0x100000000), dwarfdump needs an unsigned long
long parameter.

Patch by: Dr. Michael 'Mickey' Lauer <mickey@vanille-media.de>

llvm-svn: 321064
2017-12-19 09:45:26 +00:00
Max Kazantsev
73d7a6bc49 [JumpThreading] Restrict PRE across instructions that don't pass control to successors
PRE in JumpThreading should not be able to hoist copy of non-speculable loads across
instructions that don't always transfer execution to their successors, otherwise they may
introduce an unsafe load which otherwise would not be executed.

The same problem for GVN was fixed as rL316975.

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

llvm-svn: 321063
2017-12-19 09:10:21 +00:00
Igor Laevsky
aba02c9095 [FuzzMutate] Don't crash when mutator is unable to find operation
Differential Revision: https://reviews.llvm.org/D41009

llvm-svn: 321062
2017-12-19 08:52:51 +00:00
Bjorn Steinbrink
feb288b9a0 Treat sret arguments as being dereferenceable in getPointerDereferenceableBytes()
Reviewers: rnk, hfinkel, efriedma

Subscribers: llvm-commits

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

llvm-svn: 321061
2017-12-19 08:46:46 +00:00
Craig Topper
b64e60f4ce [X86] Don't extend v16i8 non-uniform shifts to v16i32 if we have BWI. Use v16i16 instead.
BWI supports shifting by word amounts. Even if VLX isn't support we can still widen to v32i16 and extract the lower half. For SKX its preferrable to not use 512-bit vector if we can.

llvm-svn: 321059
2017-12-19 06:59:10 +00:00
Craig Topper
f6641677a8 [X86] Use a specific list of MVTs in combineShiftRightArithmetic instead of iterating over every integer VT and checking their size.
Previously, we were checking for MVTs with sizes betwen 8 and 64 which only includes i8, i16, i32, and i64 today. But I don't think we should assume that and should list the types that are legal for x86. I also don't think we need i64 since type legalization is guaranteed to split those up.

llvm-svn: 321058
2017-12-19 06:29:00 +00:00
Craig Topper
574e767a20 [X86] Remove unnecessary check for integer VT from combineShiftRightArithmetic.
I doubt there's any way to create a ashr for an FP type.

llvm-svn: 321057
2017-12-19 06:28:58 +00:00
Craig Topper
14f0f17b4b [X86] Remove dead code for turning vector shifts by large amounts into a zero vector.
Pretty sure these are handled by a target independent DAG combine that turns them into undef these days.

llvm-svn: 321056
2017-12-19 05:21:50 +00:00
Craig Topper
20683fd338 [X86] Use ZERO_EXTEND instead of ANY_EXTEND when extending the shift amount for a non-uniform shift.
My reading of the SDM says that all bits of the shift amount are used. If the value of the element is larger than the number of bits the result the shift result is zero. So I think we need to zero_extend here to avoid garbage in the upper bits.

In reality we lower any_extend as zero_extend so in most cases it would be hard to hit this.

llvm-svn: 321055
2017-12-19 04:52:04 +00:00
Serguei Katkov
183e73d6dc Fix APFloat from string conversion for Inf
The method IEEEFloat::convertFromStringSpecials() does not recognize
the "+Inf" and "-Inf" strings but these strings are printed for
the double Infinities by the IEEEFloat::toString().

This patch adds the "+Inf" and "-Inf" strings to the list of recognized
patterns in IEEEFloat::convertFromStringSpecials().

Re-landing after fix.

Reviewers: sberg, bogner, majnemer, timshen, rnk, skatkov, gottesmm, bkramer, scanon, anna
Reviewed By: anna
Subscribers: mkazantsev, FlameTop, llvm-commits, reames, apilipenko
Differential Revision: https://reviews.llvm.org/D38030

llvm-svn: 321054
2017-12-19 04:27:39 +00:00
Quentin Colombet
a4783736b2 [TableGen][GlobalISel] Reset the internal map of RuleMatchers just before the emission
Between the creation of the last InstructionMatcher and the first
emission of the related Rule, we need to clear the internal map of IDs.
We used to do that right after the creation of the main
InstructionMatcher when building the rule and although that worked, this
is fragile because if for some reason some later code decides to create
more InstructionMatcher before the final call to emit, then the IDs
would be completely messed up.

Move that to the beginning of "emit" so that the IDs are guarantee to be
consistent.

NFC.

llvm-svn: 321053
2017-12-19 02:57:23 +00:00
Reid Kleckner
aa37769e1c Fix Wasm as a follow up to r321035 and the other one
This array is tightly coupled with the .def file. Someone should look
into fixing that.

llvm-svn: 321050
2017-12-19 01:08:53 +00:00
Justin Bogner
837b6ed803 update_mir_test_checks: Accept IR as input as well as MIR
We need to handle IR for tests that want to do lowering (or just
-stop-after with IR as input). I've run this on one AArch64 test to
demonstrate what it looks like.

llvm-svn: 321048
2017-12-19 00:49:04 +00:00
Jake Ehrlich
9f580d4e7a [llvm-objcopy] Add option to add a progbits section from a file
This change adds support for adding progbits sections with contents from a file

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

llvm-svn: 321047
2017-12-19 00:47:30 +00:00
Matthias Braun
f51f69bd75 TargetLoweringBase: Followup to r321035
I missed some prefixes and the fact that on AArch64 we use "bzero"
instead of "__bzero" as on X86 when doing my refactoring in r321035.

Improve tests for bzero.

llvm-svn: 321046
2017-12-19 00:43:00 +00:00
Matthias Braun
dbb949be3c TargetLowering: Fix InitLibcallCallingConvs() overriding things set in InitLibcalls()
I missed the fact that the later called InitLibcallCallingConvs()
overrides some things set in InitLibcalls() when I did the refactoring
in r321036.

Fix by merging InitLibcallCallingConvs() into InitLibcalls() and doing
the initialization earlier.

llvm-svn: 321045
2017-12-19 00:20:33 +00:00
Matthias Braun
c94abbea59 TargetLowering: Fix off-by-one error
This problem was present for a while, but somehow asan didn't catch
it before the refactoring in r321036.

llvm-svn: 321043
2017-12-19 00:05:10 +00:00
Sam Clegg
af67e33ea7 [llvm-readobj] Dump wasm init functions
llvm-svn: 321042
2017-12-19 00:04:41 +00:00
Matthias Braun
5d839b5ad3 TargetLoweringBase: Remove unnecessary watchos exception; NFC
WatchOS isn't report as iOS (as opposed to tvos) so the exception I
added in my last commit wasn't necessary after all.

llvm-svn: 321041
2017-12-18 23:33:28 +00:00
Justin Bogner
da67fa913e update_mir_test_checks: Add "mir" to some states and regex names
For tests that do lowering we need to support IR as input, so here we
clarify some names to avoid ambiguity in upcoming commits.

llvm-svn: 321039
2017-12-18 23:31:55 +00:00
Craig Topper
ea43ac79fd [X86] Don't use NOPL when the assembler is passed an empty CPU string.
This recommits the change from r321026. I have a fix for the lld test now.

llvm-svn: 321038
2017-12-18 23:31:43 +00:00
Matthias Braun
dcb7646ac9 LiveStacks: Rename LiveStack.{h|cpp} to LiveStacks.{h|cpp}; NFC
Filenames should match the name of the class they contain.

llvm-svn: 321037
2017-12-18 23:19:44 +00:00