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

151606 Commits

Author SHA1 Message Date
Reid Kleckner
be3a717d03 Put std::mutex usage behind #ifdefs to pacify the sanitizer buildbot
llvm-svn: 307925
2017-07-13 16:56:24 +00:00
Frederich Munch
37a94374f8 Support: Add llvm::center_justify.
Summary: Completes the set.

Reviewers: ruiu

Reviewed By: ruiu

Subscribers: ruiu, llvm-commits

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

llvm-svn: 307922
2017-07-13 16:11:08 +00:00
Davide Italiano
e03a5fdca4 [GlobalOpt] Autogenerate checks for the test in PR33686.
Also fix a typo while here.

llvm-svn: 307921
2017-07-13 15:55:34 +00:00
Davide Italiano
2fbf9c5782 Reapply [GlobalOpt] Remove unreachable blocks before optimizing a function.
This commit reapplies r307215 now that we found out and fixed
the cause of the cfi test failure (in r307871).

llvm-svn: 307920
2017-07-13 15:40:59 +00:00
Sjoerd Meijer
fe7144fbfd [AArch64] Enable the mnemonic spell checker
The AsmParser mnemonic spell checker was introduced in r307148 and enabled only
for ARM. This patch enables it for AArch64.

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

llvm-svn: 307918
2017-07-13 15:29:13 +00:00
Amara Emerson
d39c27e29a [AArch64] Add an SVE target feature to the backend and TargetParser.
The feature will be used properly once assembler/disassembler support
begins to land.

llvm-svn: 307917
2017-07-13 15:19:56 +00:00
Matthew Simpson
7235623126 [AArch64] Add preliminary support for ARMv8.1 SUB/AND atomics
This patch is a follow-up to r305893 and adds preliminary support for the
fetch_sub and fetch_and operations.

llvm-svn: 307913
2017-07-13 15:01:23 +00:00
Anna Thomas
330876c9e4 [RuntimeUnrolling] Update DomTree correctly when exit blocks have successors
Summary:
When we runtime unroll with multiple exit blocks, we also need to update the
immediate dominators of the immediate successors of the exit blocks.

Reviewers: reames, mkuper, mzolotukhin, apilipenko

Reviewed by: mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 307909
2017-07-13 13:21:23 +00:00
Simon Dardis
c43ce3d9fa Reland "[mips] Fix multiprecision arithmetic."
For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC,
get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs.

For MIPS, only the DSP ASE has a carry flag, so in the general case it is not
useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes.

Also improve the generation code in such cases for targets with
TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the
comparison node rather than using it in selects. Similarly for ISD::SUBE /
ISD::SUBC.

Address optimization breakage by moving the generation of MIPS specific integer
multiply-accumulate nodes to before legalization.

This revolves PR32713 and PR33424.

Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue!

Reviewers: slthakur

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

The previous version of this patch was too aggressive in producing fused
integer multiple-addition instructions.

llvm-svn: 307906
2017-07-13 11:28:05 +00:00
Diana Picus
3bbb58a19b [ARM] GlobalISel: Support G_BR
This boils down to not crashing in reg bank select due to the lack of
register operands on this instruction, and adding some tests. The
instruction selection is already covered by the TableGen'erated code.

llvm-svn: 307904
2017-07-13 11:09:34 +00:00
Florian Hahn
eb8eb7ef68 [PM] Use range-based for loops in LegacyPassManager.cpp (NFC).
Summary:
This patch replaces a bunch of iterator-based for loops with range-based
for loops. There are 2 iterator-based loops left in this file in
removeNotPreservedAnalysis, but I think those cannot be replaced by
range-based for loops as they modify the container they are iterating
over.

Unless I missed something, this schould be a NFC and I would appreciate
if someone could have a quick look to confirm that.

Reviewers: chandlerc, pcc, jhenderson

Reviewed By: jhenderson

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 307902
2017-07-13 10:52:00 +00:00
Simon Pilgrim
8124dbf6ce [DAGCombiner] Fix issue with rotate combines asserting if the constant value types differ from the result type.
llvm-svn: 307900
2017-07-13 10:41:49 +00:00
Javed Absar
766ecee491 [ARM] Tidy up and organise better ARM.td. NFC.
This patch tidies up and organises ARM.td
so that it is easier to understandand
and extend in the future.

Reviewed by: @hahn, @rovka
Differential Revision: https://reviews.llvm.org/D35248

llvm-svn: 307897
2017-07-13 10:24:30 +00:00
Diana Picus
140f7d0007 Fixup r307893: Silence warning
Silence unused variable warning in release builds.
*sigh*

llvm-svn: 307896
2017-07-13 09:52:06 +00:00
Simon Pilgrim
5ae4ff7688 Use isNullConstantOrNullSplatConstant helper. NFCI.
llvm-svn: 307895
2017-07-13 09:39:00 +00:00
Simon Pilgrim
e317ef9f89 Fix whitespace indentation. NFCI.
llvm-svn: 307894
2017-07-13 09:36:04 +00:00
Diana Picus
5714fdb258 [ARM] GlobalISel: Move local variable. NFC
Move a local variable from outside a switch to inside every case that
needs it (which isn't all of the cases, of course).

llvm-svn: 307893
2017-07-13 09:30:08 +00:00
Florian Hahn
057a01e97b [ARM] Fix typo in test added in r307889
This fixes the following test failure:
    LLVM :: Transforms/Inline/ARM/inline-target-attr.ll

Sorry for any inconenience.

llvm-svn: 307892
2017-07-13 08:53:43 +00:00
Dylan McKay
b0f5dc854e [AVR] Fix broken indentation
llvm-svn: 307891
2017-07-13 08:40:59 +00:00
Dylan McKay
35d736b4e2 [AVR] Add a 'LLVM_FALLTHROUGH' statement to the AsmParser
Should fix warnings in the build.

llvm-svn: 307890
2017-07-13 08:39:46 +00:00
Florian Hahn
17accd7982 [ARM] Inline callee if its target-features are a subset of the caller
Summary:
Similar to X86, it should be safe to inline callees if their
target-features are a subset of the caller. As some subtarget features
provide different instructions depending on whether they are set or
unset (e.g. ThumbMode and ModeSoftFloat), we use a whitelist of
target-features describing hardware capabilities only.

Reviewers: kristof.beyls, rengolin, t.p.northover, SjoerdMeijer, peter.smith, silviu.baranga, efriedma

Reviewed By: SjoerdMeijer, efriedma

Subscribers: dschuff, efriedma, aemerson, sdardis, javed.absar, arichardson, eraman, llvm-commits

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

llvm-svn: 307889
2017-07-13 08:26:17 +00:00
Dylan McKay
dcba8216a6 [AVR] Fix indirect calls to function pointers
Patch by Carl Peto.

llvm-svn: 307888
2017-07-13 08:09:36 +00:00
Mikael Holmen
2d4de8dcfb Add original reproducer for r307754 / PR33689
Apparently I managed to drop the test case between two revisions in
Phabricator: https://reviews.llvm.org/D35003

llvm-svn: 307887
2017-07-13 07:38:53 +00:00
Hiroshi Inoue
95d1010b48 fix typos in comments and error messges; NFC
llvm-svn: 307885
2017-07-13 06:48:39 +00:00
Craig Topper
27a05640e7 [X86] Simplify the getHostCPUName for AMD family 6 and 15.
As far as I can tell we can simply distinguish based on features rather than model number. Many of the strings we were previously using are treated the same by the backend.

llvm-svn: 307884
2017-07-13 06:34:10 +00:00
Martin Storsjo
842285000a [llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocations
All other code in MachODump.cpp uses the same comparison,
((r_length & 0x1) == 1), for distinguishing between the two,
while the code in llvm-objdump.cpp seemed to be incorrect.

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

llvm-svn: 307882
2017-07-13 05:54:08 +00:00
Davide Italiano
0df1e464f8 [opt-viewer] Don't except when debug info is not available.
For records without DebugLoc we simply skip the caller location in
map_remarks.

Fixes PR33764.

Patch by Simon Whittaker!

llvm-svn: 307880
2017-07-13 04:19:13 +00:00
Geoff Berry
b564df0f8b [TargetLowering] Add hook for adding target MMO flags when doing ISel.
Summary: Add TargetLowering hook getMMOFlags() to add target specific
MMO flags to load/store instructions created by ISel.

Reviewers: bogner, hfinkel, qcolombet, MatzeB

Subscribers: mcrosier, javed.absar, llvm-commits

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

llvm-svn: 307879
2017-07-13 03:49:42 +00:00
Geoff Berry
9a32a3bacd [MIR] Add support for printing and parsing target MMO flags
Summary: Add target hooks for printing and parsing target MMO flags.
Targets may override getSerializableMachineMemOperandTargetFlags() to
return a mapping from string to flag value for target MMO values that
should be serialized/parsed in MIR output.

Add implementation of this hook for AArch64 SuppressPair MMO flag.

Reviewers: bogner, hfinkel, qcolombet, MatzeB

Subscribers: mcrosier, javed.absar, llvm-commits

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

llvm-svn: 307877
2017-07-13 02:28:54 +00:00
Kostya Serebryany
7653d30e45 [libFuzzer] make sure that -reduce_inputs=1 deletes redundant files in the corpus
llvm-svn: 307875
2017-07-13 01:56:37 +00:00
Davide Italiano
211aa642c6 [sanstats] Remove a flaky test.
I don't know a reliable way of crafting a test for this case,
but I'll try a little harder. In the meanwhile, let's get the
bots green again. Please note this will be tested by `check-cfi`
once r307215 relands.

llvm-svn: 307874
2017-07-13 01:36:12 +00:00
Kostya Serebryany
25dc7da1a2 [libFuzzer] experimental feature -reduce_inputs (off by default) that tries to replace elements in the corpus with smaller ones that have the same feature set. Still needs tuning
llvm-svn: 307873
2017-07-13 01:08:53 +00:00
Wolfgang Pieb
b3ebcbb3bc [DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5
section names was in the wrong place.

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

llvm-svn: 307872
2017-07-13 01:03:28 +00:00
Davide Italiano
398952f4ae [sanstats] Print the correct line information.
The instrumentation tracks the return address and not that of the
call so we remove one to compensate. Thanks for Peter Collingbourne
for confirming the analysis of the problem.

llvm-svn: 307871
2017-07-13 00:49:03 +00:00
Eli Friedman
661b22e877 [CodeGenPrepare] Don't create dead instructions in addrmode sinking
When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.

Fixes https://bugs.llvm.org/show_bug.cgi?id=33608 .

llvm-svn: 307866
2017-07-12 23:30:02 +00:00
Xinliang David Li
a42f887b03 [PGO] Enhance pgo counter promotion
This is an incremental change to the promotion feature.

There are two problems with the current behavior:
1) loops with multiple exiting blocks are totally disabled
2) a counter update can only be promoted one level up in
  the loop nest -- which does help much for short trip
  count inner loops inside a high trip-count outer loops.

Due to this limitation, we still saw very large profile
count fluctuations from run to run for the affected loops
which are usually very hot.

This patch adds the support for promotion counters iteratively
across the loop nest. It also turns on the promotion for
loops with multiple exiting blocks (with a limit).

For single-threaded applications, the performance impact is flat
on average. For instance, dealII improves, but povray regresses.

llvm-svn: 307863
2017-07-12 23:27:44 +00:00
Kostya Serebryany
9c0b653c83 [libFuzzer] relax test/shrink.test a bit (got broken on windows)
llvm-svn: 307862
2017-07-12 23:22:32 +00:00
Matt Arsenault
9b29c01b64 AMDGPU: Fix converting unanalyzable global loads to SMRD
Not all memory dependence queries succeed, so this needs to
be conservative if it fails.

llvm-svn: 307861
2017-07-12 23:06:18 +00:00
Gerolf Hoflehner
7d489cae75 [SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary:
Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.

Reviewers: MatzeB, t.p.northover, dblaikie

Reviewed By: MatzeB

Subscribers: llvm-commits

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

llvm-svn: 307860
2017-07-12 23:05:15 +00:00
Sanjay Patel
5961785cc6 [x86] add select-of-constant tests; NFC
We're using cmov in these cases, but we could reduce to simpler ops.

llvm-svn: 307859
2017-07-12 22:42:39 +00:00
Kostya Serebryany
5fd8b48f81 [libFuzzer] remove include <sanitizer/coverage_interface.h>, not needed any more
llvm-svn: 307858
2017-07-12 22:22:36 +00:00
Kostya Serebryany
b43c07ef34 [libFuzzer] refactoring in preparation for -reduce_inputs; NFC intended
llvm-svn: 307857
2017-07-12 22:20:04 +00:00
Daniel Neilson
84653da20b Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.

Reviewers: eli.friedman, reames, mkazantsev, skatkov

Reviewed By: reames

Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits

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

llvm-svn: 307854
2017-07-12 21:57:23 +00:00
Rui Ueyama
7d0fdbaded [Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.

Patch by: Fedor Sergeev

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

llvm-svn: 307852
2017-07-12 21:43:14 +00:00
Florian Hahn
447e1250ca [AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar

Reviewed By: evandro

Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits

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

llvm-svn: 307851
2017-07-12 21:41:28 +00:00
Rui Ueyama
f809fa7f30 Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.

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

llvm-svn: 307850
2017-07-12 21:37:02 +00:00
Frederich Munch
4d0cd2ca8d Allow clients to specify search order of DynamicLibraries.
Summary: Different JITs and other clients of LLVM may have different needs in how symbol resolution should occur.

Reviewers: v.g.vassilev, lhames, karies

Reviewed By: v.g.vassilev

Subscribers: pcanal, llvm-commits

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

llvm-svn: 307849
2017-07-12 21:22:45 +00:00
Stanislav Mekhanoshin
efe34aaf12 [AMDGPU] fcanonicalize elimination optimization
We are using multiplication by 1.0 to flush denormals and quiet sNaNs.
That is possible to omit this multiplication if source of the
fcanonicalize instruction is known to be flushed/quieted, i.e.
if it comes from another instruction known to do the normalization
and we are using IEEE mode to quiet sNaNs.

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

llvm-svn: 307848
2017-07-12 21:20:28 +00:00
Rafael Espindola
35296157d7 Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.

I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.

llvm-svn: 307846
2017-07-12 21:08:24 +00:00
Anna Thomas
6f931c9a15 [LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.

llvm-svn: 307843
2017-07-12 20:55:43 +00:00