platform/upstream/llvm.git
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
llvm-svn: 282863

7 years agoFixing windows build breakage caused by rL282822
Dimitar Vlahovski [Fri, 30 Sep 2016 14:36:17 +0000 (14:36 +0000)]
Fixing windows build breakage caused by rL282822

The breakage was because of the moving of the UTF functions to the llvm
namespace

llvm-svn: 282862

7 years ago[CodeGen] Change 'Scalar' to 'Array' in method names. NFC.
Michael Kruse [Fri, 30 Sep 2016 14:34:05 +0000 (14:34 +0000)]
[CodeGen] Change 'Scalar' to 'Array' in method names. NFC.

generateScalarLoad() and generateScalarStore() are used for explicit (MK_Array)
memory accesses, therefore the method names were misleading. The names also
were similar to generateScalarLoads() and generateScalarStores() (plural forms)
which indeed handle scalar accesses. Presumbly, they were originally named to
contrast VectorBlockGenerator::generateLoad().

Rename the two methods to generateArrayLoad(),
respectively generateArrayStore().

llvm-svn: 282861

7 years ago[compiler-rt][asan] Disable a broken test on windows 64-bits
Etienne Bergeron [Fri, 30 Sep 2016 14:31:39 +0000 (14:31 +0000)]
[compiler-rt][asan] Disable a broken test on windows 64-bits

Summary:
This test is broken on wndows 64-bit.

The interception library is not able to hook on the memchr functions.

Snippet of the function that is not hookable:
```
--- No source file -------------------------------------------------------------
000007FEFA1A18CD CC                   int         3
000007FEFA1A18CE CC                   int         3
000007FEFA1A18CF CC                   int         3
--- f:\dd\vctools\crt\vcruntime\src\string\amd64_arm_arm64\memchr.c ------------
        while ( cnt && (*(unsigned char *)buf != (unsigned char)chr) ) {
000007FEFA1A18D0 4D 85 C0             test        r8,r8
000007FEFA1A18D3 74 0D                je          memchr+12h (07FEFA1A18E2h)
000007FEFA1A18D5 38 11                cmp         byte ptr [rcx],dl
000007FEFA1A18D7 74 09                je          memchr+12h (07FEFA1A18E2h)
                buf = (unsigned char *)buf + 1;
000007FEFA1A18D9 48 FF C1             inc         rcx
                cnt--;
000007FEFA1A18DC 49 83 E8 01          sub         r8,1
000007FEFA1A18E0 75 F3                jne         memchr+5h (07FEFA1A18D5h)
        }
```

Reviewers: rnk

Subscribers: kubabrecka, dberris, llvm-commits, chrisha

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

llvm-svn: 282860

7 years ago[compiler-rt][asan] Fix incorrect regexp breaking an asan unittest on win64
Etienne Bergeron [Fri, 30 Sep 2016 14:29:43 +0000 (14:29 +0000)]
[compiler-rt][asan] Fix incorrect regexp breaking an asan unittest on win64

Summary:
On windows, the memcpy and memmove function can be the same.
This is correcly detected when hooking, but it's not possible
to report the right function name when doing symbolisation.

The same fix was applied for the static asan unittest.
We forgot to apply the fix for the dynamic asan tests.
```
lvm\projects\compiler-rt\test\asan/TestCases/Windows/.svn/text-base/intercept_memcpy.cc.svn-base:// CHECK-NEXT:  __asan_{{.*}}mem{{.*}}
```

This patch is fixing this test (win64):
```
ddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/dll_intercept_memcpy_indirect.cc
```

Reviewers: rnk, vitalybuka

Subscribers: llvm-commits, kubabrecka, chrisha, dberris

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

llvm-svn: 282859

7 years agoStrip trailing whitespace (NFCI)
Simon Pilgrim [Fri, 30 Sep 2016 14:25:09 +0000 (14:25 +0000)]
Strip trailing whitespace (NFCI)

llvm-svn: 282858

7 years agoFix int <= bool comparison warning on MSVC
Simon Pilgrim [Fri, 30 Sep 2016 14:18:06 +0000 (14:18 +0000)]
Fix int <= bool comparison warning on MSVC

llvm-svn: 282857

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

llvm-svn: 282856

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.

llvm-svn: 282855

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

llvm-svn: 282854

7 years ago[CodeGen] Add assertion for partial scalar accesses. NFC.
Michael Kruse [Fri, 30 Sep 2016 14:01:46 +0000 (14:01 +0000)]
[CodeGen] Add assertion for partial scalar accesses. NFC.

The code generator always adds unconditional LoadInst and StoreInst, hence the
MemoryAccess must be defined over all statement instances.

llvm-svn: 282853

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

llvm-svn: 282852

7 years ago[ELF] - Inlined template argument variable. NFC.
George Rimar [Fri, 30 Sep 2016 13:46:34 +0000 (13:46 +0000)]
[ELF] - Inlined template argument variable. NFC.

llvm-svn: 282851

7 years ago[ELF] - Removed excessive variables. NFC.
George Rimar [Fri, 30 Sep 2016 13:44:02 +0000 (13:44 +0000)]
[ELF] - Removed excessive variables. NFC.

llvm-svn: 282850

7 years agoXFAIL TestSBData for gcc-4.9 i386
Pavel Labath [Fri, 30 Sep 2016 12:12:15 +0000 (12:12 +0000)]
XFAIL TestSBData for gcc-4.9 i386

test broken in r282659.

llvm-svn: 282849

7 years agoFix PDB unittests on non-windows platforms
Pavel Labath [Fri, 30 Sep 2016 11:47:54 +0000 (11:47 +0000)]
Fix PDB unittests on non-windows platforms

llvm r282788 changed how the presence of windows DIA SDK is signalled. Adjust to
that.

llvm-svn: 282848

7 years agoFix another --gc-sections crash.
Rafael Espindola [Fri, 30 Sep 2016 06:48:09 +0000 (06:48 +0000)]
Fix another --gc-sections crash.

The missing case was when a merge section was only referenced from
non-alloca sections.

llvm-svn: 282847

7 years agoCosmetic fix: deleted unnecessary line break in comment.
Victor Leschuk [Fri, 30 Sep 2016 06:39:48 +0000 (06:39 +0000)]
Cosmetic fix: deleted unnecessary line break in comment.

llvm-svn: 282846

7 years agoFix --gc-sections crash.
Rafael Espindola [Fri, 30 Sep 2016 06:37:29 +0000 (06:37 +0000)]
Fix --gc-sections crash.

We would crash when a non-alloca section pointed to a gced part of a
merge section.

That can happen when a C/c++ constant in put in a merge section and
debug info is present.

llvm-svn: 282845

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

llvm-svn: 282844

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.

llvm-svn: 282843

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.

llvm-svn: 282842

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.

llvm-svn: 282841

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

llvm-svn: 282839

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

llvm-svn: 282838

7 years ago[change-namespace] fix namespace specifier of global variables.
Eric Liu [Fri, 30 Sep 2016 04:32:39 +0000 (04:32 +0000)]
[change-namespace] fix namespace specifier of global variables.

Reviewers: hokein

Subscribers: cfe-commits

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

llvm-svn: 282837

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.

llvm-svn: 282836

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.

llvm-svn: 282835

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.

llvm-svn: 282834

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

llvm-svn: 282833

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.

llvm-svn: 282832

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)

llvm-svn: 282831

7 years agoAdd the tracking radar on our end.
Jim Ingham [Fri, 30 Sep 2016 01:23:46 +0000 (01:23 +0000)]
Add the tracking radar on our end.

llvm-svn: 282830

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

llvm-svn: 282829

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

llvm-svn: 282826

7 years agoAdd unit tests for simple frameless i386 and x86_64 function
Jason Molenda [Fri, 30 Sep 2016 00:41:15 +0000 (00:41 +0000)]
Add unit tests for simple frameless i386 and x86_64 function
instruction inspection to UnwindPlans.

llvm-svn: 282825

7 years agoPrefer skipping over x-failing
Enrico Granata [Fri, 30 Sep 2016 00:41:07 +0000 (00:41 +0000)]
Prefer skipping over x-failing

llvm-svn: 282824

7 years agoDo not assume we will be able to discover the return type of this selector call,...
Enrico Granata [Fri, 30 Sep 2016 00:40:04 +0000 (00:40 +0000)]
Do not assume we will be able to discover the return type of this selector call, for that is not true in i386 mode

llvm-svn: 282823

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

llvm-svn: 282822

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.

llvm-svn: 282821

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

llvm-svn: 282820

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

llvm-svn: 282819

7 years agoStart linker scripts at 0.
Rafael Espindola [Fri, 30 Sep 2016 00:16:11 +0000 (00:16 +0000)]
Start linker scripts at 0.

We were implicitly creating space for the headers. That is not the
behaviour of bfd, which requires the script to use SIZEOF_HEADERS. The
difference is important for scripts that don't use SIZEOF_HEADERS and
expect the first section to be at 0.

llvm-svn: 282818

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.

llvm-svn: 282817

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.

llvm-svn: 282816

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.

llvm-svn: 282815

7 years agoDon't depend on lld creating space for the headers.
Rafael Espindola [Fri, 30 Sep 2016 00:06:24 +0000 (00:06 +0000)]
Don't depend on lld creating space for the headers.

Currently lld will implicitly reserve space for the headers. This is
not the case is bfd, where it is the script responsibility to use
SIZEOF_HEADERS. This means that a script not using SIZEOF_HEADERS and
expecting the address of the first section to be 0 would fail with lld.

I am fixing that is the next commit. This one just makes the tests
explicitly use SIZEOF_HEADERS to avoid the dependency on the current
behaviour.

llvm-svn: 282814

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.

llvm-svn: 282813

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

llvm-svn: 282812

7 years agoSwitch to using TEST_EQ, TEST_FALSE where appropriate.
Jason Molenda [Thu, 29 Sep 2016 23:57:33 +0000 (23:57 +0000)]
Switch to using TEST_EQ, TEST_FALSE where appropriate.

llvm-svn: 282811

7 years agoAdd some logging when trace is on. We're getting a bot failure on i386 that doesn't
Jim Ingham [Thu, 29 Sep 2016 23:48:21 +0000 (23:48 +0000)]
Add some logging when trace is on.  We're getting a bot failure on i386 that doesn't
I can't reproduce locally.  Hopefully this will help us catch the reason.

llvm-svn: 282810

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.

llvm-svn: 282809

7 years agoRemove Google specific code.
Vitaly Buka [Thu, 29 Sep 2016 23:05:35 +0000 (23:05 +0000)]
Remove Google specific code.

llvm-svn: 282808

7 years agoAdd comments.
Rui Ueyama [Thu, 29 Sep 2016 23:04:50 +0000 (23:04 +0000)]
Add comments.

llvm-svn: 282807

7 years agoBreak long line. NFC.
Rafael Espindola [Thu, 29 Sep 2016 23:02:57 +0000 (23:02 +0000)]
Break long line. NFC.

llvm-svn: 282806

7 years agoDon't use internal symbolizer if we are in process of reporting Out-of-Memory.
Vitaly Buka [Thu, 29 Sep 2016 23:00:54 +0000 (23:00 +0000)]
Don't use internal symbolizer if we are in process of reporting Out-of-Memory.

Reviewed by eugenis offline, as reviews.llvm.org is down.

llvm-svn: 282805

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.

llvm-svn: 282804

7 years ago[CMake] LLDB/Expression needs to depend on intrinsics_gen
Chris Bieneman [Thu, 29 Sep 2016 22:55:09 +0000 (22:55 +0000)]
[CMake] LLDB/Expression needs to depend on intrinsics_gen

IRExecutionUnit.h includes Module.h, which through a long chain of includes eventually includes Attributes.gen.

This fixes a build issue reported to lldb-dev by Hal. Thanks Hal!

llvm-svn: 282803

7 years agoUse StringSwitch::Cases. NFC.
Rui Ueyama [Thu, 29 Sep 2016 22:54:31 +0000 (22:54 +0000)]
Use StringSwitch::Cases. NFC.

llvm-svn: 282802

7 years agoRemove HasError check after lto::LTO::run.
Rui Ueyama [Thu, 29 Sep 2016 22:50:37 +0000 (22:50 +0000)]
Remove HasError check after lto::LTO::run.

Because LTO::run doesn't change HasError, it doesn't make
sense to check that value.

llvm-svn: 282801

7 years agoP0035R4: add std::align_val_t overloads of operator new/delete in C++17 mode.
Richard Smith [Thu, 29 Sep 2016 22:49:46 +0000 (22:49 +0000)]
P0035R4: add std::align_val_t overloads of operator new/delete in C++17 mode.

llvm-svn: 282800

7 years agoDon't put ro before rx when using linker scripts.
Rafael Espindola [Thu, 29 Sep 2016 22:48:55 +0000 (22:48 +0000)]
Don't put ro before rx when using linker scripts.

Since they end up going on the same PT_LOAD, there is no reason to
sort them. This matches bfd's behaviour and is user visible in the
placement of orphan sections.

llvm-svn: 282799

7 years agoKeep a private member private.
Rui Ueyama [Thu, 29 Sep 2016 22:37:45 +0000 (22:37 +0000)]
Keep a private member private.

llvm-svn: 282798

7 years agoList more sections in linker script.
Rafael Espindola [Thu, 29 Sep 2016 22:27:48 +0000 (22:27 +0000)]
List more sections in linker script.

This makes the test less brittle with regards to orphan section placement.

llvm-svn: 282797

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.

llvm-svn: 282796

7 years agoRemove a return type that can be trivially easily.
Rui Ueyama [Thu, 29 Sep 2016 22:14:20 +0000 (22:14 +0000)]
Remove a return type that can be trivially easily.

llvm-svn: 282795

7 years agoDon't expect new-style Objective-C literals to work on i386 with the V1 runtime.
Sean Callanan [Thu, 29 Sep 2016 22:01:11 +0000 (22:01 +0000)]
Don't expect new-style Objective-C literals to work on i386 with the V1 runtime.

llvm-svn: 282794

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

llvm-svn: 282793

7 years ago[Coroutines] Fix assertion about uncorrected typos in co_await/co_yield/co_return...
Eric Fiselier [Thu, 29 Sep 2016 21:47:39 +0000 (21:47 +0000)]
[Coroutines] Fix assertion about uncorrected typos in co_await/co_yield/co_return expressions

llvm-svn: 282792

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.

llvm-svn: 282791

7 years agoAdd a quick note about how to build lldb with debug info using
Jason Molenda [Thu, 29 Sep 2016 21:47:15 +0000 (21:47 +0000)]
Add a quick note about how to build lldb with debug info using
cmake/ninja on linux/bsd systems.

llvm-svn: 282790

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

llvm-svn: 282789

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.

llvm-svn: 282788

7 years agoFixed TestObjCMethods2/i386 by separating out the portions that require ObjC V2.
Sean Callanan [Thu, 29 Sep 2016 21:43:31 +0000 (21:43 +0000)]
Fixed TestObjCMethods2/i386 by separating out the portions that require ObjC V2.

llvm-svn: 282787

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.

llvm-svn: 282786

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.

llvm-svn: 282785

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.

llvm-svn: 282784

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

llvm-svn: 282783

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

llvm-svn: 282782

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.

llvm-svn: 282781

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

llvm-svn: 282780

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

llvm-svn: 282779

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

llvm-svn: 282778

7 years agoSwitch to a different workaround for unimplementability of P0145R3 in MS ABIs.
Richard Smith [Thu, 29 Sep 2016 21:30:12 +0000 (21:30 +0000)]
Switch to a different workaround for unimplementability of P0145R3 in MS ABIs.
Instead of ignoring the evaluation order rule, ignore the "destroy parameters
in reverse construction order" rule for the small number of problematic cases.
This only causes incorrect behavior in the rare case where both parameters to
an overloaded operator <<, >>, ->*, &&, ||, or comma are of class type with
non-trivial destructor, and the program is depending on those parameters being
destroyed in reverse construction order.

We could do a little better here by reversing the order of parameter
destruction for those functions (and reversing the argument evaluation order
for all direct calls, not just those with operator syntax), but that is not a
complete solution to the problem, as the same situation can be reached by an
indirect function call.

Approach reviewed off-line by rnk.

llvm-svn: 282777

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.

llvm-svn: 282776

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.

llvm-svn: 282775

7 years agoThis test will not work in i386 mode because we don't create interesting types from...
Enrico Granata [Thu, 29 Sep 2016 21:20:56 +0000 (21:20 +0000)]
This test will not work in i386 mode because we don't create interesting types from the ObjC runtime

"Fixes" rdar://28501616

llvm-svn: 282774

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

llvm-svn: 282773

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

llvm-svn: 282772

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.

llvm-svn: 282771

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

llvm-svn: 282770

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

llvm-svn: 282769

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.

llvm-svn: 282768

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.

llvm-svn: 282767

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.

llvm-svn: 282766

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.

llvm-svn: 282765

7 years agoRename "void check(Error)".
Rui Ueyama [Thu, 29 Sep 2016 21:00:26 +0000 (21:00 +0000)]
Rename "void check(Error)".

We have a few "check" functions in Error.h. All of them are to
check for an error and strip an error object if there was no error,
except "void check(Error E)", which doesn't return anything.
This patch renames it and moves it to the .cpp file where it is used.

llvm-svn: 282764

7 years agoRename warning -> warn.
Rui Ueyama [Thu, 29 Sep 2016 21:00:23 +0000 (21:00 +0000)]
Rename warning -> warn.

It's better because it's a verb.

llvm-svn: 282763

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.

llvm-svn: 282762

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.

llvm-svn: 282761