OSDN Git Service

android-x86/external-llvm.git
7 years ago[WebAssembly] Make register stackification more conservative
Derek Schuff [Fri, 30 Sep 2016 18:02:54 +0000 (18:02 +0000)]
[WebAssembly] Make register stackification more conservative

Register stackification currently checks VNInfo for changes. Make that
more accurate by testing each intervening instruction for any other defs
to the same virtual register.

Patch by Jacob Gravelle

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282886 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Object] Define Archive::isEmpty().
Rui Ueyama [Fri, 30 Sep 2016 17:54:31 +0000 (17:54 +0000)]
[Object] Define Archive::isEmpty().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282884 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[asan] Support dynamic shadow address instrumentation
Etienne Bergeron [Fri, 30 Sep 2016 17:46:32 +0000 (17:46 +0000)]
[asan] Support dynamic shadow address instrumentation

Summary:
This patch is adding the support for a shadow memory with
dynamically allocated address range.

The compiler-rt needs to export a symbol containing the shadow
memory range.

This is required to support ASAN on windows 64-bits.

Reviewers: kcc, rnk, vitalybuka

Subscribers: zaks.anna, kubabrecka, dberris, llvm-commits, chrisha

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282881 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Choose VMCNT, EXPCNT, LGKMCNT masks and shifts based on the isa version
Konstantin Zhuravlyov [Fri, 30 Sep 2016 17:01:40 +0000 (17:01 +0000)]
[AMDGPU] Choose VMCNT, EXPCNT, LGKMCNT masks and shifts based on the isa version

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282877 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Ask subtarget if waitcnt instruction is needed before barrier instruction
Konstantin Zhuravlyov [Fri, 30 Sep 2016 16:50:36 +0000 (16:50 +0000)]
[AMDGPU] Ask subtarget if waitcnt instruction is needed before barrier instruction

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282875 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Do not run scalar optimization passes at "-O0"
Konstantin Zhuravlyov [Fri, 30 Sep 2016 16:39:24 +0000 (16:39 +0000)]
[AMDGPU] Do not run scalar optimization passes at "-O0"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282873 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCVP. Turn marking adds as no wrap on by default (was turned off by 279082)
Artur Pilipenko [Fri, 30 Sep 2016 16:20:08 +0000 (16:20 +0000)]
CVP. Turn marking adds as no wrap on by default (was turned off by 279082)

With 282650 in tree extra no wrap on adds doesn't cause regressions anymore. Reenable the optimzation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282872 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoResubmit "Add llvm::enumerate() to STLExtras."
Zachary Turner [Fri, 30 Sep 2016 15:43:59 +0000 (15:43 +0000)]
Resubmit "Add llvm::enumerate() to STLExtras."

The CL was originally failing due to the use of some C++14
specific features, so I've removed those.  Hopefully this will
satisfy the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282867 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Build all scalar steps for non-uniform induction variables
Matthew Simpson [Fri, 30 Sep 2016 15:13:52 +0000 (15:13 +0000)]
[LV] Build all scalar steps for non-uniform induction variables

When building the steps for scalar induction variables, we previously attempted
to determine if all the scalar users of the induction variable were uniform. If
they were, we would only emit the step corresponding to vector lane zero. This
optimization was too aggressive. We generally don't know the entire set of
induction variable users that will be scalar. We have
isScalarAfterVectorization, but this is only a conservative estimate of the
instructions that will be scalarized. Thus, an induction variable may have
scalar users that aren't already known to be scalar. To avoid emitting unused
steps, we can only check that the induction variable is uniform. This should
fix PR30542.

Reference: https://llvm.org/bugs/show_bug.cgi?id=30542

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282863 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the ELF object file writer
Dylan McKay [Fri, 30 Sep 2016 14:09:20 +0000 (14:09 +0000)]
[AVR] Add the ELF object file writer

Summary: This adds the ELF32 writer for AVR.

Reviewers: kparzysz

Subscribers: beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282856 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[RegAllocGreedy] Attempt to split unspillable live intervals"
Dylan McKay [Fri, 30 Sep 2016 14:05:15 +0000 (14:05 +0000)]
Revert "[RegAllocGreedy] Attempt to split unspillable live intervals"

It was accidentally committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282855 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the assembly instruction printer
Dylan McKay [Fri, 30 Sep 2016 14:01:50 +0000 (14:01 +0000)]
[AVR] Add the assembly instruction printer

Summary:
This change adds the AVR assembly instruction printer.

No tests are included in this patch. I have left them downstream so we can
add them once `llc` successfully runs (there's very few components left
to upstream until this).

Reviewers: arsenm, kparzysz

Subscribers: wdng, beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282854 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RegAllocGreedy] Attempt to split unspillable live intervals
Dylan McKay [Fri, 30 Sep 2016 13:59:20 +0000 (13:59 +0000)]
[RegAllocGreedy] Attempt to split unspillable live intervals

Summary:
Previously, when allocating unspillable live ranges, we would never
attempt to split. We would always bail out and try last ditch graph
recoloring.

This patch changes this by attempting to split all live intervals before
performing recoloring.

This fixes LLVM bug PR14879.

I can't add test cases for any backends other than AVR because none of
them have small enough register classes to trigger the bug.

Reviewers: qcolombet

Subscribers: MatzeB

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282852 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[CMake] Support symlinks even with LLVM_INSTALL_TOOLCHAIN_ONLY
Petr Hosek [Fri, 30 Sep 2016 06:29:28 +0000 (06:29 +0000)]
[CMake] Support symlinks even with LLVM_INSTALL_TOOLCHAIN_ONLY

When LLVM_INSTALL_TOOLCHAIN_ONLY is used and LLVM_TOOLCHAIN_TOOLS
contains a tool which is a symlink, it would be ignored. This already
worked before but got broken in r282510.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282844 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Store address operand should be an input operand for the special stack...
Craig Topper [Fri, 30 Sep 2016 05:35:47 +0000 (05:35 +0000)]
[AVX-512] Store address operand should be an input operand for the special stack spilling pseudos for XMM16-31 and YMM16-31 without VLX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282843 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add the special stack spilling pseudos for XMM16-31 and YMM16-31 without...
Craig Topper [Fri, 30 Sep 2016 05:35:45 +0000 (05:35 +0000)]
[AVX-512] Add the special stack spilling pseudos for XMM16-31 and YMM16-31 without VLX to teh isFrameLoadOpcode and isFrameStoreOpcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282842 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r282835 "[AVX-512] Always use the full 32 register vector classes for addRegis...
Craig Topper [Fri, 30 Sep 2016 05:35:42 +0000 (05:35 +0000)]
Revert r282835 "[AVX-512] Always use the full 32 register vector classes for addRegisterClass regardless of whether AVX512/VLX is enabled or not."

Turns out this doesn't pass verify-machineinstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282841 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libfuzzer] test for c-ares CVE-2016-5180
Kostya Serebryany [Fri, 30 Sep 2016 05:15:45 +0000 (05:15 +0000)]
[libfuzzer] test for c-ares CVE-2016-5180

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282839 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LDist] Port to new streaming API for opt remarks
Adam Nemet [Fri, 30 Sep 2016 04:56:25 +0000 (04:56 +0000)]
[LDist] Port to new streaming API for opt remarks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282838 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add AVX-512 VTs to findRepresentativeClass as well as v16i16 which was also...
Craig Topper [Fri, 30 Sep 2016 04:31:37 +0000 (04:31 +0000)]
[X86] Add AVX-512 VTs to findRepresentativeClass as well as v16i16 which was also missing. Change register class to include the extra 16 AVX512 registers.

I'm not completely sure what this method does or why all the 256-bit VTs returned VR128RegClass when the comments on the method definiton say it should return the largest super register class. I just figured AVX-512 should be similar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282836 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Always use the full 32 register vector classes for addRegisterClass regardl...
Craig Topper [Fri, 30 Sep 2016 04:31:33 +0000 (04:31 +0000)]
[AVX-512] Always use the full 32 register vector classes for addRegisterClass regardless of whether AVX512/VLX is enabled or not.

If AVX512 is disabled, the registers should already be marked reserved. Pattern predicates and register classes on instructions should take care of most of the rest. Loads/stores and physical register copies for XMM16-31 and YMM16-31 without VLX have already been taken care of.

I'm a little unclear why this changed the register allocation of the SSE2 run of the sad.ll test, but the registers selected appear to be valid after this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282835 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LoopUnroll] Port to the new streaming interface for opt remarks.
Adam Nemet [Fri, 30 Sep 2016 03:44:16 +0000 (03:44 +0000)]
[LoopUnroll] Port to the new streaming interface for opt remarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282834 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[thinlto] Don't decay threshold for hot callsites
Piotr Padlewski [Fri, 30 Sep 2016 03:01:17 +0000 (03:01 +0000)]
[thinlto] Don't decay threshold for hot callsites

Summary:
We don't want to decay hot callsites to import chains of hot
callsites. The same mechanism is used in LIPO.

Reviewers: tejohnson, eraman, mehdi_amini

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282833 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Use unsigned compare for eq/ne
Matt Arsenault [Fri, 30 Sep 2016 01:50:20 +0000 (01:50 +0000)]
AMDGPU: Use unsigned compare for eq/ne

For some reason there are both of these available, except
for scalar 64-bit compares which only has u64. I'm not sure
why there are both (I'm guessing it's for the one bit inputs we
don't use), but for consistency always using the
unsigned one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282832 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] remove the code for -print_pcs=1 with the old coverage. It still works...
Kostya Serebryany [Fri, 30 Sep 2016 01:24:57 +0000 (01:24 +0000)]
[libFuzzer] remove the code for -print_pcs=1 with the old coverage. It still works with the new one (trace-pc-guard)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282831 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] more the feature set to InputCorpus; on feature update, change the featur...
Kostya Serebryany [Fri, 30 Sep 2016 01:19:56 +0000 (01:19 +0000)]
[libFuzzer] more the feature set to InputCorpus; on feature update, change the feature counter of the old best input

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282829 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LoopDataPrefetch] Port to new streaming API for opt remarks
Adam Nemet [Fri, 30 Sep 2016 00:42:43 +0000 (00:42 +0000)]
[LoopDataPrefetch] Port to new streaming API for opt remarks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282826 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMove UTF functions into namespace llvm.
Justin Lebar [Fri, 30 Sep 2016 00:38:45 +0000 (00:38 +0000)]
Move UTF functions into namespace llvm.

Summary:
This lets people link against LLVM and their own version of the UTF
library.

I determined this only affects llvm, clang, lld, and lldb by running

$ git grep -wl 'UTF[0-9]\+\|\bConvertUTF\bisLegalUTF\|getNumBytesFor' | cut -f 1 -d '/' | sort | uniq
  clang
  lld
  lldb
  llvm

Tested with

  ninja lldb
  ninja check-clang check-llvm check-lld

(ninja check-lldb doesn't complete for me with or without this patch.)

Reviewers: rnk

Subscribers: klimek, beanz, mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282822 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Port the remarks in processLoop to the new streaming API
Adam Nemet [Fri, 30 Sep 2016 00:29:30 +0000 (00:29 +0000)]
[LV] Port the remarks in processLoop to the new streaming API

This completes LV.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282821 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Port the last opt remark in Hints to the new streaming interface
Adam Nemet [Fri, 30 Sep 2016 00:29:25 +0000 (00:29 +0000)]
[LV] Port the last opt remark in Hints to the new streaming interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282820 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Don't preserve Win64 SSE CSRs when SSE is disabled
Reid Kleckner [Fri, 30 Sep 2016 00:17:49 +0000 (00:17 +0000)]
[X86] Don't preserve Win64 SSE CSRs when SSE is disabled

Code that doesn't use floating point and doesn't use SSE (kernel code)
shouldn't save and restore SSE registers.

Fixes PR30503

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282819 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Use static mapping for 3-operands instrs.
Quentin Colombet [Fri, 30 Sep 2016 00:10:00 +0000 (00:10 +0000)]
[AArch64][RegisterBankInfo] Use static mapping for 3-operands instrs.

This uses a TableGen'ed like structure for all 3-operands instrs.
The output of the RegBankSelect pass should be identical but the
RegisterBankInfo will do less dynamic allocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282817 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Add static value mapping for 3-op instrs.
Quentin Colombet [Fri, 30 Sep 2016 00:09:58 +0000 (00:09 +0000)]
[AArch64][RegisterBankInfo] Add static value mapping for 3-op instrs.

This is the kind of input TableGen should generate at some point.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282816 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][RegisterBankInfo] Check the statically created ValueMapping.
Quentin Colombet [Fri, 30 Sep 2016 00:09:43 +0000 (00:09 +0000)]
[AArch64][RegisterBankInfo] Check the statically created ValueMapping.

Make sure that the ValueMappings contain the value we expect at the
indices we expect.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282815 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LAA, LV] Port to new streaming interface for opt remarks. Update LV
Adam Nemet [Fri, 30 Sep 2016 00:01:30 +0000 (00:01 +0000)]
[LAA, LV] Port to new streaming interface for opt remarks.  Update LV

(Recommit after making sure IsVerbose gets properly initialized in
DiagnosticInfoOptimizationBase.  See previous commit that takes care of
this.)

OptimizationRemarkAnalysis directly takes the role of the report that is
generated by LAA.

Then we need the magic to be able to turn an LAA remark into an LV
remark.  This is done via a new OptimizationRemark ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282813 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Diag] Use non-static member initializer for IsVerbose. NFC
Adam Nemet [Fri, 30 Sep 2016 00:01:27 +0000 (00:01 +0000)]
[Diag] Use non-static member initializer for IsVerbose. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282812 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "Add llvm::enumerate() to STLExtras."
Zachary Turner [Thu, 29 Sep 2016 23:05:41 +0000 (23:05 +0000)]
Revert "Add llvm::enumerate() to STLExtras."

This reverts commit r282804 as it seems to use some C++ features
that not all compilers support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282809 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd llvm::enumerate() to STLExtras.
Zachary Turner [Thu, 29 Sep 2016 22:59:30 +0000 (22:59 +0000)]
Add llvm::enumerate() to STLExtras.

enumerate allows you to iterate over a range by pairing the
iterator's value with its index in the enumeration.  This gives
you most of the benefits of using a for loop while still allowing
the range syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282804 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] fix function names; NFC
Sanjay Patel [Thu, 29 Sep 2016 22:18:30 +0000 (22:18 +0000)]
[InstCombine] fix function names; NFC

Also, make foldSelectExtConst() a member of InstCombiner, remove
unnecessary parameters from its interface, and group visitSelectInst
helpers together in the header file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282796 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_STRDUP.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:50:37 +0000 (21:50 +0000)]
GC HAVE_STRDUP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282793 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC more left-over libtool defines.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:47:34 +0000 (21:47 +0000)]
GC more left-over libtool defines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282791 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_PRINTF_A, HAVE_STD_ISINF_IN_CMATH and HAVE_STD_ISNAN_IN_CMATH
Joerg Sonnenberger [Thu, 29 Sep 2016 21:45:45 +0000 (21:45 +0000)]
GC HAVE_PRINTF_A, HAVE_STD_ISINF_IN_CMATH and HAVE_STD_ISNAN_IN_CMATH

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282789 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoHAVE_DIA_SDK is directly checked by value, so define it as 0/1.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:44:25 +0000 (21:44 +0000)]
HAVE_DIA_SDK is directly checked by value, so define it as 0/1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282788 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMove _chsize_s and _Unwind_Backtrace to the correct position.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:42:36 +0000 (21:42 +0000)]
Move _chsize_s and _Unwind_Backtrace to the correct position.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282786 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix HAVE_POSIX_FALLOCATE entry.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:39:53 +0000 (21:39 +0000)]
Fix HAVE_POSIX_FALLOCATE entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282785 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix comments to match autoconf.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:39:11 +0000 (21:39 +0000)]
Fix comments to match autoconf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282784 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_DLD.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:37:46 +0000 (21:37 +0000)]
GC HAVE_DLD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282783 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_DYLD, HAVE_PRELOADED_SYMBOLS and HAVE_SHL_LOAD
Joerg Sonnenberger [Thu, 29 Sep 2016 21:35:27 +0000 (21:35 +0000)]
GC HAVE_DYLD, HAVE_PRELOADED_SYMBOLS and HAVE_SHL_LOAD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282782 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort mallctl, fix comment for mallinfo.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:33:53 +0000 (21:33 +0000)]
Sort mallctl, fix comment for mallinfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282781 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_DLERROR.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:32:30 +0000 (21:32 +0000)]
GC HAVE_DLERROR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282780 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC srand48/lrand48/drand48.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:31:54 +0000 (21:31 +0000)]
GC srand48/lrand48/drand48.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282779 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_BCOPY.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:30:23 +0000 (21:30 +0000)]
GC HAVE_BCOPY.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282778 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC opendir/readdir/closedir checks.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:29:57 +0000 (21:29 +0000)]
GC opendir/readdir/closedir checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282776 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_SETJMP_H and checks for the content of setjmp.h.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:28:37 +0000 (21:28 +0000)]
GC HAVE_SETJMP_H and checks for the content of setjmp.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282775 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSort futimes correctly.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:19:43 +0000 (21:19 +0000)]
Sort futimes correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282773 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCheck for sysconf(3).
Joerg Sonnenberger [Thu, 29 Sep 2016 21:18:05 +0000 (21:18 +0000)]
Check for sysconf(3).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282772 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_MACH_O_DYLD_H.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:15:57 +0000 (21:15 +0000)]
GC HAVE_MACH_O_DYLD_H.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282771 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_UTIME_H.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:15:23 +0000 (21:15 +0000)]
GC HAVE_UTIME_H.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282770 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGC HAVE_LIMITS_H.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:14:34 +0000 (21:14 +0000)]
GC HAVE_LIMITS_H.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282769 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMake HAVE_DECL_ARC4RANDOM always defined. Sort the entry correctly.
Joerg Sonnenberger [Thu, 29 Sep 2016 21:10:38 +0000 (21:10 +0000)]
Make HAVE_DECL_ARC4RANDOM always defined. Sort the entry correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282768 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoHAVE_UNWIND_BACKTRACE -> HAVE__UNWIND_BACKTRACE
Joerg Sonnenberger [Thu, 29 Sep 2016 21:07:57 +0000 (21:07 +0000)]
HAVE_UNWIND_BACKTRACE -> HAVE__UNWIND_BACKTRACE
Check for existance and not truth value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282767 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNext set of additional error checks for invalid Mach-O files for the
Kevin Enderby [Thu, 29 Sep 2016 21:07:29 +0000 (21:07 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load command that uses the MachO::entry_point_command type
but not used in llvm libObject code but used in llvm tool code.

This includes just the LC_MAIN load command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282766 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove LLVM_CONFIGTIME, left-overs from when reproducable builds where
Joerg Sonnenberger [Thu, 29 Sep 2016 21:00:53 +0000 (21:00 +0000)]
Remove LLVM_CONFIGTIME, left-overs from when reproducable builds where
not the default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282765 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd FE_ALL_EXCEPT and FE_INEXACT detection macros forgotten on the cmake
Joerg Sonnenberger [Thu, 29 Sep 2016 20:59:48 +0000 (20:59 +0000)]
Add FE_ALL_EXCEPT and FE_INEXACT detection macros forgotten on the cmake
side of configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282762 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoClamp version number in S_COMPILE3 to avoid overflowing 16-bit field.
Adrian McCarthy [Thu, 29 Sep 2016 20:28:25 +0000 (20:28 +0000)]
Clamp version number in S_COMPILE3 to avoid overflowing 16-bit field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282761 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[LAA, LV] Port to new streaming interface for opt remarks. Update LV"
Adam Nemet [Thu, 29 Sep 2016 20:17:37 +0000 (20:17 +0000)]
Revert "[LAA, LV] Port to new streaming interface for opt remarks.  Update LV"

This reverts commit r282758.

There are some clang failures I haven't seen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282759 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LAA, LV] Port to new streaming interface for opt remarks. Update LV
Adam Nemet [Thu, 29 Sep 2016 20:12:18 +0000 (20:12 +0000)]
[LAA, LV] Port to new streaming interface for opt remarks.  Update LV

OptimizationRemarkAnalysis directly takes the role of the report that is
generated by LAA.

Then we need the magic to be able to turn an LAA remark into an LV
remark.  This is done via a new OptimizationRemark ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282758 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RegisterBankInfo] Change the default mapping for Copy and PHI.
Quentin Colombet [Thu, 29 Sep 2016 19:51:46 +0000 (19:51 +0000)]
[RegisterBankInfo] Change the default mapping for Copy and PHI.

Instead of producing a mapping for all the operands, we only generate a
mapping for the definition. Indeed, the other operands are not
constrained by the instruction and thus, we should leave the choice to
the actual definition to do the right thing.

In pratice this is almost NFC, but with one advantage. We will have only
one instance of OperandsMapping for each copy and phi that map to one
register bank instead of one different instance for each different
number of operands for each copy and phi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282756 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGeneralize ArgList::AddAllArgs more
Douglas Katzman [Thu, 29 Sep 2016 19:47:58 +0000 (19:47 +0000)]
Generalize ArgList::AddAllArgs more

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282755 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Port OptimizationRemarkAnalysisFPCommute and
Adam Nemet [Thu, 29 Sep 2016 18:04:47 +0000 (18:04 +0000)]
[LV] Port OptimizationRemarkAnalysisFPCommute and
OptimizationRemarkAnalysisAliasing to new streaming API for opt remarks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282742 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Convert processLoop to new streaming API for opt remarks
Adam Nemet [Thu, 29 Sep 2016 17:55:13 +0000 (17:55 +0000)]
[LV] Convert processLoop to new streaming API for opt remarks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282740 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[codeview] Use character types for all byte-sized integer types
Reid Kleckner [Thu, 29 Sep 2016 17:55:01 +0000 (17:55 +0000)]
[codeview] Use character types for all byte-sized integer types

The VS debugger doesn't appear to understand the 0x68 or 0x69 type
indices, which were probably intended for use on a platform where a C
'int' is 8 bits. So, use the character types instead. Clang was already
using the character types because '[u]int8_t' is usually defined in
terms of 'char'.

See the Rust issue for screenshots of what VS does:
https://github.com/rust-lang/rust/issues/36646

Fixes PR30552

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282739 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agofix formatting; NFC
Sanjay Patel [Thu, 29 Sep 2016 17:48:19 +0000 (17:48 +0000)]
fix formatting; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282737 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNext set of additional error checks for invalid Mach-O files for the
Kevin Enderby [Thu, 29 Sep 2016 17:45:23 +0000 (17:45 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load command that uses the Mach::source_version_command type
but not used in llvm libObject code but used in llvm tool code.

This includes just the LC_SOURCE_VERSION load command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282736 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[sanitizer-coverage/libFuzzer] make the guards for trace-pc 32-bit; create one array...
Kostya Serebryany [Thu, 29 Sep 2016 17:43:24 +0000 (17:43 +0000)]
[sanitizer-coverage/libFuzzer] make the guards for trace-pc 32-bit; create one array of guards per function, instead of one guard per BB. reorganize the code so that trace-pc-guard does not create unneeded globals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282735 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[thinlto] Add cold-callsite import heuristic
Piotr Padlewski [Thu, 29 Sep 2016 17:32:07 +0000 (17:32 +0000)]
[thinlto] Add cold-callsite import heuristic

Summary:
Not tunned up heuristic, but with this small heuristic there is about
+0.10% improvement on SPEC 2006

Reviewers: tejohnson, mehdi_amini, eraman

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282733 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Avoid "unused" warnings if no asserts
Douglas Katzman [Thu, 29 Sep 2016 17:26:12 +0000 (17:26 +0000)]
[X86] Avoid "unused" warnings if no asserts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282732 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Move static createMissedAnalysis from anonymous to global namespace
Adam Nemet [Thu, 29 Sep 2016 17:25:00 +0000 (17:25 +0000)]
[LV] Move static createMissedAnalysis from anonymous to global namespace

This is an attempt to fix a windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282730 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Convert CostModel to use the new streaming opt remark API
Adam Nemet [Thu, 29 Sep 2016 17:15:48 +0000 (17:15 +0000)]
[LV] Convert CostModel to use the new streaming opt remark API

Here we can already remove the member function emitAnalysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282729 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Split most of createMissedAnalysis into a static function. NFC
Adam Nemet [Thu, 29 Sep 2016 17:05:35 +0000 (17:05 +0000)]
[LV] Split most of createMissedAnalysis into a static function. NFC

This will be shared between Legality and CostModel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282728 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Convert all but one opt remark in Legality to new streaming interface
Adam Nemet [Thu, 29 Sep 2016 16:49:42 +0000 (16:49 +0000)]
[LV] Convert all but one opt remark in Legality to new streaming interface

The last one remaining after which emitAnalysis can be removed is when
we convert the LAA's report to a vectorization report.  This requires
converting LAA to the new interface first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282726 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Convert emitRemark to new opt remark streaming interface
Adam Nemet [Thu, 29 Sep 2016 16:23:12 +0000 (16:23 +0000)]
[LV] Convert emitRemark to new opt remark streaming interface

Also renamed the function to emitRemarkWithHints to better reflect what
the function actually does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282723 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove unnecessary explicit
Adam Nemet [Thu, 29 Sep 2016 16:01:34 +0000 (16:01 +0000)]
Remove unnecessary explicit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282722 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] initialize ValueBitMap::NumBits
Kostya Serebryany [Thu, 29 Sep 2016 15:51:28 +0000 (15:51 +0000)]
[libFuzzer] initialize ValueBitMap::NumBits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282721 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Added common helper for shuffle mask constant pool decodes.
Simon Pilgrim [Thu, 29 Sep 2016 15:25:48 +0000 (15:25 +0000)]
[X86][SSE] Added common helper for shuffle mask constant pool decodes.

The shuffle mask decodes have a large amount of repeated code extracting/splitting mask values from Constant data.

This patch pulls all of this duplicated code into a single helper function to identify undef elements and combine/split constant integer data into the requested shuffle mask elements.

Updated PSHUFB/VPERMIL/VPERMIL2/VPPERM decoders to use it (VPERMV/VPERMV3 could be converted as well in the future).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282720 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add explicit test triple to make windows/msvc builds happier
Simon Pilgrim [Thu, 29 Sep 2016 15:10:09 +0000 (15:10 +0000)]
[X86] Add explicit test triple to make windows/msvc builds happier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282719 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[docs] Fix a broken URL in 'HowToAddABuilder'
Dylan McKay [Thu, 29 Sep 2016 13:29:49 +0000 (13:29 +0000)]
[docs] Fix a broken URL in 'HowToAddABuilder'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282718 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTest commit. NFC.
Volkan Keles [Thu, 29 Sep 2016 13:04:37 +0000 (13:04 +0000)]
Test commit. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282717 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[docs] Fix typo in 'How to add a builder'
Dylan McKay [Thu, 29 Sep 2016 12:51:26 +0000 (12:51 +0000)]
[docs] Fix typo in 'How to add a builder'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282713 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[AVR] Add instruction selection lowering code"
Dylan McKay [Thu, 29 Sep 2016 12:49:18 +0000 (12:49 +0000)]
Revert "[AVR] Add instruction selection lowering code"

I accidentally comitted it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282712 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add instruction selection lowering code
Dylan McKay [Thu, 29 Sep 2016 12:44:38 +0000 (12:44 +0000)]
[AVR] Add instruction selection lowering code

Summary: This adds AVRISelLowering.cpp

Reviewers: kparzysz, arsenm

Subscribers: wdng, beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282711 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[modules] Centralize the module cache.
Vassil Vassilev [Thu, 29 Sep 2016 08:14:06 +0000 (08:14 +0000)]
[modules] Centralize the module cache.

This reduces the build size from 17G to 1.9G on my machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282704 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Really fix the FileCheck line from r282690.
Craig Topper [Thu, 29 Sep 2016 06:49:21 +0000 (06:49 +0000)]
[X86] Really fix the FileCheck line from r282690.

Why does Folded Spill comments print with a different number of # characters on different systems?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282693 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Fix a check line from r282690.
Craig Topper [Thu, 29 Sep 2016 06:37:21 +0000 (06:37 +0000)]
[AVX-512] Fix a check line from r282690.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282691 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Support spills of XMM16-31 and YMM16-31 when VLX isn't available.
Craig Topper [Thu, 29 Sep 2016 06:07:09 +0000 (06:07 +0000)]
[AVX-512] Support spills of XMM16-31 and YMM16-31 when VLX isn't available.

This adds new pseudo instructions that can be selected during register allocation to represent loads and stores of XMM/YMM registers when AVX512F is available, but VLX isn't. They will be converted to VEX encoded moves if the register turns out to be XMM0-15/YMM0-15. Otherwise either an EVEX VEXTRACT(store) or VBROADCAST(load) will be used.

Fixes one of the cases from PR29112.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282690 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Remove extra FileCheck lines that got left behind in r282688.
Craig Topper [Thu, 29 Sep 2016 06:07:07 +0000 (06:07 +0000)]
[X86] Remove extra FileCheck lines that got left behind in r282688.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282689 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Replicate pattern from AVX to select VMOVDDUP for (v2f64 (X86VBroadcast...
Craig Topper [Thu, 29 Sep 2016 05:54:43 +0000 (05:54 +0000)]
[AVX-512] Replicate pattern from AVX to select VMOVDDUP for (v2f64 (X86VBroadcast f64:)). Add AVX512VL to command line of existing AVX2 test that hits this condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282688 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add EVEX encoded VBROADCASTSS/SD and VPBROADCASTD/Q to execution domain fixing...
Craig Topper [Thu, 29 Sep 2016 05:54:39 +0000 (05:54 +0000)]
[X86] Add EVEX encoded VBROADCASTSS/SD and VPBROADCASTD/Q to execution domain fixing table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282687 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Remove AddedComplexity adjustments that don't seem to be needed.
Craig Topper [Thu, 29 Sep 2016 05:54:34 +0000 (05:54 +0000)]
[X86] Remove AddedComplexity adjustments that don't seem to be needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282686 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add 512-bit VPBROADCASTB and VPBROADCASTW tests.
Craig Topper [Thu, 29 Sep 2016 05:54:32 +0000 (05:54 +0000)]
[X86] Add 512-bit VPBROADCASTB and VPBROADCASTW tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282685 91177308-0d34-0410-b5e6-96231b3b80d8