oota-llvm.git
9 years ago[X86] Call getScalarSizeInBits() instead of getScalarType().getScalarSizeInBits(...
Craig Topper [Sat, 31 Oct 2015 18:14:15 +0000 (18:14 +0000)]
[X86] Call getScalarSizeInBits() instead of getScalarType().getScalarSizeInBits(). NFC

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

9 years ago[X86] Remove two const references to the return value of a constructor and just use...
Craig Topper [Sat, 31 Oct 2015 17:28:02 +0000 (17:28 +0000)]
[X86] Remove two const references to the return value of a constructor and just use normal object creation syntax. NFC

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

9 years ago[X86] Replace EVT with MVT in some more places. NFC
Craig Topper [Sat, 31 Oct 2015 17:27:59 +0000 (17:27 +0000)]
[X86] Replace EVT with MVT in some more places. NFC

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

9 years ago[X86] Fix indentation of case statements in switch. NFC
Craig Topper [Sat, 31 Oct 2015 17:27:56 +0000 (17:27 +0000)]
[X86] Fix indentation of case statements in switch. NFC

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

9 years ago[X86] Reduce math for index calculation for inserting and extracting subvectors and...
Craig Topper [Sat, 31 Oct 2015 17:27:52 +0000 (17:27 +0000)]
[X86] Reduce math for index calculation for inserting and extracting subvectors and elements by exploiting the fact that all supported vector types have a power 2 number of elements.

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

9 years ago[SimplifyLibCalls] Remove dead code.
Davide Italiano [Sat, 31 Oct 2015 08:28:10 +0000 (08:28 +0000)]
[SimplifyLibCalls] Remove dead code.

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

9 years agoAdd a unittest for SmallDenseMap that tests assigning a SmallDenseMap when it is...
Michael Gottesman [Sat, 31 Oct 2015 05:23:53 +0000 (05:23 +0000)]
Add a unittest for SmallDenseMap that tests assigning a SmallDenseMap when it is not small.

This complements CopyConstructorNotSmallTest. If we are testing the copy
constructor in such a way, we should also probably test assignment in the same
way.

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

9 years agoAdd a sys::OwningMemoryBlock class, which is a sys::MemoryBlock that owns its
Lang Hames [Sat, 31 Oct 2015 00:55:32 +0000 (00:55 +0000)]
Add a sys::OwningMemoryBlock class, which is a sys::MemoryBlock that owns its
underlying memory, and will automatically release it on destruction.

Use this to tidy up the orc::IndirectStubsInfo class.

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

9 years ago[FunctionAttrs] Inline the prototype attribute inference to an existing
Chandler Carruth [Sat, 31 Oct 2015 00:28:37 +0000 (00:28 +0000)]
[FunctionAttrs] Inline the prototype attribute inference to an existing
loop over the SCC.

The separate function wasn't really adding much, NFC.

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

9 years ago[PM] Port StripDeadPrototypes to the new pass manager
Justin Bogner [Fri, 30 Oct 2015 23:28:12 +0000 (23:28 +0000)]
[PM] Port StripDeadPrototypes to the new pass manager

This is a really straightforward port. Also adds a test for the pass,
since it only seemed to be tested tangentially before.

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

9 years ago[PM] Port ADCE to the new pass manager
Justin Bogner [Fri, 30 Oct 2015 23:13:18 +0000 (23:13 +0000)]
[PM] Port ADCE to the new pass manager

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

9 years agoWhitespace. NFC
Justin Bogner [Fri, 30 Oct 2015 23:02:38 +0000 (23:02 +0000)]
Whitespace. NFC

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

9 years agoPM: Print the IR unit's name in debug output. NFC
Justin Bogner [Fri, 30 Oct 2015 22:58:15 +0000 (22:58 +0000)]
PM: Print the IR unit's name in debug output. NFC

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

9 years agoImplemented the code to make llvm-nm’s -g option work.
Kevin Enderby [Fri, 30 Oct 2015 19:55:32 +0000 (19:55 +0000)]
Implemented the code to make llvm-nm’s -g option work.

While llvm-nm parses the -g option and has help that describes it as:

  -extern-only            - Show only external symbols

There is no code in the program to use the boolean valve it sets from the
command line.

rdar://23261095

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

9 years ago[FunctionAttrs] Separate another chunk of the logic for functionattrs
Chandler Carruth [Fri, 30 Oct 2015 16:48:08 +0000 (16:48 +0000)]
[FunctionAttrs] Separate another chunk of the logic for functionattrs
from its pass harness by providing a lambda to query for AA results.

This allows the legacy pass to easily provide a lambda that uses the
special helpers to construct function AA results from a legacy CGSCC
pass. With the new pass manager (the next patch) the lambda just
directly wraps the intuitive query API.

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

9 years ago[WebAssembly] Fix import statement
JF Bastien [Fri, 30 Oct 2015 16:41:21 +0000 (16:41 +0000)]
[WebAssembly] Fix import statement

Summary:
Imports should be generated like (param i32 f32...) not (param i32) (param f32) ...

Author: binji
Reviewers: jfb
Subscribers: jfb, dschuff

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

9 years agoARM: add extra test for watchOS ABI
Tim Northover [Fri, 30 Oct 2015 16:29:44 +0000 (16:29 +0000)]
ARM: add extra test for watchOS ABI

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

9 years ago[SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes
Silviu Baranga [Fri, 30 Oct 2015 15:02:28 +0000 (15:02 +0000)]
[SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes

Summary:
When forming expressions for phi nodes having an incoming value from
outside the loop A and a value coming from the previous iteration B
we were forming an AddRec if:
  - B was an AddRec
  - the value A was equal to the value for B at iteration -1 (or equal
    to the value of B shifted by one iteration, at iteration 0)

In this case, we were computing the expression to be the expression of
B, shifted by one iteration.

This changes generalizes the logic above by removing the restriction that
B needs to be an AddRec. For this we introduce two expression rewriters
that allow us to
  - shift an expression by one iteration
  - get the value of an expression at iteration 0

This allows us to get SCEV expressions for PHI nodes when these expressions
are not AddRecExprs.

Reviewers: sanjoy

Subscribers: llvm-commits, sanjoy

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

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

9 years agoRecommit r251680 (also need to update clang test)
Dehao Chen [Fri, 30 Oct 2015 05:07:15 +0000 (05:07 +0000)]
Recommit r251680 (also need to update clang test)

Update the discriminator assignment algorithm

* If a scope has already been assigned a discriminator, do not reassign a nested discriminator for it.
* If the file and line both match, even if the column does not match, we should assign a new discriminator for the stmt.

original code:
; #1 int foo(int i) {
; #2 if (i == 3 || i == 5) return 100; else return 99;
; #3 }

; i == 3: discriminator 0
; i == 5: discriminator 2
; return 100: discriminator 1
; return 99: discriminator 3

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

9 years agoRemove oneline.ll test.
Dehao Chen [Fri, 30 Oct 2015 04:48:24 +0000 (04:48 +0000)]
Remove oneline.ll test.

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

9 years ago[X86] Use is128BitVector/is256BitVector/is512BitVector in place of getSizeInBits...
Craig Topper [Fri, 30 Oct 2015 04:31:18 +0000 (04:31 +0000)]
[X86] Use is128BitVector/is256BitVector/is512BitVector in place of getSizeInBits == in some places. NFC

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

9 years ago[X86] Minor formatting fixes. NFC.
Craig Topper [Fri, 30 Oct 2015 04:31:14 +0000 (04:31 +0000)]
[X86] Minor formatting fixes. NFC.

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

9 years agoRevert r251680:
Dehao Chen [Fri, 30 Oct 2015 04:29:05 +0000 (04:29 +0000)]
Revert r251680:

Update the discriminator assignment algorithm

* If a scope has already been assigned a discriminator, do not reassign a nested discriminator for it.
* If the file and line both match, even if the column does not match, we should assign a new discriminator for the stmt.

original code:
; #1 int foo(int i) {
; #2 if (i == 3 || i == 5) return 100; else return 99;
; #3 }

; i == 3: discriminator 0
; i == 5: discriminator 2
; return 100: discriminator 1
; return 99: discriminator 3

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

9 years ago[Orc] Expose the compile callback API through the C bindings.
Lang Hames [Fri, 30 Oct 2015 03:20:21 +0000 (03:20 +0000)]
[Orc] Expose the compile callback API through the C bindings.

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

9 years ago[X86] Use MVT instead of EVT in some places. NFC
Craig Topper [Fri, 30 Oct 2015 03:19:12 +0000 (03:19 +0000)]
[X86] Use MVT instead of EVT in some places. NFC

Prior to this the compiled code probably had extra checks for extended types that won't ever execute.

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

9 years agoUpdate the discriminator assignment algorithm
Dehao Chen [Fri, 30 Oct 2015 02:38:29 +0000 (02:38 +0000)]
Update the discriminator assignment algorithm

* If a scope has already been assigned a discriminator, do not reassign a nested discriminator for it.
* If the file and line both match, even if the column does not match, we should assign a new discriminator for the stmt.

original code:
; #1 int foo(int i) {
; #2 if (i == 3 || i == 5) return 100; else return 99;
; #3 }

; i == 3: discriminator 0
; i == 5: discriminator 2
; return 100: discriminator 1
; return 99: discriminator 3

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

9 years ago[MC] Make another header NDEBUG-free.
Davide Italiano [Fri, 30 Oct 2015 01:25:50 +0000 (01:25 +0000)]
[MC] Make another header NDEBUG-free.

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

9 years agoLet the users of LLVMSymbolizer decide whether they want to symbolize inlined frames.
Alexey Samsonov [Fri, 30 Oct 2015 00:40:20 +0000 (00:40 +0000)]
Let the users of LLVMSymbolizer decide whether they want to symbolize inlined frames.

Introduce LLVMSymbolizer::symbolizeInlinedCode() instead of switching
on PrintInlining option passed to the constructor. This will be needed
once we retrun structured data (instead of std::string) from
LLVMSymbolizer and move printing logic out.

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

9 years agollvm/ExecutionEngine/Orc/LogicalDylib.h: Satisfy Modules.
NAKAMURA Takumi [Fri, 30 Oct 2015 00:38:01 +0000 (00:38 +0000)]
llvm/ExecutionEngine/Orc/LogicalDylib.h: Satisfy Modules.

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

9 years ago[LLVMSymbolize] Simplify SymbolizableObjectFile::symbolizeInlinedCode(). NFC.
Alexey Samsonov [Fri, 30 Oct 2015 00:02:55 +0000 (00:02 +0000)]
[LLVMSymbolize] Simplify SymbolizableObjectFile::symbolizeInlinedCode(). NFC.

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

9 years agoRevert "Don't assert if materializing before seeing any function bodies"
Filipe Cabecinhas [Fri, 30 Oct 2015 00:00:58 +0000 (00:00 +0000)]
Revert "Don't assert if materializing before seeing any function bodies"

This reverts r251667 since it broke the bots.

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

9 years ago[LLVMSymbolize] Move printing the description of a global into a separate function...
Alexey Samsonov [Thu, 29 Oct 2015 23:49:19 +0000 (23:49 +0000)]
[LLVMSymbolize] Move printing the description of a global into a separate function. NFC.

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

9 years agoDon't assert if materializing before seeing any function bodies
Filipe Cabecinhas [Thu, 29 Oct 2015 23:37:28 +0000 (23:37 +0000)]
Don't assert if materializing before seeing any function bodies

This assert was reachable from user input. A minimized test case (no
FUNCTION_BLOCK_ID record) is attached.

Bug found with afl-fuzz

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

9 years agoRevert "[ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll"
Weiming Zhao [Thu, 29 Oct 2015 22:34:59 +0000 (22:34 +0000)]
Revert "[ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll"

Summary:
This reverts commit 79c37e1a4ff1e634da8f95322f080601b4c815fc.

    This test passes locally but fails on the community buildbot. So we will let it
    XFAIL for now.

Patched by Mandeep Singh Grang (mgrang@codeaurora.org)

Reviewers: kparzysz, weimingz

Subscribers: aemerson, rengolin, llvm-commits

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

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

9 years ago[LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).
Alexey Samsonov [Thu, 29 Oct 2015 22:21:37 +0000 (22:21 +0000)]
[LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).

Summary:
This is mostly NFC. It is a first step in cleaning up LLVMSymbolize
library. It removes "ModuleInfo" class which bundles together ObjectFile
and its debug info context in favor of:
  * abstract SymbolizableModule in public headers;
  * SymbolizableObjectFile subclass in implementation.

Additionally, SymbolizableObjectFile is now created via factory, so we
can properly detect object parsing error at this stage instead of keeping
the broken half-parsed object. As a next step, we would be able to
propagate the error all the way back to the library user.

Further improvements might include:
  * factoring out the logic of finding appropriate file with debug info
    for a given object file, and caching all parsed object files into a
    separate class [A].
  * factoring out DILineInfo rendering [B].
This would make what is now a heavyweight "LLVMSymbolizer" a relatively
straightforward class, that calls into [A] to turn filepath into a
SymbolizableModule, delegates actual symbolization to concrete SymbolizableModule
implementation, and lets [C] render the result.

Reviewers: dblaikie, echristo, rafael

Subscribers: llvm-commits

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

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

9 years ago[X86][SSE] Added load+sext tests for 16i1->16i8 and 32i1->32i8
Simon Pilgrim [Thu, 29 Oct 2015 22:19:21 +0000 (22:19 +0000)]
[X86][SSE] Added load+sext tests for 16i1->16i8 and 32i1->32i8

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

9 years ago[X86][SSE] Shuffle blends with zero
Simon Pilgrim [Thu, 29 Oct 2015 22:11:28 +0000 (22:11 +0000)]
[X86][SSE] Shuffle blends with zero

This patch generalizes the zeroing of vector elements with the BLEND instructions. Currently a zero vector will only blend if the shuffled elements are correctly inline, this patch recognises when a vector input is zero (or zeroable) and modifies a local copy of the shuffle mask to support a blend. As a zeroable vector input may not be all zeroes, the zeroable vector is regenerated if necessary.

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

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

9 years ago[Orc] Teach IndirectStubsManager to manage an expandable pool of stubs, rather
Lang Hames [Thu, 29 Oct 2015 22:04:22 +0000 (22:04 +0000)]
[Orc] Teach IndirectStubsManager to manage an expandable pool of stubs, rather
than a pre-allocated slab of stubs. Also add a convenience method for creating a
single stub, rather than a whole block a time.

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

9 years agoclang-format lib/Transforms/Utils/AddDiscriminators.cpp
Dehao Chen [Thu, 29 Oct 2015 21:25:33 +0000 (21:25 +0000)]
clang-format lib/Transforms/Utils/AddDiscriminators.cpp

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

9 years agoFix test check label.
Teresa Johnson [Thu, 29 Oct 2015 21:24:38 +0000 (21:24 +0000)]
Fix test check label.

Summary:
I noticed when manually modifying this test that it was passing when I
expected it to fail. Looks like the combination of LABEL and NOT on the
check does not work. This can also be seen when running FileCheck with
only that one -check-prefix (removing the additional -check-prefix=B):

/usr/local/google/home/tejohnson/llvm/llvm_11_build/./bin/llvm-link -S -internalize -only-needed /usr/local/google/home/tejohnson/llvm/llvm_11_build/test/Linker/Output/link-flags.ll.tmp.b.bc /usr/local/google/home/tejohnson/llvm/llvm_11_build/test/Linker/Output/link-flags.ll.tmp.c.bc | /usr/local/google/home/tejohnson/llvm/llvm_11_build/./bin/FileCheck /usr/local/google/home/tejohnson/llvm/llvm_11/test/Linker/link-flags.ll -check-prefix=CN
error: no check strings found with prefix 'CN:'

The CN prefix checks don't in fact need "LABEL" so remove that.

Reviewers: tra

Subscribers: llvm-commits

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

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

9 years ago[ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll
Weiming Zhao [Thu, 29 Oct 2015 20:51:54 +0000 (20:51 +0000)]
[ARM] Remove XFAIL on test/CodeGen/Generic/MachineBranchProb.ll

Summary: Refer PR23377. This test was XFAIL'ed for Hexagon as well as ARM. But it has now started passing for ARM.

Reviewers: hans, rengolin, aemerson, kparzysz

Subscribers: aemerson, llvm-commits, rengolin

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

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

9 years ago[Orc] Rename IndirectStubsManagerBase method 'init' to 'createStubs'.
Lang Hames [Thu, 29 Oct 2015 18:36:27 +0000 (18:36 +0000)]
[Orc] Rename IndirectStubsManagerBase method 'init' to 'createStubs'.

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

9 years ago[FunctionAttrs] Provide a single SCC node set to all of the
Chandler Carruth [Thu, 29 Oct 2015 18:29:15 +0000 (18:29 +0000)]
[FunctionAttrs] Provide a single SCC node set to all of the
transformations in FunctionAttrs rather than building a new one each
time.

This isn't trivial because there are different heuristics from different
passes for exactly what set they want. The primary difference is whether
an *overridable* function completely disables the synthesis of
attributes. I've modeled this by directly testing for overridable, and
using the common set that excludes external and opt-none functions.

This does cause some changes by disabling more optimizations in the face
of opt-none. Specifically, we were still optimizing *calls* to opt-none
functions based on their attributes, just not the bodies. It seems
better to be conservative on both fronts given the intended semanticas
here (best effort to not assume or disturb anything). I've not tried to
test this change as it seems complex, brittle, and not important to the
implicit contract of opt-none. Instead, it seems more like a choice that
should be dictated by the simplified implementation and the change to be
acceptable differences within the space of opt-none.

A big benefit here is that these transformations no longer rely on the
legacy pass manager's SCC types, they just work on generic sets of
function pointers. This will make it easy to re-use their logic in the
new pass manager.

I've also made the transforms static functions instead of members where
trivial while I was touching the signatures.

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

9 years agoRevert r251593.
Diego Novillo [Thu, 29 Oct 2015 16:20:38 +0000 (16:20 +0000)]
Revert r251593.

The patch in r251593 was only papering over the problem. The actual fix
was committed in r251623.

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

9 years ago[SystemZ] Make the CCRegs regclass non-allocatable.
Jonas Paulsson [Thu, 29 Oct 2015 16:13:55 +0000 (16:13 +0000)]
[SystemZ] Make the CCRegs regclass non-allocatable.

This was discovered to be necessary while running memchr-01.ll with
-verify-machinstrs, because it is not allowed to have a phys reg live
accross block boundaries while on SSA form, if the register is
allocatable (expect in entry block and landing pads).

In this test case, stringRRE pseudos are expanded after isel by adding
a loop block which produces a live out CC register. To make the test
pass, it was also necessary to not say that StringRRELoop pseudo uses
R0L, this is only true for the StringRRE opcode.

-verify-machineinstrs added to memchr-01.ll test.

New test case int-cmp-51.ll to test that MachineCSE can eliminate
an identical compare (which it couldn't do before).

Reviewed by Ulrich Weigand

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

9 years agoAMDGPU/SI: handle undef for llvm.SI.packf16
Marek Olsak [Thu, 29 Oct 2015 15:29:09 +0000 (15:29 +0000)]
AMDGPU/SI: handle undef for llvm.SI.packf16

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

9 years agoAMDGPU/SI: use S_OR for fneg (fabs f32)
Marek Olsak [Thu, 29 Oct 2015 15:29:05 +0000 (15:29 +0000)]
AMDGPU/SI: use S_OR for fneg (fabs f32)

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

9 years agoAMDGPU/SI: use S_AND for i1 trunc
Marek Olsak [Thu, 29 Oct 2015 15:05:03 +0000 (15:05 +0000)]
AMDGPU/SI: use S_AND for i1 trunc

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

9 years ago[mips] wrong opcode for ll/sc instructions on mipsr6 when -integrated-as is used
Zoran Jovanovic [Thu, 29 Oct 2015 14:40:19 +0000 (14:40 +0000)]
[mips] wrong opcode for ll/sc instructions on mipsr6 when -integrated-as is used

Summary:
This commit resolves wrong opcodes for ll and sc instructions for r6 architecutres, which were generated in method MipsTargetLowering::emitAtomicBinary.

Author: Jelena.Losic

Reviewers: dsanders

Subscribers: dsanders, llvm-commits

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

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

9 years agoRecognize that ARM1176JZ[F]-S support TrustZone
Artyom Skrobov [Thu, 29 Oct 2015 13:56:19 +0000 (13:56 +0000)]
Recognize that ARM1176JZ[F]-S support TrustZone

Summary:
ARMv6KZ cores were set up incorrectly in ARM.td; also, the SMI mnemonic
(the old name for SMC, as defined in ARMv6KZ) wasn't supported.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

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

9 years ago[sanitizer] [msan] Unify aarch64 mapping
Adhemerval Zanella [Thu, 29 Oct 2015 13:02:30 +0000 (13:02 +0000)]
[sanitizer] [msan] Unify aarch64 mapping

This patch unify the 39-bit and 42-bit mapping for aarch64 to use only
one instrumentation algorithm.  This removes compiler flag
SANITIZER_AARCH64_VMA requirement for MSAN on aarch64.

The mapping to use now is for 39 and 42-bits:

    0x00000000000ULL-0x01000000000ULL  MappingDesc::INVALID
    0x01000000000ULL-0x02000000000ULL  MappingDesc::SHADOW
    0x02000000000ULL-0x03000000000ULL  MappingDesc::ORIGIN
    0x03000000000ULL-0x04000000000ULL  MappingDesc::SHADOW
    0x04000000000ULL-0x05000000000ULL  MappingDesc::ORIGIN
    0x05000000000ULL-0x06000000000ULL  MappingDesc::APP
    0x06000000000ULL-0x07000000000ULL  MappingDesc::INVALID
    0x07000000000ULL-0x08000000000ULL  MappingDesc::APP

And only for 42-bits:

    0x08000000000ULL-0x09000000000ULL  MappingDesc::INVALID
    0x09000000000ULL-0x0A000000000ULL  MappingDesc::SHADOW
    0x0A000000000ULL-0x0B000000000ULL  MappingDesc::ORIGIN
    0x0B000000000ULL-0x0F000000000ULL  MappingDesc::INVALID
    0x0F000000000ULL-0x10000000000ULL  MappingDesc::APP
    0x10000000000ULL-0x11000000000ULL  MappingDesc::INVALID
    0x11000000000ULL-0x12000000000ULL  MappingDesc::APP
    0x12000000000ULL-0x17000000000ULL  MappingDesc::INVALID
    0x17000000000ULL-0x18000000000ULL  MappingDesc::SHADOW
    0x18000000000ULL-0x19000000000ULL  MappingDesc::ORIGIN
    0x19000000000ULL-0x20000000000ULL  MappingDesc::INVALID
    0x20000000000ULL-0x21000000000ULL  MappingDesc::APP
    0x21000000000ULL-0x26000000000ULL  MappingDesc::INVALID
    0x26000000000ULL-0x27000000000ULL  MappingDesc::SHADOW
    0x27000000000ULL-0x28000000000ULL  MappingDesc::ORIGIN
    0x28000000000ULL-0x29000000000ULL  MappingDesc::SHADOW
    0x29000000000ULL-0x2A000000000ULL  MappingDesc::ORIGIN
    0x2A000000000ULL-0x2B000000000ULL  MappingDesc::APP
    0x2B000000000ULL-0x2C000000000ULL  MappingDesc::INVALID
    0x2C000000000ULL-0x2D000000000ULL  MappingDesc::SHADOW
    0x2D000000000ULL-0x2E000000000ULL  MappingDesc::ORIGIN
    0x2E000000000ULL-0x2F000000000ULL  MappingDesc::APP
    0x2F000000000ULL-0x39000000000ULL  MappingDesc::INVALID
    0x39000000000ULL-0x3A000000000ULL  MappingDesc::SHADOW
    0x3A000000000ULL-0x3B000000000ULL  MappingDesc::ORIGIN
    0x3B000000000ULL-0x3C000000000ULL  MappingDesc::APP
    0x3C000000000ULL-0x3D000000000ULL  MappingDesc::INVALID
    0x3D000000000ULL-0x3E000000000ULL  MappingDesc::SHADOW
    0x3E000000000ULL-0x3F000000000ULL  MappingDesc::ORIGIN
    0x3F000000000ULL-0x40000000000ULL  MappingDesc::APP

And although complex it provides a better memory utilization that
previous one.

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

9 years agoFix use-after-free. Thanks ASAN for giving me a detailed report :-).
Daniel Jasper [Thu, 29 Oct 2015 12:49:37 +0000 (12:49 +0000)]
Fix use-after-free. Thanks ASAN for giving me a detailed report :-).

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

9 years ago[mips] Check the register class before replacing materializations of zero with $zero...
Vasileios Kalintiris [Thu, 29 Oct 2015 10:17:16 +0000 (10:17 +0000)]
[mips] Check the register class before replacing materializations of zero with $zero in microMIPS.

Summary:
The microMIPS register class GPRMM16 does not contain the $zero register.
However, MipsSEDAGToDAGISel::replaceUsesWithZeroReg() would replace uses
of the $dst register:

  [d]addiu, $dst, $zero, 0

with the $zero register, without checking for membership in the register
class of the target machine operand.

Reviewers: dsanders

Subscribers: llvm-commits, dsanders

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

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

9 years ago[MachineVerifier] Analyze MachineMemOperands for mem-to-mem moves.
Jonas Paulsson [Thu, 29 Oct 2015 08:28:35 +0000 (08:28 +0000)]
[MachineVerifier] Analyze MachineMemOperands for mem-to-mem moves.

Since the verifier will give false reports if it incorrectly thinks MI is
loading or storing using an FI, it is necessary to scan memoperands and
find out how the FI is used in the instruction. This should be relatively
rare.

Needed to make CodeGen/SystemZ/spill-01.ll pass, which now runs with this flag.

Reviewed by Quentin Colombet.

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

9 years agoOrcJITTests: Update libdeps corresponding to r251604.
NAKAMURA Takumi [Thu, 29 Oct 2015 06:40:04 +0000 (06:40 +0000)]
OrcJITTests: Update libdeps corresponding to r251604.

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

9 years agoRevert the revision 251592 as it fails a test on some platforms.
Cong Hou [Thu, 29 Oct 2015 05:35:22 +0000 (05:35 +0000)]
Revert the revision 251592 as it fails a test on some platforms.

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

9 years agoRevert "ScheduleDAGInstrs: Remove IsPostRA flag"
Matthias Braun [Thu, 29 Oct 2015 05:06:41 +0000 (05:06 +0000)]
Revert "ScheduleDAGInstrs: Remove IsPostRA flag"

It broke 3 arm testcases.

This reverts commit r251608.

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

9 years agoFix an unused variable warning which broke the clang-cmake-mips builder
Philip Reames [Thu, 29 Oct 2015 04:21:49 +0000 (04:21 +0000)]
Fix an unused variable warning which broke the clang-cmake-mips builder

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

9 years ago[WebAssembly] Update opcode name format for conversions
JF Bastien [Thu, 29 Oct 2015 04:10:52 +0000 (04:10 +0000)]
[WebAssembly] Update opcode name format for conversions

Summary:
Conversion opcode name format should be f64.convert_u/i64 not f64_convert_u

Author: s3ththompson
Reviewers: jfb
Subscribers: sunfish, jfb, llvm-commits, dschuff
Differential Revision: http://reviews.llvm.org/D14160

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

9 years ago[PGO] Do not emit runtime hook user function for Linux
Xinliang David Li [Thu, 29 Oct 2015 04:08:31 +0000 (04:08 +0000)]
[PGO] Do not emit runtime hook user function for Linux

Clang driver now injects -u<hook_var> flag in the linker
command line, in which case user function is not needed
any more.

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

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

9 years agoMachineScheduler: Fix typo in debug message
Matthias Braun [Thu, 29 Oct 2015 03:57:28 +0000 (03:57 +0000)]
MachineScheduler: Fix typo in debug message

Maybe I just missed the humor there ;-)

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

9 years agoScheduleDAGInstrs: Remove IsPostRA flag
Matthias Braun [Thu, 29 Oct 2015 03:57:24 +0000 (03:57 +0000)]
ScheduleDAGInstrs: Remove IsPostRA flag

This was a layering violation in ScheduleDAGInstrs (and
MachineSchedulerBase) they both shouldn't know directly whether they are
used by the PostMachineScheduler or the MachineScheduler.

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

9 years agoMachineScheduler: Use ranged for and slightly simplify the code
Matthias Braun [Thu, 29 Oct 2015 03:57:17 +0000 (03:57 +0000)]
MachineScheduler: Use ranged for and slightly simplify the code

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

9 years ago[LVI/CVP] Teach LVI about range metadata
Philip Reames [Thu, 29 Oct 2015 03:57:17 +0000 (03:57 +0000)]
[LVI/CVP] Teach LVI about range metadata

Somewhat shockingly for an analysis pass which is computing constant ranges, LVI did not understand the ranges provided by range metadata.

As part of this change, I included a change to CVP primarily because doing so made it much easier to write small self contained test cases. CVP was previously only handling the non-local operand case, but given that LVI can sometimes figure out information about instructions standalone, I don't see any reason to restrict this.  There could possibly be a compile time impact from this, but I suspect it should be minimal.  If anyone has an example which substaintially regresses, please let me know.  I could restrict the block local handling to ICmps feeding Terminator instructions if needed.

Note that this patch continues a somewhat bad practice in LVI. In many cases, we know facts about values, and separate context sensitive facts about values. LVI makes no effort to distinguish and will frequently cache the same value fact repeatedly for different contexts. I would like to change this, but that's a large enough change that I want it to go in separately with clear documentation of what's changing. Other examples of this include the non-null handling, and arguments.

As a meta comment: the entire motivation of this change was being able to write smaller (aka reasonable sized) test cases for a future patch teaching LVI about select instructions.

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

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

9 years ago[Orc] Add missing file for r251604.
Lang Hames [Thu, 29 Oct 2015 03:53:42 +0000 (03:53 +0000)]
[Orc] Add missing file for r251604.

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

9 years ago[Orc] Add support for RuntimeDyld::setProcessAllSections.
Lang Hames [Thu, 29 Oct 2015 03:52:58 +0000 (03:52 +0000)]
[Orc] Add support for RuntimeDyld::setProcessAllSections.

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

9 years ago[InstSimplify] sgt on i1s also encodes implication
Philip Reames [Thu, 29 Oct 2015 03:19:10 +0000 (03:19 +0000)]
[InstSimplify] sgt on i1s also encodes implication

Follow on to http://reviews.llvm.org/D13074, implementing something pointed out by Sanjoy. His truth table from his comment on that bug summarizes things well:
LHS | RHS | LHS >=s RHS | LHS implies RHS
0 | 0 | 1 (0 >= 0) | 1
0 | 1 | 1 (0 >= -1) | 1
1 | 0 | 0 (-1 >= 0) | 0
1 | 1 | 1 (-1 >= -1) | 1

The key point is that an "i1 1" is the value "-1", not "1".

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

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

9 years ago[SimplifyCFG] Constant fold a branch implied by it's incoming edge
Philip Reames [Thu, 29 Oct 2015 03:11:49 +0000 (03:11 +0000)]
[SimplifyCFG] Constant fold a branch implied by it's incoming edge

The most common use case is when eliminating redundant range checks in an example like the following:
c = a[i+1] + a[i];

Note that all the smarts of the transform (the implication engine) is already in ValueTracking and is tested directly through InstructionSimplify.

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

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

9 years ago[SimplifyLibCalls] Factor out common unsafe-math checks.
Davide Italiano [Thu, 29 Oct 2015 02:58:44 +0000 (02:58 +0000)]
[SimplifyLibCalls] Factor out common unsafe-math checks.

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

9 years agoRemove CRLF line endings.
Benjamin Kramer [Thu, 29 Oct 2015 02:33:05 +0000 (02:33 +0000)]
Remove CRLF line endings.

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

9 years agoTweak test check pattern to fix bot failure.
Diego Novillo [Thu, 29 Oct 2015 02:15:02 +0000 (02:15 +0000)]
Tweak test check pattern to fix bot failure.

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

9 years agoAdd a flag vectorizer-maximize-bandwidth in loop vectorizer to enable using larger...
Cong Hou [Thu, 29 Oct 2015 01:28:44 +0000 (01:28 +0000)]
Add a flag vectorizer-maximize-bandwidth in loop vectorizer to enable using larger vectorization factor.

To be able to maximize the bandwidth during vectorization, this patch provides a new flag vectorizer-maximize-bandwidth. When it is turned on, the vectorizer will determine the vectorization factor (VF) using the smallest instead of widest type in the loop. To avoid increasing register pressure too much, estimates of the register usage for different VFs are calculated so that we only choose a VF when its register usage doesn't exceed the number of available registers.

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

9 years ago[PowerPC] Recurse through constants when looking for TLS globals
Hal Finkel [Wed, 28 Oct 2015 23:43:00 +0000 (23:43 +0000)]
[PowerPC] Recurse through constants when looking for TLS globals

We cannot form ctr-based loops around function calls, including calls to
__tls_get_addr used for PIC TLS variables. References to such TLS variables,
however, might be buried within constant expressions, and so we need to search
the entire constant expression to be sure that no references to such TLS
variables exist.

Fixes PR25256, reported by Eric Schweitz. This is a slightly-modified version
of the patch suggested by Eric in the bug report, and a test case I created.

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

9 years ago[PowerPC] Don't return unsupported register classes for asm constraints
Hal Finkel [Wed, 28 Oct 2015 23:03:45 +0000 (23:03 +0000)]
[PowerPC] Don't return unsupported register classes for asm constraints

As a follow-up to r251566, do the same for the other optionally-supported
register classes (mostly for vector registers). Don't return an unavailable
register class (which would cause an assert later), but fail cleanly when
provided an unsupported inline asm constraint.

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

9 years agoARM: add watchOS default version support function.
Tim Northover [Wed, 28 Oct 2015 22:57:14 +0000 (22:57 +0000)]
ARM: add watchOS default version support function.

It's useful for Clang's Driver faff.

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

9 years agoARM: add support for WatchOS's compact unwind information.
Tim Northover [Wed, 28 Oct 2015 22:56:36 +0000 (22:56 +0000)]
ARM: add support for WatchOS's compact unwind information.

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

9 years agoARM: teach backend about WatchOS and TvOS libcalls.
Tim Northover [Wed, 28 Oct 2015 22:51:16 +0000 (22:51 +0000)]
ARM: teach backend about WatchOS and TvOS libcalls.

The most substantial changes are again for watchOS: libcalls are hard-float if
needed and sincos has a different calling convention.

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

9 years agoARM: add backend support for the ABI used in WatchOS
Tim Northover [Wed, 28 Oct 2015 22:46:43 +0000 (22:46 +0000)]
ARM: add backend support for the ABI used in WatchOS

At the LLVM level this ABI is essentially a minimal modification of AAPCS to
support 16-byte alignment for vector types and the stack.

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

9 years agoARM: support .watchos_version_min and .tvos_version_min.
Tim Northover [Wed, 28 Oct 2015 22:36:05 +0000 (22:36 +0000)]
ARM: support .watchos_version_min and .tvos_version_min.

These MachO file directives are used by linkers and other tools to provide
compatibility information, much like the existing .ios_version_min and
.macosx_version_min.

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

9 years agoSamplePGO - Add flag to check sampling coverage.
Diego Novillo [Wed, 28 Oct 2015 22:30:25 +0000 (22:30 +0000)]
SamplePGO - Add flag to check sampling coverage.

This adds the flag -mllvm -sample-profile-check-coverage=N to the
SampleProfile pass. N is the percent of input sample records that the
user expects to apply.  If the pass does not use N% (or more) of the
sample records in the input, it emits a warning.

This is useful to detect some forms of stale profiles. If the code has
drifted enough from the original profile, there will be records that do
not match the IR anymore.

This will not detect cases where a sample profile record for line L is
referring to some other instructions that also used to be at line L.

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

9 years ago[PowerPC] Cleanly reject asm crbit constraint with -crbits
Hal Finkel [Wed, 28 Oct 2015 22:25:52 +0000 (22:25 +0000)]
[PowerPC] Cleanly reject asm crbit constraint with -crbits

When crbits are disabled, cleanly reject the constraint (return the register
class only to cause an assert later).

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

9 years agoRevert "r251451 - [AliasSetTracker] Use mod/ref information for UnknownInstr"
Hal Finkel [Wed, 28 Oct 2015 22:13:41 +0000 (22:13 +0000)]
Revert "r251451 - [AliasSetTracker] Use mod/ref information for UnknownInstr"

It looks like this broke the stage 2 builder:
  http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto/6989/

Original commit message:

AliasSetTracker does not need to convert the access mode to ModRefAccess if the
new visited UnknownInst has only 'REF' modrefinfo to existing pointers in the
sets.

Patch by Andrew Zhogin!

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

9 years ago[Orc] Remove the 'takeOwnershipOfBuffers' kludge.
Lang Hames [Wed, 28 Oct 2015 22:10:27 +0000 (22:10 +0000)]
[Orc] Remove the 'takeOwnershipOfBuffers' kludge.

Keno Fischer fixed the underlying issue that necessitated this in r236341.

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

9 years ago[SCEV] Compute max backedge count for loops with "shift ivs"
Sanjoy Das [Wed, 28 Oct 2015 21:27:14 +0000 (21:27 +0000)]
[SCEV] Compute max backedge count for loops with "shift ivs"

This teaches SCEV to compute //max// backedge taken counts for loops
like

    for (int i = k; i != 0; i >>>= 1)
      whatever();

SCEV yet cannot represent the exact backedge count for these loops, and
this patch does not change that.  This is really geared towards teaching
SCEV that loops like the above are *not* infinite.

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

9 years ago[JumpThreading] Use dominating conditions to prove implications
Sanjoy Das [Wed, 28 Oct 2015 21:27:08 +0000 (21:27 +0000)]
[JumpThreading] Use dominating conditions to prove implications

Summary:
If P branches to Q conditional on C and Q branches to R conditional on
C' and C => C' then the branch conditional on C' can be folded to an
unconditional branch.

Reviewers: reames

Subscribers: llvm-commits

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

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

9 years ago[Orc] Require target support for host before running execution unit tests.
Lang Hames [Wed, 28 Oct 2015 20:08:51 +0000 (20:08 +0000)]
[Orc] Require target support for host before running execution unit tests.

Orc unit tests that execute code shouldn't run if the compiler doesn't have
target support for the host machine.

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

9 years ago[PowerPC] Fix CodeGen/PowerPC/crbit-asm.ll test for -O1
Hal Finkel [Wed, 28 Oct 2015 19:58:02 +0000 (19:58 +0000)]
[PowerPC] Fix CodeGen/PowerPC/crbit-asm.ll test for -O1

Add the crbits processor feature so that the test can be run at -O1, etc.
regardless of the default crbits setting.

Fixes PR23778.

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

9 years ago[PGO] RawProf Reader code cleanup
Xinliang David Li [Wed, 28 Oct 2015 19:34:04 +0000 (19:34 +0000)]
[PGO] RawProf Reader code cleanup

Add a couple of helper methods to make the primary
raw profile reader interface's implementation more
readable. It also hides more format details. This
patch has no functional change.

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

9 years ago[CMake] Disable adding the test suite as a projects subdirectory
Chris Bieneman [Wed, 28 Oct 2015 18:36:56 +0000 (18:36 +0000)]
[CMake] Disable adding the test suite as a projects subdirectory

This will never work as an add_subdirectory call, so we should just make sure it doesn't happen. To do this properly we'll need to add it under clang similar to the external compiler-rt.

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

9 years ago[X86] A small fix in X86/X86TargetTransformInfo.cpp: check a value type is simple...
Cong Hou [Wed, 28 Oct 2015 18:15:46 +0000 (18:15 +0000)]
[X86] A small fix in X86/X86TargetTransformInfo.cpp: check a value type is simple before calling getSimpleVT().

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

9 years ago[AliasAnalysis] Take into account readnone attribute for the function arguments
Igor Laevsky [Wed, 28 Oct 2015 17:54:48 +0000 (17:54 +0000)]
[AliasAnalysis] Take into account readnone attribute for the function arguments

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

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

9 years agoWebAssembly: disable some loop-idiom recognition
JF Bastien [Wed, 28 Oct 2015 17:50:23 +0000 (17:50 +0000)]
WebAssembly: disable some loop-idiom recognition

memset/memcpy aren't fully supported yet. We should invert this test
once they are supported.

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

9 years agoSamplePGO - Clear per-function data after applying a profile.
Diego Novillo [Wed, 28 Oct 2015 17:40:22 +0000 (17:40 +0000)]
SamplePGO - Clear per-function data after applying a profile.

The pass was keeping around a lot of per-function data (visited blocks,
edges, dominance, etc) that is just taking up memory for no reason. In
fact, from function to function it could potentially confuse the
propagator since some maps are indexed by line offsets which can be
common between functions.

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

9 years ago[AliasAnalysis] Take into account readonly attribute for the function arguments
Igor Laevsky [Wed, 28 Oct 2015 16:42:00 +0000 (16:42 +0000)]
[AliasAnalysis] Take into account readonly attribute for the function arguments

In getArgModRefInfo we consider all arguments as having MRI_ModRef.
However for arguments marked with readonly attribute we can return
more precise answer - MRI_Ref.

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

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

9 years agoTypo.
Chad Rosier [Wed, 28 Oct 2015 15:08:33 +0000 (15:08 +0000)]
Typo.

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

9 years agoReapply: [LIR] Add support for creating memsets from loops with a negative stride.
Chad Rosier [Wed, 28 Oct 2015 14:38:49 +0000 (14:38 +0000)]
Reapply: [LIR] Add support for creating memsets from loops with a negative stride.

The simple fix is to prevent forming memcpy from loops with a negative stride.

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

9 years ago[GlobalOpt] Add newlines to DEBUG messages
James Molloy [Wed, 28 Oct 2015 14:30:53 +0000 (14:30 +0000)]
[GlobalOpt] Add newlines to DEBUG messages

I think these were affected by a change way back when to stop printing newlines in Value::dump() by default. This change simply allows the debug output to be readable.

NFC.

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

9 years ago[ARM] Allow SP in rGPR, starting from ARMv8
Artyom Skrobov [Wed, 28 Oct 2015 13:58:36 +0000 (13:58 +0000)]
[ARM] Allow SP in rGPR, starting from ARMv8

Summary:
This patch handles assembly and disassembly, but not codegen, as of yet.

Additionally, it fixes a bug whereby SP and PC as shifted-reg operands
were treated as predictable in ARMv7 Thumb; and it enables the tests
for invalid and unpredictable instructions to run on both ARMv7 and ARMv8.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

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

9 years agoPut global classes into the appropriate namespace.
Benjamin Kramer [Wed, 28 Oct 2015 13:54:36 +0000 (13:54 +0000)]
Put global classes into the appropriate namespace.

Most of the cases belong into an anonymous namespace. No
functionality change intended.

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

9 years agoRevert "[LIR] Add support for creating memsets from loops with a negative stride."
Chad Rosier [Wed, 28 Oct 2015 13:54:09 +0000 (13:54 +0000)]
Revert "[LIR] Add support for creating memsets from loops with a negative stride."

This reverts commit r251512.  This is causing LNT/chomp to fail.

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