oota-llvm.git
9 years agoDCE: isArrayMalloc() is not used neither in LLVM nor Clang
Mehdi Amini [Mon, 9 Mar 2015 02:57:32 +0000 (02:57 +0000)]
DCE: isArrayMalloc() is not used neither in LLVM nor Clang

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

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

9 years agoSimplify expressions involving boolean constants with clang-tidy
David Blaikie [Mon, 9 Mar 2015 01:57:13 +0000 (01:57 +0000)]
Simplify expressions involving boolean constants with clang-tidy

Patch by Richard (legalize at xmission dot com).

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

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

9 years agoTeach DataLayout to infer a plausible alignment for things even when nothing is speci...
Owen Anderson [Sun, 8 Mar 2015 21:53:59 +0000 (21:53 +0000)]
Teach DataLayout to infer a plausible alignment for things even when nothing is specified by the user.

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

9 years ago[X86][AVX] Fix wrong lowering of VPERM2X128 nodes
Andrea Di Biagio [Sun, 8 Mar 2015 16:28:47 +0000 (16:28 +0000)]
[X86][AVX] Fix wrong lowering of VPERM2X128 nodes

There were cases where the backend computed a wrong permute mask for a VPERM2X128 node.

Example:
\code
define <8 x float> @foo(<8 x float> %a, <8 x float> %b) {
  %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 undef, i32 undef, i32 6, i32 7, i32 undef, i32 undef, i32 6, i32 7>
  ret <8 x float> %shuffle
}
\code end

Before this patch, llc (with -mattr=+avx) emitted the following vperm2f128:
  vperm2f128 $0, %ymm0, %ymm0, %ymm0  # ymm0 = ymm0[0,1,0,1]

With this patch, llc emits a vperm2f128 with a correct permute mask:
  vperm2f128 $17, %ymm0, %ymm0, %ymm0  # ymm0 = ymm0[2,3,2,3]

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

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

9 years agoMake static variables const if possible. Makes them go into a read-only section.
Benjamin Kramer [Sun, 8 Mar 2015 16:07:39 +0000 (16:07 +0000)]
Make static variables const if possible. Makes them go into a read-only section.

Or fold them into a initializer list which has the same effect. NFC.

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

9 years ago[DAGCombiner] Add a shuffle mask commutation helper function. NFCI.
Simon Pilgrim [Sat, 7 Mar 2015 22:33:11 +0000 (22:33 +0000)]
[DAGCombiner] Add a shuffle mask commutation helper function. NFCI.

We have an increasing number of cases where we are creating commuted shuffle masks - all implementing nearly the same code.

This patch adds a static helper function - ShuffleVectorSDNode::commuteMask() and replaces a number of cases to use it.

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

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

9 years agoFix the autoconf build
David Majnemer [Sat, 7 Mar 2015 21:47:46 +0000 (21:47 +0000)]
Fix the autoconf build

lib/ExecutionEngine/Targets has no Makefile, causing the autoconf build
to fail.  Solve this by bringing the COFF implementation of RuntimeDyld
in line like the Mach-O and ELF implementations.

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

9 years agoMake the assertion macros in Verifier and Linter truly variadic.
Benjamin Kramer [Sat, 7 Mar 2015 21:15:40 +0000 (21:15 +0000)]
Make the assertion macros in Verifier and Linter truly variadic.

NFC.

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

9 years agoFix unused variable/function warnings
David Majnemer [Sat, 7 Mar 2015 20:56:50 +0000 (20:56 +0000)]
Fix unused variable/function warnings

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

9 years agoExecutionEngine: Preliminary support for dynamically loadable coff objects
David Majnemer [Sat, 7 Mar 2015 20:21:27 +0000 (20:21 +0000)]
ExecutionEngine: Preliminary support for dynamically loadable coff objects

Provide basic support for dynamically loadable coff objects. Only handles a subset of x64 currently.

Patch by Andy Ayers!

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

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

9 years agoMake constant arrays that are passed to functions as const.
Benjamin Kramer [Sat, 7 Mar 2015 17:41:00 +0000 (17:41 +0000)]
Make constant arrays that are passed to functions as const.

In theory this allows the compiler to skip materializing the array on
the stack. In practice clang often fails to do that, but that's a
different story. NFC.

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

9 years agoUse SDValue bool check to tidyup some possible combines. NFC.
Simon Pilgrim [Sat, 7 Mar 2015 16:34:55 +0000 (16:34 +0000)]
Use SDValue bool check to tidyup some possible combines. NFC.

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

9 years agoAdding parenthesis around logical expressions to silence a -Wparentheses warning...
Aaron Ballman [Sat, 7 Mar 2015 15:16:27 +0000 (15:16 +0000)]
Adding parenthesis around logical expressions to silence a -Wparentheses warning; NFC.

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

9 years agoRemoving spurious semi-colons; NFC
Aaron Ballman [Sat, 7 Mar 2015 15:10:32 +0000 (15:10 +0000)]
Removing spurious semi-colons; NFC

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

9 years agoX86: Roll repetitive code into a loop. NFC.
Benjamin Kramer [Sat, 7 Mar 2015 15:06:16 +0000 (15:06 +0000)]
X86: Roll repetitive code into a loop. NFC.

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

9 years ago[DAGCombiner] Fix wrong folding of AND dag nodes.
Andrea Di Biagio [Sat, 7 Mar 2015 12:24:55 +0000 (12:24 +0000)]
[DAGCombiner] Fix wrong folding of AND dag nodes.

This patch fixes the logic in the DAGCombiner that folds an AND node according
to rule: (and (X (load V)), C) -> (X (load V))

An AND between a vector load 'X' and a constant build_vector 'C' can be folded
into the load itself only if we can prove that the AND operation is redundant.
The algorithm implemented by 'visitAND' firstly computes the splat value 'S'
from C, and then checks if S has the lower 'B' bits set (where B is the size in
bits of the vector element type). The algorithm takes into account also the
'undef' bits in the splat mask.

Unfortunately, the algorithm only worked under the assumption that the size of S
is a multiple of the vector element type. With this patch, we conservatively
avoid folding the AND if the splat bits are not compatible with the vector
element type.

Added X86 test and-load-fold.ll

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

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

9 years ago[Modules] Include the header needed for make_unique, otherwise we can't
Chandler Carruth [Sat, 7 Mar 2015 10:55:47 +0000 (10:55 +0000)]
[Modules] Include the header needed for make_unique, otherwise we can't
build this header in a module.

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

9 years agoTeach the LLVM CMake build how to explicitly use libc++abi when using
Chandler Carruth [Sat, 7 Mar 2015 10:30:34 +0000 (10:30 +0000)]
Teach the LLVM CMake build how to explicitly use libc++abi when using
libc++. This lets me almost self-host on Linux with libc++ and libc++abi
very simply.

Currently, MCJIT and OrcJIT are failing due to uncaught exceptions, and
the Go binding tests are failing to build due to not linking in the
correct C++ standard library.

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

9 years ago[PM] Fixup for r231556 where I missed a dependency on intrinsics
Chandler Carruth [Sat, 7 Mar 2015 09:08:20 +0000 (09:08 +0000)]
[PM] Fixup for r231556 where I missed a dependency on intrinsics
generation.

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

9 years ago[PM] Create a separate library for high-level pass management code.
Chandler Carruth [Sat, 7 Mar 2015 09:02:36 +0000 (09:02 +0000)]
[PM] Create a separate library for high-level pass management code.

This will provide the analogous replacements for the PassManagerBuilder
and other code long term. This code is extracted from the opt tool
currently, and I plan to extend it as I build up support for using the
new pass manager in Clang and other places.

Mailing this out for review in part to let folks comment on the terrible names
here. A brief word about why I chose the names I did.

The library is called "Passes" to try and make it clear that it is a high-level
utility and where *all* of the passes come together and are registered in
a common library. I didn't want it to be *limited* to a registry though, the
registry is just one component.

The class is a "PassBuilder" but this name I'm less happy with. It doesn't
build passes in any traditional sense and isn't a Builder-style API at all. The
class is a PassRegisterer or PassAdder, but neither of those really make a lot
of sense. This class is responsible for constructing passes for registry in an
analysis manager or for population of a pass pipeline. If anyone has a better
name, I would love to hear it. The other candidate I looked at was
PassRegistrar, but that doesn't really fit either. There is no register of all
the passes in use, and so I think continuing the "registry" analog outside of
the registry of pass *names* and *types* is a mistake. The objects themselves
are just objects with the new pass manager.

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

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

9 years ago[DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C)) -> VECTOR_SHUFFLE
Simon Pilgrim [Sat, 7 Mar 2015 05:52:42 +0000 (05:52 +0000)]
[DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C)) -> VECTOR_SHUFFLE

This patch attempts to convert a SCALAR_TO_VECTOR using an operand from an EXTRACT_VECTOR_ELT into a VECTOR_SHUFFLE.

This prevents many cases of spilling scalar data between the gpr + simd registers.

At present the optimization only accepts cases where there is no TRUNC of the scalar type (i.e. all types must match).

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

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

9 years agoTypo.
Eric Christopher [Sat, 7 Mar 2015 01:39:09 +0000 (01:39 +0000)]
Typo.

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

9 years agoRemove use of misched-bench from this test and replace it with
Eric Christopher [Sat, 7 Mar 2015 01:39:06 +0000 (01:39 +0000)]
Remove use of misched-bench from this test and replace it with
non-temporary enabling options. This is part of removing misched-bench
as an option.

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

9 years ago[dsymutil] Apply relocations to DIE data before cloning.
Frederic Riss [Sat, 7 Mar 2015 01:25:09 +0000 (01:25 +0000)]
[dsymutil] Apply relocations to DIE data before cloning.

Doing this gets function's low_pc and global variable's locations right
in the output debug info. It also could get right other attributes
that need to be relocated (in linker terms), but I don't know of any
other than the address attributes.

This doesn't fixup low_pc attributes in compile_unit, lexical_block
or inlined subroutine, nor does it get right high_pc attributes
for function. This will come in a subsequent commit.

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

9 years agoRecommit r231324 with a fix to the ARM execution domain code
Eric Christopher [Sat, 7 Mar 2015 00:12:22 +0000 (00:12 +0000)]
Recommit r231324 with a fix to the ARM execution domain code
to disable lane switching if we don't actually have the instruction
set we want to switch to. Models the earlier check above the
conditional for the pass.

The testcase is one that triggered with the assert that's added
as part of the fix, use it to avoid adding a new testcase as it
highlights the same problem.

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

9 years ago[modules] Mark Analysis/TargetLibraryInfo.def as a textual header.
Richard Smith [Fri, 6 Mar 2015 23:39:54 +0000 (23:39 +0000)]
[modules] Mark Analysis/TargetLibraryInfo.def as a textual header.

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

9 years ago[dsymutil] Support cloning DIE reference attributes.
Frederic Riss [Fri, 6 Mar 2015 23:22:53 +0000 (23:22 +0000)]
[dsymutil] Support cloning DIE reference attributes.

Reference attributes are mainly handled by just creating DIEEntry
attributes for them. There is a special case for DW_FORM_ref_addr
attributes though, because the DIEEntry code needs a DwarfDebug
code to emit them (and we don't have one as we do no CodeGen).
In that case, just use DIEInteger attributes with the right form.

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

9 years ago[dsymutil] Set linked unit start offset early. NFC.
Frederic Riss [Fri, 6 Mar 2015 23:22:50 +0000 (23:22 +0000)]
[dsymutil] Set linked unit start offset early. NFC.

The start offset of a linked unit is known before starting to clone
its DIEs. Handling DW_FORM_ref_addr attributes requires that this
offset is set while cloning the unit. Split CompileUnit::computeOffsets()
into setStartOffset() and computeNextUnitOffset() and call them
repsectively before cloning the DIEs and right after.

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

9 years agoAdd DIEInteger::setValue() method.
Frederic Riss [Fri, 6 Mar 2015 23:22:46 +0000 (23:22 +0000)]
Add DIEInteger::setValue() method.

dsymutil needs to 'patch' attribute values after creating them. Just
add this trivial capability.

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

9 years agoDo not restrict interleaved unrolling to small loops, depending on the target.
Olivier Sallenave [Fri, 6 Mar 2015 23:12:04 +0000 (23:12 +0000)]
Do not restrict interleaved unrolling to small loops, depending on the target.

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

9 years ago[AArch64][LoadStoreOptimizer] Generate LDP + SXTW instead of LD[U]R + LD[U]RSW.
Quentin Colombet [Fri, 6 Mar 2015 22:42:10 +0000 (22:42 +0000)]
[AArch64][LoadStoreOptimizer] Generate LDP + SXTW instead of LD[U]R + LD[U]RSW.
Teach the load store optimizer how to sign extend a result of a load pair when
it helps creating more pairs.
The rational is that loads are more expensive than sign extensions, so if we
gather some in one instruction this is better!

<rdar://problem/20072968>

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

9 years agofixed to test features, not CPUs
Sanjay Patel [Fri, 6 Mar 2015 21:50:42 +0000 (21:50 +0000)]
fixed to test features, not CPUs

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

9 years agofixed to test features, not CPUs
Sanjay Patel [Fri, 6 Mar 2015 21:50:27 +0000 (21:50 +0000)]
fixed to test features, not CPUs

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

9 years agoloosen checking for buildbots
Sanjay Patel [Fri, 6 Mar 2015 21:30:18 +0000 (21:30 +0000)]
loosen checking for buildbots

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Fri, 6 Mar 2015 21:24:56 +0000 (21:24 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Fri, 6 Mar 2015 21:19:32 +0000 (21:19 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agofixed test to use FileCheck
Sanjay Patel [Fri, 6 Mar 2015 21:16:15 +0000 (21:16 +0000)]
fixed test to use FileCheck

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

9 years agofixed to use CHECK-LABELs
Sanjay Patel [Fri, 6 Mar 2015 21:05:02 +0000 (21:05 +0000)]
fixed to use CHECK-LABELs

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Fri, 6 Mar 2015 20:58:15 +0000 (20:58 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Fri, 6 Mar 2015 20:57:40 +0000 (20:57 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agofixed to test feature, not CPU
Sanjay Patel [Fri, 6 Mar 2015 20:51:25 +0000 (20:51 +0000)]
fixed to test feature, not CPU

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

9 years agofixed to test features, not CPUs
Sanjay Patel [Fri, 6 Mar 2015 20:46:16 +0000 (20:46 +0000)]
fixed to test features, not CPUs

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

9 years agofixed test to use SSE2 attribute
Sanjay Patel [Fri, 6 Mar 2015 20:38:55 +0000 (20:38 +0000)]
fixed test to use SSE2 attribute

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Fri, 6 Mar 2015 20:34:20 +0000 (20:34 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agoDAGCombiner: Canonicalize select(and/or,x,y) depending on target.
Matthias Braun [Fri, 6 Mar 2015 19:49:10 +0000 (19:49 +0000)]
DAGCombiner: Canonicalize select(and/or,x,y) depending on target.

This is based on the following equivalences:
select(C0 & C1, X, Y) <=> select(C0, select(C1, X, Y), Y)
select(C0 | C1, X, Y) <=> select(C0, X, select(C1, X, Y))

Many target cannot perform and/or on the CPU flags and therefore the
right side should be choosen to avoid materializign the i1 flags in an
integer register. If the target can perform this operation efficiently
we normalize to the left form.

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

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

9 years agoDAGCombiner: Factor out some and/or combines.
Matthias Braun [Fri, 6 Mar 2015 19:49:06 +0000 (19:49 +0000)]
DAGCombiner: Factor out some and/or combines.

This is in preparation for changing visitSELECT to normalize towards
select(Cond0, select(Cond1, X, Y), Y);
select(Cond0, X, select(Cond1, X, Y)) which perfom an implicit and/or of
the conditions.

The factored function contains all DAGCombine rules which reduce two values
combined by an And/Or operation to a single value. This does not include rules
involving constants as visitSELECT already handles that case.

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

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

9 years ago[AsmPrinter][TLOF] Remove AArch64 test to appease buildbots
Bruno Cardoso Lopes [Fri, 6 Mar 2015 19:42:18 +0000 (19:42 +0000)]
[AsmPrinter][TLOF] Remove AArch64 test to appease buildbots

Follow up from r231497. Using XFAIL would still trigger fail on some
buildbots. Will re-introduce it as soon as I have a fix.

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

9 years agoLoopInterchange: Remove empty method.
Benjamin Kramer [Fri, 6 Mar 2015 19:37:26 +0000 (19:37 +0000)]
LoopInterchange: Remove empty method.

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

9 years agoLoopInterchange: Rephrase instruction moving using ilist's splice and factor it into...
Benjamin Kramer [Fri, 6 Mar 2015 18:59:14 +0000 (18:59 +0000)]
LoopInterchange: Rephrase instruction moving using ilist's splice and factor it into a function

+ Random cleanups. No functional change.

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

9 years agoExecutionDepsFix: Indizes -> Indices.
Matthias Braun [Fri, 6 Mar 2015 18:56:20 +0000 (18:56 +0000)]
ExecutionDepsFix: Indizes -> Indices.

Translate german to english.

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

9 years ago[AsmPrinter][TLOF] XFAIL AArch64 test to appease buildbots
Bruno Cardoso Lopes [Fri, 6 Mar 2015 18:38:42 +0000 (18:38 +0000)]
[AsmPrinter][TLOF] XFAIL AArch64 test to appease buildbots

The checking for extgotequiv and localgotequiv rely on the emission
order, which is not guaranteed because we use DenseMap to hold the GOT
equivalents. XFAIL this now until I get time to use MapVector and test
out the solution. In the meantime, appease buildbots.

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

9 years agoFix typo.
Eric Christopher [Fri, 6 Mar 2015 18:20:23 +0000 (18:20 +0000)]
Fix typo.

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

9 years ago[dsymutil] Add debug_str construction support.
Frederic Riss [Fri, 6 Mar 2015 17:56:30 +0000 (17:56 +0000)]
[dsymutil] Add debug_str construction support.

With this comes the ability to correctly clone string attributes in DIEs.

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

9 years agoR600/SI: Remove unused register class
Tom Stellard [Fri, 6 Mar 2015 17:00:16 +0000 (17:00 +0000)]
R600/SI: Remove unused register class

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

9 years agoFold init() helpers into constructors. NFC.
Benjamin Kramer [Fri, 6 Mar 2015 16:21:15 +0000 (16:21 +0000)]
Fold init() helpers into constructors. NFC.

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

9 years agoAvoid calls to dumpPassInfo and RegionBase<Tr>::getNameStr() in RGPassManager if
Chad Rosier [Fri, 6 Mar 2015 16:15:04 +0000 (16:15 +0000)]
Avoid calls to dumpPassInfo and RegionBase<Tr>::getNameStr() in RGPassManager if
-debug-pass is not specified, as the string is only used when dumping pass
information.  There is a big cost of determining the name in
ReginBase<Tr>:getNameStr() if the region's entry or exit block doesn't have a
name.  This is the case for the Release build, as names are not preserved by the
front-end.

RegionPass is mainly used by Polly, resulting in long compile time for one file
of a customer application with the Release build (1m24s) vs Release+Asserts
build (10s) when Polly is used.  With this change, the compile time with the
Release build went down to 8s.

Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!
Phabricator: http://reviews.llvm.org/D8076

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

9 years ago[ConstantRange] Teach multiply to be cleverer about signed ranges.
James Molloy [Fri, 6 Mar 2015 15:50:47 +0000 (15:50 +0000)]
[ConstantRange] Teach multiply to be cleverer about signed ranges.

Multiplication is not dependent on signedness, so just treating
all input ranges as unsigned is not incorrect. However it will cause
overly pessimistic ranges (such as full-set) when used with signed
negative values.

Teach multiply to try to interpret its inputs as both signed and
unsigned, and then to take the most specific (smallest population)
as its result.

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

9 years ago[AsmPrinter][TLOF] Make AArch64 test a bit more flexible
Bruno Cardoso Lopes [Fri, 6 Mar 2015 15:11:41 +0000 (15:11 +0000)]
[AsmPrinter][TLOF] Make AArch64 test a bit more flexible

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

9 years ago[AsmPrinter][TLOF] Split tests and move to appropriate directories
Bruno Cardoso Lopes [Fri, 6 Mar 2015 14:41:56 +0000 (14:41 +0000)]
[AsmPrinter][TLOF] Split tests and move to appropriate directories

Follow up from r231474 and 231475 to appease buildbots

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

9 years ago[AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:49:05 +0000 (13:49 +0000)]
[AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents

Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent
symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and
access through a non_lazy_symbol_pointers section is used instead.

-- before

    _extgotequiv:
       .long _extfoo

    _delta:
       .long _extgotequiv-_delta

-- after

    _delta:
       .long L_extfoo$non_lazy_ptr-_delta

       .section __IMPORT,__pointers,non_lazy_symbol_pointers
    L_extfoo$non_lazy_ptr:
       .indirect_symbol _extfoo
       .long 0

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

9 years ago[AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:48:45 +0000 (13:48 +0000)]
[AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents

Follow up r230264 and add ARM64 support for replacing global GOT
equivalent symbol accesses by references to the GOT entry for the final
symbol instead, example:

-- before

   .globl  _foo
  _foo:
   .long   42

   .globl  _gotequivalent
  _gotequivalent:
   .quad   _foo

   .globl  _delta
  _delta:
   .long   _gotequivalent-_delta

-- after

   .globl  _foo
  _foo:
   .long   42

   .globl  _delta
  Ltmp3:
   .long _foo@GOT-Ltmp3

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

9 years agoCodingStyle: Allow delegating ctors
Benjamin Kramer [Fri, 6 Mar 2015 13:46:50 +0000 (13:46 +0000)]
CodingStyle: Allow delegating ctors

Delegating constructors seem to work fine with all supported compilers.

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

9 years ago[mips] [IAS] Add missing constraints and improve testing for the .module directive.
Toma Tabacu [Fri, 6 Mar 2015 12:15:12 +0000 (12:15 +0000)]
[mips] [IAS] Add missing constraints and improve testing for the .module directive.

Summary:
None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint.
Also added testing for all the other implemented directives which are supposed to trigger this constraint.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoChange the way in which error case is being handled.
Daniel Jasper [Fri, 6 Mar 2015 10:39:14 +0000 (10:39 +0000)]
Change the way in which error case is being handled.

Specifically this:
* Prevents an "unused" warning in non-assert builds.
* In that error case return with out removing a child loop instead of
  looping forever.

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

9 years agoAdd a new pass "Loop Interchange"
Karthik Bhat [Fri, 6 Mar 2015 10:11:25 +0000 (10:11 +0000)]
Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.

For e.g. given a loop like -
  for(int i=0;i<N;i++)
    for(int j=0;j<N;j++)
      A[j][i] = A[j][i]+B[j][i];

is interchanged to -
  for(int j=0;j<N;j++)
    for(int i=0;i<N;i++)
      A[j][i] = A[j][i]+B[j][i];

This pass is currently disabled by default.

To give a brief introduction it consists of 3 stages-

LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.

LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.

TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.

A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499

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

9 years agoX86: Form IMGREL relocations for LLVM Functions
David Majnemer [Fri, 6 Mar 2015 08:11:32 +0000 (08:11 +0000)]
X86: Form IMGREL relocations for LLVM Functions

We supported forming IMGREL relocations from ConstantExprs involving
__ImageBase if the minuend was a GlobalVariable.  Extend this
functionality to all GlobalObjects.

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

9 years agoSilence C4715 'not all control paths return a value' warnings.
Yaron Keren [Fri, 6 Mar 2015 07:49:14 +0000 (07:49 +0000)]
Silence C4715 'not all control paths return a value' warnings.

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

9 years agoSupport: Improve performance of FileOutputBuffer on Windows
Rui Ueyama [Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)]
Support: Improve performance of FileOutputBuffer on Windows

We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.

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

9 years ago[objc-arc] Sprinkle some more auto on some iterators.
Michael Gottesman [Fri, 6 Mar 2015 02:10:03 +0000 (02:10 +0000)]
[objc-arc] Sprinkle some more auto on some iterators.

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

9 years ago[objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.
Michael Gottesman [Fri, 6 Mar 2015 02:07:12 +0000 (02:07 +0000)]
[objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.

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

9 years agoLegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.
Michael Zolotukhin [Fri, 6 Mar 2015 01:13:01 +0000 (01:13 +0000)]
LegalizeTypes: Handle shift by 0 in ExpandShiftByConstant.

Though such shifts are usually optimized away by combiner, we still can
encounter them after a vector shift is legalized.

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

9 years agoRemember to move a type to the correct set when setting the body.
Rafael Espindola [Fri, 6 Mar 2015 00:50:21 +0000 (00:50 +0000)]
Remember to move a type to the correct set when setting the body.

We would set the body of a struct type (therefore making it non-opaque)
but were forgetting to move it to the non-opaque set.

Fixes pr22807.

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

9 years ago[objc-arc] Move the checking of whether or not we can match onto PtrStates and out...
Michael Gottesman [Fri, 6 Mar 2015 00:34:42 +0000 (00:34 +0000)]
[objc-arc] Move the checking of whether or not we can match onto PtrStates and out of the main dataflow.

These refactored computations check whether or not we are at a stage
of the sequence where we can perform a match. This patch moves the
computation out of the main dataflow and into
{BottomUp,TopDown}PtrState.

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

9 years ago[objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> {TopDown,BottomU...
Michael Gottesman [Fri, 6 Mar 2015 00:34:39 +0000 (00:34 +0000)]
[objc-arc] Refactor (Re-)initialization of PtrState from dataflow -> {TopDown,BottomUp}PtrState Class.

This initialization occurs when we see a new retain or release. Before
we performed the actual initialization inline in the dataflow. That is
just messy.

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

9 years ago[objc-arc] Create two subclasses of PtrState in preparation for moving per ptr state...
Michael Gottesman [Fri, 6 Mar 2015 00:34:36 +0000 (00:34 +0000)]
[objc-arc] Create two subclasses of PtrState in preparation for moving per ptr state change behavior onto a PtrState class.

This will enable the main ObjCARCOpts dataflow to work with higher
level concepts such as "can this ptr state be modified by this ref
count" and not need to understand the nitty gritty details of how that
is determined. This makes the dataflow cleaner.

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

9 years ago[objc-arc] Extract out MDNodes into a cache structure so the information can be passe...
Michael Gottesman [Fri, 6 Mar 2015 00:34:33 +0000 (00:34 +0000)]
[objc-arc] Extract out MDNodes into a cache structure so the information can be passed around.

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

9 years ago[objc-arc] Remove annotations code.
Michael Gottesman [Fri, 6 Mar 2015 00:34:29 +0000 (00:34 +0000)]
[objc-arc] Remove annotations code.

It will always be in the history if it is needed again. Now it is just dead
code.

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

9 years agoTeach ComputeNumSignBits about signed reminder.
Nadav Rotem [Fri, 6 Mar 2015 00:23:58 +0000 (00:23 +0000)]
Teach ComputeNumSignBits about signed reminder.

This optimization a continuation of r231140 that reasoned about signed div.

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

9 years agoFix build error.
Michael Gottesman [Thu, 5 Mar 2015 23:57:07 +0000 (23:57 +0000)]
Fix build error.

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

9 years ago[objc-arc] Change some casts and loop iterators to use auto.
Michael Gottesman [Thu, 5 Mar 2015 23:29:06 +0000 (23:29 +0000)]
[objc-arc] Change some casts and loop iterators to use auto.

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

9 years ago[objc-arc] Extract out state specific to a ref count from the main objc arc sequence...
Michael Gottesman [Thu, 5 Mar 2015 23:29:03 +0000 (23:29 +0000)]
[objc-arc] Extract out state specific to a ref count from the main objc arc sequence dataflow. This will allow me to separate the actual ARC queries from the meat of the dataflow algorithm.

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

9 years ago[objc-arc] Extract blot map vector into its own file. NFC.
Michael Gottesman [Thu, 5 Mar 2015 23:28:58 +0000 (23:28 +0000)]
[objc-arc] Extract blot map vector into its own file. NFC.

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

9 years ago[X86] Remove stale comment. NFC.
Ahmed Bougacha [Thu, 5 Mar 2015 23:18:41 +0000 (23:18 +0000)]
[X86] Remove stale comment.  NFC.

It turns out 256bit V[SZ]EXT nodes are still
generated by the new shuffle lowering, so this
is here to stay!

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

9 years agoAll FileCheck directives allow patterns.
Paul Robinson [Thu, 5 Mar 2015 23:04:26 +0000 (23:04 +0000)]
All FileCheck directives allow patterns.

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

9 years agoGo bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Peter Collingbourne [Thu, 5 Mar 2015 22:55:38 +0000 (22:55 +0000)]
Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.

Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.

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

9 years ago[RewriteStatepointsForGC] Yet more test cases for relocation
Philip Reames [Thu, 5 Mar 2015 22:28:06 +0000 (22:28 +0000)]
[RewriteStatepointsForGC] Yet more test cases for relocation

At this point, we should have decent coverage of the involved code.  I've got a few more test cases to cleanup and submit, but what's here is already reasonable.

I've got a collection of liveness tests which will be posted for review along with a decent liveness algorithm in the next few days.  Once those are in, the code in this file should be well tested and I can start renaming things without risk of serious breakage.

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

9 years ago[CODE_OWNERS] Change the ownership of register allocators.
Quentin Colombet [Thu, 5 Mar 2015 22:15:17 +0000 (22:15 +0000)]
[CODE_OWNERS] Change the ownership of register allocators.

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

9 years agoInstructions: Use delegated constructors to reduce duplication
Benjamin Kramer [Thu, 5 Mar 2015 22:05:26 +0000 (22:05 +0000)]
Instructions: Use delegated constructors to reduce duplication

NFC.

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

9 years ago[AVX] Lower / fast-isel scalar FP selects into VBLENDV instructions (PR22483)
Sanjay Patel [Thu, 5 Mar 2015 21:46:54 +0000 (21:46 +0000)]
[AVX] Lower / fast-isel scalar FP selects into VBLENDV instructions (PR22483)

This patch reduces code size for all AVX targets and increases speed for some chips.

SSE 4.1 introduced the useless (see code comments) 2-register form of BLENDV and
only in the packed float/double flavors.

AVX subsequently made the instruction useful by adding a 4-register operand form.

So we just need to paper over the lack of scalar forms of this instruction, complicate
the code to choose float or double forms, and use blendv on scalars since all FP is in
xmm registers anyway.

This gives us an approximately 50% speed up for a blendv microbenchmark sequence
on SandyBridge and Haswell:
blendv : 29.73 cycles/iter
logic : 43.15 cycles/iter

No new test cases with this patch because:

1. fast-isel-select-sse.ll tests the positive side for regular X86 lowering and fast-isel
2. sse-minmax.ll and fp-select-cmp-and.ll confirm that we're not firing for scalar selects without AVX
3. fp-select-cmp-and.ll and logical-load-fold.ll confirm that we're not firing for scalar selects with constants.

http://llvm.org/bugs/show_bug.cgi?id=22483

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

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

9 years agoSelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.
Benjamin Kramer [Thu, 5 Mar 2015 21:13:08 +0000 (21:13 +0000)]
SelectionDAGBuilder: Merge 3 copies of the limited precision exp2 emission code.

NFC intended.

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

9 years agoFix uninitialized memory references in WinEHPrepare
Andrew Kaylor [Thu, 5 Mar 2015 21:06:42 +0000 (21:06 +0000)]
Fix uninitialized memory references in WinEHPrepare

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

9 years agoSDAG: Merge the meat of two ExpandAtomic implementations.
Benjamin Kramer [Thu, 5 Mar 2015 20:04:29 +0000 (20:04 +0000)]
SDAG: Merge the meat of two ExpandAtomic implementations.

The copies already diverged, don't let them become any worse. Reduce
redundancy in code with a little macro metaprogramming.

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

9 years ago[AArch64] Teach AsmPrinter about GlobalAddress operands.
Ahmed Bougacha [Thu, 5 Mar 2015 20:04:21 +0000 (20:04 +0000)]
[AArch64] Teach AsmPrinter about GlobalAddress operands.

Fixes PR22761, rdar://20024866.
Differential Revision: http://reviews.llvm.org/D8042

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

9 years ago[RewriteStatepointsForGC] Add additional tests around relocation
Philip Reames [Thu, 5 Mar 2015 19:52:13 +0000 (19:52 +0000)]
[RewriteStatepointsForGC] Add additional tests around relocation

These are focused around the actual relocation rewriting itself, not the rest of the infrastructure.

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

9 years agoUse the correct func begin symbol in all places in ppc.
Rafael Espindola [Thu, 5 Mar 2015 19:47:50 +0000 (19:47 +0000)]
Use the correct func begin symbol in all places in ppc.

I missed an occurrence of the old symbol in my previous patch.

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

9 years agoTableGen: Initialize ErrorInfo to ~0ULL in the MatchInstructionImpl
Tom Stellard [Thu, 5 Mar 2015 19:46:55 +0000 (19:46 +0000)]
TableGen: Initialize ErrorInfo to ~0ULL in the MatchInstructionImpl

This is what all the targets check for and is consistent with the
initialized value of MissingFeatures, which is sometimes assinged
to ErrorInfo.

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

9 years ago[ARM] Enable vector extload combine for legal types.
Ahmed Bougacha [Thu, 5 Mar 2015 19:37:53 +0000 (19:37 +0000)]
[ARM] Enable vector extload combine for legal types.

This commit enables forming vector extloads for ARM.
It only does so for legal types, and when we can't fold the extension
in a wide/long form of the user instruction.

Enabling it for larger types isn't as good an idea on ARM as it is on
X86, because:
- we pretend that extloads are legal, but end up generating vld+vmov
- we have instructions like vld {dN, dM}, which can't be generated
  when we "manually expand" extloads to vld+vmov.

For legal types, the combine doesn't fire that often: in the
integration tests only in a big endian testcase, where it removes a
pointless AND.

Related to rdar://19723053
Differential Revision: http://reviews.llvm.org/D7423

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

9 years agoReplace PrintStackTrace(FILE*) with PrintStackTrace(raw_ostream&)
Zachary Turner [Thu, 5 Mar 2015 19:10:52 +0000 (19:10 +0000)]
Replace PrintStackTrace(FILE*) with PrintStackTrace(raw_ostream&)

This will be followed by a change on the clang side to update
the only user of this function with the new version.

Differential Revision: http://reviews.llvm.org/D8074
Reviewed By: Reid Kleckner

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

9 years agoRemove accidental errs() call in Verifier
Reid Kleckner [Thu, 5 Mar 2015 19:05:25 +0000 (19:05 +0000)]
Remove accidental errs() call in Verifier

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

9 years agoUse the generic Lfunc_begin label on ppc.
Rafael Espindola [Thu, 5 Mar 2015 18:55:50 +0000 (18:55 +0000)]
Use the generic Lfunc_begin label on ppc.

This removes yet another custom label to mark the start of a function.

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