]> granicus.if.org Git - llvm/log
llvm
8 years ago[Hexagon] Handle returning small structures by value
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:30:41 +0000 (17:30 +0000)]
[Hexagon] Handle returning small structures by value

This is compliant with the official ABI, but allows experimentation with
calling conventions.

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

8 years ago[X86] Accept SELECT op code for x86-64 fp128 type
Chih-Hung Hsieh [Mon, 18 Jul 2016 17:20:09 +0000 (17:20 +0000)]
[X86] Accept SELECT op code for x86-64 fp128 type

DAGTypeLegalizer::CanSkipSoftenFloatOperand should allow
SELECT op code for x86_64 fp128 type for MME targets,
so SoftenFloatOperand does not abort on SELECT op code.

Differential Revision: http://reviews.llvm.org/D21758

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

8 years ago[MathExtras] Fix UB in minIntN
David Majnemer [Mon, 18 Jul 2016 17:03:09 +0000 (17:03 +0000)]
[MathExtras] Fix UB in minIntN

We negated a value with a signed type which invited problems when that
value was the most negative signed number.  Use an unsigned type
for the value instead.  It will compute the same twos complement
result without the UB.

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

8 years ago[LoopDist] This test does not require ASSERTS
Adam Nemet [Mon, 18 Jul 2016 16:37:32 +0000 (16:37 +0000)]
[LoopDist] This test does not require ASSERTS

Only its counterpart, diagnostics-with-hotness-lazy-BFI.ll, which
invokes opt with -debug-only=.

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

8 years ago[LoopDist] Port to new PM
Adam Nemet [Mon, 18 Jul 2016 16:29:27 +0000 (16:29 +0000)]
[LoopDist] Port to new PM

Summary:
The direct motivation for the port is to ensure that the OptRemarkEmitter
tests work with the new PM.

This remains a function pass because we not only create multiple loops
but could also version the original loop.

In the test I need to invoke opt
with -passes='require<aa>,loop-distribute'.  LoopDistribute does not
directly depend on AA however LAA does.  LAA uses getCachedResult so
I *think* we need manually pull in 'aa'.

Reviewers: davidxl, silvas

Subscribers: sanjoy, llvm-commits, mzolotukhin

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

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

8 years ago[OptRemarkEmitter] Port to new PM
Adam Nemet [Mon, 18 Jul 2016 16:29:21 +0000 (16:29 +0000)]
[OptRemarkEmitter] Port to new PM

Summary:
The main goal is to able to start using the new OptRemarkEmitter
analysis from the LoopVectorizer.  Since the vectorizer was recently
converted to the new PM, it makes sense to convert this analysis as
well.

This pass is currently tested through the LoopDistribution pass, so I am
also porting LoopDistribution to get coverage for this analysis with the
new PM.

Reviewers: davidxl, silvas

Subscribers: llvm-commits, mzolotukhin

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

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

8 years agoSort include headers
Adam Nemet [Mon, 18 Jul 2016 16:29:17 +0000 (16:29 +0000)]
Sort include headers

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

8 years ago[X86][AVX2] Added tests that demonstrate duplicate broadcasts
Simon Pilgrim [Mon, 18 Jul 2016 16:17:34 +0000 (16:17 +0000)]
[X86][AVX2] Added tests that demonstrate duplicate broadcasts

We don't yet decode broadcasts as a target shuffle

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

8 years ago[Hexagon] Misc changes to HexagonMachineScheduler, NFC
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:15:15 +0000 (16:15 +0000)]
[Hexagon] Misc changes to HexagonMachineScheduler, NFC

- Remove duplicated code.
- Convert loop to range-for.

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

8 years ago[Hexagon] Enable .cur formation in MISched for Hexagon V60
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:05:27 +0000 (16:05 +0000)]
[Hexagon] Enable .cur formation in MISched for Hexagon V60

Schedule a load and its use in the same packet in MISched. Previously,
isResourceAvailable was returning false for dependences in the same
packet, which prevented MISched from packetizing a load and its use in
the same packet for v60.

Patch by Ikhlas Ajbar.

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

8 years agoRevert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"
Alexander Kornienko [Mon, 18 Jul 2016 15:51:31 +0000 (15:51 +0000)]
Revert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"

Causes https://llvm.org/bugs/show_bug.cgi?id=28588

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

8 years ago[Hexagon] Add verbose debugging mode to Hexagon MI Scheduler
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:47:25 +0000 (15:47 +0000)]
[Hexagon] Add verbose debugging mode to Hexagon MI Scheduler

Patch by Sergei Larin.

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

8 years ago[PowerPC] Remove redundant direct moves when extracting integers and converting to FP
Nemanja Ivanovic [Mon, 18 Jul 2016 15:30:00 +0000 (15:30 +0000)]
[PowerPC] Remove redundant direct moves when extracting integers and converting to FP

This patch corresponds to review:
https://reviews.llvm.org/D21354

We use direct moves for extracting integer elements from vectors. We also use
direct moves when converting integers to FP. When these operations are chained,
we get a direct move out of a VSR followed by a direct move back into a VSR.
These are redundant - all we need to do is line up the element and convert.

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

8 years ago[MC] Cleanup Error Handling in AsmParser
Nirav Dave [Mon, 18 Jul 2016 15:24:03 +0000 (15:24 +0000)]
[MC] Cleanup Error Handling in AsmParser

Add parseToken and compatriot functions to stitch error checks in
straight linear code. As part of this fix some erronous handling of
directives where the EndOfStatement token either was not checked or
Lexed on termination.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D22312

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

8 years ago[Hexagon] Use timing class info as tie-breaker in machine scheduler
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:17:10 +0000 (15:17 +0000)]
[Hexagon] Use timing class info as tie-breaker in machine scheduler

Patch by Sirish Pande.

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

8 years ago[Hexagon] HexagonMachineScheduler should account for resources
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:52:13 +0000 (14:52 +0000)]
[Hexagon] HexagonMachineScheduler should account for resources

The machine scheduler needs to account for available resources
more accurately in order to avoid scheduling an instruction that
forces a new packet to be created.

This occurs in two ways: First, an instruction without an available
resource may have a large priority due to other metrics and be
scheduled when there are other instructions with available resources.
Second, an instruction with a non-zero latency may become available
prematurely. In both these cases, we attempt change the priority
in order to allow a better instruction to be scheduled.

Patch by Brendon Cahoon.

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

8 years ago[Hexagon] Fix zero latency instructions with multiple predecessors
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:23:10 +0000 (14:23 +0000)]
[Hexagon] Fix zero latency instructions with multiple predecessors

An instruction may have multiple predecessors that are candidates
for using .cur. However, only one of them can use .cur in the
packet. When this case occurs, we need to make sure that only
one of the dependences gets a 0 latency value.

Patch by Brendon Cahoon.

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

8 years agoFixed errors in docs.
Alexander Kornienko [Mon, 18 Jul 2016 14:13:18 +0000 (14:13 +0000)]
Fixed errors in docs.

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

8 years ago[SLPVectorizer][X86] Added sqrt vectorization tests
Simon Pilgrim [Mon, 18 Jul 2016 13:20:54 +0000 (13:20 +0000)]
[SLPVectorizer][X86] Added sqrt vectorization tests

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

8 years ago[inlineasm] Propagate operand constraints to the backend
Simon Dardis [Mon, 18 Jul 2016 13:17:31 +0000 (13:17 +0000)]
[inlineasm] Propagate operand constraints to the backend

When SelectionDAGISel transforms a node representing an inline asm
block, memory constraint information is not preserved. This can cause
constraints to be broken when a memory offset is of the form:

offset + frame index

when the frame is resolved.

By propagating the constraints all the way to the backend, targets can
enforce memory operands of inline assembly to conform to their constraints.

For MIPSR6, some instructions had their offsets reduced to 9 bits from
16 bits such as ll/sc. This becomes problematic when using inline assembly
to perform atomic operations, as an offset can generated that is too big to
encode in the instruction.

Reviewers: dsanders, vkalintris

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

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

8 years agoAMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.
Nicolai Haehnle [Mon, 18 Jul 2016 09:02:47 +0000 (09:02 +0000)]
AMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.

Summary:
The work item intrinsics are not available for the shader
calling conventions. And even if we did hook them up most
shader stages haves some extra restrictions on the amount
of available LDS.

Reviewers: tstellarAMD, arsenm

Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl

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

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

8 years ago[ARM] Update test to use CHECK-LABEL. NFCI.
Diana Picus [Mon, 18 Jul 2016 07:48:42 +0000 (07:48 +0000)]
[ARM] Update test to use CHECK-LABEL. NFCI.

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

8 years ago[ARM] Skip inline asm memory operands in DAGToDAGISel
Diana Picus [Mon, 18 Jul 2016 07:35:14 +0000 (07:35 +0000)]
[ARM] Skip inline asm memory operands in DAGToDAGISel

The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.

The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.

Fixes PR26038

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

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

8 years ago[AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.
Craig Topper [Mon, 18 Jul 2016 06:49:32 +0000 (06:49 +0000)]
[AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.

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

8 years ago[X86] Fix test checks to include leading 'v' on avx mnemonic names.
Craig Topper [Mon, 18 Jul 2016 06:49:29 +0000 (06:49 +0000)]
[X86] Fix test checks to include leading 'v' on avx mnemonic names.

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

8 years ago[ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl
Diana Picus [Mon, 18 Jul 2016 06:48:25 +0000 (06:48 +0000)]
[ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl

At higher optimization levels, we generate the libcall for DIVREM_Ix, which is
fine: aeabi_{u|i}divmod. At -O0 we generate the one for REM_Ix, which is the
default {u}mod{q|h|s|d}i3.

This commit makes sure that we don't generate REM_Ix calls for ABIs that
don't support them (i.e. where we need to use DIVREM_Ix instead). This is
achieved by bailing out of FastISel, which can't handle non-double multi-reg
returns, and letting the legalization infrastructure expand the REM_Ix calls.

It also updates the divmod-eabi.ll test to run under -O0 as well, and adds some
Windows checks to it to make sure we don't break things for it.

Fixes PR27068

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

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

8 years ago[AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:59 +0000 (06:14 +0000)]
[AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:57 +0000 (06:14 +0000)]
[X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:54 +0000 (06:14 +0000)]
[X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:50 +0000 (06:14 +0000)]
[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.
Craig Topper [Mon, 18 Jul 2016 06:14:47 +0000 (06:14 +0000)]
[X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.

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

8 years ago[X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all...
Craig Topper [Mon, 18 Jul 2016 06:14:45 +0000 (06:14 +0000)]
[X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all packed fp division instructions.

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

8 years ago[X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoads...
Craig Topper [Mon, 18 Jul 2016 06:14:43 +0000 (06:14 +0000)]
[X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoadsFromSameBasePtr.

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

8 years ago[X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.
Craig Topper [Mon, 18 Jul 2016 06:14:39 +0000 (06:14 +0000)]
[X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.

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

8 years ago[AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX...
Craig Topper [Mon, 18 Jul 2016 06:14:34 +0000 (06:14 +0000)]
[AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX is supported.

Ideally we would use VEX encoded moves instead of EVEX if the high 16 registers aren't referenced, but this a good first step.

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

8 years ago[X86] Fix 80-column violations. NFC
Craig Topper [Mon, 18 Jul 2016 06:14:26 +0000 (06:14 +0000)]
[X86] Fix 80-column violations. NFC

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

8 years ago[GVNHoist] Change the key for VNtoInsns to a pair
David Majnemer [Mon, 18 Jul 2016 06:11:37 +0000 (06:11 +0000)]
[GVNHoist] Change the key for VNtoInsns to a pair

While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers.  They _usually_ were except for
StoreInst in which case they were a hash of two different value numbers.

This leads to two observations:
- It is more difficult to debug things when the semantic contents of
  VNtoInsns changes over time.
- Using a single value number is not much cheaper, the value of
  VNtoInsns is a SmallVector.
- It is not immediately clear what the algorithm would do if there were
  hash collisions in the StoreInst case.

Using a DenseMap of std::pair sidesteps all of this.

N.B.  The changes in the test were due their sensitivity to the
iteration order of VNtoInsns which has changed.

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

8 years ago[llvm-cov] Attempt to fix a test failure on Windows
Vedant Kumar [Mon, 18 Jul 2016 04:49:42 +0000 (04:49 +0000)]
[llvm-cov] Attempt to fix a test failure on Windows

Don't make the test/tools/llvm-cov/demangle.test depend on the order in
which symbols are seen, or on the exact formatting llvm-cov emits after
a symbol is printed. This is an attempt to fix a Windows bot failure:

  http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9141

I don't know what the root cause of the failure is, or why the
showTemplateInstantiations test doesn't fail in the same way on the
Windows bots. However, this measure can't hurt, and it'll at least get
me on the blamelists again.

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

8 years agoRevert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument...
NAKAMURA Takumi [Mon, 18 Jul 2016 03:23:25 +0000 (03:23 +0000)]
Revert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute""

This reverts also r275029, "Update Clang tests after adding inference for the returned argument attribute"

It broke LTO build. Seems miscompilation.

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

8 years ago[GVNHoist] Sink HoistedCtr into GVNHoist
David Majnemer [Mon, 18 Jul 2016 00:35:01 +0000 (00:35 +0000)]
[GVNHoist] Sink HoistedCtr into GVNHoist

HoistedCtr cannot be a mutated global variable, that will open us up to
races between threads compiling code in parallel.

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

8 years ago[GVNHoist] Some small cleanups
David Majnemer [Mon, 18 Jul 2016 00:34:58 +0000 (00:34 +0000)]
[GVNHoist] Some small cleanups

No functional change is intended, just trying to clean things up a
little.

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

8 years ago[GVN] Move other PRE tests to a subdirectory.
Davide Italiano [Sun, 17 Jul 2016 23:55:20 +0000 (23:55 +0000)]
[GVN] Move other PRE tests to a subdirectory.

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

8 years ago[GVN] Move the PRE/LOADPRE test in a subdirectory.
Davide Italiano [Sun, 17 Jul 2016 23:48:18 +0000 (23:48 +0000)]
[GVN] Move the PRE/LOADPRE test in a subdirectory.

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

8 years ago[GVN] Use FileCheck instead of grep for tests.
Davide Italiano [Sun, 17 Jul 2016 23:21:26 +0000 (23:21 +0000)]
[GVN] Use FileCheck instead of grep for tests.

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

8 years agoStrip trailing whitespace
Simon Pilgrim [Sun, 17 Jul 2016 19:02:27 +0000 (19:02 +0000)]
Strip trailing whitespace

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

8 years ago[X86] Add CTPOP/CTLZ/CTTZ scalar cost tests
Simon Pilgrim [Sun, 17 Jul 2016 18:29:19 +0000 (18:29 +0000)]
[X86] Add CTPOP/CTLZ/CTTZ scalar cost tests

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

8 years agoAdd tests for max/minIntN(64).
Justin Lebar [Sun, 17 Jul 2016 18:19:28 +0000 (18:19 +0000)]
Add tests for max/minIntN(64).

Summary:
Given that we had a bug on max/minUIntN(64), these should have tests
too.

Reviewers: rnk

Subscribers: dylanmckay, llvm-commits

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

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

8 years agoAvoid UB in maxIntN(64).
Justin Lebar [Sun, 17 Jul 2016 18:19:26 +0000 (18:19 +0000)]
Avoid UB in maxIntN(64).

Summary:
Previously we were relying on 2's complement underflow in an int64_t.
Now we cast to a uint64_t so we explicitly get the behavior we want.

Reviewers: rnk

Subscribers: dylanmckay, llvm-commits

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

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

8 years agoClean up some comments in MathExtras.h.
Justin Lebar [Sun, 17 Jul 2016 18:19:25 +0000 (18:19 +0000)]
Clean up some comments in MathExtras.h.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoAdd assertions checking SignExtend{32,64}'s bit width.
Justin Lebar [Sun, 17 Jul 2016 18:19:23 +0000 (18:19 +0000)]
Add assertions checking SignExtend{32,64}'s bit width.

Summary:
The bit width must be greater than zero, otherwise we shift by the
integer's width, which is UB.  Also (more obviously) the width must be
less than or equal to the integer's width, otherwise we shift by a
negative number, which is also UB.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoFix isShiftedInt and isShiftedUint for widths > 32.
Justin Lebar [Sun, 17 Jul 2016 18:19:21 +0000 (18:19 +0000)]
Fix isShiftedInt and isShiftedUint for widths > 32.

Summary:
Previously we were doing 1 << S.  "1" is an int, so this doesn't work
when S >= 32.

This patch also adds some static_asserts to these functions to ensure
that we don't hit UB by shifting left too much.

Reviewers: rnk

Subscribers: llvm-commits, dylanmckay

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

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

8 years agoUse a faster implementation of maxUIntN.
Justin Lebar [Sun, 17 Jul 2016 18:19:19 +0000 (18:19 +0000)]
Use a faster implementation of maxUIntN.

Summary:
On x86-64 with clang 3.8, before:

   mov     edx, 1
   mov     cl, dil
   shl     rdx, cl
   cmp     rdi, 64
   mov     rax, -1
   cmovne  rax, rdx
   ret

after:

  mov     ecx, 64
  sub     ecx, edi
  mov     rax, -1
  shr     rax, cl
  ret

Reviewers: rnk

Subscribers: dylanmckay, mkuper, llvm-commits

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

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

8 years agoFix warnings in ImmutableSetTest and SequenceTest.
Justin Lebar [Sun, 17 Jul 2016 18:10:30 +0000 (18:10 +0000)]
Fix warnings in ImmutableSetTest and SequenceTest.

Doing "I++" inside of an EXPECT_* triggers

  warning: expression with side effects has no effect in an unevaluated context

because EXPECT_* partially expands to

  EqHelper<(sizeof(::testing::internal::IsNullLiteralHelper(i++)) == 1)>

which is an unevaluated context.

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

8 years ago[X86][AVX] Added VBROADCASTF128/VBROADCASTI128 tests
Simon Pilgrim [Sun, 17 Jul 2016 17:44:18 +0000 (17:44 +0000)]
[X86][AVX] Added VBROADCASTF128/VBROADCASTI128 tests

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

8 years ago[X86] Regenerated ctlz/cttz scalar tests for 32/64-bit targets with/without LZCNT...
Simon Pilgrim [Sun, 17 Jul 2016 16:15:51 +0000 (16:15 +0000)]
[X86] Regenerated ctlz/cttz scalar tests for 32/64-bit targets with/without LZCNT/TZCNT support

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

8 years ago[X86] Regenerated popcnt scalar tests for 32/64-bit targets with/without POPCNT support
Simon Pilgrim [Sun, 17 Jul 2016 16:04:19 +0000 (16:04 +0000)]
[X86] Regenerated popcnt scalar tests for 32/64-bit targets with/without POPCNT support

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

8 years ago[X86][SSE] lowerVectorShuffleAsPermuteAndUnpack tidyup. NFCI.
Simon Pilgrim [Sun, 17 Jul 2016 15:48:25 +0000 (15:48 +0000)]
[X86][SSE] lowerVectorShuffleAsPermuteAndUnpack tidyup. NFCI.

Moved unpack type determination into TryUnpack lambda.

Added missing comment describing lowerVectorShuffleAsPermuteAndUnpack call.

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

8 years ago[ThinLTO] Perform profile-guided indirect call promotion
Teresa Johnson [Sun, 17 Jul 2016 14:47:01 +0000 (14:47 +0000)]
[ThinLTO] Perform profile-guided indirect call promotion

Summary:
To enable profile-guided indirect call promotion in ThinLTO mode, we
simply add call graph edges for each profitable target from the profile
to the summaries, then the summary-guided importing will consider the
callee for importing as usual.

Also we need to enable the indirect call promotion pass creation in the
PassManagerBuilder when PerformThinLTO=true (we are in the ThinLTO
backend), so that the newly imported functions are considered for
promotion in the backends.

The IC promotion profiles refer to callees by GUID, which required
adding GUIDs to the per-module VST in bitcode (and assigning them
valueIds similar to how they are assigned valueIds in the combined
index).

Reviewers: mehdi_amini, xur

Subscribers: mehdi_amini, davidxl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21932

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

8 years agoAddress review comments.
Teresa Johnson [Sun, 17 Jul 2016 14:46:58 +0000 (14:46 +0000)]
Address review comments.

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

8 years agoRefactor indirect call promotion profitability analysis (NFC)
Teresa Johnson [Sun, 17 Jul 2016 14:46:54 +0000 (14:46 +0000)]
Refactor indirect call promotion profitability analysis (NFC)

Summary:
Refactored the profitability analysis out of the IC promotion pass and
into lib/Analysis so that it can be accessed by the summary index
builder in a follow-on patch to enable IC promotion in ThinLTO (D21932).

Reviewers: davidxl, xur

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D22182

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

8 years agotest commit
Guy Blank [Sun, 17 Jul 2016 12:10:35 +0000 (12:10 +0000)]
test commit

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

8 years agoX86: Updated a test file. NFC.
Elena Demikhovsky [Sun, 17 Jul 2016 07:03:13 +0000 (07:03 +0000)]
X86: Updated a test file. NFC.

This test shows subotimal code generated for AVX-512 vs PENTIUM4.
The issue will be fixed in an upcomming commit.

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

8 years ago[PM] Convert IVUsers analysis to new pass manager.
Dehao Chen [Sat, 16 Jul 2016 22:51:33 +0000 (22:51 +0000)]
[PM] Convert IVUsers analysis to new pass manager.

Summary: Convert IVUsers analysis to new pass manager.

Reviewers: davidxl, silvas

Subscribers: junbuml, sanjoy, llvm-commits, mzolotukhin

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

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

8 years ago[InstCombine] allow X + signbit --> X ^ signbit for vector splats
Sanjay Patel [Sat, 16 Jul 2016 18:29:26 +0000 (18:29 +0000)]
[InstCombine] allow X + signbit --> X ^ signbit for vector splats

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

8 years agoadd vector test to show missing transform
Sanjay Patel [Sat, 16 Jul 2016 18:24:18 +0000 (18:24 +0000)]
add vector test to show missing transform

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

8 years agoIPRA: avoid double query to the map (NFC)
Mehdi Amini [Sat, 16 Jul 2016 18:20:26 +0000 (18:20 +0000)]
IPRA: avoid double query to the map (NFC)

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

8 years agoupdate tests to use FileCheck, consolidate tests, fix comments
Sanjay Patel [Sat, 16 Jul 2016 18:08:22 +0000 (18:08 +0000)]
update tests to use FileCheck, consolidate tests, fix comments

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

8 years agoupdate test to use FileCheck
Sanjay Patel [Sat, 16 Jul 2016 16:31:58 +0000 (16:31 +0000)]
update test to use FileCheck

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

8 years agoauto-generate checks
Sanjay Patel [Sat, 16 Jul 2016 16:27:58 +0000 (16:27 +0000)]
auto-generate checks

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

8 years agoauto-ggenerate checks
Sanjay Patel [Sat, 16 Jul 2016 16:24:06 +0000 (16:24 +0000)]
auto-ggenerate checks

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

8 years ago[InstCombine] reassociate logic ops with constants separated by a zext
Sanjay Patel [Sat, 16 Jul 2016 15:20:19 +0000 (15:20 +0000)]
[InstCombine] reassociate logic ops with constants separated by a zext

This is a partial implementation of a general fold for associative+commutative operators:
(op (cast (op X, C2)), C1) --> (cast (op X, op (C1, C2)))
(op (cast (op X, C2)), C1) --> (op (cast X), op (C1, C2))

There are 7 associative operators and 13 cast types, so this could potentially go a lot further.

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

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

8 years agoRevert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute"
Hal Finkel [Sat, 16 Jul 2016 07:21:28 +0000 (07:21 +0000)]
Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute"

This reverts commit r275042; the initial commit triggered self-hosting failures
on ARM/AArch64. James Molloy identified the problematic backend code, which has
been disabled in r275677. Trying again...

Original commit message:

Let FuncAttrs infer the 'returned' argument attribute

A function can have one argument with the 'returned' attribute, indicating that
the associated argument is always the return value of the function. Add
FuncAttrs inference logic.

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

8 years agoDisable this-return argument forwarding on ARM/AArch64
Hal Finkel [Sat, 16 Jul 2016 07:07:29 +0000 (07:07 +0000)]
Disable this-return argument forwarding on ARM/AArch64

r275042 reverted function-attribute inference for the 'returned' attribute
because the feature triggered self-hosting failures on ARM and AArch64. James
Molloy determined that the this-return argument forwarding feature, which
directly ties the returned input argument to the returned value, was the cause.
It seems likely that this forwarding code contains, or triggers, a subtle bug.
Disabling for now until we can track that down.

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

8 years agoRe-commit [AMDGPU] Add metadata for runtime
Yaxun Liu [Sat, 16 Jul 2016 05:09:21 +0000 (05:09 +0000)]
Re-commit [AMDGPU] Add metadata for runtime

Attempting to fix lit test failure on ppc.

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

8 years ago[AVX512] Remove CodeGenOnly VBROADCAST m_Int instructions. They can be implemented...
Craig Topper [Sat, 16 Jul 2016 03:42:59 +0000 (03:42 +0000)]
[AVX512] Remove CodeGenOnly VBROADCAST m_Int instructions. They can be implemented with patterns selecting existing instructions. NFC

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

8 years agollc: Add support for -run-pass none
Matthias Braun [Sat, 16 Jul 2016 02:24:59 +0000 (02:24 +0000)]
llc: Add support for -run-pass none

This does not schedule any passes besides the ones necessary to
construct and print the machine function. This is useful to test .mir
file reading and printing.

Differential Revision: http://reviews.llvm.org/D22432

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

8 years agollc: Move pass query/add code into an own function; NFC
Matthias Braun [Sat, 16 Jul 2016 02:24:15 +0000 (02:24 +0000)]
llc: Move pass query/add code into an own function; NFC

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

8 years agoARM/MIR: Move test from MIR to CodeGen/ARM directory
Matthias Braun [Sat, 16 Jul 2016 02:24:13 +0000 (02:24 +0000)]
ARM/MIR: Move test from MIR to CodeGen/ARM directory

test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir is an actual test for the ARM
load store optimization pass and not a test of the mir parser/printer.

It belongs to test/CodeGen/ARM; This also updates the test to use the
new -run-pass llc syntax.

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

8 years agoARM: Initialize LoadStore passes in TargetMachine
Matthias Braun [Sat, 16 Jul 2016 02:24:10 +0000 (02:24 +0000)]
ARM: Initialize LoadStore passes in TargetMachine

Initializing them in LLVMInitializeARMTarget() makes them visible early
enough for "llc -run-pass usage".

This required the pass to be renamed from "arm-load-store-opt" to
"arm-ldst-opt", because there already exists an arm-load-store-opt
cl::opt switch which would now clash with the passname getting added as
a switch in opt. On the bright side the pass name now matches the
DEBUG_TYPE name. Renamed "arm-prera-load-store-opt" to
"arm-repra-ldst-opt" as well for consistency.

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

8 years agoReword comment to be more clear.
Eric Christopher [Sat, 16 Jul 2016 01:55:45 +0000 (01:55 +0000)]
Reword comment to be more clear.

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

8 years agoMIParser: reject subregister indexes on physregs
Matthias Braun [Sat, 16 Jul 2016 01:36:18 +0000 (01:36 +0000)]
MIParser: reject subregister indexes on physregs

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

8 years agoFix modules buildbot after r275633.
Richard Smith [Sat, 16 Jul 2016 01:05:39 +0000 (01:05 +0000)]
Fix modules buildbot after r275633.

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

8 years agoDon't do uint64_t(1) << 64 in maxUIntN.
Justin Lebar [Sat, 16 Jul 2016 00:59:41 +0000 (00:59 +0000)]
Don't do uint64_t(1) << 64 in maxUIntN.

Summary:
This shift is undefined behavior (and, as compiled by clang, gives the
wrong answer for maxUIntN(64)).

Reviewers: mkuper

Subscribers: llvm-commits, jroelofs, rsmith

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

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

8 years ago[libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp
Kostya Serebryany [Fri, 15 Jul 2016 23:27:19 +0000 (23:27 +0000)]
[libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp

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

8 years ago[llvm-cov] Attempt to appease an older builder
Vedant Kumar [Fri, 15 Jul 2016 23:15:35 +0000 (23:15 +0000)]
[llvm-cov] Attempt to appease an older builder

It's using a version of clang which can't (or won't) deduce an implicit
conversion from a SmallString to a StringRef. Write the conversion out
explicitly:

  http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/8574

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

8 years agobugpoint: add flag -verbose-errors
Sebastian Pop [Fri, 15 Jul 2016 23:15:06 +0000 (23:15 +0000)]
bugpoint: add flag -verbose-errors

The default behavior of bugpoint is to print "<crash>" when it finds a reduced
test that crashes compilation.  With this flag we now can see the output of the
crashing program.  This is useful to make sure it is the same error being
tracked down and not a different error that happens to crash the compiler as
well.

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

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

8 years agoReapply "Mips: Avoid implicit iterator conversions, NFC"
Duncan P. N. Exon Smith [Fri, 15 Jul 2016 23:09:47 +0000 (23:09 +0000)]
Reapply "Mips: Avoid implicit iterator conversions, NFC"

This reverts commit r275562, effectively reapplying r275141.  Doug
Gilmore reported that there was an error when bisecting the Mips
buildbot failure, and that r275141 was not to blame after all.  Here is
the green build:
https://dmz-portal.mips.com/bb/builders/LLVM%20with%20integrated%20assembler%20and%20fPIC%20and%20-O0/builds/803

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

8 years ago[llvm-cov] Attempt to appease Windows bots
Vedant Kumar [Fri, 15 Jul 2016 23:08:22 +0000 (23:08 +0000)]
[llvm-cov] Attempt to appease Windows bots

They appear to reject r275640 because stdin is held open during an
ExecuteAndWait in which it's redirected:

  http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/8390

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

8 years ago[llvm-cov] Optionally use a symbol demangler when preparing reports
Vedant Kumar [Fri, 15 Jul 2016 22:44:57 +0000 (22:44 +0000)]
[llvm-cov] Optionally use a symbol demangler when preparing reports

Add an option to specify a symbol demangler (as well as options to the
demangler). This can be used to make reports more human-readable.

This option is especially useful in -output-dir mode, since it isn't as
easy to manually pipe reports into a demangler in this mode.

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

8 years ago[llvm-cov] Document a few private fields of CodeCoverageTool (NFC)
Vedant Kumar [Fri, 15 Jul 2016 22:44:54 +0000 (22:44 +0000)]
[llvm-cov] Document a few private fields of CodeCoverageTool (NFC)

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

8 years ago[Support] Fix a doxygen comment (NFC)
Vedant Kumar [Fri, 15 Jul 2016 22:44:52 +0000 (22:44 +0000)]
[Support] Fix a doxygen comment (NFC)

There was a missing "<" on a line, so its contents wrapped around into
the description of the next argument.

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

8 years agoMinor code cleanups. NFC.
Junmo Park [Fri, 15 Jul 2016 22:42:52 +0000 (22:42 +0000)]
Minor code cleanups. NFC.

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

8 years ago[lanai] Small cleanup: remove/comment out unused args
Jacques Pienaar [Fri, 15 Jul 2016 22:38:32 +0000 (22:38 +0000)]
[lanai] Small cleanup: remove/comment out unused args

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

8 years agoAMDGPU: Fix verifier error from partially undef copy
Matt Arsenault [Fri, 15 Jul 2016 22:32:02 +0000 (22:32 +0000)]
AMDGPU: Fix verifier error from partially undef copy

In this situation:

%VGPR2<def> = BUFFER_LOAD_DWORD_OFFSET %SGPR8_SGPR9_SGPR10_SGPR11,
%VGPR7<def,tied3> = V_MAC_F32_e32 %VGPR0<undef>, %VGPR1<kill>, %VGPR7<kill,tied0>, %EXEC<imp-use>
%VGPR3_VGPR4_VGPR5_VGPR6<def> = COPY %VGPR0_VGPR1_VGPR2_VGPR3
%VGPR4<def> = COPY %VGPR2

The copy for VGPR1 -> VGPR4 was an error from reading undefined VGPR1,
but VGPR4 is defined immediately after this copy.

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

8 years agoExpandPostRAPseudos should transfer implicit uses, not only implicit defs
Michael Kuperstein [Fri, 15 Jul 2016 22:31:14 +0000 (22:31 +0000)]
ExpandPostRAPseudos should transfer implicit uses, not only implicit defs

Previously, we would expand:
%BL<def> = COPY %DL<kill>, %EBX<imp-use,kill>, %EBX<imp-def>
Into:
%BL<def> = MOV8rr %DL<kill>, %EBX<imp-def>
Dropping the imp-use on the floor.

That confused CriticalAntiDepBreaker, which (correctly) assumes that if an
instruction defs but doesn't use a register, that register is dead immediately
before the instruction - while in this case, the high lanes of EBX can be very
much alive.

This fixes PR28560.

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

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

8 years agoBPF: Use official ELF e_machine value
Alexei Starovoitov [Fri, 15 Jul 2016 22:27:55 +0000 (22:27 +0000)]
BPF: Use official ELF e_machine value

The same value for EM_BPF is being propagated to glibc,
elfutils, and binutils.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lanai] Fix build by updating calls to getLoad & getStore.
Jacques Pienaar [Fri, 15 Jul 2016 22:18:33 +0000 (22:18 +0000)]
[lanai] Fix build by updating calls to getLoad & getStore.

rL275592 removed the boolean parameters of SelectionDAG::getLoad and getStore, updating Lanai backend's calls to these functions.

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

8 years ago[pdb] Teach MsfBuilder and other classes about the Free Page Map.
Zachary Turner [Fri, 15 Jul 2016 22:17:19 +0000 (22:17 +0000)]
[pdb] Teach MsfBuilder and other classes about the Free Page Map.

Block 1 and 2 of an MSF file are bit vectors that represent the
list of blocks allocated and free in the file.  We had been using
these blocks to write stream data and other data, so we mark them
as the free page map now.  We don't yet serialize these pages to
the disk, but at least we make a note of what it is, and avoid
writing random data to them.

Doing this also necessitated cleaning up some of the tests to be
more general and hardcode fewer values, which is nice.

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

8 years ago[pdb] Round trip the NameMap data structure to YAML.
Zachary Turner [Fri, 15 Jul 2016 22:17:08 +0000 (22:17 +0000)]
[pdb] Round trip the NameMap data structure to YAML.

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

8 years ago[pdb] Use MsfBuilder to handle the writing PDBs.
Zachary Turner [Fri, 15 Jul 2016 22:16:56 +0000 (22:16 +0000)]
[pdb] Use MsfBuilder to handle the writing PDBs.

Previously we would read a PDB, then write some of it back out,
but write the directory, super block, and other pertinent metadata
back out unchanged.  This generates incorrect PDBs since the amount
of data written was not always the same as the amount of data read.

This patch changes things to use the newly introduced `MsfBuilder`
class to write out a correct and accurate set of Msf metadata for
the data *actually* written, which opens up the door for adding and
removing type records, symbol records, and other types of data to
an existing PDB.

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