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

158029 Commits

Author SHA1 Message Date
David Blaikie
6924bbcb14 Remove a non-modular header (& inline it into its one use)
llvm-svn: 320768
2017-12-14 23:45:58 +00:00
Quentin Colombet
3ce97888aa [TableGen][GlobalISel] Add a common class for all PredicateMatcher
NFC.

llvm-svn: 320767
2017-12-14 23:44:07 +00:00
George Burgess IV
eef4390e6c [ProfileData] Use a different data structure to save memory.
This change swaps FunctionSamples to a std::map. This saves us around
17% of the memory required to parse sample profiles. To put hard numbers
on this, clang now eats around 1.3GB of RAM instead of 1.6GB while
parsing a 50MB profile.

The CPU time taken by a large profile merge (3.1GB of data across 226
files) is also reduced by ~11% by this patch (1:09.08 vs 1:01.11).

This was split out at the request of reviewers in D41152.

llvm-svn: 320764
2017-12-14 23:32:57 +00:00
Evandro Menezes
7cdf778e13 [Unit][AArch64] Additional tests for target parsing
Add Exynos M2/M3 to extension check.

llvm-svn: 320762
2017-12-14 23:13:04 +00:00
Evandro Menezes
b9ca09c930 [AArch64] Test patch
Fix formatting by adding a missing blank line to test new network setup.

llvm-svn: 320760
2017-12-14 23:06:18 +00:00
Adrian Prantl
caed503477 EmitFuncArgumentDbgValue: Prefer stack slots over registers for stack arguments
While investigating LLVM PR22316 (http://llvm.org/bugs/show_bug.cgi?id=22316)
I started wondering if it were not always preferable to emit the
initial DBG_VALUEs for stack arguments as FI locations instead of
describing the first register they get copied into. The advantage of
doing this is that the arguments will be available as soon as the
stack is setup. As illustrated by the testcase in the PR, the first
copy of the FI into a register may be sunk by MachineSink.cpp into a
later basic block. By describing the argument on the stack, we nicely
circumvent this problem.

<rdar://problem/19583723>

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

llvm-svn: 320758
2017-12-14 22:55:06 +00:00
Craig Topper
0cfd26f1c6 [X86] Remove an unnecessary SmallVector that was collecting chains for two SDNode's we're still holding SDValues for. NFCI
We can just get the chains from those SDValues to create the TokenFactor.

llvm-svn: 320757
2017-12-14 22:50:10 +00:00
Matt Arsenault
ec7e75e600 TLI: Allow using PSV for intrinsic mem operands
llvm-svn: 320756
2017-12-14 22:34:10 +00:00
Zachary Turner
7655f081e8 Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that
enums are signed by default in the MS ABI, while the
tautological comparison warnings trigger on x86 builds where
sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max()
is always false.

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

llvm-svn: 320750
2017-12-14 22:07:03 +00:00
Sanjay Patel
b03cfaf7ce [SimplifyCFG] don't sink common insts too soon (PR34603)
This should solve:
https://bugs.llvm.org/show_bug.cgi?id=34603
...by preventing SimplifyCFG from altering redundant instructions before early-cse has a chance to run.
It changes the default (canonical-forming) behavior of SimplifyCFG, so we're only doing the
sinking transform later in the optimization pipeline.

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

llvm-svn: 320749
2017-12-14 22:05:20 +00:00
Matt Arsenault
2a00489664 DAG: Expose all MMO flags in getTgtMemIntrinsic
Rather than adding more bits to express every
MMO flag you could want, just directly use the
MMO flags. Also fixes using a bunch of bool arguments to
getMemIntrinsicNode.

On AMDGPU, buffer and image intrinsics should always
have MODereferencable set, but currently there is no
way to do that directly during the initial intrinsic
lowering.

llvm-svn: 320746
2017-12-14 21:39:51 +00:00
Krzysztof Parzyszek
1eb78fb8be [Hexagon] Generate HVX code for comparisons and selects
llvm-svn: 320744
2017-12-14 21:28:48 +00:00
Sam Clegg
e4da2b15e2 [WebAssembly] Add support for init functions linking metadata
Summary:
This change lays the groundwork lowering of @llvm.global_ctors
and @llvm.global_dtors for the wasm object format.  Some parts
of this patch are subset of: https://reviews.llvm.org/D40759

See https://github.com/WebAssembly/tool-conventions/issues/25

Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish

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

llvm-svn: 320742
2017-12-14 21:10:03 +00:00
Zachary Turner
d7c6e3bc68 Revert "Fix isPodLike for MSVC and use it in TypeHashing."
This reverts commit ac5edc198eb612f82293850c3488042708b1c5fa.

Apparently this doesn't cover all the bases, so some compilers
and standard libraries still think this is not trivially copyable
even though it is.  Reverting this back to an MSVC-only check for
now so that at least we have some coverage.

llvm-svn: 320739
2017-12-14 19:59:10 +00:00
Zachary Turner
aac027b233 Fix isPodLike for MSVC and use it in TypeHashing.
This should be a better check than using is_trivially_copyable
behind an #ifdef _MSC_VER.

llvm-svn: 320737
2017-12-14 19:41:28 +00:00
Guozhi Wei
8c380373f3 [SLPVectorizer] Don't ignore scalar extraction instructions of aggregate value
In SLPVectorizer, the vector build instructions (insertvalue for aggregate type) is passed to BoUpSLP.buildTree, it is treated as UserIgnoreList, so later in cost estimation, the cost of these instructions are not counted. 
For aggregate value, later usage are more likely to be done in scalar registers, either used as individual scalars or used as a whole for function call or return value. Ignore scalar extraction instructions may cause too aggressive vectorization for aggregate values, and slow down performance. So for vectorization of aggregate value, the scalar extraction instructions are required in cost estimation.

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

llvm-svn: 320736
2017-12-14 19:35:43 +00:00
Zachary Turner
9fc3694294 Only use is_trivially_copyable if we know it's safe to do so.
Apparently this isn't present on older versions of libstdc++, so
it causes some builds to fail.

llvm-svn: 320733
2017-12-14 19:11:28 +00:00
Krzysztof Parzyszek
c211ababd7 Add MVT::v128i1, NFC
Hexagon HVX has type v128i8, comparing two vectors of that type will
produce v128i1 types in SelectionDAG.

llvm-svn: 320732
2017-12-14 19:05:21 +00:00
Adam Nemet
a22a5ffa95 [opt-viewer] Render utf-8 characters properly in the generated HTML
llvm-svn: 320729
2017-12-14 18:55:33 +00:00
Paul Robinson
ab6984b108 [MC] Allow .file directives to be out-of-order
llvm-svn: 320727
2017-12-14 18:46:43 +00:00
Adam Nemet
2ca42e294c [opt-viewer] Support unicode characters in function names
This is a Swift feature.  The output stream for the index page and the source
HTML page is utf-8 now.

The next patch will add the HTML magic to properly render these characters in
the browser.

llvm-svn: 320725
2017-12-14 18:42:42 +00:00
Shoaib Meenai
99b6e72b29 [cmake] Only attempt to install MSVC system libraries on Windows
Newer versions of CMake (I'm on 3.10, but I believe 3.9 behaves the same
way) attempt to query the system for information about the VS 2017
install. Unfortunately, this query fails on non-Windows systems:

  cmake_host_system_information does not recognize <key> VS_15_DIR

CMake isn't going to find these system libraries on non-Windows anyway
(and we were previously silencing the resultant warnings in our
cross-compilation toolchain), so it makes sense to just omit the
attempted installation entirely on non-Windows.

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

llvm-svn: 320724
2017-12-14 18:41:49 +00:00
Craig Topper
d9543646e4 [X86] Don't zero the upper bits of the k-register before extracting a single bit from a vXi1.
This doesn't match the semantics of the extract_vector_elt operation. Nothing downstream knows the bits were zeroed so they still get masked or sign extended after the extrat anyway.

llvm-svn: 320723
2017-12-14 18:35:25 +00:00
Krzysztof Parzyszek
f4e269a95c [Hexagon] Remove vectors of i64 from valid HVX types
HVX does not support operations on 64-bit integers.

llvm-svn: 320722
2017-12-14 18:35:24 +00:00
Zachary Turner
421445fcbf Fix error due to missing includes.
While I'm pushing cleanup changes, this also fixes a few warnings
related to extraneous semicolons.

llvm-svn: 320720
2017-12-14 18:20:23 +00:00
Zachary Turner
3e534be355 [COFF] Teach LLD to use the COFF .debug$H section.
This adds the /DEBUG:GHASH option to LLD which will look for
the existence of .debug$H sections in linker inputs and use them
to accelerate type merging.  The clang-cl side has already been
added, so this completes the work necessary to begin experimenting
with this feature.

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

llvm-svn: 320719
2017-12-14 18:07:04 +00:00
Geoff Berry
e010be38fd [ARM] Fix isRenamable flag setting on expanded VSTMDIA opcode.
Fixes expensive-check ARM buildbot failure.

llvm-svn: 320718
2017-12-14 18:06:25 +00:00
Gadi Haber
250b1e3c78 [X86][AVX][AVX2]: Adding full coverage of MC encoding for the AVX, AVX2 isa set.<NFC>
NFC.
Adding MC regressions tests to cover the AVX and AVX2 ISA sets.
This patch is part of a larger task to cover MC encoding of all X86 ISA Sets.
See revision: https://reviews.llvm.org/D39952

Reviewers: zvi, RKSimon, aymanmus, m_zuckerman
Differential Revison: https://reviews.llvm.org/D40287

Change-Id: I304687a2b7abb473f79de99c31fc55c97b2662da
llvm-svn: 320716
2017-12-14 16:46:47 +00:00
Simon Dardis
44c6576474 [mips] Update some tests before posting a patch, NFC.
llvm-svn: 320715
2017-12-14 16:42:04 +00:00
Yaxun Liu
038f7c5d2f Revert CodeGen: Fix assertion in machine inst sheduler due to llvm.dbg.value
This commit might have caused regression on ppc64. Revert it to verify that.

llvm-svn: 320712
2017-12-14 16:12:04 +00:00
Sander de Smalen
8ac9f47934 Re-commit: [TableGen] AsmMatcher: Fix bug with reported diagnostic for operand.
Summary:
The generated diagnostic by the AsmMatcher isn't always applicable to the AsmOperand.

This is because the code will only update the diagnostic if it is more 
specific than the previous diagnostic. However, when having validated
operands and 'moved on' to a next operand (for some instruction/alias for
which all previous operands are valid), if the diagnostic is InvalidOperand,
than that should be set as the diagnostic, not the more specific message
about a previous operand for some other instruction/alias candidate.

(Re-committed with an extra whitespace in SVEInstrFormats.td to trigger rebuild 
of AArch64GenAsmMatcher.inc, since the llvm-clang-x86_64-expensive-checks-win
builder does not seem to rebuild AArch64GenAsmMatcher.inc with the
newly built TableGen due to a missing dependency somewhere (see:
http://lists.llvm.org/pipermail/llvm-dev/2017-December/119555.html))

Reviewers: craig.topper, olista01, rengolin, stoklund

Reviewed By: olista01

Subscribers: javed.absar, llvm-commits

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

llvm-svn: 320711
2017-12-14 16:09:48 +00:00
Eugene Leviant
77a7b50432 [LLVMgold] Use platform dependent extension in tests
Differential revision: https://reviews.llvm.org/D41238

llvm-svn: 320710
2017-12-14 15:59:05 +00:00
Simon Dardis
fc4a194816 [mips] Add partial support for R6 in the long branch pass
MIPSR6 introduced several new jump instructions and deprecated
the use of the 'j' instruction. For microMIPS32R6, 'j' was removed
entirely and it only has non delay slot jumps.

This patch adds support for MIPSR6 by using some R6 instructions--
'bc' instead of 'j', 'jic $reg, 0' instead of 'jalr $zero, $reg'--
and modifies the sequences not to use delay slots for R6.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: dschuff, arichardson, llvm-commits

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

llvm-svn: 320703
2017-12-14 14:55:25 +00:00
Bjorn Pettersson
6aa37cb0b7 [ScalarEvolution] Fix base condition in isNormalAddRecPHI.
Summary:
The function is meant to recurse until it comes upon the
phi it's looking for. However, with the current condition,
it will recurse until it finds anything _but_ the phi.

The function will even fail for simple cases like:
  %i = phi i32 [ %inc, %loop ], ...
  ...
  %inc = add i32 %i, 1

because the base condition will not happen when the phi
is recursed to, and the recursion will end with a 'false'
result since the previous instruction is a phi.

Reviewers: sanjoy, atrick

Reviewed By: sanjoy

Subscribers: Ka-Ka, bjope, llvm-commits

Committing on behalf of: Bevin Hansson (bevinh)

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

llvm-svn: 320700
2017-12-14 14:47:52 +00:00
Haicheng Wu
34f30c2167 [InlineCost] Tracking Values through PHI Nodes
This patch fix this FIXME in visitPHI()

FIXME: We should potentially be tracking values through phi nodes,
especially when they collapse to a single value due to deleted CFG edges
during inlining.

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

llvm-svn: 320699
2017-12-14 14:36:18 +00:00
Benjamin Kramer
4af13398dc Revert "[DAGCombine] Move AND nodes to multiple load leaves"
This reverts commit r320679. Causes miscompiles.

llvm-svn: 320698
2017-12-14 14:03:07 +00:00
Andrew V. Tischenko
66d2111ffe Any Target Asm comments should start from MachineInstr::TAsmComments value.
llvm-svn: 320693
2017-12-14 12:07:11 +00:00
Omer Paparo Bivas
4ff8c46cae Inserting several lit tests to reflect current behaviour
Change-Id: I1b8188dc3c6c7c0f455715364ece7d35ef485f2f
llvm-svn: 320692
2017-12-14 12:00:04 +00:00
Michael Zuckerman
0d1bc9bb69 [AVX512] Adding support for load truncate store of I1
store operation on a truncated memory (load) of vXi1 is poorly supported by LLVM and most of the time end with an assertion.
This patch fixes this issue.

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

Change-Id: Ida5523dd09c1ad384acc0a27e9e59273d28cbdc9
llvm-svn: 320691
2017-12-14 11:55:50 +00:00
Simon Pilgrim
c5aeeb3746 [X86] Add FMA4 schedule tests
llvm-svn: 320690
2017-12-14 11:40:54 +00:00
Simon Pilgrim
79f0b6a634 [X86] Add FMA3 schedule tests
Rewrote to use inline asm for full coverage

llvm-svn: 320689
2017-12-14 11:30:01 +00:00
Fedor Sergeev
4e5e23e6c9 [PM][InstCombine] fixing omission of AliasAnalysis in new-pass-manager's version of InstCombine
Summary:
Passing AliasAnalysis results instead of nullptr appears to work just fine.
A couple new-pass-manager tests updated to align with new order of analyses.

Reviewers: chandlerc, spatel, craig.topper

Reviewed By: chandlerc

Subscribers: mehdi_amini, eraman, llvm-commits

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

llvm-svn: 320687
2017-12-14 10:36:31 +00:00
Fedor Sergeev
d4491490ad Remove redundant includes from lib/Target/AArch64.
llvm-svn: 320686
2017-12-14 10:36:20 +00:00
Francis Visoiu Mistrih
ba735f2d6a [CodeGen] Print MCSymbol operands as <mcsymbol sym> in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`<mcsymbol sym>` instead of `<MCSym=sym>`.

Only debug syntax is affected.

llvm-svn: 320685
2017-12-14 10:03:23 +00:00
Francis Visoiu Mistrih
dc3e036217 [CodeGen] Move printing MO_Metadata operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.

llvm-svn: 320684
2017-12-14 10:03:18 +00:00
Francis Visoiu Mistrih
d2c2d77621 [CodeGen] Print live-out register lists as liveout(...) in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`liveout(...)` instead of `<regliveout>`.

Only debug syntax is affected.

llvm-svn: 320683
2017-12-14 10:03:14 +00:00
Francis Visoiu Mistrih
172bdfe4ba [CodeGen] Print global addresses as @foo in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`@foo` instead of `<ga:@foo>`.

Also print target flags in the MIR format since most of them are used on
global address operands.

Only debug syntax is affected.

llvm-svn: 320682
2017-12-14 10:03:09 +00:00
Francis Visoiu Mistrih
e40ab0ed31 [CodeGen] Print external symbols as $symbol in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`$symbol` instead of `<es:symbol>`.

Only debug syntax is affected.

llvm-svn: 320681
2017-12-14 10:02:58 +00:00
Igor Laevsky
948180d9b5 [Verifier] Check that GEP indexes has correct types
Differential Revision: https://reviews.llvm.org/D40391

llvm-svn: 320680
2017-12-14 09:33:58 +00:00
Sam Parker
bc49de227d [DAGCombine] Move AND nodes to multiple load leaves
Recommitting rL319773, which was reverted due to a recursive issue
causing timeouts. This happened because I failed to check whether
the discovered loads could be narrowed further. In the case of a tree
with one or more narrow loads, that could not be further narrowed, as
well as a node that would need masking, an AND could be introduced
which could then be visited and recombined again with the same load.
This could again create the masking load, with would be combined
again... We now check that the load can be narrowed so that this
process stops.

Original commit message:
Search from AND nodes to find whether they can be propagated back to
loads, so that the AND and load can be combined into a narrow load.
We search through OR, XOR and other AND nodes and all bar one of the
leaves are required to be loads or constants. The exception node then
needs to be masked off meaning that the 'and' isn't removed, but the
loads(s) are narrowed still.

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

llvm-svn: 320679
2017-12-14 09:31:01 +00:00