1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

157524 Commits

Author SHA1 Message Date
Evgeniy Stepanov
3270817a72 Update BitCodeFormat.
Add 2 recently added attributes to list of well-known attributes
in BitCodeFormat.rst.

llvm-svn: 319999
2017-12-07 01:38:20 +00:00
Davide Italiano
8473e78e20 [DebugInfo] Explicitly pass a triple to this test.
As we emit different linetables format on different operating
systems, this currently fails on linux. Speculative commit
to fix the bots.

llvm-svn: 319997
2017-12-07 01:22:10 +00:00
Davide Italiano
e925a1adcd [MC/Dwarf] Use the older DWARF linetables format on Darwin.
dsymutil doesn't yet understand the new format and the change,
among others, breaks a large fraction of the debugger tests on
mac OS.

rdar://problem/35856354

llvm-svn: 319995
2017-12-07 00:57:25 +00:00
Alina Sbirlea
21c646e4f5 [ModRefInfo] Replace remaining bit-wise operations with wrappers.
llvm-svn: 319993
2017-12-07 00:43:19 +00:00
Dan Gohman
79ec459a34 [WebAssembly] Don't try to emit size information for unsized types
Patch by John Sully!

Fixes PR35164.

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

llvm-svn: 319991
2017-12-07 00:14:30 +00:00
Vedant Kumar
54a36e6cb7 [Coverage] Scan ahead for the most-recent completed count (PR35495)
This extends r319391. It teaches the segment builder to emit the right
completed segment when more than one region ends at the same location.

Fixes PR35495.

llvm-svn: 319990
2017-12-07 00:01:15 +00:00
Dan Gohman
651a4a50bb [WebAssembly] Import the linear memory and function table.
Instead of having .o files contain linear-memory and function table
definitions, use imports. This is more consistent with the stack pointer
being imported, and it's consistent with the linker being the one to
decide whether linear memory and function table are imported or defined
in the linked output. This implements tool-conventions #23.

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

llvm-svn: 319989
2017-12-06 23:57:11 +00:00
Matt Morehouse
5ec2b2d7ea [CMake] Use PRIVATE when linking LLVM fuzzers.
More fuzzers missed by r319840.

llvm-svn: 319987
2017-12-06 23:32:46 +00:00
Alina Sbirlea
1f9b2fbf29 [ModRefInfo] Use ModRefInfo wrappers in FunctionModRefBehavior
when testing for info found only in ModRefInfo [NFC].

llvm-svn: 319985
2017-12-06 23:12:43 +00:00
Florian Hahn
fbe21e02bb [AArch64] Add patterns to replace fsub fmul with fma fneg.
Summary:
This patch adds MachineCombiner patterns for transforming
(fsub (fmul x y) z) into (fma x y (fneg z)). This has a lower
latency on micro architectures where fneg is cheap.

Patch based on work by George Steed.

Reviewers: rengolin, joelkevinjones, joel_k_jones, evandro, efriedma

Reviewed By: evandro

Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls

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

llvm-svn: 319980
2017-12-06 22:48:36 +00:00
Adam Nemet
8c2b05ed44 [LV] Interleaved access vectorization: fix computing new alias info
As a new access is generated spanning across multiple fields, we need to
propagate alias info from all the fields to form the most generic alias info.

rdar://35602528

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

llvm-svn: 319979
2017-12-06 22:42:24 +00:00
Krzysztof Parzyszek
4fa9d26a18 [Hexagon] Recognize vdealb, vdealh, vshuffb and vshuffh specifically
llvm-svn: 319978
2017-12-06 22:41:49 +00:00
Krzysztof Parzyszek
a018c62276 [Hexagon] Handle perfect shuffles on single vectors
llvm-svn: 319965
2017-12-06 21:25:03 +00:00
Sanjay Patel
f0724c4012 [InstCombine] canonicalize constant-minus-boolean to select-of-constants
This restores the half of:
https://reviews.llvm.org/rL75531
that was reverted at:
https://reviews.llvm.org/rL159230

For the x86 case mentioned there, we now produce:
leal 1(%rdi), %eax
subl %esi, %eax

We have target hooks to invert this in DAGCombiner (and x86 is enabled) with:
https://reviews.llvm.org/rL296977
https://reviews.llvm.org/rL311731

AArch64 and possibly other targets would probably benefit from enabling those hooks too. 
See PR30327:
https://bugs.llvm.org/show_bug.cgi?id=30327#c2

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

llvm-svn: 319964
2017-12-06 21:22:57 +00:00
Matthew Simpson
e71eaed450 [PGO] Make indirect call promotion a utility
This patch factors out the main code transformation utilities in the pgo-driven
indirect call promotion pass and places them in Transforms/Utils. The change is
intended to be a non-functional change, letting non-pgo-driven passes share a
common implementation with the existing pgo-driven pass.

The common utilities are used to conditionally promote indirect call sites to
direct call sites. They perform the underlying transformation, and do not
consider profile information. The pgo-specific details (e.g., the computation
of branch weight metadata) have been left in the indirect call promotion pass.

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

llvm-svn: 319963
2017-12-06 21:22:54 +00:00
Dan Gohman
5fdb149e58 [WebAssembly] Commit a file I accidentally omitted from r319956.
llvm-svn: 319962
2017-12-06 21:16:04 +00:00
Dan Gohman
dca291d96b [WebAssembly] Remove WASM_STACK_POINTER.
WASM_STACK_POINTER and the .stack_pointer directive are no longer needed
now that the stack pointer global is an import.

llvm-svn: 319956
2017-12-06 20:56:40 +00:00
Florian Hahn
e0e5ec299f [MachineCombiner] Add up latencies of all instructions in new pattern.
Summary:
When calculating the RootLatency, we add up all the latencies of the
deleted instructions. But for NewRootLatency we only add the latency of
the new root instructions, ignoring the latencies of the other
instructions inserted. This leads the combiner to underestimate the cost
of patterns which add multiple instructions. This patch fixes that by
summing up the latencies of all new instructions. For NewRootNode, the
more complex getLatency function is used.

Note that we may be slightly more precise than just summing up
all latencies. For example, consider a pattern like

    r1 = INS1 ..
    r2 = INS2 ..
    r3 = INS3 r1, r2

I think in some other places, the total latency of the pattern would be
estimated as lat(INS3) + max(lat(INS1), lat(INS2)). If you consider
that worth changing, I think it would be best to do in a follow-up
patch.

Reviewers: Gerolf, sebpop, spop, fhahn

Reviewed By: fhahn

Subscribers: evandro, llvm-commits

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

llvm-svn: 319951
2017-12-06 20:27:33 +00:00
Alina Sbirlea
c83daf2715 [ModRefInfo] Do not use ModRefInfo result in if conditions as this makes
assumptions about the values in the enum. Replace with wrapper returning
bool [NFC].

llvm-svn: 319949
2017-12-06 19:56:37 +00:00
Florian Hahn
edcd440830 [InlineFunction] Only replace call if there are VarArgs to forward.
Summary:
There is no need to replace the original call instruction if no
 VarArgs need to be forwarded. 

Reviewers: davide, rnk, majnemer, efriedma

Reviewed By: efriedma

Subscribers: eraman, llvm-commits

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

llvm-svn: 319947
2017-12-06 19:47:24 +00:00
Sanjay Patel
7899ab1c83 [LoopUtils] simplify createTargetReduction(); NFCI
llvm-svn: 319946
2017-12-06 19:37:00 +00:00
Simon Pilgrim
8443635a81 [X86][AVX512] Tag mask reg op instruction scheduler classes
llvm-svn: 319945
2017-12-06 19:36:00 +00:00
Tim Shen
694a89a791 [Hexagon] Suppress more warnings on unused variables defined for asserts.
llvm-svn: 319944
2017-12-06 19:33:42 +00:00
Alina Sbirlea
89f373d2a9 [ModRefInfo] Use createModRefInfo wrapper to create a ModRefInfo from FunctionModRefBehavior.
llvm-svn: 319941
2017-12-06 19:23:03 +00:00
Tim Shen
9f01a9410c [Hexagon] Suppress warnings on unused variables defind for asserts.
llvm-svn: 319940
2017-12-06 19:22:19 +00:00
Rui Ueyama
59cdec1fc6 [COFF] Ignore semicolons in module definition identifiers
Patch by David Major.

The NSS project's .def files make heavy use of semicolons in a
frightening attempt at portability:
https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/capi/nsscapi.def

lld-link was treating the semicolon as part of the export name,
resulting in unresolved symbols. This patch includes ';' in the list of
characters to split on.

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

llvm-svn: 319933
2017-12-06 19:18:24 +00:00
Sanjay Patel
d6ee876e05 [LoopUtils] fix variable name to match FMF vocabulary; NFC
llvm-svn: 319928
2017-12-06 19:11:23 +00:00
Zachary Turner
1267568ace Update obj2yaml and yaml2obj for .debug$H section.
Differential Revision: https://reviews.llvm.org/D40842

llvm-svn: 319925
2017-12-06 18:58:48 +00:00
Davide Italiano
15744ca954 [Target] dumpr() is defined only in debug builds.
This fixes the clang build on macOS.

llvm-svn: 319923
2017-12-06 18:54:17 +00:00
Simon Pilgrim
6ae446173e [X86][SSE] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
llvm-svn: 319921
2017-12-06 18:47:37 +00:00
Simon Pilgrim
62c23721c3 [X86][AVX512] Tag scalar insert/extract instruction scheduler classes
Classes don't look great but match what we're doing on SSE/AVX

llvm-svn: 319920
2017-12-06 18:46:06 +00:00
Craig Topper
0e9a7f17fe [X86] Simplify the TTI code for getInterleavedMemoryOpCost around for AVX512BW. NFCI
Previously the lambda for AVX512 passed out a flag that indicated whether AVX512BW was required and that was checked against the AVX512BW subtarget flag outside.

This patch changes the interface to pass the AVX512BW subtarget bit in and return its value if we detect 16 or 8 bit types.

llvm-svn: 319919
2017-12-06 18:40:46 +00:00
Shoaib Meenai
b8543cbaec [cmake] Remove unnecessary header include in atomics check
The header include was required to work around PR19898, as noted in that
comment. That PR has since been marked resolved fixed, and the
configuration check passes without the header inclusion both when
compiling on Windows with cl and when cross-compiling on Linux using
clang-cl.

I noticed this because the inclusion was cased incorrectly (Intrin.h
instead of intrin.h), which when cross-compiling on a case sensitive
file system would cause the intrin.h from the Windows SDK to be included
(which LLVM can't handle) instead of the one from clang's resource
directory, making the check fail. This is the same issue as r309980.
Correcting the case of the inclusion makes the check pass when cross
compiling, but it seems better to get rid of the inclusion entirely,
since it appears to be unnecessary now.

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

llvm-svn: 319917
2017-12-06 18:33:07 +00:00
Simon Pilgrim
d6e669c0b8 [X86][AVX2] Tag MASKMOV instruction scheduler classes
llvm-svn: 319915
2017-12-06 18:24:48 +00:00
Craig Topper
c58a408765 [X86] Regenerate test for r319778
llvm-svn: 319914
2017-12-06 18:04:39 +00:00
Simon Pilgrim
86afcce055 [X86][AVX512] Tag aligned/unaligned move instruction scheduler classes
llvm-svn: 319913
2017-12-06 17:59:26 +00:00
Simon Pilgrim
9da120fc3e [X86][AVX] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
llvm-svn: 319912
2017-12-06 17:57:18 +00:00
Craig Topper
b1e0fafe91 [X86] Attempt to fix a ubsan failure in the autoupgrade of kunpck intrinsics.
llvm-svn: 319911
2017-12-06 17:54:07 +00:00
Zvi Rackover
541777c567 InstructionSimplify: 'extractelement' with an undef index is undef
Summary:
An undef extract index can be arbitrarily chosen to be an
out-of-range index value, which would result in the instruction being undef.

This change closes a gap identified while working on lowering vector permute intrinsics
with variable index vectors to pure LLVM IR.

Reviewers: arsenm, spatel, majnemer

Reviewed By: arsenm, spatel

Subscribers: fhahn, nhaehnle, wdng, llvm-commits

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

llvm-svn: 319910
2017-12-06 17:51:46 +00:00
Artem Belevich
3a24efe4a6 [NVPTX,CUDA] Added llvm.nvvm.fns intrinsic and matching __nvvm_fns builtin in clang.
Differential Revision: https://reviews.llvm.org/D40872

llvm-svn: 319909
2017-12-06 17:50:05 +00:00
Zvi Rackover
fc0a62827b AMDGPU Tests: Change a case to be run with -O0
D40231 requires to run case with -O0 to prevent InstructionSimplify from
transforming an extractelement with undef index.

llvm-svn: 319907
2017-12-06 17:40:09 +00:00
Jonas Paulsson
998b0a0fef [SystemZ] Add IntrWriteMem flag to int_s390_tabort intrinsic
Tabort (transaction abort) does not load from memory.

mayLoad flag removed from corresponding TABORT machine instruction.

Review: Ulrich Weigand
llvm-svn: 319905
2017-12-06 17:01:08 +00:00
Adam Nemet
10e51269a3 [opt-viewer] Suppress noisy Swift remarks
Most likely, this is not how we want to handle this in the long term.  This
code should probably be in the Swift repo and somehow plugged into the
opt-viewer.  This is still however very experimental at this point so I don't
want to over-engineer it at this point.

llvm-svn: 319902
2017-12-06 16:50:50 +00:00
Krzysztof Parzyszek
eec0895eab [Hexagon] Generate HVX code for vector construction and access
Support for:
  - build vector,
  - extract vector element, subvector,
  - insert vector element, subvector,
  - shuffle.

llvm-svn: 319901
2017-12-06 16:40:37 +00:00
Simon Pilgrim
14f8c49596 [X86][AVX512] Tag BROADCAST instruction scheduler classes
llvm-svn: 319900
2017-12-06 15:48:40 +00:00
Nirav Dave
d42b05387d [ARM][AArch64][DAG] Reenable post-legalize store merge
Reenable post-legalize stores with constant merging computation and
corresponding test case.

 * Properly truncate store merge constants
 * Disable merging of truncated stores floating points
 * Ensure merges of constant stores into a single vector are
   constructed from legal elements.

Reviewers: eastig, efriedma

Reviewed By: eastig

Subscribers: spatel, rengolin, aemerson, javed.absar, kristof.beyls, hiraditya, llvm-commits

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

llvm-svn: 319899
2017-12-06 15:30:13 +00:00
Don Hinton
53cb4a8f16 [cmake] Move CMAKE_(C|CXX)_COMPILER variables before CROSS_TOOLCHAIN_FLAGS so
they can be overridden when cross compiling.

Summary:
Since CROSS_TOOLCHAN_FLAGS can set CMAKE_(C|CXX)_COMPILER
variables, move the compiler variables up front so they can be
overridden.

This is a followup to https://reviews.llvm.org/D40229 committed in rL319620.

Thanks to Pavel Labath for reporting this issue.

Reviewers: labath, beanz

Subscribers: mgorny, llvm-commits

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

llvm-svn: 319898
2017-12-06 15:25:14 +00:00
Simon Pilgrim
afc2ad760d [X86][AVX512] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
llvm-svn: 319895
2017-12-06 14:07:38 +00:00
Igor Laevsky
83aa596dd0 [InstSimplify] Fold insertelement into undef if index is out of bounds
Differential Revision: https://reviews.llvm.org/D40650

llvm-svn: 319894
2017-12-06 14:04:45 +00:00
Jonas Paulsson
3a2b48b970 [SystemZ] Bugfix in expandRxSBG()
Csmith discovered a program that caused wrong code generation with -O0:

When handling a SIGN_EXTEND in expandRxSBG(), RxSBG.BitSize may be less than
the Input width (if a truncate was previously traversed), so maskMatters()
should be called with a masked based on the width of the sign extend result
instead.

Review: Ulrich Weigand
llvm-svn: 319892
2017-12-06 13:53:24 +00:00