oota-llvm.git
8 years agoMerging r257905:
Hans Wennborg [Tue, 19 Jan 2016 17:28:24 +0000 (17:28 +0000)]
Merging r257905:
------------------------------------------------------------------------
r257905 | hans | 2016-01-15 09:04:45 -0800 (Fri, 15 Jan 2016) | 3 lines

test-release.sh: Fix clang-tools-extra symlink for CMake build

The CMake and Autoconf builds want the symlink set up differently.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258146 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257791:
Hans Wennborg [Thu, 14 Jan 2016 23:24:17 +0000 (23:24 +0000)]
Merging r257791:
------------------------------------------------------------------------
r257791 | hans | 2016-01-14 11:21:14 -0800 (Thu, 14 Jan 2016) | 4 lines

Exclude test-suite from CMake builds in test-release.sh

It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
so we're not losing something we had before.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257836 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257730:
Hans Wennborg [Thu, 14 Jan 2016 17:52:28 +0000 (17:52 +0000)]
Merging r257730:
------------------------------------------------------------------------
r257730 | majnemer | 2016-01-13 17:20:03 -0800 (Wed, 13 Jan 2016) | 11 lines

[X86] Don't alter HasOpaqueSPAdjustment after we've relied on it

We rely on HasOpaqueSPAdjustment not changing after we've calculated
things based on it.  Things like whether or not we can use 'rep;movs' to
copy bytes around, that sort of thing.  If it changes, invariants in the
backend will quietly break.  This situation arose when we had a call to
memcpy *and* a COPY of the FLAGS register where we would attempt to
reference local variables using %esi, a register that was clobbered by
the 'rep;movs'.

This fixes PR26124.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257779 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes.rst: a few entries from Rafael
Hans Wennborg [Thu, 14 Jan 2016 00:23:32 +0000 (00:23 +0000)]
ReleaseNotes.rst: a few entries from Rafael

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257725 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257648:
Hans Wennborg [Wed, 13 Jan 2016 21:18:59 +0000 (21:18 +0000)]
Merging r257648:
------------------------------------------------------------------------
r257648 | hans | 2016-01-13 10:59:45 -0800 (Wed, 13 Jan 2016) | 1 line

Fix struct/class mismatch for MachineSchedContext
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257668 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257645:
Dimitry Andric [Wed, 13 Jan 2016 19:37:51 +0000 (19:37 +0000)]
Merging r257645:
------------------------------------------------------------------------
r257645 | dim | 2016-01-13 19:29:46 +0100 (Wed, 13 Jan 2016) | 22 lines

Avoid undefined behavior in LinkAllPasses.h

The LinkAllPasses.h file is included in several main programs, to force
a large number of passes to be linked in.  However, the ForcePassLinking
constructor uses undefined behavior, since it calls member functions on
`nullptr`, e.g.:

      ((llvm::Function*)nullptr)->viewCFGOnly();
      llvm::RGPassManager RGM;
      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);

When the optimization level is -O2 or higher, the code below the first
nullptr dereference is optimized away, and replaced by `ud2` (on x86).

Therefore, the calls after that first dereference are never emitted.  In
my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!

Replace instances of dereferencing `nullptr` with either objects on the
stack, or regular function calls.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257660 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDrop 'svn' suffix from version.
Hans Wennborg [Wed, 13 Jan 2016 19:03:44 +0000 (19:03 +0000)]
Drop 'svn' suffix from version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257651 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCreating release_38 branch off revision 257626
Hans Wennborg [Wed, 13 Jan 2016 17:34:56 +0000 (17:34 +0000)]
Creating release_38 branch off revision 257626

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257630 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 17:23:52 +0000 (17:23 +0000)]
fix typo

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

8 years agoAMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled
Marek Olsak [Wed, 13 Jan 2016 17:23:20 +0000 (17:23 +0000)]
AMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr
Marek Olsak [Wed, 13 Jan 2016 17:23:15 +0000 (17:23 +0000)]
AMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr

Reviewers: tstellarAMD, arsenm

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

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

8 years agoAMDGPU/SI: Remove ending s_endpgm from non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:12 +0000 (17:23 +0000)]
AMDGPU/SI: Remove ending s_endpgm from non-void functions

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add s_waitcnt at the end of non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:09 +0000 (17:23 +0000)]
AMDGPU/SI: Add s_waitcnt at the end of non-void functions

Summary:
v2: Make ReturnsVoid private, so that I can another 8 lines of code and
    look more productive.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add support for non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:04 +0000 (17:23 +0000)]
AMDGPU/SI: Add support for non-void functions

Summary:
Return values can be stored in SGPRs (i32) and VGPRs (f32).

This will be used by functions which expect some bytecode or other binary to
be appended at the end. It allows defining in which registers the return
values will be stored.

v2: don't do this for compute shaders

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years ago[WebAssemly] Invalidate liveness in CFG stackifier
Derek Schuff [Wed, 13 Jan 2016 17:10:28 +0000 (17:10 +0000)]
[WebAssemly] Invalidate liveness in CFG stackifier

WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
verifier failure if liveness has not already been invalidated.

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:46:41 +0000 (16:46 +0000)]
fix typo

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

8 years ago[lit] Fix handling of per test timeout when the installed psutil version
Dan Liew [Wed, 13 Jan 2016 16:43:49 +0000 (16:43 +0000)]
[lit] Fix handling of per test timeout when the installed psutil version
is < ``2.0``.

Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
Ubuntu 14.04) use a different API for retrieving the child processes.
To handle this try the new API first and if that fails try the old API.

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:34:10 +0000 (16:34 +0000)]
fix typo

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:30:44 +0000 (16:30 +0000)]
fix typo

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

8 years agoAMDGPU/SI: Add SI Machine Scheduler
Nicolai Haehnle [Wed, 13 Jan 2016 16:10:10 +0000 (16:10 +0000)]
AMDGPU/SI: Add SI Machine Scheduler

Summary:
It is off by default, but can be used
with --misched=si

Patch by: Axel Davy

Reviewers: arsenm, tstellarAMD, nhaehnle

Subscribers: nhaehnle, solenskiner, arsenm, llvm-commits

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

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

8 years agoFixing warning by adding the X86ISD::VROTRI case.
Michael Zuckerman [Wed, 13 Jan 2016 15:48:42 +0000 (15:48 +0000)]
Fixing warning by adding the X86ISD::VROTRI case.

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

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

8 years ago[Hexagon] Do not insert non-phis before phis in bit simplification
Krzysztof Parzyszek [Wed, 13 Jan 2016 15:48:18 +0000 (15:48 +0000)]
[Hexagon] Do not insert non-phis before phis in bit simplification

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

8 years ago[AVX512] Adding PMOVSXBD/W/Q , PMOVZSDQ and PMOVZSWD/Q Intrinsics .
Michael Zuckerman [Wed, 13 Jan 2016 14:59:19 +0000 (14:59 +0000)]
[AVX512] Adding PMOVSXBD/W/Q , PMOVZSDQ and PMOVZSWD/Q Intrinsics .

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

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

8 years ago[AVX512] Adding PMOVZXBD/W/Q , PMOVZXDQ and PMOVZXWD/Q Intrinsics
Michael Zuckerman [Wed, 13 Jan 2016 14:25:21 +0000 (14:25 +0000)]
[AVX512] Adding PMOVZXBD/W/Q , PMOVZXDQ and PMOVZXWD/Q Intrinsics

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

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

8 years ago[PowerPC] Fix large code model with the ELFv2 ABI
Ulrich Weigand [Wed, 13 Jan 2016 13:12:23 +0000 (13:12 +0000)]
[PowerPC] Fix large code model with the ELFv2 ABI

The global entry point prologue currently assumes that the TOC
associated with a function is less than 2GB away from the function
entry point.  This is always true when using the medium or small
code model, but may not be the case when using the large code model.

This patch adds a new variant of the ELFv2 global entry point prologue
that lifts the 2GB restriction when building with -mcmodel=large.
This works by emitting a quadword containing the distance from the
function entry point to its associated TOC immediately before the
entry point, and then using a prologue like:

ld r2,-8(r12)
add r2,r2,r12

Since creation of the entry point prologue is now split across two
separate routines (PPCLinuxAsmPrinter::EmitFunctionEntryLabel emits
the data word, PPCLinuxAsmPrinter::EmitFunctionBodyStart the prolog
code), I've switched to using named labels instead of just temporaries
to indicate the locations of the global and local entry points and the
new TOC offset data word.

These names are provided by new routines in PPCFunctionInfo modeled
after the existing PPCFunctionInfo::getPICOffsetSymbol.

Note that a corresponding change was committed to GCC here:
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00355.html

Reviewers: hfinkel

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

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

8 years ago[AVX512] adding PRORQ , PRORD , PRORLVQ and PRORLVD Intrinsics
Michael Zuckerman [Wed, 13 Jan 2016 12:39:33 +0000 (12:39 +0000)]
[AVX512] adding PRORQ , PRORD , PRORLVQ and PRORLVD Intrinsics

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

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

8 years agoAMDGPU/SI: Allow more shader inputs
Marek Olsak [Wed, 13 Jan 2016 11:46:48 +0000 (11:46 +0000)]
AMDGPU/SI: Allow more shader inputs

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Allow any number of PS inputs
Marek Olsak [Wed, 13 Jan 2016 11:46:10 +0000 (11:46 +0000)]
AMDGPU/SI: Allow any number of PS inputs

Summary:
With the ability to concatenate shader binaries, the limit of 15 no longer
applies.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add new target attribute InitialPSInputAddr
Marek Olsak [Wed, 13 Jan 2016 11:45:36 +0000 (11:45 +0000)]
AMDGPU/SI: Add new target attribute InitialPSInputAddr

Summary:
This allows Mesa to pass initial SPI_PS_INPUT_ADDR to LLVM.
The register assigns VGPR locations to PS inputs, while the ENA register
determines whether or not they are loaded.

Mesa needs to set some inputs as not-movable, so that a pixel shader prolog
binary appended at the beginning can assume where some inputs are.

v2: Make PSInputAddr private, because there is never enough silly getters
    and setters for people to read.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Fix a bug in SIFoldOperands
Marek Olsak [Wed, 13 Jan 2016 11:44:29 +0000 (11:44 +0000)]
AMDGPU/SI: Fix a bug in SIFoldOperands

Summary: ret.ll will contain a test for this

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoLEA code size optimization pass (Part 2): Remove redundant LEA instructions.
Andrey Turetskiy [Wed, 13 Jan 2016 11:30:44 +0000 (11:30 +0000)]
LEA code size optimization pass (Part 2): Remove redundant LEA instructions.

Make x86 OptimizeLEAs pass remove LEA instruction if there is another LEA
(in the same basic block) which calculates address differing only be a
displacement. Works only for -Oz.

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

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

8 years agoAdd test cases that will show the bug that was fixed in r256725.
Craig Topper [Wed, 13 Jan 2016 07:53:11 +0000 (07:53 +0000)]
Add test cases that will show the bug that was fixed in r256725.

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

8 years ago[TableGen] Cleanup output formatting and add llvm_unreachables to the output the...
Craig Topper [Wed, 13 Jan 2016 07:20:13 +0000 (07:20 +0000)]
[TableGen] Cleanup output formatting and add llvm_unreachables to the output the AsmMatcher uses when it overflows the 64-bit tables. No in tree targets use this code, but I tested it with an temporarily reduced table width.

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

8 years ago[TableGen] Replace some hardcoded assumptions that the OpcodeInfo table is 64-bits...
Craig Topper [Wed, 13 Jan 2016 07:20:12 +0000 (07:20 +0000)]
[TableGen] Replace some hardcoded assumptions that the OpcodeInfo table is 64-bits for cleanliness. NFC

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

8 years ago[TableGen] Use std::remove_if instead of an n^2 loop. NFC
Craig Topper [Wed, 13 Jan 2016 07:20:10 +0000 (07:20 +0000)]
[TableGen] Use std::remove_if instead of an n^2 loop. NFC

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

8 years ago[TableGen] Fix up some stale comments in the AsmMatcher. NFC
Craig Topper [Wed, 13 Jan 2016 07:20:07 +0000 (07:20 +0000)]
[TableGen] Fix up some stale comments in the AsmMatcher. NFC

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

8 years ago[TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functio...
Craig Topper [Wed, 13 Jan 2016 07:20:05 +0000 (07:20 +0000)]
[TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC

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

8 years agoRemove extra whitespace. NFC.
Junmo Park [Wed, 13 Jan 2016 07:03:42 +0000 (07:03 +0000)]
Remove extra whitespace. NFC.

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

8 years ago[ORC] Add extra debugging output to OrcRemoteTargetServer.
Lang Hames [Wed, 13 Jan 2016 06:34:57 +0000 (06:34 +0000)]
[ORC] Add extra debugging output to OrcRemoteTargetServer.

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

8 years ago[ORC] Fix typo in debugging output.
Lang Hames [Wed, 13 Jan 2016 06:08:07 +0000 (06:08 +0000)]
[ORC] Fix typo in debugging output.

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

8 years ago[Inliner] Merge the attributes of the caller and callee functions
Akira Hatanaka [Wed, 13 Jan 2016 06:02:45 +0000 (06:02 +0000)]
[Inliner] Merge the attributes of the caller and callee functions

This patch turns off the fast-math optimization attribute on the caller
if the callee's fast-math attribute is not turned on.

For example,

- before inlining
 caller: "less-precise-fpmad"="true"
 callee: "less-precise-fpmad"="false"

- after inlining
 caller: "less-precise-fpmad"="false"

Alternatively, it's possible to block inlining if the caller's and
callee's attributes don't match. If this approach is preferable to the
one in this patch, we can discuss post-commit.

rdar://problem/19836465

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

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

8 years agoFix PointerIntPair so that it can use an enum class as its integer template argument.
Michael Gottesman [Wed, 13 Jan 2016 05:59:13 +0000 (05:59 +0000)]
Fix PointerIntPair so that it can use an enum class as its integer template argument.

Summary:
The problem here is that an enum class can not be implicitly converted to an
integer. That assumption snuck back into PointerIntPair. This commit fixes the
issue and more importantly adds some unittests to make sure that we do not break
this again.

rdar://23594806

Reviewers: gribozavr

Subscribers: llvm-commits

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

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

8 years agoDoc fix: code-quote load / store doc the same way
JF Bastien [Wed, 13 Jan 2016 04:52:26 +0000 (04:52 +0000)]
Doc fix: code-quote load / store doc the same way

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

8 years ago[SPARC] Revamp AnalyzeBranch and add ReverseBranchCondition.
James Y Knight [Wed, 13 Jan 2016 04:44:14 +0000 (04:44 +0000)]
[SPARC] Revamp AnalyzeBranch and add ReverseBranchCondition.

AnalyzeBranch on X86 (and, previously, SPARC, which implementation was
copied from X86) tries to modify the branches based on block
layout (e.g. checking isLayoutSuccessor), when AllowModify is true.

The rest of the architectures leave that up to the caller, which can
call InsertBranch, RemoveBranch, and ReverseBranchCondition as
appropriate. That appears to be the preferred way to do it nowadays.

This commit makes SPARC like the rest: replaces AnalyzeBranch with an
implementation cribbed from AArch64, and adds a ReverseBranchCondition
implementation.

Additionally, a test-case has been added (also cribbed from AArch64)
demonstrating that redundant branch sequences no longer get emitted.

E.g., it used to emit code like this:
         bne .LBB1_2
         nop
         ba .LBB1_1
         nop
 .LBB1_2:

And now emits:
        cmp %i0, 42
        be .LBB1_1
        nop

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

8 years ago[Coverage] Refactor coverage mapping reader code
Xinliang David Li [Wed, 13 Jan 2016 04:36:15 +0000 (04:36 +0000)]
[Coverage] Refactor coverage mapping reader code

(Resubmit after fixing a typo that breaks test on big endian
 machines)

In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).

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

8 years ago[llvm-readobj] Remove dead code. Add an assertion instead.
Davide Italiano [Wed, 13 Jan 2016 04:11:36 +0000 (04:11 +0000)]
[llvm-readobj] Remove dead code. Add an assertion instead.

When we arrive at the end of the function, the validation of
the object has been done already. In theory, so, we should never
arrive here with something broken as the object isn't mutated.
Practice sometimes proves theory to be wrong, so leave an assertion
instead, as suggested by David Blaikie, to catch bugs.

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

8 years agoRollback r257551 -- unexpected test failures TBI
Xinliang David Li [Wed, 13 Jan 2016 02:46:40 +0000 (02:46 +0000)]
Rollback r257551 -- unexpected test failures TBI

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

8 years agoRe-Revert r257105 (Verifier debug info changes)
Keno Fischer [Wed, 13 Jan 2016 02:31:14 +0000 (02:31 +0000)]
Re-Revert r257105 (Verifier debug info changes)

While I investigate some new buildbot failures. This was originally reapplied
as r257550 and r257558.

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

8 years ago[llvm-objdump] Use report_error() and improve error coverage.
Davide Italiano [Wed, 13 Jan 2016 02:03:31 +0000 (02:03 +0000)]
[llvm-objdump] Use report_error() and improve error coverage.

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

8 years ago[libFuzzer] make sure to update CurrentUnit when drilling
Kostya Serebryany [Wed, 13 Jan 2016 01:58:27 +0000 (01:58 +0000)]
[libFuzzer] make sure to update CurrentUnit when drilling

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

8 years agoUse utostr rather than std::to_string
Keno Fischer [Wed, 13 Jan 2016 01:26:57 +0000 (01:26 +0000)]
Use utostr rather than std::to_string

Looks like std::to_string is not available for Android. Hopefully
this fixes the bot.

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

8 years agoAsmPrinter: Fix wrong OS X versions being emitted for darwin triples
Matthias Braun [Wed, 13 Jan 2016 01:18:13 +0000 (01:18 +0000)]
AsmPrinter: Fix wrong OS X versions being emitted for darwin triples

The version numbers of the darwin kernel are different from the version
numbers of OS X, so we need adjustments if we had "*-*-darwin" triples.
Use the existing utility functions in TargetTriple for this.

Fixes rdar://22056966

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

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

8 years ago[CodeView] Mark our lines as statements, not expressions
David Majnemer [Wed, 13 Jan 2016 01:05:23 +0000 (01:05 +0000)]
[CodeView] Mark our lines as statements, not expressions

The line tables for CodeView make a distinction between expressions and
statements.  As it turns out, MSVC always emits them as statements and
we always emit them as expressions.  Let's switch to statements to match
the CodeView that they emit.

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

8 years ago[CodeView] Improve the line table dumper
David Majnemer [Wed, 13 Jan 2016 01:05:16 +0000 (01:05 +0000)]
[CodeView] Improve the line table dumper

This change has us print out fields we didn't previously understand.  To
improve readability, we now group column information with it's
respective line.

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

8 years ago[Coverage] Refactor coverage mapping reader code /NFC
Xinliang David Li [Wed, 13 Jan 2016 00:53:46 +0000 (00:53 +0000)]
[Coverage] Refactor coverage mapping reader code /NFC

(Resubmit after fixing build bot failures)

In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).

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

8 years agoReapply r257105 "[Verifier] Check that debug values have proper size"
Keno Fischer [Wed, 13 Jan 2016 00:31:44 +0000 (00:31 +0000)]
Reapply r257105 "[Verifier] Check that debug values have proper size"

The follow extra changes were made to test cases:

Manually making the variable be the actual type instead of a pointer
to avoid pointer-size differences in generic code:

    LLVM :: DebugInfo/Generic/2010-03-24-MemberFn.ll
    LLVM :: DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
    LLVM :: DebugInfo/Generic/2010-05-03-DisableFramePtr.ll
    LLVM :: DebugInfo/Generic/varargs.ll

Delete sizing information from debug info for the same reason
(but the presence of the pointer was important to the test case):

    LLVM :: DebugInfo/Generic/restrict.ll
    LLVM :: DebugInfo/Generic/tu-composite.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Fixing an incorrect DW_OP_deref

    LLVM :: DebugInfo/Generic/2010-05-03-OriginDIE.ll

Fixing a missing DW_OP_deref

    LLVM :: DebugInfo/Generic/incorrect-variable-debugloc.ll

Additionally, clang should no longer complain during bootstrap should no
longer happen after r257534.

The original commit message was:
```
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.

One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.

Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
  it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
  variable as that would depend on the target, even though this test is
  supposed to be generic
- I had to manually declared size/align for reference type. See also the
  discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref
```

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

8 years agoRollback r257547 -- buildbot failure TBI
Xinliang David Li [Wed, 13 Jan 2016 00:27:24 +0000 (00:27 +0000)]
Rollback r257547 -- buildbot failure TBI

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

8 years agoFor llvm-objdump, add the option -private-header (without the trailing ’s’)
Kevin Enderby [Wed, 13 Jan 2016 00:25:36 +0000 (00:25 +0000)]
For llvm-objdump, add the option -private-header (without the trailing â€™s’)
to only print the first private header.

Which for Mach-O files only prints the Mach header and not the subsequent load
commands.  Which is used by scripts to match what the darwin otool(1) with the
-h flag does without the -l flag.

For non-Mach-O files it has the same functionality as -private-headers (with
the trailing â€™s’).

rdar://24158331

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

8 years ago[Coverage] Refactor coverage mapping reader code /NFC
Xinliang David Li [Wed, 13 Jan 2016 00:16:43 +0000 (00:16 +0000)]
[Coverage] Refactor coverage mapping reader code /NFC

In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code.
(When coveremap format version changes, backward compatibtility
should be preserved).

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

8 years agoGuard fabs to bfc convert with V6T2 flag
Ana Pazos [Wed, 13 Jan 2016 00:03:35 +0000 (00:03 +0000)]
Guard fabs to bfc convert with V6T2 flag

Summary:
BFC instructions are available in ARMv6T2 and above.

Reviewers: t.p.northover

Subscribers: aemerson

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

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

8 years ago[ARM] Mark VMOV with immediate: isAsCheapAsMove.
Quentin Colombet [Wed, 13 Jan 2016 00:02:40 +0000 (00:02 +0000)]
[ARM] Mark VMOV with immediate: isAsCheapAsMove.
VMOVs are not strictly speaking cheap, but they are as expensive as a vector
copy (VORR), so we should prefer rematerialization over splitting when it
applies.

rdar://problem/23754176

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

8 years agoCannotBeOrderedLessThanZero: add some missing cases
Fiona Glaser [Tue, 12 Jan 2016 23:37:30 +0000 (23:37 +0000)]
CannotBeOrderedLessThanZero: add some missing cases

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

8 years agoCOFF: Teach llvm-objdump how to dump DLL forwarder symbols.
Rui Ueyama [Tue, 12 Jan 2016 23:28:42 +0000 (23:28 +0000)]
COFF: Teach llvm-objdump how to dump DLL forwarder symbols.

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

8 years ago[WebAssembly] Fix disassembler shared-libs build
Derek Schuff [Tue, 12 Jan 2016 23:03:40 +0000 (23:03 +0000)]
[WebAssembly] Fix disassembler shared-libs build

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

8 years agoRegisterPressure: Expose RegisterOperands API
Matthias Braun [Tue, 12 Jan 2016 22:57:35 +0000 (22:57 +0000)]
RegisterPressure: Expose RegisterOperands API

Previously the RegisterOperands have only been used internally in
RegisterPressure.cpp. However this datastructure can be useful for other
tasks as well and allows refactoring of PDiff initialisation out of
RPTracker::recede().

This patch:
- Exposes RegisterOperands as public API
- Splits RPTracker::recede() into a part that skips DebugValues and
  maintains the region borders, and the core that changes register
  pressure when given a set of RegisterOperands.
- This allows to move the PDiff initialisation out recede() into a
  method of the PressureDiffs class.
- The upcoming subregister scheduling code will also use
  RegisterOperands to avoid pushing more unrelated functionality into
  recede()/advance().

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

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

8 years ago[Utils] Insert DW_OP_bit_piece when only describing part of the variable
Keno Fischer [Tue, 12 Jan 2016 22:46:09 +0000 (22:46 +0000)]
[Utils] Insert DW_OP_bit_piece when only describing part of the variable

Summary: The dbg.declare -> dbg.value conversion looks through any zext/sext
to find a value to describe the variable (in the expectation that those
zext/sext instruction will go away later). However, those values do not
cover the entire variable and thus need a DW_OP_bit_piece.

Reviewers: aprantl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16061

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

8 years ago[Support] Add saturating multiply-add support function
Nathan Slingerland [Tue, 12 Jan 2016 22:34:00 +0000 (22:34 +0000)]
[Support] Add saturating multiply-add support function

Summary: Add SaturatingMultiplyAdd convenience function template since A + (X * Y) comes up frequently when doing weighted arithmetic.

Reviewers: davidxl, silvas

Subscribers: llvm-commits

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

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

8 years ago[CodeView] Initialize column-end to zero
David Majnemer [Tue, 12 Jan 2016 21:58:20 +0000 (21:58 +0000)]
[CodeView] Initialize column-end to zero

CodeView, unlike DWARF, can associate code with a range of columns.
However, LLVM can only represent a single column position internally.

We used to claim that the end column and start column were the same
which yielded less than satisfactory results: we would stop printing at
the _beginning_ of the source expression!  Instead, mark the column-end
as 'zero' to indicate that we don't have one (as per the documentation
for IDiaLineNumber::get_lineNumberEnd).

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

8 years ago[WebAsssembly] Register the MC register info.
Dan Gohman [Tue, 12 Jan 2016 21:27:55 +0000 (21:27 +0000)]
[WebAsssembly] Register the MC register info.

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

8 years ago[AVX512] adding PROLQ and PROLD Intrinsics
Michael Zuckerman [Tue, 12 Jan 2016 21:19:17 +0000 (21:19 +0000)]
[AVX512] adding PROLQ and PROLD Intrinsics

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

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

8 years ago[WebAssembly] Fix a test to work even when the integrated assembler is enabled.
Dan Gohman [Tue, 12 Jan 2016 21:01:30 +0000 (21:01 +0000)]
[WebAssembly] Fix a test to work even when the integrated assembler is enabled.

Add -no-integrated-as to this test, since it's testing inline asm strings
that aren't actually valid assembly syntax.

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

8 years agoCodegen: [PPC] Handle weighted comparisons when inserting selects.
Kyle Butt [Tue, 12 Jan 2016 21:00:43 +0000 (21:00 +0000)]
Codegen: [PPC] Handle weighted comparisons when inserting selects.

Only non-weighted predicates were handled in PPCInstrInfo::insertSelect. Handle
the weighted predicates as well.

This latent bug was triggered by r255398, because it added use of the
branch-weighted predicates.

While here, switch over an enum instead of an int to get the compiler to enforce
totality in the future.

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

8 years ago[WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.
Dan Gohman [Tue, 12 Jan 2016 20:56:01 +0000 (20:56 +0000)]
[WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.

A request has been made to the official registry, but an official value is
not yet available. This patch uses a temporary value in order to support
development. When an official value is recieved, the value of EM_WEBASSEMBLY
will be updated.

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

8 years ago[WebAssembly] Add ELFRelocs/WebAssembly.def as a "textual header" to the module map.
Dan Gohman [Tue, 12 Jan 2016 20:51:40 +0000 (20:51 +0000)]
[WebAssembly] Add ELFRelocs/WebAssembly.def as a "textual header" to the module map.

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

8 years ago[WebAssembly] Introduce a WebAssemblyTargetStreamer class.
Dan Gohman [Tue, 12 Jan 2016 20:30:51 +0000 (20:30 +0000)]
[WebAssembly] Introduce a WebAssemblyTargetStreamer class.

Refactor .param, .result, .local, and .endfunc, as directives, using the
proper MCTargetStreamer mechanism, rather than fake instructions.

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

8 years agoReplace inherited constructor with an explicit one
Krzysztof Parzyszek [Tue, 12 Jan 2016 19:27:59 +0000 (19:27 +0000)]
Replace inherited constructor with an explicit one

Some bots failed when the inherited constructor was used.

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

8 years ago[WebAssembly] Make CFG stackification independent of basic-block labels.
Dan Gohman [Tue, 12 Jan 2016 19:14:46 +0000 (19:14 +0000)]
[WebAssembly] Make CFG stackification independent of basic-block labels.

This patch changes the way labels are referenced. Instead of referencing the
basic-block label name (eg. .LBB0_0), instructions now just have an immediate
which indicates the depth in the control-flow stack to find a label to jump to.
This makes them much closer to what we expect to have in the binary encoding,
and avoids the problem of basic-block label names not being explicit in the
binary encoding.

Also, it terminates blocks and loops with end_block and end_loop instructions,
rather than basic-block label names, for similar reasons.

This will also fix problems where two constructs appear to have the same label,
because we no longer explicitly use labels, so consumers that need labels will
presumably create their own labels, and presumably they won't reuse labels
when they do.

This patch does make the code a little more awkward to read; as a partial
mitigation, this patch also introduces comments showing where the labels are,
and comments on each branch showing where it's branching to.

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

8 years ago[Hexagon] Implement RDF-based post-RA optimizations
Krzysztof Parzyszek [Tue, 12 Jan 2016 19:09:01 +0000 (19:09 +0000)]
[Hexagon] Implement RDF-based post-RA optimizations

- Handle simple cases of register copies (what current RDF CP allows).
- Hexagon-specific dead code elimination: handles dead address updates
  in post-increment instructions.

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

8 years ago[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5...
Sanjay Patel [Tue, 12 Jan 2016 19:06:35 +0000 (19:06 +0000)]
[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5) calls

Also, propagate the FMF to the newly created sqrt() call.

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

8 years ago[ORC] More cleanup, partially aimed at working around GCC ICE.
Lang Hames [Tue, 12 Jan 2016 19:01:49 +0000 (19:01 +0000)]
[ORC] More cleanup, partially aimed at working around GCC ICE.

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

8 years agorangify; NFCI
Sanjay Patel [Tue, 12 Jan 2016 18:47:59 +0000 (18:47 +0000)]
rangify; NFCI

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

8 years agoAuto-link with ole32.dll to simplify building LLVM.dll
Reid Kleckner [Tue, 12 Jan 2016 18:33:49 +0000 (18:33 +0000)]
Auto-link with ole32.dll to simplify building LLVM.dll

Patch by Jakob Bornecrantz

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

8 years ago[Orc] Replace lambda with a helper method.
Lang Hames [Tue, 12 Jan 2016 18:17:23 +0000 (18:17 +0000)]
[Orc] Replace lambda with a helper method.

This is good cleanup, but I'm also hoping it'll fix some more GCC ICEs.

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

8 years agofunction names start with a lower case letter ; NFC
Sanjay Patel [Tue, 12 Jan 2016 18:03:37 +0000 (18:03 +0000)]
function names start with a lower case letter ; NFC

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

8 years agoFix bot failure from r257493: remove extraneous temp file read
Teresa Johnson [Tue, 12 Jan 2016 17:53:59 +0000 (17:53 +0000)]
Fix bot failure from r257493: remove extraneous temp file read

This was left from an earlier version of the test.

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

8 years ago[ThinLTO] Handle an external call from an import to an alias in dest
Teresa Johnson [Tue, 12 Jan 2016 17:48:44 +0000 (17:48 +0000)]
[ThinLTO] Handle an external call from an import to an alias in dest

The findExternalCalls routine ignores calls to functions already
defined in the dest module. This was not handling the case where
the definition in the current module is actually an alias to a
function call.

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

8 years ago[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(exp(x...
Sanjay Patel [Tue, 12 Jan 2016 17:30:37 +0000 (17:30 +0000)]
[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(exp(x)) calls

See also:
http://reviews.llvm.org/rL255555
http://reviews.llvm.org/rL256871
http://reviews.llvm.org/rL256964
http://reviews.llvm.org/rL257400
http://reviews.llvm.org/rL257404
http://reviews.llvm.org/rL257414

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

8 years agoRDF: Copy propagation
Krzysztof Parzyszek [Tue, 12 Jan 2016 17:23:48 +0000 (17:23 +0000)]
RDF: Copy propagation

This is a very limited implementation of DFG-based copy propagation.
It only handles actual COPY instructions (does not handle other equivalents
such as add-immediate with a 0 operand).
The major limitation is that it does not update the DFG: that will be the
change required to make it more robust (hopefully coming up soon).

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

8 years agoAMDGPU: Emit note directive for HSA even if there are no functions
Tom Stellard [Tue, 12 Jan 2016 17:18:17 +0000 (17:18 +0000)]
AMDGPU: Emit note directive for HSA even if there are no functions

Reviewers: arsenm, echristo

Subscribers: arsenm, llvm-commits

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

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

8 years ago[Orc] Clang-format.
Lang Hames [Tue, 12 Jan 2016 17:06:32 +0000 (17:06 +0000)]
[Orc] Clang-format.

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

8 years ago[Orc] Take another shot at working around the GCC 4.7 ICE in
Lang Hames [Tue, 12 Jan 2016 17:04:12 +0000 (17:04 +0000)]
[Orc] Take another shot at working around the GCC 4.7 ICE in
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/27486

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

8 years agoRDF: Dead code elimination
Krzysztof Parzyszek [Tue, 12 Jan 2016 17:01:16 +0000 (17:01 +0000)]
RDF: Dead code elimination

Utility class to perform DFG-based dead code elimination.

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

8 years agoconsolidate exp/exp2 tests
Sanjay Patel [Tue, 12 Jan 2016 17:00:38 +0000 (17:00 +0000)]
consolidate exp/exp2 tests

The transform is identical, so keep the tests together and save some overhead.

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

8 years agoFix compiler warnings from r257477
Krzysztof Parzyszek [Tue, 12 Jan 2016 16:51:55 +0000 (16:51 +0000)]
Fix compiler warnings from r257477

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

8 years ago[libFuzzer] add a macro LLVM_FUZZER_DEFINES_SANITIZER_WEAK_HOOOKS
Kostya Serebryany [Tue, 12 Jan 2016 16:50:18 +0000 (16:50 +0000)]
[libFuzzer] add a macro LLVM_FUZZER_DEFINES_SANITIZER_WEAK_HOOOKS

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

8 years agoAdd/edit tests to include instruction-level FMF on calls
Sanjay Patel [Tue, 12 Jan 2016 16:50:17 +0000 (16:50 +0000)]
Add/edit tests to include instruction-level FMF on calls
Prepatory patch before changing LibCallSimplifier to use the FMF.
Also, tighten the CHECK lines and give the tests more meaningful names.
Similar changes to:
http://reviews.llvm.org/rL257414

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

8 years agoRDF: Implement register liveness analysis
Krzysztof Parzyszek [Tue, 12 Jan 2016 15:56:33 +0000 (15:56 +0000)]
RDF: Implement register liveness analysis

Compute block live-ins and operand kill flags from the DFG.

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

8 years ago[mips] Correct operand order in DSP's mthi/mtlo
Daniel Sanders [Tue, 12 Jan 2016 15:15:14 +0000 (15:15 +0000)]
[mips] Correct operand order in DSP's mthi/mtlo

Summary: The result register is the second operand as per the other mt* instructions.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years agoRegister Data Flow: data flow graph
Krzysztof Parzyszek [Tue, 12 Jan 2016 15:09:49 +0000 (15:09 +0000)]
Register Data Flow: data flow graph

Target independent, SSA-based data flow framework for representing
data flow between physical registers.

This commit implements the creation of the actual data flow graph.

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

8 years ago[Hexagon] Make helper function static. NFC.
Benjamin Kramer [Tue, 12 Jan 2016 14:58:49 +0000 (14:58 +0000)]
[Hexagon] Make helper function static. NFC.

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