platform/upstream/llvm.git
7 years agoObjectFileELF: Add support for compressed sections
Pavel Labath [Fri, 15 Dec 2017 14:23:58 +0000 (14:23 +0000)]
ObjectFileELF: Add support for compressed sections

Summary:
We use the llvm decompressor to decompress SHF_COMPRESSED sections. This enables
us to read data from debug info sections, which are sometimes compressed,
particuarly in the split-dwarf case.  This functionality is only available if
llvm is compiled with zlib support.

Reviewers: clayborg, zturner

Subscribers: emaste, mgorny, aprantl, lldb-commits

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

llvm-svn: 320813

7 years ago[X86] Add MWAITX/MONITORX schedule tests
Simon Pilgrim [Fri, 15 Dec 2017 14:22:15 +0000 (14:22 +0000)]
[X86] Add MWAITX/MONITORX schedule tests

llvm-svn: 320812

7 years agoFix the second build bot break introduced by r320791.
Nemanja Ivanovic [Fri, 15 Dec 2017 14:17:45 +0000 (14:17 +0000)]
Fix the second build bot break introduced by r320791.

llvm-svn: 320811

7 years ago[X86] Add XOP schedule tests
Simon Pilgrim [Fri, 15 Dec 2017 14:02:35 +0000 (14:02 +0000)]
[X86] Add XOP schedule tests

llvm-svn: 320810

7 years agollgs-tests: Make addition of new tests easier
Pavel Labath [Fri, 15 Dec 2017 13:56:22 +0000 (13:56 +0000)]
llgs-tests: Make addition of new tests easier

Summary:
Adding a new test would require one to duplicate a significant part of
the existing test that we have. This attempts to reduce that by moving
some part of that code to the test fixture. The StandardStartupTest
fixture automatically starts up the server and connects it to the
client. I also add a more low-level TestBase fixture, which allows one
to start up the client and server in a custom way (I am going to need
this for the test I am writing).

Reviewers: eugene, zturner

Subscribers: lldb-commits, mgorny

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

llvm-svn: 320809

7 years agoAdded a separate install target for compilert-rt-headers
Ilya Biryukov [Fri, 15 Dec 2017 13:20:13 +0000 (13:20 +0000)]
Added a separate install target for compilert-rt-headers

Summary:
This patch adds a new install target `install-compilert-rt-headers`,
that is similar to `install-clang-headers`.

It allows to install the headers without installing all of
compiler-rt.

Reviewers: alekseyshl, beanz

Reviewed By: beanz

Subscribers: smeenai, beanz, mgorny, #sanitizers, kcc, llvm-commits

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

llvm-svn: 320808

7 years ago[clangd] Build in-memory index on symbols in files.
Eric Liu [Fri, 15 Dec 2017 12:25:02 +0000 (12:25 +0000)]
[clangd] Build in-memory index on symbols in files.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits

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

llvm-svn: 320807

7 years agoFix code causing fallthrough warnings in the PPC back end.
Nemanja Ivanovic [Fri, 15 Dec 2017 11:47:48 +0000 (11:47 +0000)]
Fix code causing fallthrough warnings in the PPC back end.

llvm-svn: 320806

7 years ago[X86] Add AVX512 VPOPCNTDQ schedule tests
Simon Pilgrim [Fri, 15 Dec 2017 11:32:31 +0000 (11:32 +0000)]
[X86] Add AVX512 VPOPCNTDQ schedule tests

Demonstrates how to perform full coverage avx512 schedule tests

llvm-svn: 320805

7 years ago[clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.
Ilya Biryukov [Fri, 15 Dec 2017 11:27:51 +0000 (11:27 +0000)]
[clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

Summary:
Revision D38639 needs this commit in order to properly make open
definition calls on include statements work.

Patch by William Enright.

Reviewers: malaperle, krasimir, bkramer, ilya-biryukov

Reviewed By: malaperle, ilya-biryukov

Subscribers: cfe-commits, arphaman, ilya-biryukov

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

llvm-svn: 320804

7 years ago[ELF] Remove Duplicate .ARM.exidx sections
Peter Smith [Fri, 15 Dec 2017 11:09:41 +0000 (11:09 +0000)]
[ELF] Remove Duplicate .ARM.exidx sections

The ARM.exidx section contains a table of 8-byte entries with the first
word of each entry an offset to the function it describes and the second
word instructions for unwinding if an exception is thrown from that
function. The SHF_LINK_ORDER processing will order the table in ascending
order of the functions described by the exception table entries. As the
address range of an exception table entry is terminated by the next table
entry, it is possible to merge consecutive table entries that have
identical unwind instructions.

For this implementation we define a table entry to be identical if:
- Both entries are the special EXIDX_CANTUNWIND.
- Both entries have the same inline unwind instructions.
We do not attempt to establish if table entries that are references to
.ARM.extab sections are identical.

This implementation works at a granularity of a single .ARM.exidx
InputSection. If all entries in the InputSection are identical to the
previous table entry we can remove the InputSection. A more sophisticated
but more complex implementation would rewrite InputSection contents so that
duplicates within a .ARM.exidx InputSection can be merged.

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

llvm-svn: 320803

7 years ago[ELF] Add missing test from r320800
Peter Smith [Fri, 15 Dec 2017 11:02:50 +0000 (11:02 +0000)]
[ELF] Add missing test from r320800

Forgot to svn add the additional test for the commit. Adding with this one.

llvm-svn: 320802

7 years ago[ELF] Fix buildbot warning error.
Peter Smith [Fri, 15 Dec 2017 10:47:44 +0000 (10:47 +0000)]
[ELF] Fix buildbot warning error.

Forward declare InputSectionDescription as struct not class.

llvm-svn: 320801

7 years ago[ELF] Complete implementation of --fix-cortex-a53-843419
Peter Smith [Fri, 15 Dec 2017 10:32:34 +0000 (10:32 +0000)]
[ELF] Complete implementation of --fix-cortex-a53-843419

This patch provides the mechanism to fix instances of the instruction
sequence that may trigger the cortex-a53 843419 erratum. The fix is
provided by an alternative instruction sequence to remove one of the
erratum conditions. To reach this alternative instruction sequence we
replace the original instruction with a branch to the alternative
sequence. The alternative sequence is responsible for branching back to
the original.

As there is only erratum to fix the implementation is specific to
AArch64 and the specific erratum conditions. It should be generalizable
to other targets and erratum if needed.

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

llvm-svn: 320800

7 years ago[RISCV] Change shift amount operand of RVC shift instructions to uimmlog2xlennonzero
Alex Bradbury [Fri, 15 Dec 2017 10:20:51 +0000 (10:20 +0000)]
[RISCV] Change shift amount operand of RVC shift instructions to uimmlog2xlennonzero

c.slli/c.srli/c.srai allow a 5-bit shift in RV32C and a 6-bit shift in RV64C.
This patch adds uimmlog2xlennonzero to reflect this constraint as well as
tests.

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

Patch by Shiva Chen.

llvm-svn: 320799

7 years agoFix the build bot break introduced by r320791.
Nemanja Ivanovic [Fri, 15 Dec 2017 09:51:34 +0000 (09:51 +0000)]
Fix the build bot break introduced by r320791.

llvm-svn: 320798

7 years ago[RISCV] Enable emission of alias instructions by default
Alex Bradbury [Fri, 15 Dec 2017 09:47:01 +0000 (09:47 +0000)]
[RISCV] Enable emission of alias instructions by default

This patch switches the default for -riscv-no-aliases to false
and updates all affected MC and CodeGen tests. As recommended in
D41071, MC tests use the canonical instructions and the CodeGen
tests use the aliases.

Additionally, for the f and d instructions with rounding mode,
the tests for the aliased versions are moved and tightened such
that they can actually detect if alias emission is enabled.
(see D40902 for context)

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

Patch by Mario Werner.

llvm-svn: 320797

7 years ago[PM] port Rewrite Statepoints For GC to the new pass manager.
Fedor Sergeev [Fri, 15 Dec 2017 09:32:11 +0000 (09:32 +0000)]
[PM] port Rewrite Statepoints For GC to the new pass manager.

Summary:
The port is nearly straightforward.
The only complication is related to the analyses handling,
since one of the analyses used in this module pass is domtree,
which is a function analysis. That requires asking for the results
of each function and disallows a single interface for run-on-module
pass action.

Decided to copy-paste the main body of this pass.
Most of its code is requesting analyses anyway, so not that much
of a copy-paste.

The rest of the code movement is to transform all the implementation
helper functions like stripNonValidData into non-member statics.

Extended all the related LLVM tests with new-pass-manager use.
No failures.

Reviewers: sanjoy, anna, reames

Reviewed By: anna

Subscribers: skatkov, llvm-commits

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

llvm-svn: 320796

7 years ago[ARM] Add tests for D34515
Roger Ferrer Ibanez [Fri, 15 Dec 2017 09:24:46 +0000 (09:24 +0000)]
[ARM] Add tests for D34515

This is NFC and a preparatory step for D34515.

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

llvm-svn: 320795

7 years ago[LLVMgold] Don't set undefined symbol as prevailing
Eugene Leviant [Fri, 15 Dec 2017 09:18:21 +0000 (09:18 +0000)]
[LLVMgold] Don't set undefined symbol as prevailing

Differential revision: https://reviews.llvm.org/D41113

llvm-svn: 320794

7 years agoRepair Windows buildbots after r320792
Shoaib Meenai [Fri, 15 Dec 2017 08:08:26 +0000 (08:08 +0000)]
Repair Windows buildbots after r320792

Windows paths have colons in them, so the regex will fail there. Just
match for any character; the rest of the message will restrict the match
to the path anyway.

llvm-svn: 320793

7 years ago[COFF] Warn for locally imported symbols
Shoaib Meenai [Fri, 15 Dec 2017 07:49:21 +0000 (07:49 +0000)]
[COFF] Warn for locally imported symbols

Locally imported symbols are a very surprising linker feature. link.exe
warns for them, and we should warn too.

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

llvm-svn: 320792

7 years ago[PowerPC] Convert r+r instructions to r+i (pre and post RA)
Nemanja Ivanovic [Fri, 15 Dec 2017 07:27:53 +0000 (07:27 +0000)]
[PowerPC] Convert r+r instructions to r+i (pre and post RA)

This patch adds the necessary infrastructure to convert instructions that
take two register operands to those that take a register and immediate if
the necessary operand is produced by a load-immediate. Furthermore, it uses
this infrastructure to perform such conversions twice - first at MachineSSA
and then pre-emit.

There are a number of reasons we may end up with opportunities for this
transformation, including but not limited to:
- X-Form instructions chosen since the exact offset isn't available at ISEL time
- Atomic instructions with constant operands (we will add patterns for this
  in the future)
- Tail duplication may duplicate code where one block contains this redundancy
- When emitting compare-free code in PPCDAGToDAGISel, we don't handle constant
  comparands specially

Furthermore, this patch moves the initialization of PPCMIPeepholePass so that
it can be used for MIR tests.

llvm-svn: 320791

7 years ago[X86] Fix a couple bugs in my recent changes to vXi1 insert_subvector lowering.
Craig Topper [Fri, 15 Dec 2017 07:16:41 +0000 (07:16 +0000)]
[X86] Fix a couple bugs in my recent changes to vXi1 insert_subvector lowering.

A couple places didn't use the same SDValue variables to connect everything all the way through.

I don't have a test case for a bug in insert into the lower bits of a non-zero, non-undef vector. Not sure the best way to create that. We don't create the case when lowering concat_vectors which is the main way to get insert_subvectors.

llvm-svn: 320790

7 years ago[SCEV] Fix the movement of insertion point in expander. PR35406.
Serguei Katkov [Fri, 15 Dec 2017 05:24:42 +0000 (05:24 +0000)]
[SCEV] Fix the movement of insertion point in expander. PR35406.

We cannot move the insertion point to header if SCEV contains div/rem
operations due to they may go over check for zero denominator.

Reviewers: sanjoy, mkazantsev, sebpop
Reviewed By: sebpop
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41229

llvm-svn: 320789

7 years agoRecommit CodeGen: Fix assertion in machine inst sheduler due to llvm.dbg.value
Yaxun Liu [Fri, 15 Dec 2017 03:56:57 +0000 (03:56 +0000)]
Recommit CodeGen: Fix assertion in machine inst sheduler due to llvm.dbg.value

The regression on ppc64 was not due to this commit.

llvm-svn: 320788

7 years ago[libFuzzer] make the tests depend on ubsan
Kostya Serebryany [Fri, 15 Dec 2017 01:39:52 +0000 (01:39 +0000)]
[libFuzzer] make the tests depend on ubsan

llvm-svn: 320787

7 years agoDisabling r312514 as it causes miscompiles that show up on bootstrap
Nemanja Ivanovic [Fri, 15 Dec 2017 01:38:03 +0000 (01:38 +0000)]
Disabling r312514 as it causes miscompiles that show up on bootstrap

The compare elimination peephole introduced in https://reviews.llvm.org/rL312514
causes a miscompile in AMDGPUInstrInfo.cpp which in turn causes some AMDGPU
test case failures in stage2 bootstrap testing. This miscompile didn't cause any
test case failures until https://reviews.llvm.org/rL320614, so it appeared as if
that patch caused these failures.
Disabling this transformation for now to bring the build bots back to green and
the author of the patch will investigate the miscompile.

llvm-svn: 320786

7 years ago[cmake] Fix clang-cl cross-compilation on macOS
Shoaib Meenai [Fri, 15 Dec 2017 01:05:48 +0000 (01:05 +0000)]
[cmake] Fix clang-cl cross-compilation on macOS

macOS paths usually start with /Users, which clang-cl interprets as a
macro undefine, leading to pretty much everything failing to compile.

CMake should be taught to put a -- in its compilation rules for clang-cl
(and I've been meaning to submit that upstream for a while). In the
meantime, however, and to support older CMake versions, we can just
create a custom make rules override to fix the compilation rules.

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

llvm-svn: 320785

7 years ago[X86] Add a TODO about v8i1 CONCAT_VECTORS.
Craig Topper [Fri, 15 Dec 2017 01:03:46 +0000 (01:03 +0000)]
[X86] Add a TODO about v8i1 CONCAT_VECTORS.

llvm-svn: 320784

7 years ago[SelectionDAG] Make getNode calls that take an ArrayRef of SDValue for operands call...
Craig Topper [Fri, 15 Dec 2017 01:03:45 +0000 (01:03 +0000)]
[SelectionDAG] Make getNode calls that take an ArrayRef of SDValue for operands call NewSDValueDbgMsg.

This makes it work better with some build_vector and concat_vectors creations.

Adjust the NewSDValueDbgMsg in getConstant to avoid duplicating the print when it calls getSplatBuildVector since getSplatBuildVector didn't trigger a print before.

llvm-svn: 320783

7 years ago[X86] Further rearrange the setOperationAction calls to separate the ones that requir...
Craig Topper [Fri, 15 Dec 2017 01:03:43 +0000 (01:03 +0000)]
[X86] Further rearrange the setOperationAction calls to separate the ones that require 512-bit registers OR VLX into separate sections. NFCI

We have several instructions that were introduced in AVX512F that are only available in 512-bit form on KNL. We still make use of them for 128/256 by artificially widening and extracting during isel.

This commit separates these operations from the true 512-bit operations. This way we can qualify the normal 512-bit operations with needing 512-bit register support. And these special operations will get qualified with needing 512-bit registers OR VLX.

The 512-bit register qualification will be introduced in a future patch this just gets everything grouped to minimize deltas on that patch.

llvm-svn: 320782

7 years ago[X86] Group setOperationActions related to vXi1 masks together. NFCI
Craig Topper [Fri, 15 Dec 2017 01:03:42 +0000 (01:03 +0000)]
[X86] Group setOperationActions related to vXi1 masks together. NFCI

Previously they were sort of interleaved in with XMM/YMM/ZMM action related code.

Trying to separate things so its easier to split 512-bit vectors later.

llvm-svn: 320781

7 years ago[X86] Make ISD::INSERT_SUBVECTOR v8i1 legal with AVX512F because we should be custom...
Craig Topper [Fri, 15 Dec 2017 01:03:40 +0000 (01:03 +0000)]
[X86] Make ISD::INSERT_SUBVECTOR v8i1 legal with AVX512F because we should be custom lowering inserting v1i1 into v8i1 under this.

I don't have a test case at the moment. Just noticed while auditing things.

llvm-svn: 320780

7 years ago[X86] Move some of the hasVLX qualified code out of the main hasAVX512 block in the...
Craig Topper [Fri, 15 Dec 2017 01:03:38 +0000 (01:03 +0000)]
[X86] Move some of the hasVLX qualified code out of the main hasAVX512 block in the X86ISelLowering constructor. NFCI

Move it into the separate hasVLX block later in the constructor.

I'm trying to separate 128/256 and 512-bit related code so we can eventually qualify the hasAVX512 block with support for 512-bit vectors required by the prefer-vector-width feature support being talked about in D41096.

llvm-svn: 320779

7 years ago[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.
Davide Italiano [Fri, 15 Dec 2017 00:50:43 +0000 (00:50 +0000)]
[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.

Clang recently switched to C++14 (with GNU extensions) as the default
dialect, but LLDB didn't catch up. This causes failures as LLDB still
evaluates ObjectiveC expressions as Objective C++ using C++98 as standard.

There are things not available in C++98, including, e.g. nullptr.
In some cases Objective-C `nil` is defined as `nullptr` so this causes
an evaluation failure. Switch the default to overcome this issue
(actually, currently lldb evaluates both C++11 and C++14 as C++11,
but that seems a larger change and definitely could be re-evaluated
in the future).

No test as this is currently failing on the LLDB bots after the clang
switch (so, de facto, there's a test already for it).

This is a recommit, with a thinko fixed (the code was previously
placed incorrectly).

<rdar://problem/36011995>

llvm-svn: 320778

7 years ago[WebAssembly] Remove extra semicolon. NFC.
Sam Clegg [Fri, 15 Dec 2017 00:34:32 +0000 (00:34 +0000)]
[WebAssembly] Remove extra semicolon. NFC.

llvm-svn: 320777

7 years agoFastISel: support no-PLT PIC calls on ELF x86_64
Saleem Abdulrasool [Fri, 15 Dec 2017 00:32:09 +0000 (00:32 +0000)]
FastISel: support no-PLT PIC calls on ELF x86_64

Add support for properly handling PIC code with no-PLT.  This equates to
`-fpic -fno-plt -O0` with the clang frontend.  External functions are
marked with nonlazybind, which must then be indirected through the GOT.
This allows code to be built without optimizations in PIC mode without
going through the PLT.  Addresses PR35653!

llvm-svn: 320776

7 years agoDon't crash in llvm-pdbutil when dumping TypeIndexes with high bit set.
Zachary Turner [Fri, 15 Dec 2017 00:27:49 +0000 (00:27 +0000)]
Don't crash in llvm-pdbutil when dumping TypeIndexes with high bit set.

This is a special code that indicates that it's a function id.
While I'm still not certain how to interpret these, we definitely
should *not* be using these values as indices into an array directly.
For now, when we encounter one of these, just print the numeric value.

llvm-svn: 320775

7 years ago[WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors
Sam Clegg [Fri, 15 Dec 2017 00:17:10 +0000 (00:17 +0000)]
[WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors

Summary:
- lowers @llvm.global_dtors by adding @llvm.global_ctors
  functions which register the destructors with `__cxa_atexit`.
- impements @llvm.global_ctors with wasm start functions and linker metadata

See [here](https://github.com/WebAssembly/tool-conventions/issues/25) for more background.

Subscribers: jfb, dschuff, mgorny, jgravelle-google, aheejin, sunfish

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

llvm-svn: 320774

7 years agoDo not create an unnecessary object file in a test.
Rui Ueyama [Fri, 15 Dec 2017 00:17:04 +0000 (00:17 +0000)]
Do not create an unnecessary object file in a test.

llvm-svn: 320773

7 years agoFix error messages.
Rui Ueyama [Fri, 15 Dec 2017 00:07:15 +0000 (00:07 +0000)]
Fix error messages.

llvm-svn: 320772

7 years ago[debuginfo] Remove obsolete test_debuginfo.pl that was moved to debuginfo-tests.
Don Hinton [Fri, 15 Dec 2017 00:06:26 +0000 (00:06 +0000)]
[debuginfo] Remove obsolete test_debuginfo.pl that was moved to debuginfo-tests.

Summary:
Now that r320495, "[debuginfo-tests] Support moving
debuginfo-tests to llvm/projects," has landed, which includes a local
copy of test_debuginfo.pl, remove the obsolete copy.

Reviewers: zturner, aprantl

Reviewed By: aprantl

Subscribers: llvm-commits, JDevlieghere

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

llvm-svn: 320771

7 years agoUse warn() instead of error() to report a bad symbol in a DSO.
Rui Ueyama [Fri, 15 Dec 2017 00:01:33 +0000 (00:01 +0000)]
Use warn() instead of error() to report a bad symbol in a DSO.

Specifically, libwidevinecdm.so in Chrome has such bad symbol.
It seems the BFD linker handles them as local symbols, so instead
of inserting them to the symbol table, we should skip them too.

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

llvm-svn: 320770

7 years ago[ExpressionParser] Rollback C++98 as the standard for evaluating.
Davide Italiano [Fri, 15 Dec 2017 00:00:17 +0000 (00:00 +0000)]
[ExpressionParser] Rollback C++98 as the standard for evaluating.

Some ubuntu bots are failing with this patch in, let me unblock
while I investigate.

llvm-svn: 320769

7 years agoRemove a non-modular header (& inline it into its one use)
David Blaikie [Thu, 14 Dec 2017 23:45:58 +0000 (23:45 +0000)]
Remove a non-modular header (& inline it into its one use)

llvm-svn: 320768

7 years ago[TableGen][GlobalISel] Add a common class for all PredicateMatcher
Quentin Colombet [Thu, 14 Dec 2017 23:44:07 +0000 (23:44 +0000)]
[TableGen][GlobalISel] Add a common class for all PredicateMatcher

NFC.

llvm-svn: 320767

7 years agoRemove duplicate python libclang changes from r320748
Alex Lorenz [Thu, 14 Dec 2017 23:40:42 +0000 (23:40 +0000)]
Remove duplicate python libclang changes from r320748

llvm-svn: 320766

7 years agoCorrect UnaryTransformTypeLoc to properly initialize.
Erich Keane [Thu, 14 Dec 2017 23:37:08 +0000 (23:37 +0000)]
Correct UnaryTransformTypeLoc to properly initialize.

The initializeLocal function of UnaryTransformTypeLoc missed
the UnderlyingTInfo member.  This caused a null-dereference
issue, as reported in PR23421. This patch correctly initializss
the UnderlyingTInfo.

llvm-svn: 320765

7 years ago[ProfileData] Use a different data structure to save memory.
George Burgess IV [Thu, 14 Dec 2017 23:32:57 +0000 (23:32 +0000)]
[ProfileData] Use a different data structure to save memory.

This change swaps FunctionSamples to a std::map. This saves us around
17% of the memory required to parse sample profiles. To put hard numbers
on this, clang now eats around 1.3GB of RAM instead of 1.6GB while
parsing a 50MB profile.

The CPU time taken by a large profile merge (3.1GB of data across 226
files) is also reduced by ~11% by this patch (1:09.08 vs 1:01.11).

This was split out at the request of reviewers in D41152.

llvm-svn: 320764

7 years agoD40901: Refactor lazy loading of template specializations. NFC
Vassil Vassilev [Thu, 14 Dec 2017 23:30:18 +0000 (23:30 +0000)]
D40901: Refactor lazy loading of template specializations. NFC

llvm-svn: 320763

7 years ago[Unit][AArch64] Additional tests for target parsing
Evandro Menezes [Thu, 14 Dec 2017 23:13:04 +0000 (23:13 +0000)]
[Unit][AArch64] Additional tests for target parsing

Add Exynos M2/M3 to extension check.

llvm-svn: 320762

7 years ago[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.
Davide Italiano [Thu, 14 Dec 2017 23:11:15 +0000 (23:11 +0000)]
[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.

Clang recently switched to C++14 (with GNU extensions) as the default
dialect, but LLDB didn't catch up. This causes failures as LLDB still
evaluates ObjectiveC expressions as Objective C++ using C++98 as standard.

There are things not available in C++98, including, e.g. nullptr.
In some cases Objective-C `nil` is defined as `nullptr` so this causes
an evaluation failure. Switch the default to overcome this issue
(actually, currently lldb evaluates both C++11 and C++14 as C++11,
but that seems a larger change and definitely could be re-evaluated
in the future).

No test as this is currently failing on the LLDB bots after the clang
switch (so, de facto, there's a test already for it).

<rdar://problem/36011995>

llvm-svn: 320761

7 years ago[AArch64] Test patch
Evandro Menezes [Thu, 14 Dec 2017 23:06:18 +0000 (23:06 +0000)]
[AArch64] Test patch

Fix formatting by adding a missing blank line to test new network setup.

llvm-svn: 320760

7 years ago[ClangASTContext] Remove dead stuff found fixing something else.
Davide Italiano [Thu, 14 Dec 2017 23:03:35 +0000 (23:03 +0000)]
[ClangASTContext] Remove dead stuff found fixing something else.

llvm-svn: 320759

7 years agoEmitFuncArgumentDbgValue: Prefer stack slots over registers for stack arguments
Adrian Prantl [Thu, 14 Dec 2017 22:55:06 +0000 (22:55 +0000)]
EmitFuncArgumentDbgValue: Prefer stack slots over registers for stack arguments

While investigating LLVM PR22316 (http://llvm.org/bugs/show_bug.cgi?id=22316)
I started wondering if it were not always preferable to emit the
initial DBG_VALUEs for stack arguments as FI locations instead of
describing the first register they get copied into. The advantage of
doing this is that the arguments will be available as soon as the
stack is setup. As illustrated by the testcase in the PR, the first
copy of the FI into a register may be sunk by MachineSink.cpp into a
later basic block. By describing the argument on the stack, we nicely
circumvent this problem.

<rdar://problem/19583723>

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

llvm-svn: 320758

7 years ago[X86] Remove an unnecessary SmallVector that was collecting chains for two SDNode...
Craig Topper [Thu, 14 Dec 2017 22:50:10 +0000 (22:50 +0000)]
[X86] Remove an unnecessary SmallVector that was collecting chains for two SDNode's we're still holding SDValues for. NFCI

We can just get the chains from those SDValues to create the TokenFactor.

llvm-svn: 320757

7 years agoTLI: Allow using PSV for intrinsic mem operands
Matt Arsenault [Thu, 14 Dec 2017 22:34:10 +0000 (22:34 +0000)]
TLI: Allow using PSV for intrinsic mem operands

llvm-svn: 320756

7 years agoDon't trigger -Wuser-defined-literals for system headers
Dimitry Andric [Thu, 14 Dec 2017 22:32:24 +0000 (22:32 +0000)]
Don't trigger -Wuser-defined-literals for system headers

Summary:
In D41064, I proposed adding `#pragma clang diagnostic ignored
"-Wuser-defined-literals"` to some of libc++'s headers, since these
warnings are now triggered by clang's new `-std=gnu++14` default:

```
$ cat test.cpp
#include <string>

$ clang -std=c++14 -Wsystem-headers -Wall -Wextra -c test.cpp
In file included from test.cpp:1:
In file included from /usr/include/c++/v1/string:470:
/usr/include/c++/v1/string_view:763:29: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string_view<char> operator "" sv(const char *__str, size_t __len)
                            ^
/usr/include/c++/v1/string_view:769:32: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string_view<wchar_t> operator "" sv(const wchar_t *__str, size_t __len)
                               ^
/usr/include/c++/v1/string_view:775:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string_view<char16_t> operator "" sv(const char16_t *__str, size_t __len)
                                ^
/usr/include/c++/v1/string_view:781:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string_view<char32_t> operator "" sv(const char32_t *__str, size_t __len)
                                ^
In file included from test.cpp:1:
/usr/include/c++/v1/string:4012:24: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string<char> operator "" s( const char *__str, size_t __len )
                       ^
/usr/include/c++/v1/string:4018:27: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
                          ^
/usr/include/c++/v1/string:4024:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
                           ^
/usr/include/c++/v1/string:4030:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
    basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
                           ^
8 warnings generated.
```

Both @aaron.ballman and @mclow.lists felt that adding this workaround to
the libc++ headers was the wrong way, and it should be fixed in clang
instead.

Here is a proposal to do just that.  I verified that this suppresses the
warning, even when -Wsystem-headers is used, and that the warning is
still emitted for a declaration outside of system headers.

Reviewers: aaron.ballman, mclow.lists, rsmith

Reviewed By: aaron.ballman

Subscribers: mclow.lists, aaron.ballman, andrew, emaste, cfe-commits

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

llvm-svn: 320755

7 years agoAdd a missing build dependency.
Rui Ueyama [Thu, 14 Dec 2017 22:31:29 +0000 (22:31 +0000)]
Add a missing build dependency.

Patch by Chen-Pang He.

llvm-svn: 320754

7 years ago[ThreadSafetyAnalysis] Fix isCapabilityExpr
Yi Kong [Thu, 14 Dec 2017 22:24:45 +0000 (22:24 +0000)]
[ThreadSafetyAnalysis] Fix isCapabilityExpr

There are many more expr types that can be a capability expr, like
CXXThisExpr, CallExpr, MemberExpr. Instead of enumerating all of them,
just check typeHasCapability for any type given.

Also add & and * operators to allowed unary operators.

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

llvm-svn: 320753

7 years agoHarmonize GNU- and C++-style attribute spellings.
Aaron Ballman [Thu, 14 Dec 2017 22:17:09 +0000 (22:17 +0000)]
Harmonize GNU- and C++-style attribute spellings.

Most attributes will now use the Clang<"name"> construct to provide both __attribute__((name)) and [[clang::name]] syntaxes for the attribute. Attributes deviating from this should be marked with a comment explaining why they are not supported under both spellings. Common reasons are: the attribute is provided by some other specification that controls the syntax or the attribute cannot be exposed under a particular spelling for some given reason.

Because this is a mechanical change that only introduces new spellings, there are no test cases for the commit.

llvm-svn: 320752

7 years ago[debuginfo] Remove temporary FIXME.
Don Hinton [Thu, 14 Dec 2017 22:12:46 +0000 (22:12 +0000)]
[debuginfo] Remove temporary FIXME.

Summary:
Now that r320495, "[debuginfo-tests] Support moving
debuginfo-tests to llvm/projects," has landed, remove temporary FIXME
that supported the old mechanism.

Reviewers: zturner, aprantl

Reviewed By: aprantl

Subscribers: JDevlieghere, cfe-commits

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

llvm-svn: 320751

7 years agoFix many -Wsign-compare and -Wtautological-constant-compare warnings.
Zachary Turner [Thu, 14 Dec 2017 22:07:03 +0000 (22:07 +0000)]
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.

Most of the -Wsign-compare warnings are due to the fact that
enums are signed by default in the MS ABI, while the
tautological comparison warnings trigger on x86 builds where
sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max()
is always false.

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

llvm-svn: 320750

7 years ago[SimplifyCFG] don't sink common insts too soon (PR34603)
Sanjay Patel [Thu, 14 Dec 2017 22:05:20 +0000 (22:05 +0000)]
[SimplifyCFG] don't sink common insts too soon (PR34603)

This should solve:
https://bugs.llvm.org/show_bug.cgi?id=34603
...by preventing SimplifyCFG from altering redundant instructions before early-cse has a chance to run.
It changes the default (canonical-forming) behavior of SimplifyCFG, so we're only doing the
sinking transform later in the optimization pipeline.

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

llvm-svn: 320749

7 years ago[libclang] Add support for checking abstractness of records
Alex Lorenz [Thu, 14 Dec 2017 22:01:50 +0000 (22:01 +0000)]
[libclang] Add support for checking abstractness of records

This patch allows checking whether a C++ record declaration is abstract through
libclang and clang.cindex (Python).

Patch by Johann Klähn!

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

llvm-svn: 320748

7 years agoRevert "[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC...
Ben Hamilton [Thu, 14 Dec 2017 21:44:11 +0000 (21:44 +0000)]
Revert "[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style"

This reverts commit 37e69667f748e1458b46483b7c1b8f9ba33eec44.

We're going to discuss its ramifications further before making a
conclusion.

llvm-svn: 320747

7 years agoDAG: Expose all MMO flags in getTgtMemIntrinsic
Matt Arsenault [Thu, 14 Dec 2017 21:39:51 +0000 (21:39 +0000)]
DAG: Expose all MMO flags in getTgtMemIntrinsic

Rather than adding more bits to express every
MMO flag you could want, just directly use the
MMO flags. Also fixes using a bunch of bool arguments to
getMemIntrinsicNode.

On AMDGPU, buffer and image intrinsics should always
have MODereferencable set, but currently there is no
way to do that directly during the initial intrinsic
lowering.

llvm-svn: 320746

7 years ago[scudo] Refactor ScudoChunk
Kostya Kortchinsky [Thu, 14 Dec 2017 21:32:57 +0000 (21:32 +0000)]
[scudo] Refactor ScudoChunk

Summary:
The initial implementation used an ASan like Chunk class that was deriving from
a Header class. Due to potential races, we ended up working with local copies
of the Header and never using the parent class fields. ScudoChunk was never
constructed but cast, and we were using `this` as the pointer needed for our
computations. This was meh.

So we refactored ScudoChunk to be now a series of static functions within the
namespace `__scudo::Chunk` that take a "user" pointer as first parameter (former
`this`). A compiled binary doesn't really change, but the code is more sensible.

Clang tends to inline all those small function (in -O2), but GCC left a few not
inlined, so we add the `INLINE` keyword to all.

Since we don't have `ScudoChunk` pointers anymore, a few variables were renamed
here and there to introduce a clearer distinction between a user pointer
(usually `Ptr`) and a backend pointer (`BackendPtr`).

Reviewers: alekseyshl, flowerhack

Reviewed By: alekseyshl

Subscribers: #sanitizers, llvm-commits

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

llvm-svn: 320745

7 years ago[Hexagon] Generate HVX code for comparisons and selects
Krzysztof Parzyszek [Thu, 14 Dec 2017 21:28:48 +0000 (21:28 +0000)]
[Hexagon] Generate HVX code for comparisons and selects

llvm-svn: 320744

7 years ago[clangd] Put all #includes in one block in clangd source files. NFC
Eric Liu [Thu, 14 Dec 2017 21:22:03 +0000 (21:22 +0000)]
[clangd] Put all #includes in one block in clangd source files. NFC

Clang-format categorizes and sorts #includes with style. It doesn't make sense
to manually managing #include blocks.

llvm-svn: 320743

7 years ago[WebAssembly] Add support for init functions linking metadata
Sam Clegg [Thu, 14 Dec 2017 21:10:03 +0000 (21:10 +0000)]
[WebAssembly] Add support for init functions linking metadata

Summary:
This change lays the groundwork lowering of @llvm.global_ctors
and @llvm.global_dtors for the wasm object format.  Some parts
of this patch are subset of: https://reviews.llvm.org/D40759

See https://github.com/WebAssembly/tool-conventions/issues/25

Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish

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

llvm-svn: 320742

7 years agoFix -Wreorder warning
Sam Clegg [Thu, 14 Dec 2017 21:09:31 +0000 (21:09 +0000)]
Fix -Wreorder warning

Subscribers: aheejin, llvm-commits

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

llvm-svn: 320741

7 years ago[Sanitizers] Basic sanitizer Solaris support (PR 33274)
Kamil Rytarowski [Thu, 14 Dec 2017 20:14:29 +0000 (20:14 +0000)]
[Sanitizers] Basic sanitizer Solaris support (PR 33274)

Summary:
This is the first mostly working version of the Sanitizer port to 32-bit Solaris/x86.
It is currently based on Solaris 11.4 Beta.

This part was initially developed inside libsanitizer in the GCC tree and should apply to
both.  Subsequent parts will address changes to clang, the compiler-rt build system
and testsuite.

I'm not yet sure what the right patch granularity is: if it's profitable to split the patch
up, I'd like to get guidance on how to do so.

Most of the changes are probably straightforward with a few exceptions:

* The Solaris syscall interface isn't stable, undocumented and can change within an
  OS release.  The stable interface is the libc interface, which I'm using here, if possible
  using the internal _-prefixed names.

* While the patch primarily target 32-bit x86, I've left a few sparc changes in.  They
  cannot currently be used with clang due to a backend limitation, but have worked
  fine inside the gcc tree.

* Some functions (e.g. largefile versions of functions like open64) only exist in 32-bit
  Solaris, so I've introduced a separate SANITIZER_SOLARIS32 to check for that.

The patch (with the subsequent ones to be submitted shortly) was tested
on i386-pc-solaris2.11.  Only a few failures remain, some of them analyzed, some
still TBD:

    AddressSanitizer-i386-sunos :: TestCases/Posix/concurrent_overflow.cc
    AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc
    AddressSanitizer-i386-sunos :: TestCases/log-path_test.cc
    AddressSanitizer-i386-sunos :: TestCases/malloc-no-intercept.c
    AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/concurrent_overflow.cc
    AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/start-deactivated.cc
    AddressSanitizer-i386-sunos-dynamic :: TestCases/default_options.cc
    AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc
    AddressSanitizer-i386-sunos-dynamic :: TestCases/log-path_test.cc
    AddressSanitizer-i386-sunos-dynamic :: TestCases/malloc-no-intercept.c

   SanitizerCommon-Unit :: ./Sanitizer-i386-Test/MemoryMappingLayout.DumpListOfModules
    SanitizerCommon-Unit :: ./Sanitizer-i386-Test/SanitizerCommon.PthreadDestructorIterations

Maybe this is good enough the get the ball rolling.

Reviewers: kcc, alekseyshl

Reviewed By: alekseyshl

Subscribers: srhines, jyknight, kubamracek, krytarowski, fedor.sergeev, llvm-commits, #sanitizers

Tags: #sanitizers

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

llvm-svn: 320740

7 years agoRevert "Fix isPodLike for MSVC and use it in TypeHashing."
Zachary Turner [Thu, 14 Dec 2017 19:59:10 +0000 (19:59 +0000)]
Revert "Fix isPodLike for MSVC and use it in TypeHashing."

This reverts commit ac5edc198eb612f82293850c3488042708b1c5fa.

Apparently this doesn't cover all the bases, so some compilers
and standard libraries still think this is not trivially copyable
even though it is.  Reverting this back to an MSVC-only check for
now so that at least we have some coverage.

llvm-svn: 320739

7 years agoFix a -Wreorder warning
Hans Wennborg [Thu, 14 Dec 2017 19:51:18 +0000 (19:51 +0000)]
Fix a -Wreorder warning

llvm-svn: 320738

7 years agoFix isPodLike for MSVC and use it in TypeHashing.
Zachary Turner [Thu, 14 Dec 2017 19:41:28 +0000 (19:41 +0000)]
Fix isPodLike for MSVC and use it in TypeHashing.

This should be a better check than using is_trivially_copyable
behind an #ifdef _MSC_VER.

llvm-svn: 320737

7 years ago[SLPVectorizer] Don't ignore scalar extraction instructions of aggregate value
Guozhi Wei [Thu, 14 Dec 2017 19:35:43 +0000 (19:35 +0000)]
[SLPVectorizer] Don't ignore scalar extraction instructions of aggregate value

In SLPVectorizer, the vector build instructions (insertvalue for aggregate type) is passed to BoUpSLP.buildTree, it is treated as UserIgnoreList, so later in cost estimation, the cost of these instructions are not counted.
For aggregate value, later usage are more likely to be done in scalar registers, either used as individual scalars or used as a whole for function call or return value. Ignore scalar extraction instructions may cause too aggressive vectorization for aggregate values, and slow down performance. So for vectorization of aggregate value, the scalar extraction instructions are required in cost estimation.

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

llvm-svn: 320736

7 years agoCommit missing tests for r320734
Alex Lorenz [Thu, 14 Dec 2017 19:22:41 +0000 (19:22 +0000)]
Commit missing tests for r320734

llvm-svn: 320735

7 years ago[Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like
Alex Lorenz [Thu, 14 Dec 2017 19:22:02 +0000 (19:22 +0000)]
[Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like
builtin macros

This patch implements the __is_target_arch, __is_target_vendor, __is_target_os,
and __is_target_environment Clang preprocessor extensions that were proposed by
@compnerd in Bob's cfe-dev post:
http://lists.llvm.org/pipermail/cfe-dev/2017-November/056166.html.

These macros can be used to examine the components of the target triple at
compile time. A has_builtin(is_target_???) preprocessor check can be used to
check for their availability.

__is_target_arch allows you to check if an arch is specified without worring
about a specific subarch, e.g.

__is_target_arch(arm) returns 1 for the target arch "armv7"
__is_target_arch(armv7) returns 1 for the target arch "armv7"
__is_target_arch(armv6) returns 0 for the target arch "armv7"

__is_target_vendor and __is_target_environment match the specific vendor
or environment. __is_target_os matches the specific OS, but
__is_target_os(darwin) will match any Darwin-based OS. "Unknown" can be used
to test if the triple's component is specified.

rdar://35753116

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

llvm-svn: 320734

7 years agoOnly use is_trivially_copyable if we know it's safe to do so.
Zachary Turner [Thu, 14 Dec 2017 19:11:28 +0000 (19:11 +0000)]
Only use is_trivially_copyable if we know it's safe to do so.

Apparently this isn't present on older versions of libstdc++, so
it causes some builds to fail.

llvm-svn: 320733

7 years agoAdd MVT::v128i1, NFC
Krzysztof Parzyszek [Thu, 14 Dec 2017 19:05:21 +0000 (19:05 +0000)]
Add MVT::v128i1, NFC

Hexagon HVX has type v128i8, comparing two vectors of that type will
produce v128i1 types in SelectionDAG.

llvm-svn: 320732

7 years ago[profile] Port the runtime to Solaris (retry)
Vedant Kumar [Thu, 14 Dec 2017 19:01:04 +0000 (19:01 +0000)]
[profile] Port the runtime to Solaris (retry)

This includes a few nice bits of refactoring (e.g splitting out the
exclusive locking code into a common utility).

Hopefully the Windows support is fixed now.

Patch by Rainer Orth!

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

llvm-svn: 320731

7 years ago[CodeGen][X86] Implement _InterlockedCompareExchange128 intrinsic
Reid Kleckner [Thu, 14 Dec 2017 19:00:21 +0000 (19:00 +0000)]
[CodeGen][X86] Implement _InterlockedCompareExchange128 intrinsic

Summary:
InterlockedCompareExchange128 is a bit more complicated than the other
InterlockedCompareExchange functions, so it requires a bit more work. It
doesn't directly refer to 128bit ints, instead it takes pointers to
64bit ints for Destination and ComparandResult, and exchange is taken as
two 64bit ints (high & low). The previous value is written to
ComparandResult, and success is returned. This implementation does the
following in order to produce a cmpxchg instruction:

  1. Cast everything to 128bit ints or int pointers, and glues together
     the Exchange values
  2. Reads from CompareandResult to get the comparand
  3. Calls cmpxchg volatile (on X86 this will produce a lock cmpxchg16b
     instruction)
    1. Result 0 (previous value) is written back to ComparandResult
    2. Result 1 (success bool) is zext'ed to a uchar and returned

Resolves bug https://llvm.org/PR35251

Patch by Colden Cullen!

Reviewers: rnk, agutowski

Reviewed By: rnk

Subscribers: majnemer, cfe-commits

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

llvm-svn: 320730

7 years ago[opt-viewer] Render utf-8 characters properly in the generated HTML
Adam Nemet [Thu, 14 Dec 2017 18:55:33 +0000 (18:55 +0000)]
[opt-viewer] Render utf-8 characters properly in the generated HTML

llvm-svn: 320729

7 years agoRevert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the runtime to...
Vedant Kumar [Thu, 14 Dec 2017 18:50:13 +0000 (18:50 +0000)]
Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the runtime to Solaris"

This reverts commit r320726. It looks like flock isn't available on
Windows:

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio

llvm-svn: 320728

7 years ago[MC] Allow .file directives to be out-of-order
Paul Robinson [Thu, 14 Dec 2017 18:46:43 +0000 (18:46 +0000)]
[MC] Allow .file directives to be out-of-order

llvm-svn: 320727

7 years ago[profile] Port the runtime to Solaris
Vedant Kumar [Thu, 14 Dec 2017 18:43:14 +0000 (18:43 +0000)]
[profile] Port the runtime to Solaris

This includes a few nice bits of refactoring (e.g splitting out the
exclusive locking code into a common utility).

Patch by Rainer Orth!

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

llvm-svn: 320726

7 years ago[opt-viewer] Support unicode characters in function names
Adam Nemet [Thu, 14 Dec 2017 18:42:42 +0000 (18:42 +0000)]
[opt-viewer] Support unicode characters in function names

This is a Swift feature.  The output stream for the index page and the source
HTML page is utf-8 now.

The next patch will add the HTML magic to properly render these characters in
the browser.

llvm-svn: 320725

7 years ago[cmake] Only attempt to install MSVC system libraries on Windows
Shoaib Meenai [Thu, 14 Dec 2017 18:41:49 +0000 (18:41 +0000)]
[cmake] Only attempt to install MSVC system libraries on Windows

Newer versions of CMake (I'm on 3.10, but I believe 3.9 behaves the same
way) attempt to query the system for information about the VS 2017
install. Unfortunately, this query fails on non-Windows systems:

  cmake_host_system_information does not recognize <key> VS_15_DIR

CMake isn't going to find these system libraries on non-Windows anyway
(and we were previously silencing the resultant warnings in our
cross-compilation toolchain), so it makes sense to just omit the
attempted installation entirely on non-Windows.

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

llvm-svn: 320724

7 years ago[X86] Don't zero the upper bits of the k-register before extracting a single bit...
Craig Topper [Thu, 14 Dec 2017 18:35:25 +0000 (18:35 +0000)]
[X86] Don't zero the upper bits of the k-register before extracting a single bit from a vXi1.

This doesn't match the semantics of the extract_vector_elt operation. Nothing downstream knows the bits were zeroed so they still get masked or sign extended after the extrat anyway.

llvm-svn: 320723

7 years ago[Hexagon] Remove vectors of i64 from valid HVX types
Krzysztof Parzyszek [Thu, 14 Dec 2017 18:35:24 +0000 (18:35 +0000)]
[Hexagon] Remove vectors of i64 from valid HVX types

HVX does not support operations on 64-bit integers.

llvm-svn: 320722

7 years agoIn an ARC lambda-to-block conversion thunk, reclaim the return value of
John McCall [Thu, 14 Dec 2017 18:21:14 +0000 (18:21 +0000)]
In an ARC lambda-to-block conversion thunk, reclaim the return value of
the lambda so that we don't over-release it.

Patch by Dan Zimmerman!

llvm-svn: 320721

7 years agoFix error due to missing includes.
Zachary Turner [Thu, 14 Dec 2017 18:20:23 +0000 (18:20 +0000)]
Fix error due to missing includes.

While I'm pushing cleanup changes, this also fixes a few warnings
related to extraneous semicolons.

llvm-svn: 320720

7 years ago[COFF] Teach LLD to use the COFF .debug$H section.
Zachary Turner [Thu, 14 Dec 2017 18:07:04 +0000 (18:07 +0000)]
[COFF] Teach LLD to use the COFF .debug$H section.

This adds the /DEBUG:GHASH option to LLD which will look for
the existence of .debug$H sections in linker inputs and use them
to accelerate type merging.  The clang-cl side has already been
added, so this completes the work necessary to begin experimenting
with this feature.

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

llvm-svn: 320719

7 years ago[ARM] Fix isRenamable flag setting on expanded VSTMDIA opcode.
Geoff Berry [Thu, 14 Dec 2017 18:06:25 +0000 (18:06 +0000)]
[ARM] Fix isRenamable flag setting on expanded VSTMDIA opcode.

Fixes expensive-check ARM buildbot failure.

llvm-svn: 320718

7 years ago[OPENMP] Add codegen for target data constructs with `nowait` clause.
Alexey Bataev [Thu, 14 Dec 2017 17:00:17 +0000 (17:00 +0000)]
[OPENMP] Add codegen for target data constructs with `nowait` clause.

Added codegen for the `nowait` clause in target data constructs.

llvm-svn: 320717

7 years ago[X86][AVX][AVX2]: Adding full coverage of MC encoding for the AVX, AVX2 isa set....
Gadi Haber [Thu, 14 Dec 2017 16:46:47 +0000 (16:46 +0000)]
[X86][AVX][AVX2]: Adding full coverage of MC encoding for the AVX, AVX2 isa set.<NFC>

NFC.
Adding MC regressions tests to cover the AVX and AVX2 ISA sets.
This patch is part of a larger task to cover MC encoding of all X86 ISA Sets.
See revision: https://reviews.llvm.org/D39952

Reviewers: zvi, RKSimon, aymanmus, m_zuckerman
Differential Revison: https://reviews.llvm.org/D40287

Change-Id: I304687a2b7abb473f79de99c31fc55c97b2662da
llvm-svn: 320716

7 years ago[mips] Update some tests before posting a patch, NFC.
Simon Dardis [Thu, 14 Dec 2017 16:42:04 +0000 (16:42 +0000)]
[mips] Update some tests before posting a patch, NFC.

llvm-svn: 320715

7 years ago[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style
Ben Hamilton [Thu, 14 Dec 2017 16:17:38 +0000 (16:17 +0000)]
[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style

Summary:
If we write the following code, it goes over 100 columns, so we need to wrap it:

```
- (VeryLongReturnTypeName)veryLongMethodParameter:(VeryLongParameterName)thisIsAVeryLongParameterName
                              longMethodParameter:(LongParameterName)thisIsAlsoAnotherLongParameterName;
```

Currently, clang-format with the google style aligns the method parameter names on the first column:

```
- (VeryLongReturnTypeName)
veryLongMethodParameter:(VeryLongParameterName)thisIsAVeryLongParameterName
    longMethodParameter:(LongParameterName)thisIsAlsoAnotherLongParameterName;
```

We'd like clang-format in the google style to align these to column 4 for Objective-C:

```
- (VeryLongReturnTypeName)
    veryLongMethodParameter:(VeryLongParameterName)thisIsAVeryLongParameterName
            longMethodParameter:(LongParameterName)thisIsAlsoAnotherLongParameterName;
```

Test Plan: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewers: krasimir, djasper, klimek

Reviewed By: djasper

Subscribers: cfe-commits, thakis

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

llvm-svn: 320714