OSDN Git Service
Craig Topper [Thu, 7 Dec 2017 08:04:33 +0000 (08:04 +0000)]
[SelectionDAG] Use TLI.getVectorIdxTy to determine type for an EXTRACT_VECTOR_ELT index instead of hardcoding MVT::i8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320012
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Thu, 7 Dec 2017 07:01:21 +0000 (07:01 +0000)]
Skip DBG instr in OptimizePHIs when looking for dead PHI cycles
Summary:
Changed use_instructions() to use_nodbg_instructions() when
building an instruction set.
We don't want the presence of debug info to affect the code
we generate.
Reviewers: dblaikie, Eugene.Zelenko, chandlerc, aprantl
Reviewed By: aprantl
Subscribers: aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D40882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320010
91177308-0d34-0410-b5e6-
96231b3b80d8
Leslie Zhai [Thu, 7 Dec 2017 06:56:09 +0000 (06:56 +0000)]
[AVR] Override ParseDirective
Reviewers: dylanmckay, kparzysz
Reviewed By: dylanmckay
Differential Revision: https://reviews.llvm.org/D38029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320009
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Dec 2017 03:05:45 +0000 (03:05 +0000)]
Revert "[WebAssembly] Import the linear memory and function table."
We need to a little time to prepare and lld-side change that
supports this.
Original change: https://reviews.llvm.org/D40875
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320003
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Dec 2017 02:55:51 +0000 (02:55 +0000)]
[WebAssembly] section kind can be code
Currently, when creating a named section, the Wasm
frontend forces it to use `SectionKind::Data`, whereas
in fact C++ does generate code sections with custom
names.
Patch by Nicholas Wilson
Differential Revision: https://reviews.llvm.org/D40906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320002
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 7 Dec 2017 01:38:20 +0000 (01:38 +0000)]
Update BitCodeFormat.
Add 2 recently added attributes to list of well-known attributes
in BitCodeFormat.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319999
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 7 Dec 2017 01:22:10 +0000 (01:22 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319997
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 7 Dec 2017 00:57:25 +0000 (00:57 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319995
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Thu, 7 Dec 2017 00:43:19 +0000 (00:43 +0000)]
[ModRefInfo] Replace remaining bit-wise operations with wrappers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319993
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 7 Dec 2017 00:14:30 +0000 (00:14 +0000)]
[WebAssembly] Don't try to emit size information for unsized types
Patch by John Sully!
Fixes PR35164.
Differential Revision: https://reviews.llvm.org/D39519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319991
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 7 Dec 2017 00:01:15 +0000 (00:01 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319990
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 6 Dec 2017 23:57:11 +0000 (23:57 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319989
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Morehouse [Wed, 6 Dec 2017 23:32:46 +0000 (23:32 +0000)]
[CMake] Use PRIVATE when linking LLVM fuzzers.
More fuzzers missed by r319840.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319987
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Dec 2017 23:12:43 +0000 (23:12 +0000)]
[ModRefInfo] Use ModRefInfo wrappers in FunctionModRefBehavior
when testing for info found only in ModRefInfo [NFC].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319985
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 6 Dec 2017 22:48:36 +0000 (22:48 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319980
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 6 Dec 2017 22:42:24 +0000 (22:42 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319979
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 6 Dec 2017 22:41:49 +0000 (22:41 +0000)]
[Hexagon] Recognize vdealb, vdealh, vshuffb and vshuffh specifically
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319978
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 6 Dec 2017 21:25:03 +0000 (21:25 +0000)]
[Hexagon] Handle perfect shuffles on single vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319965
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Dec 2017 21:22:57 +0000 (21:22 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319964
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Wed, 6 Dec 2017 21:22:54 +0000 (21:22 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319963
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 6 Dec 2017 21:16:04 +0000 (21:16 +0000)]
[WebAssembly] Commit a file I accidentally omitted from r319956.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319962
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 6 Dec 2017 20:56:40 +0000 (20:56 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319956
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 6 Dec 2017 20:27:33 +0000 (20:27 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319951
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Dec 2017 19:56:37 +0000 (19:56 +0000)]
[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].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319949
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 6 Dec 2017 19:47:24 +0000 (19:47 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319947
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Dec 2017 19:37:00 +0000 (19:37 +0000)]
[LoopUtils] simplify createTargetReduction(); NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319946
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 19:36:00 +0000 (19:36 +0000)]
[X86][AVX512] Tag mask reg op instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319945
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Wed, 6 Dec 2017 19:33:42 +0000 (19:33 +0000)]
[Hexagon] Suppress more warnings on unused variables defined for asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319944
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Dec 2017 19:23:03 +0000 (19:23 +0000)]
[ModRefInfo] Use createModRefInfo wrapper to create a ModRefInfo from FunctionModRefBehavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319941
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Wed, 6 Dec 2017 19:22:19 +0000 (19:22 +0000)]
[Hexagon] Suppress warnings on unused variables defind for asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319940
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 6 Dec 2017 19:18:24 +0000 (19:18 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319933
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Dec 2017 19:11:23 +0000 (19:11 +0000)]
[LoopUtils] fix variable name to match FMF vocabulary; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319928
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 6 Dec 2017 18:58:48 +0000 (18:58 +0000)]
Update obj2yaml and yaml2obj for .debug$H section.
Differential Revision: https://reviews.llvm.org/D40842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319925
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 6 Dec 2017 18:54:17 +0000 (18:54 +0000)]
[Target] dumpr() is defined only in debug builds.
This fixes the clang build on macOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319923
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 18:47:37 +0000 (18:47 +0000)]
[X86][SSE] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319921
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 18:46:06 +0000 (18:46 +0000)]
[X86][AVX512] Tag scalar insert/extract instruction scheduler classes
Classes don't look great but match what we're doing on SSE/AVX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319920
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Dec 2017 18:40:46 +0000 (18:40 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319919
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Wed, 6 Dec 2017 18:33:07 +0000 (18:33 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319917
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 18:24:48 +0000 (18:24 +0000)]
[X86][AVX2] Tag MASKMOV instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319915
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Dec 2017 18:04:39 +0000 (18:04 +0000)]
[X86] Regenerate test for r319778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319914
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 17:59:26 +0000 (17:59 +0000)]
[X86][AVX512] Tag aligned/unaligned move instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319913
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 17:57:18 +0000 (17:57 +0000)]
[X86][AVX] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319912
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Dec 2017 17:54:07 +0000 (17:54 +0000)]
[X86] Attempt to fix a ubsan failure in the autoupgrade of kunpck intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319911
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Wed, 6 Dec 2017 17:51:46 +0000 (17:51 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319910
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 6 Dec 2017 17:50:05 +0000 (17:50 +0000)]
[NVPTX,CUDA] Added llvm.nvvm.fns intrinsic and matching __nvvm_fns builtin in clang.
Differential Revision: https://reviews.llvm.org/D40872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319909
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Wed, 6 Dec 2017 17:40:09 +0000 (17:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319907
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Dec 2017 17:01:08 +0000 (17:01 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319905
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 6 Dec 2017 16:50:50 +0000 (16:50 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319902
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 6 Dec 2017 16:40:37 +0000 (16:40 +0000)]
[Hexagon] Generate HVX code for vector construction and access
Support for:
- build vector,
- extract vector element, subvector,
- insert vector element, subvector,
- shuffle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319901
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 15:48:40 +0000 (15:48 +0000)]
[X86][AVX512] Tag BROADCAST instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319900
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Dec 2017 15:30:13 +0000 (15:30 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319899
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Wed, 6 Dec 2017 15:25:14 +0000 (15:25 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319898
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 14:07:38 +0000 (14:07 +0000)]
[X86][AVX512] Regenerate vpmovm2*/vpmov*2m avx512 schedule tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319895
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 6 Dec 2017 14:04:45 +0000 (14:04 +0000)]
[InstSimplify] Fold insertelement into undef if index is out of bounds
Differential Revision: https://reviews.llvm.org/D40650
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319894
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Dec 2017 13:53:24 +0000 (13:53 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319892
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 6 Dec 2017 13:32:36 +0000 (13:32 +0000)]
[X86] Avoid unused variable warning in Release builds. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319891
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 13:14:44 +0000 (13:14 +0000)]
[X86][AVX512] Drop default NoItinerary arguments that aren't needed
Requires reordering of AVX512_maskable_common arguments, but helps track what is still missing itinerary tags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319890
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Dec 2017 12:44:56 +0000 (12:44 +0000)]
[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs
Lexicographical comparison of SCEV trees is potentially expensive for big
expression trees. We can define ordering between them for AddRecs and
N-ary operations by SCEV NoWrap flags to make non-equality check
cheaper.
This change does not prevent grouping eqivalent SCEVs together and is
not supposed to have any meaningful impact on behavior of any transforms.
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D40645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319889
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 6 Dec 2017 12:42:49 +0000 (12:42 +0000)]
[mips] Fix definition of 'bc' instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319888
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 11:59:05 +0000 (11:59 +0000)]
[X86][AVX512] Tag Mask<->Vector instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319887
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Wed, 6 Dec 2017 11:57:53 +0000 (11:57 +0000)]
[CodeGen] Fix formatting error from r319885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319886
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Wed, 6 Dec 2017 11:55:42 +0000 (11:55 +0000)]
[CodeGen] Better handling of detached MachineOperands
Basically use getMFIfAvailable to check if we can crawl up to the
function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319885
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 6 Dec 2017 11:23:13 +0000 (11:23 +0000)]
[X86][AVX512] Cleanup scalar move scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319884
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Wed, 6 Dec 2017 09:27:48 +0000 (09:27 +0000)]
[[Machine]Dominators] Improved printout when verifyDomTree fails [NFC]
Include the function name in the printout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319882
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Dec 2017 08:58:16 +0000 (08:58 +0000)]
[SCEV][NFC] Share value cache between SCEVs in GroupByComplexity
Current implementation of `compareSCEVComplexity` is being unreasonable with `SCEVUnknown`s:
every time it sees one, it creates a new value cache and tries to prove equality of two values using it.
This cache reallocates and gets lost from SCEV to SCEV.
This patch changes this behavior: now we create one cache for all values and share it between SCEVs.
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D40597
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319880
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Dec 2017 07:37:20 +0000 (07:37 +0000)]
[X86] Split 512-bit vector extends from types other than vXi1 out of LowerZERO_EXTEND_AVX512/LowerSIGN_EXTEND_AVX512. NFCI
Most of the code in these routines is for handling extends from vXi1 types. The 512-bit handling for other extends is very much like the AVX2 code. So make the special routines just do vXi1 types and move the other 512-bit handling to the place that handles AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319878
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 6 Dec 2017 01:47:55 +0000 (01:47 +0000)]
Revert r319482 and r319483 "[memcpyopt] Teach memcpyopt to optimize across basic blocks"
This caused PR35519.
> [memcpyopt] Teach memcpyopt to optimize across basic blocks
>
> This teaches memcpyopt to make a non-local memdep query when a local query
> indicates that the dependency is non-local. This notably allows it to
> eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.
>
> Fixes PR28958.
>
> Differential Revision: https://reviews.llvm.org/D38374
>
> [memcpyopt] Commit file missed in r319482.
>
> This change was meant to be included with r319482 but was accidentally
> omitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319873
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 6 Dec 2017 01:38:29 +0000 (01:38 +0000)]
[WebAssembly] Only emit stack pointer delcaration in BinFormatWasm assembly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319870
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Wed, 6 Dec 2017 01:16:08 +0000 (01:16 +0000)]
Revert "[DAGCombine] Move AND nodes to multiple load leaves"
This reverts commit r319773. It was causing some buildbots to hang, e.g.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/5589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319867
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 6 Dec 2017 01:02:44 +0000 (01:02 +0000)]
[WebAssembly] Fix test breakage from r319810
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319865
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 6 Dec 2017 00:58:12 +0000 (00:58 +0000)]
Regex out the local hash comparison test.
Since the local hash is a different number of bytes depending
on host architecture, we don't have a consistent value. I
will need to re-do this test for both x86 and x64. For now
it accepts any value for the local hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319864
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 6 Dec 2017 00:26:43 +0000 (00:26 +0000)]
Fix error in llvm-pdbutil.
A recent change made this print the wrong value, breaking some
tests. This is now fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319862
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Dec 2017 00:15:17 +0000 (00:15 +0000)]
[X86] Update to getSetCCResultType to be more robust to EVT types.
Attempt to determine what the type will be legalized to and then analyze that to see if we will be able to use a vXi1 compare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319861
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 5 Dec 2017 23:58:18 +0000 (23:58 +0000)]
Teach llvm-pdbutil to dump types from object files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319859
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 5 Dec 2017 23:19:33 +0000 (23:19 +0000)]
Fix -Wmissing-braces error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319855
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 5 Dec 2017 23:08:58 +0000 (23:08 +0000)]
[CodeView] Add support for content hashing CodeView type records.
Currently nothing uses this, but this at least gets the core
algorithm in, and adds some test to demonstrate correctness.
Differential Revision: https://reviews.llvm.org/D40736
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319854
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Dec 2017 23:08:32 +0000 (23:08 +0000)]
[SelectionDAG] Don't promote the condition operand of VSELECT when promoting the result.
The condition operand should be promoted during operand promotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319853
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Dec 2017 23:08:30 +0000 (23:08 +0000)]
[SelectionDAG] Don't promote mask operand when widening mstore and mscatter.
If the mask needs to be promoted that should occur by the legalizer detecting the mask operand needs to be promoted not as a side effect of another action.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319852
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Dec 2017 23:08:28 +0000 (23:08 +0000)]
[SelectionDAG] Don't promote mask when splitting mstore.
If the mask needs to be promoted it should be handled by operand promotion after the result is legalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319851
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Dec 2017 23:08:27 +0000 (23:08 +0000)]
[SelectionDAG] Don't promote mask operands of MGATHER and MLOAD to setcc result type while widening the result. Just widen the mask.
The mask will be promoted if necessary when operands are promoted. It's possible the mask type is legal, but the setcc result type is a different. We shouldn't promote to the setcc result type unless the mask needs to be promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319850
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Dec 2017 23:08:25 +0000 (23:08 +0000)]
[SelectionDAG] Don't call GetWidenedVector for mask operands of MLOAD/MSTORE.
GetWidenedVector does't guarantee the widened elements are zero which would break the intended behavior of the operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319849
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 5 Dec 2017 22:14:35 +0000 (22:14 +0000)]
[Orc] (Hopefully) Fix a missing typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319845
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 5 Dec 2017 21:54:01 +0000 (21:54 +0000)]
Revert r319794: [PGO] detect infinite loop and form MST properly: memory leak problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319841
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Tue, 5 Dec 2017 21:49:56 +0000 (21:49 +0000)]
[CMake] Use PRIVATE in target_link_libraries for executables
We currently use target_link_libraries without an explicit scope
specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables.
Dependencies added in this way apply to both the target and its
dependencies, i.e. they become part of the executable's link interface
and are transitive.
Transitive dependencies generally don't make sense for executables,
since you wouldn't normally be linking against an executable. This also
causes issues for generating install export files when using
LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM
library dependencies, which are currently added as interface
dependencies. If clang is in the distribution components but the LLVM
libraries it depends on aren't (which is a perfectly legitimate use case
if the LLVM libraries are being built static and there are therefore no
run-time dependencies on them), CMake will complain about the LLVM
libraries not being in export set when attempting to generate the
install export file for clang. This is reasonable behavior on CMake's
part, and the right thing is for LLVM's build system to explicitly use
PRIVATE dependencies for executables.
Unfortunately, CMake doesn't allow you to mix and match the keyword and
non-keyword target_link_libraries signatures for a single target; i.e.,
if a single call to target_link_libraries for a particular target uses
one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must
also be updated to use those keywords. This means we must do this change
in a single shot. I also fully expect to have missed some instances; I
tested by enabling all the projects in the monorepo (except dragonegg),
and configuring both with and without shared libraries, on both Darwin
and Linux, but I'm planning to rely on the buildbots for other
configurations (since it should be pretty easy to fix those).
Even after this change, we still have a lot of target_link_libraries
calls that don't specify a scope keyword, mostly for shared libraries.
I'm thinking about addressing those in a follow-up, but that's a
separate change IMO.
Differential Revision: https://reviews.llvm.org/D40823
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319840
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 5 Dec 2017 21:44:56 +0000 (21:44 +0000)]
[Orc] Add a SymbolStringPool data structure for efficient storage and fast
comparison of symbol names.
SymbolStringPool is a thread-safe string pool that will be used in upcoming Orc
APIs to facilitate efficient storage and fast comparison of symbol name strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319839
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Tue, 5 Dec 2017 21:39:37 +0000 (21:39 +0000)]
[SafepointIRVerifier] Allow deriving pointers from unrelocated base
Summary:
This patch allows to use derived pointers (GEPs/bitcasts) of unrelocated
base pointers. We care only about the uses of these derived pointers.
It is acheived by two changes:
1. When we have enough information to say if the pointer is unrelocated at some
point or not, we walk all BBs to remove from their Contributions all valid defs
of unrelocated pointers (GEP with unrelocated base or bitcast of unrelocated
pointer).
2. When it comes to verification we just ignore instructions that were removed
at stage 1.
Patch by Daniil Suchkov!
Reviewers: anna, reames, apilipenko, mkazantsev
Reviewed By: anna, mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319838
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Galenson [Tue, 5 Dec 2017 21:33:12 +0000 (21:33 +0000)]
[AArch64] Do not abort if overflow check does not use EQ or NE.
As suggested by Eli Friedman, instead of aborting if an overflow check
uses something other than SETEQ or SETNE, simply do not apply the
optimization.
Differential Revision: https://reviews.llvm.org/D39147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Dec 2017 21:05:25 +0000 (21:05 +0000)]
[X86][AVX512] Tag BLENDM instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319833
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 5 Dec 2017 20:51:20 +0000 (20:51 +0000)]
[ModRefInfo] Initialize ArgMask to MRI_NoModRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319831
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Dec 2017 20:47:11 +0000 (20:47 +0000)]
[X86][AVX512] Tag GATHER/SCATTER instruction scheduler classes
NOTE: At the moment these use the WriteLoad/WriteStore classes, which severely underestimates the costs. This needs to be reviewed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319829
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 5 Dec 2017 20:35:00 +0000 (20:35 +0000)]
[DWARFv5] Emit v5 line table header.
Differential Revision: https://reviews.llvm.org/D40741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319827
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Dec 2017 20:32:01 +0000 (20:32 +0000)]
AMDGPU: Fix SDWA crash on inline asm
This was only searching for explicit defs,
and asserting for any implicit or variadic
instruction defs, like inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319826
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 5 Dec 2017 20:22:20 +0000 (20:22 +0000)]
Re-commit r319490 "XOR the frame pointer with the stack cookie when protecting the stack"
The patch originally broke Chromium (crbug.com/791714) due to its failing to
specify that the new pseudo instructions clobber EFLAGS. This commit fixes
that.
> Summary: This strengthens the guard and matches MSVC.
>
> Reviewers: hans, etienneb
>
> Subscribers: hiraditya, JDevlieghere, vlad.tsyrklevich, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D40622
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319824
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Dec 2017 20:16:22 +0000 (20:16 +0000)]
[X86][AVX512] Tag VPSLLDQ/VPSRLDQ instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319822
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 5 Dec 2017 20:12:23 +0000 (20:12 +0000)]
Modify ModRefInfo values using static inline method abstractions [NFC].
Summary:
The aim is to make ModRefInfo checks and changes more intuitive
and less error prone using inline methods that abstract the bit operations.
Ideally ModRefInfo would become an enum class, but that change will require
a wider set of changes into FunctionModRefBehavior.
Reviewers: sanjoy, george.burgess.iv, dberlin, hfinkel
Subscribers: nlopes, llvm-commits
Differential Revision: https://reviews.llvm.org/D40749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319821
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 5 Dec 2017 19:42:07 +0000 (19:42 +0000)]
[SystemZ] Validate shifted compare value in adjustForTestUnderMask
When folding a shift into a test-under-mask comparison, make sure that
there is no loss of precision when creating the shifted comparison
value. This usually never happens, except for certain always-true
comparisons in unoptimized code.
Fixes PR35529.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319818
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Dec 2017 19:21:28 +0000 (19:21 +0000)]
[X86][AVX512] Tag VPTRUNC/VPMOVSX/VPMOVZX instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319815
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 5 Dec 2017 18:29:48 +0000 (18:29 +0000)]
[WebAssembly] Make stack-pointer imports mutable.
This is not currently valid by the wasm spec, however:
- It replaces doing set_global on an immutable global, which is also
not valid.
- It's expected be valid in the near future:
https://github.com/WebAssembly/threads/blob/master/proposals/threads/Globals.md
- This only occurs before linking, so a fully linked object will be
valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319810
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Dec 2017 18:26:23 +0000 (18:26 +0000)]
Simplify test.
It can use attrib instead of icacls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319809
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Dec 2017 18:23:17 +0000 (18:23 +0000)]
AMDGPU: Fix infinite loop with dbg_value
Surprisingly SIOptimizeExecMaskingPreRA can infinite loop
in some case with DBG_VALUE. Most tests using dbg_value are
run at -O0, so don't run this pass. This seems to only
happen when the value argument is undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319808
91177308-0d34-0410-b5e6-
96231b3b80d8