OSDN Git Service

android-x86/external-llvm.git
8 years ago[SLP] Make DataLayout a member variable.
Chad Rosier [Wed, 16 Mar 2016 19:48:42 +0000 (19:48 +0000)]
[SLP] Make DataLayout a member variable.

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

8 years agoRevert "[LSR] Create fewer redundant instructions."
Geoff Berry [Wed, 16 Mar 2016 19:21:47 +0000 (19:21 +0000)]
Revert "[LSR] Create fewer redundant instructions."

This reverts commit r263644.  Investigating bootstrap failures.

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

8 years agoRemoved trailing whitespace
Simon Pilgrim [Wed, 16 Mar 2016 18:37:44 +0000 (18:37 +0000)]
Removed trailing whitespace

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

8 years ago[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases
Simon Pilgrim [Wed, 16 Mar 2016 18:32:44 +0000 (18:32 +0000)]
[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases

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

8 years agoadd checks for 'unpredictable' metadata preservation
Sanjay Patel [Wed, 16 Mar 2016 18:15:34 +0000 (18:15 +0000)]
add checks for 'unpredictable' metadata preservation

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

8 years agofix function names; NFC
Sanjay Patel [Wed, 16 Mar 2016 18:00:09 +0000 (18:00 +0000)]
fix function names; NFC

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

8 years ago[msan] Add a comment with a bug link.
Evgeniy Stepanov [Wed, 16 Mar 2016 17:39:17 +0000 (17:39 +0000)]
[msan] Add a comment with a bug link.

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

8 years ago[LSR] Create fewer redundant instructions.
Geoff Berry [Wed, 16 Mar 2016 17:29:49 +0000 (17:29 +0000)]
[LSR] Create fewer redundant instructions.

Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs.  This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.

Reviewers: atrick

Subscribers: mcrosier, mzolotukhin, llvm-commits

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

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

8 years ago[X86] Regenerated + extended widened vector conversion tests
Simon Pilgrim [Wed, 16 Mar 2016 15:33:43 +0000 (15:33 +0000)]
[X86] Regenerated + extended widened vector conversion tests
- Ensure we test X86 + X64
- sitopfp / uitofp requires testing for SSE2 and SSE42 as well (part of the fix for PR26953)

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

8 years agoAMDGPU: Verify instructions in non-debug builds as well
Michel Danzer [Wed, 16 Mar 2016 09:10:42 +0000 (09:10 +0000)]
AMDGPU: Verify instructions in non-debug builds as well

And emit an error if it fails.

This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.

This is a candidate for the stable branch(es).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat
Michel Danzer [Wed, 16 Mar 2016 09:10:35 +0000 (09:10 +0000)]
AMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263626 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit...
Igor Breger [Wed, 16 Mar 2016 08:48:26 +0000 (08:48 +0000)]
AVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit vector because PCMPGT supported only for 128/256bit.

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

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

8 years ago[Bitcode] Add compatibility test for the 3.8 release
Vedant Kumar [Wed, 16 Mar 2016 05:43:03 +0000 (05:43 +0000)]
[Bitcode] Add compatibility test for the 3.8 release

Fork off compatibility.ll for the 3.8 release. The *.bc file in this
commit was produced using a Release build of the release_38 branch.

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

8 years ago[JumpThreading] See through Cast Instructions
Haicheng Wu [Wed, 16 Mar 2016 04:52:52 +0000 (04:52 +0000)]
[JumpThreading] See through Cast Instructions

To capture more jump-thread opportunity.

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

8 years ago[Support] Update Error unit test to remove implementation specific behaviour.
Lang Hames [Wed, 16 Mar 2016 01:20:54 +0000 (01:20 +0000)]
[Support] Update Error unit test to remove implementation specific behaviour.

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

8 years ago[Support] Add the 'Error' class for structured error handling.
Lang Hames [Wed, 16 Mar 2016 01:02:46 +0000 (01:02 +0000)]
[Support] Add the 'Error' class for structured error handling.

This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).

For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.

Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.

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

8 years ago[X86] Regenerated widen load tests
Simon Pilgrim [Wed, 16 Mar 2016 00:41:21 +0000 (00:41 +0000)]
[X86] Regenerated widen load tests

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

8 years ago[X86][SSE41] Additional tests for extracting zeroable shuffle elements
Simon Pilgrim [Wed, 16 Mar 2016 00:13:36 +0000 (00:13 +0000)]
[X86][SSE41] Additional tests for extracting zeroable shuffle elements

We can currently only match zeroable vector elements of the same size as the shuffle type - these tests demonstrate the problem and a solution will be shortly added in an updated D14261

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

8 years agoRevert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"
Haicheng Wu [Tue, 15 Mar 2016 23:38:47 +0000 (23:38 +0000)]
Revert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"

Not sure it handles undef properly.

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

8 years agollvm-bcanalyzer: Fix handling of attribute group entries
Justin Bogner [Tue, 15 Mar 2016 22:37:25 +0000 (22:37 +0000)]
llvm-bcanalyzer: Fix handling of attribute group entries

These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.

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

8 years agoTurn LoopLoadElimination on again
Adam Nemet [Tue, 15 Mar 2016 22:26:12 +0000 (22:26 +0000)]
Turn LoopLoadElimination on again

The latent bug that LLE exposed in the LoopVectorizer was resolved
(PR26952).

The pass can be disabled with -mllvm -enable-loop-load-elim=0

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

8 years ago[libfuzzer] speeding up corpus load
Mike Aizatsky [Tue, 15 Mar 2016 21:47:21 +0000 (21:47 +0000)]
[libfuzzer] speeding up corpus load

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

8 years agoAlso handle the new Rust pers fn to isCatchAll()
Bjorn Steinbrink [Tue, 15 Mar 2016 20:57:07 +0000 (20:57 +0000)]
Also handle the new Rust pers fn to isCatchAll()

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

8 years agoAdd Rust's personality function to the list of known personality functions
Bjorn Steinbrink [Tue, 15 Mar 2016 20:35:45 +0000 (20:35 +0000)]
Add Rust's personality function to the list of known personality functions

Reviewers: majnemer

Subscribers: llvm-commits

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

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

8 years ago[msan] Don't put module constructors in comdats.
Evgeniy Stepanov [Tue, 15 Mar 2016 20:25:47 +0000 (20:25 +0000)]
[msan] Don't put module constructors in comdats.

There is something strange going on with debug info (.eh_frame_hdr)
disappearing when msan.module_ctor are placed in comdat sections.

Moving this functionality under flag, disabled by default.

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

8 years agoAdd missing error handling in llvm-lto
Mehdi Amini [Tue, 15 Mar 2016 20:17:55 +0000 (20:17 +0000)]
Add missing error handling in llvm-lto

Annoyingly, ErrorOr allows to *not check* the error when things go
well. It will crash badly when there is an error though. It should
runtime assert when it is used without being checked!

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[ThinLTO] Record all global variable defs in the summary
Teresa Johnson [Tue, 15 Mar 2016 19:35:45 +0000 (19:35 +0000)]
[ThinLTO] Record all global variable defs in the summary

Record all variable defs with a summary record to aid in building a
complete reference graph and locating constant variable defs to import.

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

8 years ago[MIR] Add a test case for the diagnostic of a wrongly typed generic instruction
Quentin Colombet [Tue, 15 Mar 2016 18:31:29 +0000 (18:31 +0000)]
[MIR] Add a test case for the diagnostic of a wrongly typed generic instruction

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

8 years ago[AArch64] Move GlobalISel test cases into a GlobalISel subdirectory
Quentin Colombet [Tue, 15 Mar 2016 18:30:00 +0000 (18:30 +0000)]
[AArch64] Move GlobalISel test cases into a GlobalISel subdirectory

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

8 years ago[CMake] Add PACKAGE_VENDOR for customizing version output
Chris Bieneman [Tue, 15 Mar 2016 18:07:46 +0000 (18:07 +0000)]
[CMake] Add PACKAGE_VENDOR for customizing version output

Summary: This change adds a PACKAGE_VENDOR variable. When set it makes the version output more closely resemble the clang version output.

Reviewers: aprantl, bogner

Subscribers: llvm-commits

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

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

8 years ago[LV] Preserve LoopInfo when store predication is used
Adam Nemet [Tue, 15 Mar 2016 18:06:20 +0000 (18:06 +0000)]
[LV] Preserve LoopInfo when store predication is used

This was a latent bug that got exposed by the change to add LoopSimplify
as a dependence to LoopLoadElimination.  Since LoopInfo was corrupted
after LV, LoopSimplify mis-compiled nbench in the test-suite (more
details in the PR).

The problem was that when we create the blocks for predicated stores we
didn't add those to any loops.

The original testcase for store predication provides coverage for this
assuming we verify LI on the way out of LV.

Fixes PR26952.

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

8 years ago[MC] Rename TLSDESC as it's not ARM specific.
Davide Italiano [Tue, 15 Mar 2016 17:29:52 +0000 (17:29 +0000)]
[MC] Rename TLSDESC as it's not ARM specific.

Similarly to what was done for TLSCALL in r263515.

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

8 years agoAMDGPU/SI: Implement GroupStaticSize Intrinsic for Dynamic LDS
Changpeng Fang [Tue, 15 Mar 2016 17:28:44 +0000 (17:28 +0000)]
AMDGPU/SI: Implement GroupStaticSize Intrinsic for Dynamic LDS

Summary:
  Static LDS size is saved in MachineFunctionInfo::LDSSize,
We define a pseudo instruction with usesCustomInserter bit set. Then, in EmitInstrWithCustomInserter,
we replace this pseudo instruction with a mov of MachineFunctionInfo::LDSSize.

Reviewers:
    arsenm
    tstellarAMD

Subscribers
    llvm-commits, arsenm

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

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

8 years ago[llvm-readobj] Impl GNU style printing of sections and relocations
Hemant Kulkarni [Tue, 15 Mar 2016 17:25:31 +0000 (17:25 +0000)]
[llvm-readobj] Impl GNU style printing of  sections and relocations

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

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

8 years agoMyriad: Add new sparc CPU kinds.
Douglas Katzman [Tue, 15 Mar 2016 16:41:47 +0000 (16:41 +0000)]
Myriad: Add new sparc CPU kinds.

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

8 years ago[GlobalOpt] Don't look through aliases when sorting names of globals.
Benjamin Kramer [Tue, 15 Mar 2016 14:18:26 +0000 (14:18 +0000)]
[GlobalOpt] Don't look through aliases when sorting names of globals.

If both are different aliases to the same value the sorting becomes
non-deterministic as array_pod_sort is not stable.

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

8 years ago[SLP] Update comment to reflect reality. NFC.
Chad Rosier [Tue, 15 Mar 2016 13:27:58 +0000 (13:27 +0000)]
[SLP] Update comment to reflect reality. NFC.

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

8 years ago[AMDGPU] Assembler: Update SOP* tests
Nikolay Haustov [Tue, 15 Mar 2016 07:44:57 +0000 (07:44 +0000)]
[AMDGPU] Assembler: Update SOP* tests

Add VI encodings.
Reformat sopp.s to match style of other files.

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

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

8 years ago[llvm-objdump] Add support for dumping the PE TLS directory
David Majnemer [Tue, 15 Mar 2016 06:14:01 +0000 (06:14 +0000)]
[llvm-objdump] Add support for dumping the PE TLS directory

The PE TLS directory contains information about where the TLS data
resides in the image, what functions should be executed when threads are
created, etc.

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

8 years agobindings/go: reinstate TargetMachine.TargetData
Andrew Wilkins [Tue, 15 Mar 2016 05:04:06 +0000 (05:04 +0000)]
bindings/go: reinstate TargetMachine.TargetData

Summary:
LLVMGetTargetDataLayout was removed from the C API,
and then TargetMachine.TargetData was removed. Later,
LLVMCreateTargetMachineData was added to the C API,
and we now expose this via the Go API.

Reviewers: deadalnix, pcc

Subscribers: cierniak, llvm-commits, axw

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

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

8 years ago[MachO] Extend the alt_entry support for aliases added in r263521 to
Lang Hames [Tue, 15 Mar 2016 04:20:49 +0000 (04:20 +0000)]
[MachO] Extend the alt_entry support for aliases added in r263521 to
expressions of the form 'a = .' and 'a = Ltmp'.

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

8 years agoUse some braces to format this a little better.
Eric Christopher [Tue, 15 Mar 2016 03:01:31 +0000 (03:01 +0000)]
Use some braces to format this a little better.

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

8 years agoBitcodeWriter dyn_cast cleanup for r263275 (NFC)
Teresa Johnson [Tue, 15 Mar 2016 02:41:29 +0000 (02:41 +0000)]
BitcodeWriter dyn_cast cleanup for r263275 (NFC)

Address review suggestions from dblaikie: change a few dyn_cast to cast
and fold a cast into if condition.

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

8 years agoFix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
Eric Christopher [Tue, 15 Mar 2016 02:19:06 +0000 (02:19 +0000)]
Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
parentheses around '&&' within '||' [-Werror=parentheses].

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

8 years agoMove global ID computation from Function to GlobalValue (NFC)
Teresa Johnson [Tue, 15 Mar 2016 02:13:19 +0000 (02:13 +0000)]
Move global ID computation from Function to GlobalValue (NFC)

Since the static getGlobalIdentifier and getGUID methods are now called
for global values other than functions, reflect that by moving these
methods to the GlobalValue class.

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

8 years agoDenseMap: make .resize() do the intuitive thing
Fiona Glaser [Tue, 15 Mar 2016 01:50:46 +0000 (01:50 +0000)]
DenseMap: make .resize() do the intuitive thing

In some places, like InstCombine, we resize a DenseMap to fit the elements
we intend to put in it, then insert those elements (to avoid continual
reallocations as it grows). But .resize(foo) doesn't actually do what
people think; it resizes to foo buckets (which is really an
implementation detail the user of DenseMap probably shouldn't care about),
not the space required to fit foo elements. DenseMap grows if 3/4 of its
buckets are full, so this actually causes one forced reallocation every
time instead of avoiding a reallocation.

This patch makes .resize(foo) do the intuitive thing: it grows to the size
necessary to fit foo elements without new allocations.

Also include a test to verify that .resize() actually does what we think it
does.

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

8 years ago[MachO] Add MachO alt-entry directive support.
Lang Hames [Tue, 15 Mar 2016 01:43:05 +0000 (01:43 +0000)]
[MachO] Add MachO alt-entry directive support.

This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:

safe_foo:
  // check preconditions for foo
.alt_entry fast_foo
fast_foo:
  // body of foo, can assume preconditions.

The .alt_entry flag is also implicitly set on assembly aliases of the form:

a = b + C

where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.

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

8 years ago[libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build
Kostya Serebryany [Tue, 15 Mar 2016 01:28:00 +0000 (01:28 +0000)]
[libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build

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

8 years ago[StatepointLowering] Move an assertion; NFCI
Sanjoy Das [Tue, 15 Mar 2016 01:16:31 +0000 (01:16 +0000)]
[StatepointLowering] Move an assertion; NFCI

Instead of running an explicit loop over `gc.relocate` calls hanging off
of a `gc.statepoint`, assert the validity of the type of the value being
relocated in `visitRelocate`.

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

8 years ago[MC] Rename TLSCALL as it's not ARM specific.
Davide Italiano [Tue, 15 Mar 2016 00:25:22 +0000 (00:25 +0000)]
[MC] Rename TLSCALL as it's not ARM specific.

`MCSymbolRefExpr` variant kind for TLSCALL is prefixed with
_ARM_ since this is how it was originally implemented.
The X86_64 version is exactly the same so there's no reason
to create a new variant, we can just rename the existing
one to be machine-independent.
This generalization is the first step to implement support
for GNU2 TLS dialect in MC.

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

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

8 years ago[ThinLTO] Renaming of function index to module summary index (NFC)
Teresa Johnson [Tue, 15 Mar 2016 00:04:37 +0000 (00:04 +0000)]
[ThinLTO] Renaming of function index to module summary index (NFC)

(Resubmitting after fixing missing file issue)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

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

8 years agoTemporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND on
Eric Christopher [Mon, 14 Mar 2016 23:59:57 +0000 (23:59 +0000)]
Temporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND on
pre-SSE41 hardware" as it seems to be causing crashes during code
generation in halide. PR forthcoming.

This reverts commit r263303.

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

8 years ago[LoopUnroll] Respect the convergent attribute.
Justin Lebar [Mon, 14 Mar 2016 23:15:34 +0000 (23:15 +0000)]
[LoopUnroll] Respect the convergent attribute.

Summary:
Specifically, when we perform runtime loop unrolling of a loop that
contains a convergent op, we can only unroll k times, where k divides
the loop trip multiple.

Without this change, we'll happily unroll e.g. the following loop

  for (int i = 0; i < N; ++i) {
    if (i == 0) convergent_op();
    foo();
  }

into

  int i = 0;
  if (N % 2 == 1) {
    convergent_op();
    foo();
    ++i;
  }
  for (; i < N - 1; i += 2) {
    if (i == 0) convergent_op();
    foo();
    foo();
  }.

This is unsafe, because we've just added a control-flow dependency to
the convergent op in the prelude.

In general, runtime unrolling loops that contain convergent ops is safe
only if we don't have emit a prelude, which occurs when the unroll count
divides the trip multiple.

Reviewers: resistor

Subscribers: llvm-commits, mzolotukhin

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

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

8 years agoMathExtrasTest.cpp: Use EXPECT_DOUBLE_EQ here, instead of EXPECT_FLOAT_EQ.
NAKAMURA Takumi [Mon, 14 Mar 2016 23:11:28 +0000 (23:11 +0000)]
MathExtrasTest.cpp: Use EXPECT_DOUBLE_EQ here, instead of EXPECT_FLOAT_EQ.

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

8 years agoObject: Add ELF types to ELFType.
Rui Ueyama [Mon, 14 Mar 2016 22:58:21 +0000 (22:58 +0000)]
Object: Add ELF types to ELFType.

These types are defined in ELFFile, so in order to use them, you have
to write ELFFile<ELFT>::SomeType. But there seems to be no reason to have
ELFFile have these types. This patch allows you to write ELFT::SomeType
instead.

This simplifies libObject users.
This is an example: http://reviews.llvm.org/D18129

http://reviews.llvm.org/D18130

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

8 years agoImporove load to store => memcpy
Amaury Sechet [Mon, 14 Mar 2016 22:52:27 +0000 (22:52 +0000)]
Imporove load to store => memcpy

Summary: This now try to reorder instructions in order to help create the optimizable pattern.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer

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

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

8 years agoRe-add ConstantFoldInstOperands form taking opcode and return type.
Manuel Jacob [Mon, 14 Mar 2016 22:34:17 +0000 (22:34 +0000)]
Re-add ConstantFoldInstOperands form taking opcode and return type.

Summary:
This form was replaced by a form taking an instruction instead of opcode and
return type in r258391.  After committing this change (and some depending,
follow-up changes) it turned out in the review thread to be controversial.  The
discussion didn't come to a conclusion yet.  I'm re-adding the old form to fix
the API regression and to provide a better base for discussion, possibly on
llvm-dev.

A difference to the original function is that it can't be called with GEPs
(similarly to how it was already the case for compares).  In order to support
opaque pointers in the future, folding GEPs needs to be passed the source
element type, which is not possible with the current API.

Reviewers: dberlin, reames

Subscribers: dblaikie, eddyb

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

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

8 years agoRemove code added for debugging purposes. NFC.
Easwaran Raman [Mon, 14 Mar 2016 22:23:28 +0000 (22:23 +0000)]
Remove code added for debugging purposes. NFC.

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

8 years agollvm-shlib: Remove the option to override __cxa_atexit
Justin Bogner [Mon, 14 Mar 2016 21:54:45 +0000 (21:54 +0000)]
llvm-shlib: Remove the option to override __cxa_atexit

If anybody is actually using this, it probably doesn't do what they
think it does. This actually causes the dylib to *export* a
__cxa_atexit symbol, so anything that links it probably loses their
exit time destructors as well as disabling LLVM's.

This just removes the option entirely. If somebody does need this
behaviour we should figure out a more principled way to do it.

This is effectively a revert of r223805.

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

8 years agollvm-config: fix --libs on Linux
Reid Kleckner [Mon, 14 Mar 2016 21:39:58 +0000 (21:39 +0000)]
llvm-config: fix --libs on Linux

Summary:
llvm-config --libs does not produce correct output since commit r260263
(llvm-config: Add preliminary Windows support) changed naming format of
the libraries. This patch updates llvm-config to recognize new naming
format and output correct linker flags.

Ref: https://llvm.org/bugs/show_bug.cgi?id=26581

Patch by Vedran Miletić

Reviewers: ehsan, rnk, pxli168

Subscribers: pxli168

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

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

8 years agoFactor out MachineBlockPlacement::fillWorkLists. NFC
Amaury Sechet [Mon, 14 Mar 2016 21:24:11 +0000 (21:24 +0000)]
Factor out MachineBlockPlacement::fillWorkLists. NFC

Summary: There are places in MachineBlockPlacement where a worklist is filled in pretty much identical way. The code is duplicated. This refactor it so that the same code is used in both scenarii.

Reviewers: chandlerc, majnemer, rafael, MatzeB, escha, silvas

Subscribers: llvm-commits

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

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

8 years agoRevert "[ThinLTO] Renaming of function index to module summary index (NFC)"
Teresa Johnson [Mon, 14 Mar 2016 21:18:10 +0000 (21:18 +0000)]
Revert "[ThinLTO] Renaming of function index to module summary index (NFC)"

This reverts commit r263490. Missed a file.

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

8 years ago[ThinLTO] Renaming of function index to module summary index (NFC)
Teresa Johnson [Mon, 14 Mar 2016 21:05:56 +0000 (21:05 +0000)]
[ThinLTO] Renaming of function index to module summary index (NFC)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

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

8 years ago[JITEventListener] Fix some -Wundef warnings
Keno Fischer [Mon, 14 Mar 2016 20:49:06 +0000 (20:49 +0000)]
[JITEventListener] Fix some -Wundef warnings

Summary:
This check was added in rL152620, and has started causing downstream warnings in Julia:
```
In file included from /home/tkelman/Julia/julia-0.5/src/codegen.cpp:22:0:
/home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:84:5: warning: "LLVM_USE_INTEL_JITEVENTS" is not defined [-Wundef]
 #if LLVM_USE_INTEL_JITEVENTS
     ^
/home/tkelman/Julia/julia-0.5/usr/include/llvm/ExecutionEngine/JITEventListener.h:100:5: warning: "LLVM_USE_OPROFILE" is not defined [-Wundef]
 #if LLVM_USE_OPROFILE
     ^
```

Patch by Tony Kelman.
Reviewers: loladiro
Differential Revision: http://reviews.llvm.org/D17254

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

8 years agoRevert "Turn LoopLoadElimination on again"
Adam Nemet [Mon, 14 Mar 2016 20:38:55 +0000 (20:38 +0000)]
Revert "Turn LoopLoadElimination on again"

This reverts commit r263472.

There is an LNT failure on clang-ppc64be-linux-lnt.  Turn this off,
while I am investigating.

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

8 years agoallow branch weight metadata on select instructions (PR26636)
Sanjay Patel [Mon, 14 Mar 2016 20:18:59 +0000 (20:18 +0000)]
allow branch weight metadata on select instructions (PR26636)

As noted in:
https://llvm.org/bugs/show_bug.cgi?id=26636

This doesn't accomplish anything on its own. It's the first step towards preserving
and using branch weights with selects.

The next step would be to make sure we're propagating the info in all of the other
places where we create selects (SimplifyCFG, InstCombine, etc). I don't think there's
an easy fix to make this happen; we have to look at each transform individually to
determine how to correctly propagate the weights.

Along with that step, we need to then use the weights when making subsequent transform
decisions such as discussed in http://reviews.llvm.org/D16836.

The inliner test is independent but closely related. It verifies that metadata is
preserved when both branches and selects are cloned.

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

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

8 years ago[attrs] Handle convergent CallSites.
Justin Lebar [Mon, 14 Mar 2016 20:18:54 +0000 (20:18 +0000)]
[attrs] Handle convergent CallSites.

Summary:
Previously we had a notion of convergent functions but not of convergent
calls.  This is insufficient to correctly analyze calls where the target
is unknown, e.g. indirect calls.

Now a call is convergent if it targets a known-convergent function, or
if it's explicitly marked as convergent.  As usual, we can remove
convergent where we can prove that no convergent operations are
performed in the call.

Originally landed as r261544, then reverted in r261544 for (incidental)
build breakage.  Re-landed here with no changes.

Reviewers: chandlerc, jingyue

Subscribers: llvm-commits, tra, jhen, hfinkel

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

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

8 years ago[docs] "Straightforward" is one word.
Justin Lebar [Mon, 14 Mar 2016 20:18:51 +0000 (20:18 +0000)]
[docs] "Straightforward" is one word.

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

8 years ago[docs] Fix typo in docs/CodeGenerator.rst.
Justin Lebar [Mon, 14 Mar 2016 20:17:08 +0000 (20:17 +0000)]
[docs] Fix typo in docs/CodeGenerator.rst.

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

8 years ago[SystemZ] Add missing isBranch flags to certain instruction
Ulrich Weigand [Mon, 14 Mar 2016 20:16:30 +0000 (20:16 +0000)]
[SystemZ] Add missing isBranch flags to certain instruction

Some instructions were missing isBranch, isCall, or isTerminator
flags.  This didn't really affect code generation since most of
the affected patterns were used only for the AsmParser and/or
disassembler.

However, it could affect tools using the MC layer to disassemble
and parse binary code (e.g. via MCInstrDesc::mayAffectControlFlow).

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

8 years ago[SLPVectorizer] Fix dependency list
Keno Fischer [Mon, 14 Mar 2016 20:04:24 +0000 (20:04 +0000)]
[SLPVectorizer] Fix dependency list

Summary:
DemandedBits was added to the requirements of SLPVectorizer in rL261212
(and various earlier version of it), but the appropriate initialization
statement was accidentally forgotten.

Ref [[ https://github.com/JuliaLang/julia/issues/14998 | JuliaLang/julia#14998 ]].

Patch by Yichao Yu.
Reviewers: mssimpso
Differential Revision: http://reviews.llvm.org/D18152

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

8 years agoReverting r263474; it turns out there are uses of the public interface, but MSVC...
Aaron Ballman [Mon, 14 Mar 2016 20:03:15 +0000 (20:03 +0000)]
Reverting r263474; it turns out there are uses of the public interface, but MSVC wasn't caring about them.

http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/21475/consoleFull#-45876453249ba4694-19c4-4d7e-bec5-911270d8a58c
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8879

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

8 years agoThe file header of TrailingObjects.h suggests that TrailingObjects be inherited priva...
Aaron Ballman [Mon, 14 Mar 2016 19:57:48 +0000 (19:57 +0000)]
The file header of TrailingObjects.h suggests that TrailingObjects be inherited privately because the public APIs it exposes are not meant as part of the interface. There's no functional change because nothing currently relied on these being inherited publicly.

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

8 years agoTurn LoopLoadElimination on again
Adam Nemet [Mon, 14 Mar 2016 19:40:25 +0000 (19:40 +0000)]
Turn LoopLoadElimination on again

The two issues that were discovered got fixed (r263058, r263173).

The pass can be disabled with -mllvm -enable-loop-load-elim=0

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

8 years ago[AliasSetTracker] Do not strip pointer casts when processing MemSetInst
Michael Kuperstein [Mon, 14 Mar 2016 18:34:29 +0000 (18:34 +0000)]
[AliasSetTracker] Do not strip pointer casts when processing MemSetInst

This fixes PR26843.

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

8 years ago[AArch64] Refactor AArch64FrameLowering::emitPrologue. NFC.
Chad Rosier [Mon, 14 Mar 2016 18:24:34 +0000 (18:24 +0000)]
[AArch64] Refactor AArch64FrameLowering::emitPrologue. NFC.

http://reviews.llvm.org/D18125
Patch by Aditya Kumar.

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

8 years ago[SpillPlacement] Fix a quadratic behavior in spill placement.
Quentin Colombet [Mon, 14 Mar 2016 18:21:25 +0000 (18:21 +0000)]
[SpillPlacement] Fix a quadratic behavior in spill placement.

The bad behavior happens when we have a function with a long linear chain of
basic blocks, and have a live range spanning most of this chain, but with very
few uses.
Let say we have only 2 uses.
The Hopfield network is only seeded with two active blocks where the uses are,
and each iteration of the outer loop in `RAGreedy::growRegion()` only adds two
new nodes to the network due to the completely linear shape of the CFG.
Meanwhile, `SpillPlacer->iterate()` visits the whole set of discovered nodes,
which adds up to a quadratic algorithm.

This is an historical accident effect from r129188.

When the Hopfield network is expanding, most of the action is happening on the
frontier where new nodes are being added. The internal nodes in the network are
not likely to be flip-flopping much, or they will at least settle down very
quickly. This means that while `SpillPlacer->iterate()` is recomputing all the
nodes in the network, it is probably only the two frontier nodes that are
changing their output.

Instead of recomputing the whole network on each iteration, we can maintain a
SparseSet of nodes that need to be updated:

- `SpillPlacement::activate()` adds the node to the todo list.
- When a node changes value (i.e., `update()` returns true), its neighbors are
  added to the todo list.
- `SpillPlacement::iterate()` only updates the nodes in the list.

The result of Hopfield iterations is not necessarily exact. It should converge
to a local minimum, but there is no guarantee that it will find a global
minimum. It is possible that updating nodes in a different order will cause us
to switch to a different local minimum. In other words, this is not NFC, but
although I saw a few runtime improvements and regressions when I benchmarked
this change, those were side effects and actually the performance change is in
the noise as expected.

Huge thanks to Jakob Stoklund Olesen <stoklund@2pi.dk> for his feedbacks,
guidance and time for the review.

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

8 years ago[AArch64] Break the dependency between FP and SP when possible.
Chad Rosier [Mon, 14 Mar 2016 18:17:41 +0000 (18:17 +0000)]
[AArch64] Break the dependency between FP and SP when possible.

When the SP in not changed because of realignment/VLAs etc., we restore the SP
by using the previous value of SP and not the FP. Breaking the dependency will
help in cases when the epilog of a callee is close to the epilog of the caller;
for then "sub sp, fp, #" depends on the load restoring the FP in the epilog of
the callee.

http://reviews.llvm.org/D18060
Patch by Aditya Kumar and Evandro Menezes.

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

8 years ago[ADT] Add a pop_back_val method to the SparseSet container.
Quentin Colombet [Mon, 14 Mar 2016 18:10:41 +0000 (18:10 +0000)]
[ADT] Add a pop_back_val method to the SparseSet container.
The next commit will use it.

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

8 years ago[Mips] Fix -Wunused-private-field warning after r263444.
Chad Rosier [Mon, 14 Mar 2016 18:10:20 +0000 (18:10 +0000)]
[Mips] Fix -Wunused-private-field warning after r263444.

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

8 years ago[DAG] use !isUndef() ; NFCI
Sanjay Patel [Mon, 14 Mar 2016 18:09:43 +0000 (18:09 +0000)]
[DAG] use !isUndef() ; NFCI

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

8 years ago[DAG] use isUndef() ; NFCI
Sanjay Patel [Mon, 14 Mar 2016 17:28:46 +0000 (17:28 +0000)]
[DAG] use isUndef() ; NFCI

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

8 years agoAMDGPU/SI: Handle wait states required for DPP instructions
Tom Stellard [Mon, 14 Mar 2016 17:05:56 +0000 (17:05 +0000)]
AMDGPU/SI: Handle wait states required for DPP instructions

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years ago[x86, AVX] replace masked load with full vector load when possible
Sanjay Patel [Mon, 14 Mar 2016 16:54:43 +0000 (16:54 +0000)]
[x86, AVX] replace masked load with full vector load when possible

Converting masked vector loads to regular vector loads for x86 AVX should always be a win.
I raised the legality issue of reading the extra memory bytes on llvm-dev. I did not see any
objections.

1. x86 already does this kind of optimization for multiple scalar loads -> vector load.
2. If other targets have the same flexibility, we could move this transform up to CGP or DAGCombiner.

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

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

8 years ago[mips] MIPS32R6 compact branch support
Daniel Sanders [Mon, 14 Mar 2016 16:24:05 +0000 (16:24 +0000)]
[mips] MIPS32R6 compact branch support

Summary:
MIPSR6 introduces a class of branches called compact branches. Unlike the
traditional MIPS branches which have a delay slot, compact branches do not
have a delay slot. The instruction following the compact branch is only
executed if the branch is not taken and must not be a branch.

It works by generating compact branches for MIPS32R6 when the delay slot
filler cannot fill a delay slot. Then, inspecting the generated code for
forbidden slot hazards (a compact branch with an adjacent branch or other
CTI) and inserting nops to clear this hazard.

Patch by Simon Dardis.

Reviewers: vkalintiris, dsanders

Subscribers: MatzeB, dsanders, llvm-commits

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

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

8 years agoAMDGPU/SI: Incomplete shader binaries need to finish execution at the end
Marek Olsak [Mon, 14 Mar 2016 15:57:14 +0000 (15:57 +0000)]
AMDGPU/SI: Incomplete shader binaries need to finish execution at the end

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU: mark llvm.amdgcn.image.atomic.* as a source of divergence
Nicolai Haehnle [Mon, 14 Mar 2016 15:37:18 +0000 (15:37 +0000)]
AMDGPU: mark llvm.amdgcn.image.atomic.* as a source of divergence

Summary:
When multiple threads perform an atomic op with the same arguments, they
will usually see different return values.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

8 years ago[mips] Use range-based for loops. NFC.
Vasileios Kalintiris [Mon, 14 Mar 2016 15:05:30 +0000 (15:05 +0000)]
[mips] Use range-based for loops. NFC.

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

8 years agoRevert "Recommitted r261633 "Supporting all entities declared in lexical scope in...
Benjamin Kramer [Mon, 14 Mar 2016 14:58:36 +0000 (14:58 +0000)]
Revert "Recommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26715 at r263379."

This reverts commit r263424. Breaks self-host.

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

8 years ago[SystemZ] Avoid LER on z13 due to partial register dependencies
Ulrich Weigand [Mon, 14 Mar 2016 13:50:03 +0000 (13:50 +0000)]
[SystemZ] Avoid LER on z13 due to partial register dependencies

On the z13, it turns out to be more efficient to access a full
floating-point register than just the upper half (as done e.g.
by the LE and LER instructions).

Current code already takes this into account when loading from
memory by using the LDE instruction in place of LE.  However,
we still generate LER, which shows the same performance issues
as LE in certain circumstances.

This patch changes the back-end to emit LDR instead of LER to
implement FP32 register-to-register copies on z13.

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

8 years ago[CVP] Replace nonnegative with positive, per Philip's request. NFC.
Chad Rosier [Mon, 14 Mar 2016 13:48:00 +0000 (13:48 +0000)]
[CVP] Replace nonnegative with positive, per Philip's request. NFC.

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

8 years ago[mips] Fix an issue with long double when function roundl is defined
Zlatko Buljan [Mon, 14 Mar 2016 12:50:23 +0000 (12:50 +0000)]
[mips] Fix an issue with long double when function roundl is defined
Differential Revision: http://reviews.llvm.org/D17760

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

8 years ago[mips] Range check uimm16_64
Daniel Sanders [Mon, 14 Mar 2016 12:44:44 +0000 (12:44 +0000)]
[mips] Range check uimm16_64

Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years agoRecommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Mon, 14 Mar 2016 12:03:20 +0000 (12:03 +0000)]
Recommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26715 at r263379.

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

8 years ago[mips] Simplify ordering of range checked immediate classes.
Daniel Sanders [Mon, 14 Mar 2016 11:46:30 +0000 (11:46 +0000)]
[mips] Simplify ordering of range checked immediate classes.

Summary:
With the addition of checks to ensure that operands have a strict ordering
it has become tricky to manage the order in the way I originally intended.

This patch linearizes the ordering which simplifies the implementation but
requires an order that is arbitrary in places. Here are some examples:
* uimm4 < uimm5 < uimm6
* simm4 < uimm4 < simm5 < uimm5
* uimm5 < uimm5_plus1 (1..32) < uimm5_plus32 (32..63) < uimm6
  The term 'superset' starts to break down here since the *_plus* classes
  are not true supersets of uimm5 (but they are still subsets of uimm6).
* uimm5 < uimm5_64, and uimm5 < vsplat_uimm5
  This is entirely arbitrary. We need an ordering and what we pick is
  unimportant since only one is possible for a given mnemonic.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years ago[AMDGPU] Assembler: SOP* instruction fixes
Nikolay Haustov [Mon, 14 Mar 2016 11:17:19 +0000 (11:17 +0000)]
[AMDGPU] Assembler: SOP* instruction fixes

s_bitset0_b64, s_bitset1_b64 has 32-bit src0, not 64-bit.
s_rfe_b64 has just one destination operand and no source.
Uncomment S_BITCMP* and S_SETVSKIP, adjust SOPC_* classes for that.
Add s_memrealtime test and change comments in smem.s to follow common style.
Change test for s_memtime to use non-zero register to make it really test encoding.
Add tests for s_buffer_load*.
Add tests for SOPC instructions (same for SI and VI)

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

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

8 years ago[mips] Range check uimm6_lsl2.
Daniel Sanders [Mon, 14 Mar 2016 11:16:56 +0000 (11:16 +0000)]
[mips] Range check uimm6_lsl2.

Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

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

8 years agoTry to fix build of WebAssemblyRegStackify.cpp on Windows
Hans Wennborg [Mon, 14 Mar 2016 11:04:15 +0000 (11:04 +0000)]
Try to fix build of WebAssemblyRegStackify.cpp on Windows

It's failing to build on VS2015 with:

C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\lib\Target\WebAssembly\WebAssemblyRegStackify.cpp(520):
error C2668: 'llvm::make_reverse_iterator': ambiguous call to overloaded function
C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(217):
note: could be 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
llvm::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(IteratorTy)'
        with
        [
            IteratorTy=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
        ]
C:\b\depot_tools\win_toolchain\vs_files\391bbf1220d3edcd3cc3fccdb56224181e3b13a7\win_sdk\bin\..\..\VC\include\xutility(1217):
note: or 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
std::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(_RanIt)' [found using argument-dependent lookup]
        with
        [
            _RanIt=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
        ]

I don't have VS2015 locally at the moment, but hopefully this will help.

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

8 years agoAVX512: icmp operation should be always lowered to CMPM (AVX-512) instruction on...
Igor Breger [Mon, 14 Mar 2016 10:26:39 +0000 (10:26 +0000)]
AVX512: icmp operation should be always lowered to CMPM (AVX-512) instruction on SKX.

implemented by delena

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

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

8 years ago[AMDGPU] AsmParser: Factor out parseRegister. NFC.
Valery Pykhtin [Mon, 14 Mar 2016 07:43:42 +0000 (07:43 +0000)]
[AMDGPU] AsmParser: Factor out parseRegister. NFC.

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