138909 Commits

Author SHA1 Message Date
Dylan McKay
eabad28062 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
2016-09-30 14:05:15 +00:00
Dylan McKay
cb9627faf5 [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
2016-09-30 14:01:50 +00:00
Dylan McKay
ea9ff22768 [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
2016-09-30 13:59:20 +00:00
Petr Hosek
156ae09d83 [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
2016-09-30 06:29:28 +00:00
Craig Topper
d203a8f062 [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
2016-09-30 05:35:47 +00:00
Craig Topper
2353094861 [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
2016-09-30 05:35:45 +00:00
Craig Topper
fdec3a26e6 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
2016-09-30 05:35:42 +00:00
Kostya Serebryany
adcfb5ac04 [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
2016-09-30 05:15:45 +00:00
Adam Nemet
91f3caeaf5 [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
2016-09-30 04:56:25 +00:00
Craig Topper
5635507d68 [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
2016-09-30 04:31:37 +00:00
Craig Topper
a466cc0b4e [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
2016-09-30 04:31:33 +00:00
Adam Nemet
4fa3e14023 [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
2016-09-30 03:44:16 +00:00
Piotr Padlewski
a6db8552b8 [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
2016-09-30 03:01:17 +00:00
Matt Arsenault
7eba65d30c 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
2016-09-30 01:50:20 +00:00
Kostya Serebryany
030bfb83e5 [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
2016-09-30 01:24:57 +00:00
Kostya Serebryany
ec49d2d369 [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
2016-09-30 01:19:56 +00:00
Adam Nemet
072d6af36c [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
2016-09-30 00:42:43 +00:00
Justin Lebar
449cdb5ad5 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
2016-09-30 00:38:45 +00:00
Adam Nemet
1247d5cd07 [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
2016-09-30 00:29:30 +00:00
Adam Nemet
ec6f1559d4 [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
2016-09-30 00:29:25 +00:00
Reid Kleckner
2c3be3c856 [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
2016-09-30 00:17:49 +00:00
Quentin Colombet
070df39dce [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
2016-09-30 00:10:00 +00:00
Quentin Colombet
a7badfe36d [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
2016-09-30 00:09:58 +00:00
Quentin Colombet
df7724aeb2 [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
2016-09-30 00:09:43 +00:00
Adam Nemet
858cc931c4 [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
2016-09-30 00:01:30 +00:00
Adam Nemet
381c640f82 [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
2016-09-30 00:01:27 +00:00
Zachary Turner
a4814510ec 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
2016-09-29 23:05:41 +00:00
Zachary Turner
ab82a456ef 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
2016-09-29 22:59:30 +00:00
Sanjay Patel
8a50db91a8 [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
2016-09-29 22:18:30 +00:00
Joerg Sonnenberger
d4dee422c4 GC HAVE_STRDUP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:50:37 +00:00
Joerg Sonnenberger
5673d4cfd9 GC more left-over libtool defines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:47:34 +00:00
Joerg Sonnenberger
6506cd61ad 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
2016-09-29 21:45:45 +00:00
Joerg Sonnenberger
224b8e4d46 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
2016-09-29 21:44:25 +00:00
Joerg Sonnenberger
ac9b3d6062 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
2016-09-29 21:42:36 +00:00
Joerg Sonnenberger
3d4be77c11 Fix HAVE_POSIX_FALLOCATE entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282785 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:39:53 +00:00
Joerg Sonnenberger
a9d83e2e34 Fix comments to match autoconf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:39:11 +00:00
Joerg Sonnenberger
d067fa4b2d GC HAVE_DLD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282783 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:37:46 +00:00
Joerg Sonnenberger
00d1c969ed 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
2016-09-29 21:35:27 +00:00
Joerg Sonnenberger
4f08643ad0 Sort mallctl, fix comment for mallinfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:33:53 +00:00
Joerg Sonnenberger
87632b415d GC HAVE_DLERROR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:32:30 +00:00
Joerg Sonnenberger
74f466a640 GC srand48/lrand48/drand48.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:31:54 +00:00
Joerg Sonnenberger
eb7b0d7038 GC HAVE_BCOPY.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:30:23 +00:00
Joerg Sonnenberger
46cb71157f GC opendir/readdir/closedir checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:29:57 +00:00
Joerg Sonnenberger
b551157e44 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
2016-09-29 21:28:37 +00:00
Joerg Sonnenberger
e7d6d31948 Sort futimes correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:19:43 +00:00
Joerg Sonnenberger
d72397ae5e Check for sysconf(3).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282772 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:18:05 +00:00
Joerg Sonnenberger
04e8656779 GC HAVE_MACH_O_DYLD_H.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:15:57 +00:00
Joerg Sonnenberger
fe86503537 GC HAVE_UTIME_H.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:15:23 +00:00
Joerg Sonnenberger
248a030bf9 GC HAVE_LIMITS_H.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 21:14:34 +00:00
Joerg Sonnenberger
5a47084235 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
2016-09-29 21:10:38 +00:00