]> granicus.if.org Git - llvm/log
llvm
7 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Sat, 22 Jul 2017 02:33:45 +0000 (02:33 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

7 years ago[X86] Add nopq instruction which is a rex encoded version of nopl for gas compatibility.
Craig Topper [Sat, 22 Jul 2017 01:30:53 +0000 (01:30 +0000)]
[X86] Add nopq instruction which is a rex encoded version of nopl for gas compatibility.

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

7 years ago[X86] Add register form of NOPL and NOPW for assembler/disassembler.
Craig Topper [Sat, 22 Jul 2017 01:30:51 +0000 (01:30 +0000)]
[X86] Add register form of NOPL and NOPW for assembler/disassembler.

Fixes PR32805.

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

7 years agoAMDGPU: Remove leftover td file
Matt Arsenault [Sat, 22 Jul 2017 00:40:46 +0000 (00:40 +0000)]
AMDGPU: Remove leftover td file

All of the instructions were moved out of this a while ago,
so it's just a useless comment now.

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

7 years agoCommit missing/empty test file from r308789
David Blaikie [Sat, 22 Jul 2017 00:24:20 +0000 (00:24 +0000)]
Commit missing/empty test file from r308789

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

7 years agoRA: Remove another assert on empty intervals
Matt Arsenault [Sat, 22 Jul 2017 00:24:01 +0000 (00:24 +0000)]
RA: Remove another assert on empty intervals

This case is similar to the one fixed in r308808,
except when rematerializing.

Fixes bug 33884.

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

7 years ago[libFuzzer] reimplement experimental_len_control=1: bump the temporary max_len every...
Kostya Serebryany [Sat, 22 Jul 2017 00:10:29 +0000 (00:10 +0000)]
[libFuzzer] reimplement experimental_len_control=1: bump the temporary max_len every time we failed to find new coverage during the last 1000 runs and 1 second. Also fix FileToVector to not load unfinished files

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

7 years agoRA: Remove assert on empty live intervals
Matt Arsenault [Fri, 21 Jul 2017 23:56:13 +0000 (23:56 +0000)]
RA: Remove assert on empty live intervals

This is possible if there is an undef use when
splitting the vreg during spilling.

Fixes bug 33620.

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

7 years agoRevert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Fri, 21 Jul 2017 23:39:39 +0000 (23:39 +0000)]
Revert "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

This reverts commit 2f423248e140b94b8377660d4d2fe9364f30febe.

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

7 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Fri, 21 Jul 2017 23:27:40 +0000 (23:27 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

7 years agoRemove Bitrig: LLVM Changes
Erich Keane [Fri, 21 Jul 2017 22:48:47 +0000 (22:48 +0000)]
Remove Bitrig: LLVM Changes

Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.

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

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

7 years ago[ProfData] Detect if zlib is available
David Blaikie [Fri, 21 Jul 2017 21:41:15 +0000 (21:41 +0000)]
[ProfData] Detect if zlib is available

As discussed on [1], if the profile is compressed and llvm-profdata is not built with zlib support, the error message is not informative. Give a better error message if zlib is not available.

[1] http://lists.llvm.org/pipermail/llvm-dev/2017-July/115571.html

Reviewers: davidxl, dblaikie

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

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

7 years ago[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Fri, 21 Jul 2017 21:37:46 +0000 (21:37 +0000)]
[Analysis] Fix some Clang-tidy modernize and  Include What You Use warnings; other minor fixes (NFC).

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

7 years ago[PGOInstr] Add a debug print
Xinliang David Li [Fri, 21 Jul 2017 21:36:25 +0000 (21:36 +0000)]
[PGOInstr] Add a debug print

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

7 years agoX86InterleaveAccess: A fix for bug33826
Farhana Aleen [Fri, 21 Jul 2017 21:35:00 +0000 (21:35 +0000)]
X86InterleaveAccess: A fix for bug33826

Reviewers: DavidKreitzer

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

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

7 years agoAMDGPU: Implement memory model
Konstantin Zhuravlyov [Fri, 21 Jul 2017 21:19:23 +0000 (21:19 +0000)]
AMDGPU: Implement memory model

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

7 years ago[PPC] Add Defs = [CARRY] to MIR SRADI_32
Guozhi Wei [Fri, 21 Jul 2017 21:06:08 +0000 (21:06 +0000)]
[PPC] Add Defs = [CARRY] to MIR SRADI_32

MIR SRADI uses instruction template XSForm_1rc which declares Defs = [CARRY]. But MIR SRADI_32 uses instruction template XSForm_1, and it doesn't declare such implicit definition. With patch D33720 it causes wrong code generation for perl.

This patch adds the implicit definition.

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

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

7 years agoAMDGPU: Introduce maybeAtomic instruction flag
Konstantin Zhuravlyov [Fri, 21 Jul 2017 21:05:45 +0000 (21:05 +0000)]
AMDGPU: Introduce maybeAtomic instruction flag

Testing is in the follow up change

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

7 years agoAMDGPU: Preserve undef flag in eliminateFrameIndex
Matt Arsenault [Fri, 21 Jul 2017 19:31:44 +0000 (19:31 +0000)]
AMDGPU: Preserve undef flag in eliminateFrameIndex

Fixes verifier errors in some call tests.
Not sure why we haven't run into this before.

Test split into separate patch for once
call support is committed.

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

7 years ago[DAGCombiner] Update comment. NFC
Xin Tong [Fri, 21 Jul 2017 19:10:19 +0000 (19:10 +0000)]
[DAGCombiner] Update comment. NFC

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

7 years agoAMDGPU: Partially fix improper reliance on memoperands
Matt Arsenault [Fri, 21 Jul 2017 18:54:54 +0000 (18:54 +0000)]
AMDGPU: Partially fix improper reliance on memoperands

There are 2 more places doing this, but I'm not sure
what they are doing and don't make any sense to me

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

7 years agoAMDGPU: Don't track lgkmcnt for global_/scratch_ instructions
Matt Arsenault [Fri, 21 Jul 2017 18:34:51 +0000 (18:34 +0000)]
AMDGPU: Don't track lgkmcnt for global_/scratch_ instructions

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

7 years agoFix DebugInfo/PDB build by adding missing changes
Reid Kleckner [Fri, 21 Jul 2017 18:32:00 +0000 (18:32 +0000)]
Fix DebugInfo/PDB build by adding missing changes

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

7 years ago[PDB] Dump extra info about the publics stream
Reid Kleckner [Fri, 21 Jul 2017 18:28:55 +0000 (18:28 +0000)]
[PDB] Dump extra info about the publics stream

This includes the hash table, the address map, and the thunk table and
section offset table. The last two are only used for incremental
linking, which LLD doesn't support, so they are less interesting. The
hash table is particularly important to get right, since this is the one
of the streams that debuggers use to translate addresses to symbols.

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

7 years agoAMDGPU: Fix getMemOpBaseRegImmOfs for flat with offsets
Matt Arsenault [Fri, 21 Jul 2017 18:06:36 +0000 (18:06 +0000)]
AMDGPU: Fix getMemOpBaseRegImmOfs for flat with offsets

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

7 years ago[Hexagon] Add inline-asm constraint 'a' for modifier register class
Krzysztof Parzyszek [Fri, 21 Jul 2017 17:51:27 +0000 (17:51 +0000)]
[Hexagon] Add inline-asm constraint 'a' for modifier register class

For example
  asm ("memw(%0++%1) = %2" : : "r"(addr),"a"(mod),"r"(val) : "memory")

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

7 years agoThinLTO Minimized Bitcode File Size Reduction
Haojie Wang [Fri, 21 Jul 2017 17:25:20 +0000 (17:25 +0000)]
ThinLTO Minimized Bitcode File Size Reduction

Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file that will be not used for thin linker. In this patch, most of the extra information is striped to reduce the minimized bitcode file. Now only ModuleVersion, ModuleInfo, ModuleGlobalValueSummary, ModuleHash, Symtab and Strtab are left. Now the minimized bitcode file size is reduced to 15%-30% of the debug info stripped bitcode file size.

Reviewers: danielcdh, tejohnson, pcc

Reviewed By: pcc

Subscribers: mehdi_amini, aprantl, inglorion, eraman, llvm-commits

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

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

7 years ago[mips] Support -membedded-data and fix a related bug
Simon Dardis [Fri, 21 Jul 2017 17:19:00 +0000 (17:19 +0000)]
[mips] Support -membedded-data and fix a related bug

-membedded-data changes the location of constant data from the .sdata to
the .rodata section. Previously it was (incorrectly) always located in the
.rodata section.

Reviewers: atanasyan

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

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

7 years agoDe-brief doxygen comments
Adrian Prantl [Fri, 21 Jul 2017 16:51:17 +0000 (16:51 +0000)]
De-brief doxygen comments

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

7 years agoUse default initializers (NFC)
Adrian Prantl [Fri, 21 Jul 2017 16:51:16 +0000 (16:51 +0000)]
Use default initializers (NFC)

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

7 years agoCanonicalize the spelling of RefDie (NFC)
Adrian Prantl [Fri, 21 Jul 2017 16:51:09 +0000 (16:51 +0000)]
Canonicalize the spelling of RefDie (NFC)

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

7 years ago[RuntimeUnroll] NFC: Add a profitability function for mutliexit loop
Anna Thomas [Fri, 21 Jul 2017 16:30:38 +0000 (16:30 +0000)]
[RuntimeUnroll] NFC: Add a profitability function for mutliexit loop

Separated out the profitability from the safety analysis for multiexit
loop unrolling. Currently, this is an NFC because profitability is true
only if the unroll-runtime-multi-exit is set to true (off-by-default).

This is to ease adding the profitability heuristic up for review at
D35380.

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

7 years ago[SLPVectorizer] Replace E->Scalars to VL0 at vectorizeTree and move comment, NFCI.
Dinar Temirbulatov [Fri, 21 Jul 2017 16:02:56 +0000 (16:02 +0000)]
[SLPVectorizer] Replace E->Scalars to VL0 at vectorizeTree and move comment, NFCI.

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

7 years agoAMDGPU: Add instruction definitions for some scratch_* instructions
Matt Arsenault [Fri, 21 Jul 2017 15:36:16 +0000 (15:36 +0000)]
AMDGPU: Add instruction definitions for some scratch_* instructions

Omit atomics for now since they probably aren't useful.

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

7 years ago[SLPVectorizer] buildTree_rec replace cast<Instruction>(VL[0]) to VL0, NFCI.
Dinar Temirbulatov [Fri, 21 Jul 2017 15:31:54 +0000 (15:31 +0000)]
[SLPVectorizer] buildTree_rec replace cast<Instruction>(VL[0]) to VL0, NFCI.

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

7 years ago[mips] Enable IAS by default for Android MIPS64
Petar Jovanovic [Fri, 21 Jul 2017 14:25:42 +0000 (14:25 +0000)]
[mips] Enable IAS by default for Android MIPS64

Follow up to r306280 in Clang.
Enable IAS by default for Android MIPS64 (uses N64 ABI).

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

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

7 years ago[AMDGPU][MC][GFX9] Added support of VOP3 'op_sel' modifier
Dmitry Preobrazhensky [Fri, 21 Jul 2017 13:54:11 +0000 (13:54 +0000)]
[AMDGPU][MC][GFX9] Added support of VOP3 'op_sel' modifier

See bug 33591: https://bugs.llvm.org//show_bug.cgi?id=33591

Reviewers: vpykhtin, artem.tamazov, SamWot, arsenm

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

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

7 years ago[SLPVectorizer] Change canReuseExtract function parameter Opcode from unsigned to...
Dinar Temirbulatov [Fri, 21 Jul 2017 13:32:36 +0000 (13:32 +0000)]
[SLPVectorizer] Change canReuseExtract function parameter Opcode from unsigned to Value *, NFCI.

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

7 years ago[SystemZ] test update
Jonas Paulsson [Fri, 21 Jul 2017 13:14:17 +0000 (13:14 +0000)]
[SystemZ]  test update

test/CodeGen/SystemZ/loop-01.ll was incorrectly updated by r308729.

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

7 years ago[SystemZ, LoopStrengthReduce]
Jonas Paulsson [Fri, 21 Jul 2017 11:59:37 +0000 (11:59 +0000)]
[SystemZ, LoopStrengthReduce]

This patch makes LSR generate better code for SystemZ in the cases of memory
intrinsics, Load->Store pairs or comparison of immediate with memory.

In order to achieve this, the following common code changes were made:

 * New TTI hook: LSRWithInstrQueries(), which defaults to false. Controls if
 LSR should do instruction-based addressing evaluations by calling
 isLegalAddressingMode() with the Instruction pointers.
 * In LoopStrengthReduce: handle address operands of memset, memmove and memcpy
 as address uses, and call isFoldableMemAccessOffset() for any LSRUse::Address,
 not just loads or stores.

SystemZ changes:

 * isLSRCostLess() implemented with Insns first, and without ImmCost.
 * New function supportedAddressingMode() that is a helper for TTI methods
 looking at Instructions passed via pointers.

Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D35262
https://reviews.llvm.org/D35049

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

7 years ago[X86][SSE] Add extra (sra (sra x, c1), c2) -> (sra x, (add c1, c2)) test case
Simon Pilgrim [Fri, 21 Jul 2017 10:22:49 +0000 (10:22 +0000)]
[X86][SSE] Add extra (sra (sra x, c1), c2) -> (sra x, (add c1, c2)) test case

We should be able to handle the case where some c1+c2 elements exceed max shift and some don't by performing a clamp after the sum

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

7 years ago[X86][SSE] Add pre-AVX2 support for (i32 bitcast(v32i1)) -> 2xMOVMSK
Simon Pilgrim [Fri, 21 Jul 2017 09:58:50 +0000 (09:58 +0000)]
[X86][SSE] Add pre-AVX2 support for (i32 bitcast(v32i1)) -> 2xMOVMSK

Currently we only support (i32 bitcast(v32i1)) using the AVX2 VPMOVMSKB ymm instruction.

This patch adds support for splitting pre-AVX2 targets into 2 x (V)PMOVMSKB xmm instructions and merging the integer results.

In future we could probably generalize this to handle more cases.

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

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

7 years agoCommit access test
Philipp Schaad [Fri, 21 Jul 2017 03:51:01 +0000 (03:51 +0000)]
Commit access test

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

7 years agoOnly use xml if iconv is found, which is a prerequisite.
Eric Beckmann [Fri, 21 Jul 2017 02:13:02 +0000 (02:13 +0000)]
Only use xml if iconv is found, which is a prerequisite.

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

7 years agodsymutil: strip unused types from imported DW_TAG_modules
Adrian Prantl [Fri, 21 Jul 2017 02:07:33 +0000 (02:07 +0000)]
dsymutil: strip unused types from imported DW_TAG_modules

This patch teaches dsymutil to strip types from the imported
DW_TAG_module inside of an object file (not inside the PCM) if they
can be resolved to the full definition inside the PCM. This reduces
the size of the .dSYM from WebCore from webkit.org by almost 2/3.

<rdar://problem/33047213>

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

7 years agoDebug Info: Don't strip clang module skeleton CUs.
Adrian Prantl [Fri, 21 Jul 2017 01:24:05 +0000 (01:24 +0000)]
Debug Info: Don't strip clang module skeleton CUs.

This corrects a (hopefully :-) accidental side-effect of r304020.

rdar://problem/33442618

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

7 years ago[DWARF] Generalized verification of .debug_abbrev to be applicable to both .debug_abb...
Spyridoula Gravani [Fri, 21 Jul 2017 00:51:32 +0000 (00:51 +0000)]
[DWARF] Generalized verification of .debug_abbrev to be applicable to both .debug_abbrev and .debug_abbrev.dwo sections.

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

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

7 years ago[AVX-512] Fix a bug that prevented some non-temporal loads from using the movntdqa...
Craig Topper [Fri, 21 Jul 2017 00:40:42 +0000 (00:40 +0000)]
[AVX-512] Fix a bug that prevented some non-temporal loads from using the movntdqa instruction.

The bitconverts here had an input type of 128-bits and an output type of 256 bits. The input type should also have been 256 bits.

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

7 years agoExplicitly disable libxml2 on android.
Eric Beckmann [Thu, 20 Jul 2017 23:54:51 +0000 (23:54 +0000)]
Explicitly disable libxml2 on android.

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

7 years agoGenerate a compile_commands.json DB for external projects.
George Karpenkov [Thu, 20 Jul 2017 23:46:46 +0000 (23:46 +0000)]
Generate a compile_commands.json DB for external projects.

compile_commands.json file is very useful both for tooling and for
reproducible builds.
For files generated from recursive CMake invocation this information was
not previously generated.

Differential Review: https://reviews.llvm.org/D35219

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

7 years ago[AArch64] Adjust the cost model for Exynos M1 and M2
Evandro Menezes [Thu, 20 Jul 2017 23:41:50 +0000 (23:41 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2

Add the cost for the EXT instructions and explicitly add the cost for a few
instructions that were implied by the coarse model.

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

7 years agoOnly defined CombinedRoot if libxml2 is used.
Eric Beckmann [Thu, 20 Jul 2017 23:14:12 +0000 (23:14 +0000)]
Only defined CombinedRoot if libxml2 is used.

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

7 years agoAdd error handling to the dyld compact export entries in libObject.
Kevin Enderby [Thu, 20 Jul 2017 23:08:41 +0000 (23:08 +0000)]
Add error handling to the dyld compact export entries in libObject.

lld needs a matching change for this will be my next commit.
Expect it to fail build until that matching commit is picked up by the bots.

Like the changes in r296527 for dyld bind entires and the changes in
r298883 for lazy bind, weak bind and rebase entries the export
entries are the last of the dyld compact info to have error handling added.

This follows the model of iterators that can fail that Lang Hanes
designed when fixing the problem for bad archives r275316 (or r275361).

So that iterating through the exports now terminates if there is an error
and returns an llvm::Error with an error message in all cases for malformed
input.

This change provides the plumbing for the error handling, all the needed
testing of error conditions and test cases for all of the unique error messages.

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

7 years agoOnly enable libxml2 on linux, because systems like android lack libiconv
Eric Beckmann [Thu, 20 Jul 2017 23:02:49 +0000 (23:02 +0000)]
Only enable libxml2 on linux, because systems like android lack libiconv

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

7 years agoRecommit: GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.
Tim Northover [Thu, 20 Jul 2017 22:58:38 +0000 (22:58 +0000)]
Recommit: GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.

It revealed a bug in the Localizer pass which has now been fixed.

This includes the fix for SUBREG_TO_REG committed separately last time.

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

7 years agoGlobalISel: stop localizer putting constants before EH_LABELs
Tim Northover [Thu, 20 Jul 2017 22:58:26 +0000 (22:58 +0000)]
GlobalISel: stop localizer putting constants before EH_LABELs

If the localizer pass puts one of its constants before the label that tells the
unwinder "jump here to handle your exception" then control-flow will skip it,
leaving uninitialized registers at runtime. That's bad.

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

7 years agoMake a file end with n and remove trailing whitespace.
Rui Ueyama [Thu, 20 Jul 2017 22:39:20 +0000 (22:39 +0000)]
Make a file end with n and remove trailing whitespace.

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

7 years agoMake tests always depend on llvm-mt, because some tests are run even w/o
Eric Beckmann [Thu, 20 Jul 2017 22:13:16 +0000 (22:13 +0000)]
Make tests always depend on llvm-mt, because some tests are run even w/o
xml2.

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

7 years agoImplement parsing and writing of a single xml manifest file.
Eric Beckmann [Thu, 20 Jul 2017 21:42:04 +0000 (21:42 +0000)]
Implement parsing and writing of a single xml manifest file.

Summary: Implement parsing and writing of a single xml manifest file.

Subscribers: mgorny, llvm-commits, hiraditya

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

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

7 years ago[NVPTX] Add lowering of i128 params.
Artem Belevich [Thu, 20 Jul 2017 21:16:03 +0000 (21:16 +0000)]
[NVPTX] Add lowering of i128 params.

The patch adds support of i128 params lowering. The changes are quite trivial to
support i128 as a "special case" of integer type. With this patch, we lower i128
params the same way as aggregates of size 16 bytes: .param .b8 _ [16].

Currently, NVPTX can't deal with the 128 bit integers:
* in some cases because of failed assertions like
  ValVTs.size() == OutVals.size() && "Bad return value decomposition"
* in other cases emitting PTX with .i128 or .u128 types (which are not valid [1])
  [1] http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#fundamental-types

Differential Revision: https://reviews.llvm.org/D34555
Patch by: Denys Zariaiev (denys.zariaiev@gmail.com)

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

7 years agoAMDGPU: Rename _RTN atomic instructions
Matt Arsenault [Thu, 20 Jul 2017 21:06:04 +0000 (21:06 +0000)]
AMDGPU: Rename _RTN atomic instructions

Move the _RTN to the end of the name. It reads
better if the other addressing mode components
line up with the non-RTN version. It is also
more convenient to define saddr variants of
FLAT atomics to have the RTN last, and it is
good to have a consistent naming scheme.

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

7 years agoAdd an ID field to StackObjects
Matt Arsenault [Thu, 20 Jul 2017 21:03:45 +0000 (21:03 +0000)]
Add an ID field to StackObjects

On AMDGPU SGPR spills are really spilled to another register.
The spiller creates the spills to new frame index objects,
which is used as a placeholder.

This will eventually be replaced with a reference to a position
in a VGPR to write to and the frame index deleted. It is
most likely not a real stack location that can be shared
with another stack object.

This is a problem when StackSlotColoring decides it should
combine a frame index used for a normal VGPR spill with
a real stack location and a frame index used for an SGPR.

Add an ID field so that StackSlotColoring has a way
of knowing the different frame index types are
incompatible.

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

7 years ago[X86] Adding ISel tests for strided-shuffles with non-zero offset. NFC.
Zvi Rackover [Thu, 20 Jul 2017 21:03:36 +0000 (21:03 +0000)]
[X86] Adding ISel tests for strided-shuffles with non-zero offset. NFC.

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

7 years agoChanged EOL back to LF. NFC.
Artem Belevich [Thu, 20 Jul 2017 20:57:51 +0000 (20:57 +0000)]
Changed EOL back to LF. NFC.

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

7 years agoGenerate error reports when a fuzz target exits.
Matt Morehouse [Thu, 20 Jul 2017 20:43:39 +0000 (20:43 +0000)]
Generate error reports when a fuzz target exits.

Summary:
Implements https://github.com/google/sanitizers/issues/835.

Flush stdout before exiting in test cases.

Since the atexit hook is used for exit reports, pending prints to
stdout can be lost if they aren't flushed before calling exit().

Expect tests to have non-zero exit code if exit() is called.

Reviewers: vitalybuka, kcc

Reviewed By: kcc

Subscribers: eraman, llvm-commits, hiraditya

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

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

7 years ago[PGO] Move the PGOInstrumentation pass to new OptRemark API.
Davide Italiano [Thu, 20 Jul 2017 20:43:05 +0000 (20:43 +0000)]
[PGO] Move the PGOInstrumentation pass to new OptRemark API.

This fixes PR33791.

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

7 years ago[PEI] Fix refactoring from r308664
Francis Visoiu Mistrih [Thu, 20 Jul 2017 20:31:44 +0000 (20:31 +0000)]
[PEI] Fix refactoring from r308664

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

7 years ago[COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF
Mandeep Singh Grang [Thu, 20 Jul 2017 20:20:00 +0000 (20:20 +0000)]
[COFF, ARM64, CodeView] Add support to emit CodeView debug info for ARM64 COFF

Reviewers: compnerd, ruiu, rnk, zturner

Reviewed By: rnk

Subscribers: majnemer, aemerson, aprantl, javed.absar, kristof.beyls, llvm-commits

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

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

7 years ago[PEI] Separate saving and restoring CSRs into different functions. NFC
Francis Visoiu Mistrih [Thu, 20 Jul 2017 20:17:17 +0000 (20:17 +0000)]
[PEI] Separate saving and restoring CSRs into different functions. NFC

Split insertCSRSpillsAndRestores into insertCSRSaves + insertCSRRestores.

This is mostly useful for future shrink-wrapping improvements where we
want to save / restore a specific part of the CSRs in a specific block.

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

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

7 years ago[libFuzzer] delete stale code
Kostya Serebryany [Thu, 20 Jul 2017 20:15:13 +0000 (20:15 +0000)]
[libFuzzer] delete stale code

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

7 years ago[SPARC] Clean up the support for disabling fsmuld and fmuls instructions.
James Y Knight [Thu, 20 Jul 2017 20:09:11 +0000 (20:09 +0000)]
[SPARC] Clean up the support for disabling fsmuld and fmuls instructions.

Summary:
Also enable no-fsmuld for sparcv7 (which doesn't have the
instruction).

The previous code which used a post-processing pass to do this was
unnecessary; disabling the instruction is entirely sufficient.

Reviewers: jacob_hansen, ekedaigle

Subscribers: llvm-commits

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

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

7 years agoImplement LaneBitmask::getNumLanes and LaneBitmask::getHighestLane
Krzysztof Parzyszek [Thu, 20 Jul 2017 19:43:19 +0000 (19:43 +0000)]
Implement LaneBitmask::getNumLanes and LaneBitmask::getHighestLane

This should eliminate most uses of countPopulation and Log2_32 on
the lane mask values.

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

7 years ago[X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for...
Craig Topper [Thu, 20 Jul 2017 19:29:58 +0000 (19:29 +0000)]
[X86] Allow masks with more than 6 bits set on the x << (y & mask) optimization for the 64-bit memory shifts.

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

7 years ago[X86] Add test case to demonstrate that we don't allow masks wider than 6 bits in...
Craig Topper [Thu, 20 Jul 2017 19:29:56 +0000 (19:29 +0000)]
[X86] Add test case to demonstrate that we don't allow masks wider than 6 bits in the (shift x, (and y, mask)) patterns for the 64-bit memory form.

We allow wider than 5 bits in the 16 and 32 bit store forms. And we allow wider than 6 bits on the 64-bit regsiter form.:w

I'm assuming this was a mistake made back in r148024.

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

7 years agoUse LaneBitmask::getLane in a few more places
Krzysztof Parzyszek [Thu, 20 Jul 2017 19:15:56 +0000 (19:15 +0000)]
Use LaneBitmask::getLane in a few more places

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

7 years ago[libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved...
Kostya Serebryany [Thu, 20 Jul 2017 18:53:25 +0000 (18:53 +0000)]
[libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved to the corpus

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

7 years ago[DAG] Commit missed nit cleanup from r308617. NFC.
Nirav Dave [Thu, 20 Jul 2017 18:07:57 +0000 (18:07 +0000)]
[DAG] Commit missed nit cleanup from r308617. NFC.

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

7 years agoLowerTypeTests: Drop function type metadata only if we're going to replace it.
Peter Collingbourne [Thu, 20 Jul 2017 18:02:05 +0000 (18:02 +0000)]
LowerTypeTests: Drop function type metadata only if we're going to replace it.

Previously we were (mis)handling jump table members with a prevailing
definition in a full LTO module and a non-prevailing definition in a
ThinLTO module by dropping type metadata on those functions entirely,
which would cause type tests involving such functions to fail.

This patch causes us to drop metadata only if we are about to replace
it with metadata from cfi.functions.

We also want to replace metadata for available_externally functions,
which can arise in the opposite scenario (prevailing ThinLTO
definition, non-prevailing full LTO definition). The simplest way
to handle that is to remove the definition; there's little value in
keeping it around at this point (i.e. after most optimization passes
have already run) and later code will try to use the function's linkage
to create an alias, which would result in invalid IR if the function
is available_externally.

Fixes PR33832.

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

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

7 years agoAMDGPU: Add encoding for carryless add/sub instructions
Matt Arsenault [Thu, 20 Jul 2017 17:42:47 +0000 (17:42 +0000)]
AMDGPU: Add encoding for carryless add/sub instructions

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

7 years agoAMDGPU: Add encodings for global atomics
Matt Arsenault [Thu, 20 Jul 2017 17:31:56 +0000 (17:31 +0000)]
AMDGPU: Add encodings for global atomics

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

7 years agoRemove unnecessary prefix from comment lines in a .test file.
David Blaikie [Thu, 20 Jul 2017 17:20:36 +0000 (17:20 +0000)]
Remove unnecessary prefix from comment lines in a .test file.

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

7 years agorevert: [llvm] r308609 - This patch added some test cases to demonsrate the issues...
Simon Pilgrim [Thu, 20 Jul 2017 15:17:15 +0000 (15:17 +0000)]
revert: [llvm] r308609 - This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation.

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

7 years ago[DAG] Handle missing transform in fold of value extension case.
Nirav Dave [Thu, 20 Jul 2017 13:57:32 +0000 (13:57 +0000)]
[DAG] Handle missing transform in fold of value extension case.

Summary:
When pushing an extension of a constant bitwise operator on a load
into the load, change other uses of the load value if they exist to
prevent the old load from persisting.

Reviewers: spatel, RKSimon, efriedma

Subscribers: llvm-commits

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

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

7 years ago[DAG] Optimize away degenerate INSERT_VECTOR_ELT nodes.
Nirav Dave [Thu, 20 Jul 2017 13:48:17 +0000 (13:48 +0000)]
[DAG] Optimize away degenerate INSERT_VECTOR_ELT nodes.

Summary:
Add missing vector write of vector read reduction, i.e.:

(insert_vector_elt x (extract_vector_elt x idx) idx) to x

Reviewers: spatel, RKSimon, efriedma

Reviewed By: RKSimon

Subscribers: llvm-commits

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

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

7 years ago[globalisel][tablegen] Fix an unintended fallthrough that is currently unreachable...
Daniel Sanders [Thu, 20 Jul 2017 13:10:17 +0000 (13:10 +0000)]
[globalisel][tablegen] Fix an unintended fallthrough that is currently unreachable. NFC

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

7 years agoReland r308585
Stefan Maksimovic [Thu, 20 Jul 2017 13:08:18 +0000 (13:08 +0000)]
Reland r308585

Builder clang-x86_64-linux-abi-test apparently failed due
to a spurious error unrelated to the changes r308585
introduced.

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

7 years ago[X86][AVX512] Improve vector rotation constant folding tests
Simon Pilgrim [Thu, 20 Jul 2017 13:07:37 +0000 (13:07 +0000)]
[X86][AVX512] Improve vector rotation constant folding tests

Test constant folding both on node creation (which already works) and once the input nodes have been folded themselves (not working yet).

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

7 years agoThis patch added some test cases to demonsrate the issues described in Bug 33848...
Andrew V. Tischenko [Thu, 20 Jul 2017 12:46:02 +0000 (12:46 +0000)]
This patch added some test cases to demonsrate the issues described in Bug 33848 - X86 Asm does not support symbolic names inside address calculation.

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

7 years ago[ARM] Simplify ExpandPseudoInst. NFC.
Javed Absar [Thu, 20 Jul 2017 12:35:37 +0000 (12:35 +0000)]
[ARM] Simplify ExpandPseudoInst. NFC.

Remove headers not required and convert to range-loop

Reviewed by: @mcrosier
Differential Revision: https://reviews.llvm.org/D35626

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

7 years ago[mips] Support `long_call/far/near` attributes passed by front-end
Simon Atanasyan [Thu, 20 Jul 2017 12:19:26 +0000 (12:19 +0000)]
[mips] Support `long_call/far/near` attributes passed by front-end

This patch adds handling of the `long_call`, `far`, and `near`
attributes passed by front-end. The patch depends on D35479.

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

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

7 years agoRevert "GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64."
Diana Picus [Thu, 20 Jul 2017 11:36:03 +0000 (11:36 +0000)]
Revert "GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64."

This reverts commit 36c6a2ea9669bc3bb695928529a85d12d1d3e3f9 because it
broke the test-suite on the GlobalISel bot.

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

7 years ago[DAGCombiner] Match ISD::SRL non-uniform constant vectors patterns using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 11:03:30 +0000 (11:03 +0000)]
[DAGCombiner] Match ISD::SRL non-uniform constant vectors patterns using predicates.

Use predicate matchers introduced in D35492 to match more ISD::SRL constant folds

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

7 years agoRemove trailing whitespace. NFCI.
Simon Pilgrim [Thu, 20 Jul 2017 10:43:52 +0000 (10:43 +0000)]
Remove trailing whitespace. NFCI.

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

7 years ago[DAGCombiner] Match ISD::SRA non-uniform constant vectors patterns using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 10:43:05 +0000 (10:43 +0000)]
[DAGCombiner] Match ISD::SRA non-uniform constant vectors patterns using predicates.

Use predicate matchers introduced in D35492 to match more ISD::SRA constant folds

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

7 years ago[globalisel][tablegen] Fix an issue with lambdas when compiling with older GCC's
Daniel Sanders [Thu, 20 Jul 2017 10:25:00 +0000 (10:25 +0000)]
[globalisel][tablegen] Fix an issue with lambdas when compiling with older GCC's

It seems that G++ 4.8 doesn't accept the 'enum A' in code of the form:
  enum A { ... };
  const auto &F = []() -> enum A { ... };
However, it does accept:
  typedef enum { ... } A;
  const auto &F = []() -> A { ... };

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

7 years ago[DAGCombiner] Match non-uniform constant vectors using predicates.
Simon Pilgrim [Thu, 20 Jul 2017 10:13:40 +0000 (10:13 +0000)]
[DAGCombiner] Match non-uniform constant vectors using predicates.

Most combines currently recognise scalar and splat-vector constants, but not non-uniform vector constants.

This patch introduces a matching mechanism that uses predicates to check against BUILD_VECTOR of ConstantSDNode, as well as scalar ConstantSDNode cases.

I've changed a couple of predicates to demonstrate - the combine-shl changes add currently unsupported cases, while the MatchRotate replaces an existing mechanism.

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

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

7 years agoRevert r308585
Stefan Maksimovic [Thu, 20 Jul 2017 09:57:14 +0000 (09:57 +0000)]
Revert r308585

Builder clang-x86_64-linux-abi-test seems to fail after this change

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

7 years ago[globalisel][tablegen] Add control-flow to the MatchTable.
Daniel Sanders [Thu, 20 Jul 2017 09:25:44 +0000 (09:25 +0000)]
[globalisel][tablegen] Add control-flow to the MatchTable.

Summary:
This will allow us to merge the various sub-tables into a single table. This is a
compile-time saving at this point. However, this will also enable the optimization
of a table so that similar instructions can be tested together, reducing the time
spent on the matching the code.

The bulk of this patch is a mechanical conversion to the new MatchTable object
which is responsible for tracking label definitions and filling in the index of
the jump targets. It is also responsible for nicely formatting the table.

This was necessary to support the new GIM_Try opcode which takes the index to
jump to if the match should fail. This value is unknown during table
construction and is filled in during emission. To support nesting try-blocks
(although we currently don't emit tables with nested try-blocks), GIM_Reject
has been re-introduced to explicitly exit a try-block or fail the overall match
if there are no active try-blocks.

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

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

7 years ago[mips] Fix fp select machine verifier errors
Stefan Maksimovic [Thu, 20 Jul 2017 09:21:10 +0000 (09:21 +0000)]
[mips] Fix fp select machine verifier errors

Introduced FSELECT node necesary when lowering ISD::SELECT
which has i32, f64, f64 as its operands.
SEL_D instruction required that its output and first operand
of a SELECT node, which it used, have matching types.
MTC1_D64 node introduced to aid FSELECT lowering.

This fixes machine verifier errors on following tests:
CodeGen/Mips/llvm-ir/select-dbl.ll
CodeGen/Mips/llvm-ir/select-flt.ll
CodeGen/Mips/select.ll

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

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

7 years agoHandle clang-tools-extra project in docker scripts.
Ilya Biryukov [Thu, 20 Jul 2017 08:30:44 +0000 (08:30 +0000)]
Handle clang-tools-extra project in docker scripts.

Reviewers: klimek, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: llvm-commits

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

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