OSDN Git Service

android-x86/external-llvm.git
8 years ago[Hexagon] cast<> a reference instead of referencing + dereferencing.
Benjamin Kramer [Wed, 17 Feb 2016 09:28:45 +0000 (09:28 +0000)]
[Hexagon] cast<> a reference instead of referencing + dereferencing.

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

8 years agollvm-dwp: Support for type units when merging DWPs into larger DWPs
David Blaikie [Wed, 17 Feb 2016 07:00:24 +0000 (07:00 +0000)]
llvm-dwp: Support for type units when merging DWPs into larger DWPs

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

8 years agoFix the hash function.
David Blaikie [Wed, 17 Feb 2016 07:00:22 +0000 (07:00 +0000)]
Fix the hash function.

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

8 years agoDetecte vector reduction operations just before instruction selection.
Cong Hou [Wed, 17 Feb 2016 06:37:04 +0000 (06:37 +0000)]
Detecte vector reduction operations just before instruction selection.

This patch detects vector reductions before instruction selection. Vector
reductions are vectorized reduction operations, and for such operations we have
freedom to reorganize the elements of the result as long as the reduction of them
stay unchanged. This will enable some reduction pattern recognition during
instruction combine such as SAD/dot-product on X86. A flag is added to
SDNodeFlags to mark those vector reduction nodes to be checked during instruction
combine.

To detect those vector reductions, we search def-use chains starting from the
given instruction, and check if all uses fall into two categories:

1. Reduction with another vector.
2. Reduction on all elements.

in which 2 is detected by recognizing the pattern that the loop vectorizer
generates to reduce all elements in the vector outside of the loop, which
includes several ShuffleVector and one ExtractElement instructions.

Differential revision: http://reviews.llvm.org/D15250

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

8 years agoRevert r260979 "[X86] Enable the LEA optimization pass by default."
Hans Wennborg [Wed, 17 Feb 2016 02:49:59 +0000 (02:49 +0000)]
Revert r260979 "[X86] Enable the LEA optimization pass by default."

Asserts are still firing in Chromium builds. PR26575.

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

8 years agorevert r261038: arm/aarch64 bot failure
Xinliang David Li [Wed, 17 Feb 2016 02:39:34 +0000 (02:39 +0000)]
revert r261038: arm/aarch64 bot failure

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

8 years agoRevert "Query the StringMap only once when creating MDString (NFC)"
Mehdi Amini [Wed, 17 Feb 2016 02:18:58 +0000 (02:18 +0000)]
Revert "Query the StringMap only once when creating MDString (NFC)"

This reverts commit r261030 and r261036.
(The revision was marked "approved" on phabricator, but some concerns
were raised on the mailing list. Thanks D. Blaikie for notifying me.)

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

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

8 years ago[AliasSetTracker] Teach AliasSetTracker about MemSetInst
Haicheng Wu [Wed, 17 Feb 2016 02:01:50 +0000 (02:01 +0000)]
[AliasSetTracker] Teach AliasSetTracker about MemSetInst

This change is to fix the problem discussed in
http://lists.llvm.org/pipermail/llvm-dev/2016-February/095446.html.

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

8 years agoWebAssembly: update expected failures
JF Bastien [Wed, 17 Feb 2016 01:59:23 +0000 (01:59 +0000)]
WebAssembly: update expected failures

r261050 seems to inadvertently fix the assertion failure.

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

8 years ago[WebAssembly] Call memcpy for large byval copies.
Dan Gohman [Wed, 17 Feb 2016 01:43:37 +0000 (01:43 +0000)]
[WebAssembly] Call memcpy for large byval copies.

This fixes very slow compilation on
test/CodeGen/Generic/2010-11-04-BigByval.ll . Note that MaxStoresPerMemcpy
and friends are not yet carefully tuned so the cutoff point is currently
somewhat arbitrary. However, it's important that there be a cutoff point
so that we don't emit unbounded quantities of loads and stores.

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

8 years agoWebAssembly: update expected test failures
JF Bastien [Wed, 17 Feb 2016 00:34:15 +0000 (00:34 +0000)]
WebAssembly: update expected test failures

r261032 adds frame address support.

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

8 years ago[LCG] Construct an actual call graph with call-edge SCCs nested inside
Chandler Carruth [Wed, 17 Feb 2016 00:18:16 +0000 (00:18 +0000)]
[LCG] Construct an actual call graph with call-edge SCCs nested inside
reference-edge SCCs.

This essentially builds a more normal call graph as a subgraph of the
"reference graph" that was the old model. This allows both to exist and
the different use cases to use the aspect which addresses their needs.
Specifically, the pass manager and other *ordering* constrained logic
can use the reference graph to achieve conservative order of visit,
while analyses reasoning about attributes and other properties derived
from reachability can reason about the direct call graph.

Note that this isn't necessarily complete: it doesn't model edges to
declarations or indirect calls. Those can be found by scanning the
instructions of the function if desirable, and in fact every user
currently does this in order to handle things like calls to instrinsics.
If useful, we could consider caching this information in the call graph
to save the instruction scans, but currently that doesn't seem to be
important.

An important realization for why the representation chosen here works is
that the call graph is a formal subset of the reference graph and thus
both can live within the same data structure. All SCCs of the call graph
are necessarily contained within an SCC of the reference graph, etc.

The design is to build 'RefSCC's to model SCCs of the reference graph,
and then within them more literal SCCs for the call graph.

The formation of actual call edge SCCs is not done lazily, unlike
reference edge 'RefSCC's. Instead, once a reference SCC is formed, it
directly builds the call SCCs within it and stores them in a post-order
sequence. This is used to provide a consistent platform for mutation and
update of the graph. The post-order also allows for very efficient
updates in common cases by bounding the number of nodes (and thus edges)
considered.

There is considerable common code that I'm still looking for the best
way to factor out between the various DFS implementations here. So far,
my attempts have made the code harder to read and understand despite
reducing the duplication, which seems a poor tradeoff. I've not given up
on figuring out the right way to do this, but I wanted to wait until
I at least had the system working and tested to continue attempting to
factor it differently.

This also requires introducing several new algorithms in order to handle
all of the incremental update scenarios for the more complex structure
involving two edge colorings. I've tried to comment the algorithms
sufficiently to make it clear how this is expected to work, but they may
still need more extensive documentation.

I know that there are some changes which are not strictly necessarily
coupled here. The process of developing this started out with a very
focused set of changes for the new structure of the graph and
algorithms, but subsequent changes to bring the APIs and code into
consistent and understandable patterns also ended up touching on other
aspects. There was no good way to separate these out without causing
*massive* merge conflicts. Ultimately, to a large degree this is
a rewrite of most of the core algorithms in the LCG class and so I don't
think it really matters much.

Many thanks to the careful review by Sanjoy Das!

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

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

8 years ago[X86] Fix a shrink-wrapping miscompile around __chkstk
Reid Kleckner [Wed, 17 Feb 2016 00:17:33 +0000 (00:17 +0000)]
[X86] Fix a shrink-wrapping miscompile around __chkstk

__chkstk clobbers EAX. If EAX is live across the prologue, then we have
to take extra steps to save it. We already had code to do this if EAX
was a register parameter. This change adapts it to work when shrink
wrapping is used.

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

8 years agoNew test case: make sure alloc bit is not set for covmap section on Linux
Xinliang David Li [Wed, 17 Feb 2016 00:14:52 +0000 (00:14 +0000)]
New test case: make sure alloc bit is not set for covmap section on Linux

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

8 years ago[WebAssembly] Use SDValue::getConstantOperandVal. NFC.
Dan Gohman [Wed, 17 Feb 2016 00:14:03 +0000 (00:14 +0000)]
[WebAssembly] Use SDValue::getConstantOperandVal. NFC.

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

8 years agoFix MSVC bot: apparently visual studio does not like explicitly defaulted move ctor
Mehdi Amini [Wed, 17 Feb 2016 00:11:59 +0000 (00:11 +0000)]
Fix MSVC bot: apparently visual studio does not like explicitly defaulted move ctor

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

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

8 years agoFix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows
Andrew Kaylor [Tue, 16 Feb 2016 23:52:18 +0000 (23:52 +0000)]
Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows

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

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

8 years ago[WebAssembly] Implement __builtin_frame_address.
Dan Gohman [Tue, 16 Feb 2016 23:48:04 +0000 (23:48 +0000)]
[WebAssembly] Implement __builtin_frame_address.

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

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

8 years agoQuery the StringMap only once when creating MDString (NFC)
Mehdi Amini [Tue, 16 Feb 2016 23:05:56 +0000 (23:05 +0000)]
Query the StringMap only once when creating MDString (NFC)

Summary: Loading IR with debug info improves MDString::get() from 19ms to 10ms.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

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

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

8 years agoDefine the ThinLTO Pipeline (experimental)
Mehdi Amini [Tue, 16 Feb 2016 23:02:29 +0000 (23:02 +0000)]
Define the ThinLTO Pipeline (experimental)

Summary:
On the contrary to Full LTO, ThinLTO can afford to shift compile time
from the frontend to the linker: both phases are parallel (even if
it is not totally "free": projects like clang are reusing product
from the "compile phase" for multiple link, think about
libLLVMSupport reused for opt, llc, etc.).

This pipeline is based on the proposal in D13443 for full LTO. We
didn't move forward on this proposal because the LTO link was far too
long after that. We believe that we can afford it with ThinLTO.

The ThinLTO pipeline integrates in the regular O2/O3 flow:

 - The compile phase perform the inliner with a somehow lighter
   function simplification. (TODO: tune the inliner thresholds here)
   This is intendend to simplify the IR and get rid of obvious things
   like linkonce_odr that will be inlined.
 - The link phase will run the pipeline from the start, extended with
   some specific passes that leverage the augmented knowledge we have
   during LTO. Especially after the inliner is done, a sequence of
   globalDCE/globalOpt is performed, followed by another run of the
   "function simplification" passes. It is not clear if this part
   of the pipeline will stay as is, as the split model of ThinLTO
   does not allow the same benefit as FullLTO without added tricks.

The measurements on the public test suite as well as on our internal
suite show an overall net improvement. The binary size for the clang
executable is reduced by 5%. We're still tuning it with the bringup
of ThinLTO and it will evolve, but this should provide a good starting
point.

Reviewers: tejohnson

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

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

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

8 years agoRefactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()" (NFC)
Mehdi Amini [Tue, 16 Feb 2016 22:54:27 +0000 (22:54 +0000)]
Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()" (NFC)

It is intended to contains the passes run over a function after the
inliner is done with a function and before it moves to its callers.

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

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

8 years agoFix test from r261013
Adam Nemet [Tue, 16 Feb 2016 22:50:19 +0000 (22:50 +0000)]
Fix test from r261013

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

8 years ago[X86][AVX] Regenerated vselect tests
Simon Pilgrim [Tue, 16 Feb 2016 22:33:27 +0000 (22:33 +0000)]
[X86][AVX] Regenerated vselect tests

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

8 years ago[X86] Remove the now-unused X86ISD::PSIGN. NFC.
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:12 +0000 (22:14 +0000)]
[X86] Remove the now-unused X86ISD::PSIGN. NFC.

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

8 years ago[X86] Generalize logic blend of (x, -x) combine to match (-x, x).
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:07 +0000 (22:14 +0000)]
[X86] Generalize logic blend of (x, -x) combine to match (-x, x).

I suspect this is what let PR26110 lie dormant for so long.

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

8 years ago[X86] Don't turn (c?-v:v) into (c?-v:0) by blindly using PSIGN.
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:03 +0000 (22:14 +0000)]
[X86] Don't turn (c?-v:v) into (c?-v:0) by blindly using PSIGN.

Currently, we sometimes miscompile this vector pattern:
    (c ? -v : v)
We lower it to (because "c" is <4 x i1>, lowered as a vector mask):
    (~c & v) | (c & -v)

When we have SSSE3, we incorrectly lower that to PSIGN, which does:
    (c < 0 ? -v : c > 0 ? v : 0)
in other words, when c is either all-ones or all-zero:
    (c ? -v : 0)
While this is an old bug, it rarely triggers because the PSIGN combine
is too sensitive to operand order. This will be improved separately.

Note that the PSIGN tests are also incorrect. Consider:
    %b.lobit = ashr <4 x i32> %b, <i32 31, i32 31, i32 31, i32 31>
    %sub = sub nsw <4 x i32> zeroinitializer, %a
    %0 = xor <4 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1>
    %1 = and <4 x i32> %a, %0
    %2 = and <4 x i32> %b.lobit, %sub
    %cond = or <4 x i32> %1, %2
    ret <4 x i32> %cond
if %b is zero:
    %b.lobit = <4 x i32> zeroinitializer
    %sub = sub nsw <4 x i32> zeroinitializer, %a
    %0 = <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
    %1 = <4 x i32> %a
    %2 = <4 x i32> zeroinitializer
    %cond = or <4 x i32> %a, zeroinitializer
    ret <4 x i32> %a
whereas we currently generate:
    psignd %xmm1, %xmm0
    retq
which returns 0, as %xmm1 is 0.

Instead, use a pure logic sequence, as described in:
https://graphics.stanford.edu/~seander/bithacks.html#ConditionalNegate

Fixes PR26110.

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

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

8 years ago[X86] Extract PSIGN/BLENDVP tests into vector-blend.ll. NFC.
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:59 +0000 (22:13 +0000)]
[X86] Extract PSIGN/BLENDVP tests into vector-blend.ll. NFC.

We're going to stop generating PSIGN, so calling a test "psign"
isn't ideal. Instead, call these tests what they really are:
variable blends using logic.
Also add a test to exhibit a case we're currently missing in
the PSIGN combine.

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

8 years ago[X86] Extract PSIGN/BLENDVP combine. NFC.
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:55 +0000 (22:13 +0000)]
[X86] Extract PSIGN/BLENDVP combine. NFC.

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

8 years ago[X86] Extract ANDNP combine. NFC.
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:49 +0000 (22:13 +0000)]
[X86] Extract ANDNP combine. NFC.

This makes it IMO more readable and reduces indentation.

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

8 years agoBitcode writer: fix a typo, using getName() instead of getSourceFileName()
Mehdi Amini [Tue, 16 Feb 2016 22:07:03 +0000 (22:07 +0000)]
Bitcode writer: fix a typo, using getName() instead of getSourceFileName()

When emitting the source filename, the encoding of the string
was checked against the name instead of the filename.

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

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

8 years ago[WebAssembly] Update torture test expectations
Derek Schuff [Tue, 16 Feb 2016 21:52:06 +0000 (21:52 +0000)]
[WebAssembly] Update torture test expectations

These were fixed with r260978

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

8 years ago[codeview] Bail on a DBG_VALUE register operand with no register
Reid Kleckner [Tue, 16 Feb 2016 21:49:26 +0000 (21:49 +0000)]
[codeview] Bail on a DBG_VALUE register operand with no register

This apparently comes up when the register allocator decides that a
variable will become undef along a certain path.

Also improve the error message we emit when we can't map from LLVM
register number to CV register number.

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

8 years ago[WebAssemly] Don't move calls or stores past intervening loads
Derek Schuff [Tue, 16 Feb 2016 21:44:19 +0000 (21:44 +0000)]
[WebAssemly] Don't move calls or stores past intervening loads

The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that the
instruction being moved may affect intervening loads.

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

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

8 years ago[LTO] Support Statistics
Adam Nemet [Tue, 16 Feb 2016 21:41:51 +0000 (21:41 +0000)]
[LTO] Support Statistics

Summary:
I thought -Xlinker -mllvm -Xlinker -stats worked at some point but maybe
it never did.

For clang, I believe that stats are printed from cc1_main.  This patch
also prints them for LTO, specifically right after codegen happens.

I only looked at the C API for LTO briefly to see if this is a good
place.  Probably there are still cases where this wouldn't be printed
but it seems to be working for the common case.  I also experimented
putting this in the LTOCodeGenerator destructor but that didn't trigger
for me because ld64 does not destroy the LTOCodeGenerator.

Reviewers: dexonsmith, joker.eph

Subscribers: rafael, joker.eph, llvm-commits

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

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

8 years ago[codeview] Fix assertion on non-memory, non-register DBG_VALUE instructions
Reid Kleckner [Tue, 16 Feb 2016 21:14:51 +0000 (21:14 +0000)]
[codeview] Fix assertion on non-memory, non-register DBG_VALUE instructions

Eventually we should find a way to describe constant variables, but it
is not obvious how to do this at the moment.

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

8 years ago[Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit...
Colin LeMahieu [Tue, 16 Feb 2016 20:38:17 +0000 (20:38 +0000)]
[Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit 4-byte aligned relocation to be a valid instruction encoding.

The usual way to get a 32-bit relocation is to use a constant extender which doubles the size of the instruction, 4 bytes to 8 bytes.

Another way is to put a .word32 and mix code and data within a function.  The disadvantage is it's not a valid instruction encoding and jumping over it causes prefetch stalls inside the hardware.

This relocation packs a 23-bit value in to an "r0 = add(rX, #a)" instruction by overwriting the source register bits.  Since r0 is the return value register, if this instruction is placed after a function call which return void, r0 will be filled with an undefined value, the prefetch won't be confused, and the callee can access the constant value by way of the link register.

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

8 years ago[AArch64] Add pass to remove redundant copy after RA
Jun Bum Lim [Tue, 16 Feb 2016 20:02:39 +0000 (20:02 +0000)]
[AArch64] Add pass to remove redundant copy after RA

Summary:
This change will add a pass to remove unnecessary zero copies in target blocks
of cbz/cbnz instructions. E.g., the copy instruction in the code below can be
removed because the cbz jumps to BB1 when x0 is zero :
  BB0:
    cbz x0, .BB1
  BB1:
    mov x0, xzr

Jun

Reviewers: gberry, jmolloy, HaoLiu, MatzeB, mcrosier

Subscribers: mcrosier, mssimpso, haicheng, bmakam, llvm-commits, aemerson, rengolin

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

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

8 years ago[GlobalISel] Re-apply r260922-260923 with MSVC-friendly code.
Quentin Colombet [Tue, 16 Feb 2016 19:26:02 +0000 (19:26 +0000)]
[GlobalISel] Re-apply r260922-260923 with MSVC-friendly code.
Original message:
Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.

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

8 years agoPass a std::unique_ptr to IRMover::move.
Rafael Espindola [Tue, 16 Feb 2016 18:50:12 +0000 (18:50 +0000)]
Pass a std::unique_ptr to IRMover::move.

It was already the one "destroying" the source module, now the API
reflects that.

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

8 years ago[WebAssembly] Insert COPY_LOCAL between CopyToReg and FrameIndex DAG nodes
Derek Schuff [Tue, 16 Feb 2016 18:18:36 +0000 (18:18 +0000)]
[WebAssembly] Insert COPY_LOCAL between CopyToReg and FrameIndex DAG nodes

CopyToReg nodes don't support FrameIndex operands. Other targets select
the FI to some LEA-like instruction, but since we don't have that, we
need to insert some kind of instruction that can take an FI operand and
produces a value usable by CopyToReg (i.e. in a vreg). So insert a dummy
copy_local between Op and its FI operand. This results in a redundant
copy which we should optimize away later (maybe in the post-FI-lowering
peephole pass).

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

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

8 years ago[AMDGPU] Rename $dst operand to $vdst for VOP instructions.
Tom Stellard [Tue, 16 Feb 2016 18:14:56 +0000 (18:14 +0000)]
[AMDGPU] Rename $dst operand to $vdst for VOP instructions.

Summary: This change renames output operand for VOP instructions from dst to vdst. This is needed to enable decoding named operands for disassembler.

Reviewers: vpykhtin, tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits, nhaustov

Projects: #llvm-amdgpu-spb

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

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

8 years agoRevert 260705, it appears to be causing pr26628
Philip Reames [Tue, 16 Feb 2016 17:14:30 +0000 (17:14 +0000)]
Revert 260705, it appears to be causing pr26628

The root issue appears to be a confusion around what makeNoWrapRegion actually does.   It seems likely we need two versions of this function with slightly different semantics.

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

8 years ago[X86] Enable the LEA optimization pass by default.
Andrey Turetskiy [Tue, 16 Feb 2016 16:41:38 +0000 (16:41 +0000)]
[X86] Enable the LEA optimization pass by default.

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

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

8 years ago[WebAssembly] Switch from RPO sorting to topological sorting.
Dan Gohman [Tue, 16 Feb 2016 16:22:41 +0000 (16:22 +0000)]
[WebAssembly] Switch from RPO sorting to topological sorting.

WebAssembly doesn't require full RPO; topological sorting is sufficient and
can preserve more of the MachineBlockPlacement ordering. Unfortunately, this
still depends a lot on heuristics, because while we use the
MachineBlockPlacement ordering as a guide, we can't use it in places where
it isn't topologically ordered. This area will require further attention.

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

8 years agoA signed bitfield's range is [-1,0], so assigning 1 is technically an overflow. Howev...
Aaron Ballman [Tue, 16 Feb 2016 15:35:51 +0000 (15:35 +0000)]
A signed bitfield's range is [-1,0], so assigning 1 is technically an overflow. However, the other bitfield requires a signed value (it supports negative offsets), so it is slightly better to retain a signed 1-bit bitfield and use -1 instead of 1. Silences an MSVC warning.

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

8 years agoReverting r260922-260923; they cause link failures with MSVC.
Aaron Ballman [Tue, 16 Feb 2016 15:29:06 +0000 (15:29 +0000)]
Reverting r260922-260923; they cause link failures with MSVC.

http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/15436/steps/build/logs/stdio
http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/961/steps/build_llvm/logs/stdio

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

8 years ago[WebAssembly] Create new registers instead of reusing old ones in RegStackify.
Dan Gohman [Tue, 16 Feb 2016 15:17:21 +0000 (15:17 +0000)]
[WebAssembly] Create new registers instead of reusing old ones in RegStackify.

This avoids some complications updating LiveIntervals to be aware of the new
register lifetimes, because we can just compute new intervals from scratch
rather than describe how the old ones have been changed.

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

8 years agoReapply r260489.
Rafael Espindola [Tue, 16 Feb 2016 15:16:00 +0000 (15:16 +0000)]
Reapply r260489.

Original commit message:

[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.

The bits of r260488 it depends on have been committed.

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

8 years ago[WebAssembly] Implement support for custom NaN bit patterns.
Dan Gohman [Tue, 16 Feb 2016 15:14:23 +0000 (15:14 +0000)]
[WebAssembly] Implement support for custom NaN bit patterns.

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

8 years agoIntroduce a getAsRange helper.
Rafael Espindola [Tue, 16 Feb 2016 14:50:39 +0000 (14:50 +0000)]
Introduce a getAsRange helper.

This requires making an error message a bit more generic, but that seems
a reasonable tradeoff.

Extracted from r260488 but simplified a bit.

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

8 years agoMove DynRegionInfo out of the ELFDumper.
Rafael Espindola [Tue, 16 Feb 2016 14:27:33 +0000 (14:27 +0000)]
Move DynRegionInfo out of the ELFDumper.

This reduces indentation in preparation to adding a bit more code to it.

Extracted from r260488.

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

8 years agoThis reverts commit r260488 and r260489.
Rafael Espindola [Tue, 16 Feb 2016 14:17:48 +0000 (14:17 +0000)]
This reverts commit r260488 and r260489.

Original messages:
    Revert "[readobj] Handle ELF files with no section table or with no program headers."
    Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations."

r260489 depends on r260488 and among other issues r260488 deleted error
handling code.

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

8 years ago[X86] PR26575: Fix LEA optimization pass.
Andrey Turetskiy [Tue, 16 Feb 2016 12:47:45 +0000 (12:47 +0000)]
[X86] PR26575: Fix LEA optimization pass.

Add a missing check for a type of address displacement operand of the load/store instruction being a candidate for LEA substitution.

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

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

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

8 years ago[Hexagon] Hoist nonnull assert up.
Benjamin Kramer [Tue, 16 Feb 2016 09:53:47 +0000 (09:53 +0000)]
[Hexagon] Hoist nonnull assert up.

Once a pointer is turned into a reference it cannot be nullptr, clang
rightfully warns about this assert being a tautology. Put the assert
before the reference is created.

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

8 years agoMake sure the functions' range is empty before going through it in the LLVM C API...
Amaury Sechet [Tue, 16 Feb 2016 08:37:01 +0000 (08:37 +0000)]
Make sure the functions' range is empty before going through it in the LLVM C API test

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

8 years ago[X86] Fix typos. NFC
Craig Topper [Tue, 16 Feb 2016 07:45:07 +0000 (07:45 +0000)]
[X86] Fix typos. NFC

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

8 years ago[X86] Use range-based for loop. NFC
Craig Topper [Tue, 16 Feb 2016 07:45:04 +0000 (07:45 +0000)]
[X86] Use range-based for loop. NFC

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

8 years agoDo some refactoring in constant generation in the C API echo test. NFC
Amaury Sechet [Tue, 16 Feb 2016 07:33:23 +0000 (07:33 +0000)]
Do some refactoring in constant generation in the C API echo test. NFC

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

8 years ago[X86] Fix typo in comment. NFC
Craig Topper [Tue, 16 Feb 2016 07:28:03 +0000 (07:28 +0000)]
[X86] Fix typo in comment. NFC

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

8 years agoGenerate functions in 2 steps in the C API echo test. NFC
Amaury Sechet [Tue, 16 Feb 2016 07:08:49 +0000 (07:08 +0000)]
Generate functions in 2 steps in the C API echo test. NFC

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

8 years ago[SCEVExpander] Make findExistingExpansion smarter
Junmo Park [Tue, 16 Feb 2016 06:46:58 +0000 (06:46 +0000)]
[SCEVExpander] Make findExistingExpansion smarter

Summary:
Extending findExistingExpansion can use existing value in ExprValueMap.
This patch gives 0.3~0.5% performance improvements on
benchmarks(test-suite, spec2000, spec2006, commercial benchmark)

Reviewers: mzolotukhin, sanjoy, zzheng

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

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

8 years agoRestore the capability to manipulate datalayout from the C API
Amaury Sechet [Tue, 16 Feb 2016 05:11:24 +0000 (05:11 +0000)]
Restore the capability to manipulate datalayout from the C API

Summary:
This consist in variosu addition to the C API:

  LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
  void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
  LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: axw

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

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

8 years ago[TableGen] Fix inconsistent spacing. NFC
Craig Topper [Tue, 16 Feb 2016 04:24:58 +0000 (04:24 +0000)]
[TableGen] Fix inconsistent spacing. NFC

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

8 years ago[TableGen] Stop passing by reference an integer that doesn't get modified. NFC
Craig Topper [Tue, 16 Feb 2016 04:24:56 +0000 (04:24 +0000)]
[TableGen] Stop passing by reference an integer that doesn't get modified. NFC

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

8 years ago[TableGen] Remove unused member variable. NFC
Craig Topper [Tue, 16 Feb 2016 04:24:54 +0000 (04:24 +0000)]
[TableGen] Remove unused member variable. NFC

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

8 years agoRemove an unnecessary std::move to fix -Wpessimizing-move warning.
Craig Topper [Tue, 16 Feb 2016 04:17:42 +0000 (04:17 +0000)]
Remove an unnecessary std::move to fix -Wpessimizing-move warning.

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

8 years ago[TableGen] Use range-based for loop. NFC
Craig Topper [Tue, 16 Feb 2016 02:48:30 +0000 (02:48 +0000)]
[TableGen] Use range-based for loop. NFC

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

8 years agoSimplify users of StringRef::{l,r}trim (NFC)
Vedant Kumar [Tue, 16 Feb 2016 02:06:01 +0000 (02:06 +0000)]
Simplify users of StringRef::{l,r}trim (NFC)

r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in llvm.

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

8 years ago[ADT] Add StringRef::{l,r}trim(char) overloads (NFC)
Vedant Kumar [Tue, 16 Feb 2016 01:48:39 +0000 (01:48 +0000)]
[ADT] Add StringRef::{l,r}trim(char) overloads (NFC)

Add support for trimming a single kind of character from a StringRef.
This makes the common case of trimming null bytes much neater. It's also
probably a bit speedier too, since it avoids creating a std::bitset in
find_{first,last}_not_of.

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

8 years ago[GlobalISel][IRTranslator] Override getPassName.
Quentin Colombet [Tue, 16 Feb 2016 01:38:09 +0000 (01:38 +0000)]
[GlobalISel][IRTranslator] Override getPassName.

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

8 years ago[GlobalISel] Add missing file in previous commit.
Quentin Colombet [Tue, 16 Feb 2016 01:05:16 +0000 (01:05 +0000)]
[GlobalISel] Add missing file in previous commit.

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

8 years ago[GlobalISel] Get rid of the ifdefs in TargetLowering.
Quentin Colombet [Tue, 16 Feb 2016 00:57:44 +0000 (00:57 +0000)]
[GlobalISel] Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.

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

8 years agoDeprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Amaury Sechet [Tue, 16 Feb 2016 00:23:52 +0000 (00:23 +0000)]
Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr

Summary: The name is confusing as it matche another method on the module.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits

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

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

8 years agoKill LLVMAddTargetData
Amaury Sechet [Tue, 16 Feb 2016 00:22:02 +0000 (00:22 +0000)]
Kill LLVMAddTargetData

Summary: It's red, it's dead.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits, axw

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

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

8 years agoMITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.
NAKAMURA Takumi [Tue, 16 Feb 2016 00:17:56 +0000 (00:17 +0000)]
MITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.

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

8 years agoImplemented stack symbol table ordering/packing optimization to improve data locality...
Zia Ansari [Mon, 15 Feb 2016 23:44:13 +0000 (23:44 +0000)]
Implemented stack symbol table ordering/packing optimization to improve data locality and code size from SP/FP offset encoding.

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

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

8 years agoRename LLVMSetDataLayout's argument to match what they stand for
Amaury Sechet [Mon, 15 Feb 2016 23:40:06 +0000 (23:40 +0000)]
Rename LLVMSetDataLayout's argument to match what they stand for

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

8 years agounittests/MI: Add Core library reference
Matthias Braun [Mon, 15 Feb 2016 22:09:38 +0000 (22:09 +0000)]
unittests/MI: Add Core library reference

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

8 years agoSmallPtrSet: Avoid initializing Array in the small case.
Matthias Braun [Mon, 15 Feb 2016 21:38:42 +0000 (21:38 +0000)]
SmallPtrSet: Avoid initializing Array in the small case.

This patch avoids the initial memset at the cost of making iterators
slightly more complex. This should be beneficial as most SmallPtrSets
hold no or only a few elements, while iterating over them is less
common.

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

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

8 years agoAPInt: Slightly simplify countLeadingZerosSlowCase()
Matthias Braun [Mon, 15 Feb 2016 20:06:22 +0000 (20:06 +0000)]
APInt: Slightly simplify countLeadingZerosSlowCase()

We always clear the unused bits in the most signifant word so there is
no need to mask them out in countLeadingZerosSlowCase().

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

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

8 years agoAPInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
Matthias Braun [Mon, 15 Feb 2016 20:06:19 +0000 (20:06 +0000)]
APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan

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

8 years ago[X86] Remove now-dead variable and redundant assert. NFC.
Ahmed Bougacha [Mon, 15 Feb 2016 19:32:54 +0000 (19:32 +0000)]
[X86] Remove now-dead variable and redundant assert. NFC.

The variable was made dead in NDEBUG by r260901, but the assert
was redundant anyway: get rid of both.

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

8 years agoFix typo in LiveIntervalTest
Matthias Braun [Mon, 15 Feb 2016 19:30:11 +0000 (19:30 +0000)]
Fix typo in LiveIntervalTest

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

8 years agoLiveIntervalAnalysis: Support moving of subregister defs in handleMove
Matthias Braun [Mon, 15 Feb 2016 19:25:36 +0000 (19:25 +0000)]
LiveIntervalAnalysis: Support moving of subregister defs in handleMove

This is an updated version which fixes a bug that happened with
uses tied to an earlyclobber operand which end at an unusual slotindex.

If two definitions write to independent subregisters then they can be
put in any order. LiveIntervalAnalysis::handleMove() did not support
this previously because it looks like moving a definition of a vreg past
another one.

This is a modified version of a patch proposed (two years ago) by
Vincent Lejeune! This version does not touch the read-undef flags and is
extended for the case of moving a subregister def behind all uses - this
can happen for subregister defs that are completely unused.

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

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

8 years agoAdd unittest for LiveIntervalAnalysis::handleMove()
Matthias Braun [Mon, 15 Feb 2016 19:25:34 +0000 (19:25 +0000)]
Add unittest for LiveIntervalAnalysis::handleMove()

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

8 years agoMachineVerifier: Add parameter to choose if MachineFunction::verify() aborts
Matthias Braun [Mon, 15 Feb 2016 19:25:31 +0000 (19:25 +0000)]
MachineVerifier: Add parameter to choose if MachineFunction::verify() aborts

The abort on error behaviour is unpractical for debugger and unittest
usage.

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

8 years ago[NFC] Fixing naming convention, lowercase start of function name.
Colin LeMahieu [Mon, 15 Feb 2016 18:47:55 +0000 (18:47 +0000)]
[NFC] Fixing naming convention, lowercase start of function name.

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

8 years ago[Hexagon] Wrapping all MCExprs inside MCOperands within HexagonMCExpr to simplify...
Colin LeMahieu [Mon, 15 Feb 2016 18:42:07 +0000 (18:42 +0000)]
[Hexagon] Wrapping all MCExprs inside MCOperands within HexagonMCExpr to simplify handling and allow flags on the expression.

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

8 years ago[CodeGen] Document and use getConstant's splat-building feature. NFC.
Ahmed Bougacha [Mon, 15 Feb 2016 18:07:29 +0000 (18:07 +0000)]
[CodeGen] Document and use getConstant's splat-building feature. NFC.

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

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

8 years ago[X86][SSE2] Regenerated sse2 tests
Simon Pilgrim [Mon, 15 Feb 2016 17:57:40 +0000 (17:57 +0000)]
[X86][SSE2] Regenerated sse2 tests

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

8 years ago[ScheduleDAGInstrs] isUnsafeMemoryObject() removed
Jonas Paulsson [Mon, 15 Feb 2016 16:43:15 +0000 (16:43 +0000)]
[ScheduleDAGInstrs] isUnsafeMemoryObject() removed

This function was basically useless, since volatile memacesses or MIs with
unmodelled sideffects become global memory objects, and the other little
checks are also done elsewhere.

Reviewed by Andy Trick
http://reviews.llvm.org/D16881

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

8 years ago[Hexagon] Missed testcase update in r260895
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:15:02 +0000 (16:15 +0000)]
[Hexagon] Missed testcase update in r260895

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

8 years ago[mips] Implemented the .hword directive.
Scott Egerton [Mon, 15 Feb 2016 16:11:51 +0000 (16:11 +0000)]
[mips] Implemented the .hword directive.

Summary:
In order to pass the tests, this required marking R_MIPS_16 relocations
as needing to point to the symbol and not the section.

Reviewers: vkalintiris, dsanders

Subscribers: dsanders, llvm-commits

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

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

8 years ago[Hexagon] Use zero-extending loads for anyext
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:01:01 +0000 (16:01 +0000)]
[Hexagon] Use zero-extending loads for anyext

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

8 years ago[LV] Add support for insertelt/extractelt processing during type truncation
Silviu Baranga [Mon, 15 Feb 2016 15:38:17 +0000 (15:38 +0000)]
[LV] Add support for insertelt/extractelt processing during type truncation

Summary:
While shrinking types according to the required bits, we can
encounter insert/extract element instructions. This will cause us to
reach an llvm_unreachable statement.

This change adds support for truncating insert/extract element
operations, and adds a regression test.

Reviewers: jmolloy

Subscribers: mzolotukhin, llvm-commits

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

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

8 years agoTweak the LICM code to reuse the first sub-loop instead of creating a new one
Roman Gareev [Mon, 15 Feb 2016 14:48:50 +0000 (14:48 +0000)]
Tweak the LICM code to reuse the first sub-loop instead of creating a new one

LICM starts with an *empty* AST, and then merges in each sub-loop. While the
add code is appropriate for sub-loop 2 and up, it's utterly unnecessary for
sub-loop 1. If the AST starts off empty, we can just clone/move the contents
of the subloop into the containing AST.

Reviewed-by: Philip Reames <listmail@philipreames.com>
Differential Revision: http://reviews.llvm.org/D16753

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

8 years ago[X86] More thorough partial-register division checks
Simon Pilgrim [Mon, 15 Feb 2016 14:09:35 +0000 (14:09 +0000)]
[X86] More thorough partial-register division checks

For when grep counts are just not enough...

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

8 years ago[X86] Regenerated 64/128 bit multiply tests
Simon Pilgrim [Mon, 15 Feb 2016 14:04:05 +0000 (14:04 +0000)]
[X86] Regenerated 64/128 bit multiply tests

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

8 years ago[X86][SSE] More thorough testing of all-ones vectors re-materialization
Simon Pilgrim [Mon, 15 Feb 2016 13:50:48 +0000 (13:50 +0000)]
[X86][SSE] More thorough testing of all-ones vectors re-materialization

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

8 years ago[X86][SSE] Regenerated uint2fp special case tests
Simon Pilgrim [Mon, 15 Feb 2016 13:41:41 +0000 (13:41 +0000)]
[X86][SSE] Regenerated uint2fp special case tests

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