oota-llvm.git
9 years agoDrop the hacks used for partial C99 math libraries.
Benjamin Kramer [Mon, 9 Mar 2015 18:35:18 +0000 (18:35 +0000)]
Drop the hacks used for partial C99 math libraries.

All supported platforms have half-way decent C99 support.

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

9 years ago[Hexagon] Adding PackHL nodes and some missing modeling instructions and patterns
Colin LeMahieu [Mon, 9 Mar 2015 18:34:05 +0000 (18:34 +0000)]
[Hexagon] Adding PackHL nodes and some missing modeling instructions and patterns

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

9 years agoPrint jump tables before exception tables.
Rafael Espindola [Mon, 9 Mar 2015 18:29:12 +0000 (18:29 +0000)]
Print jump tables before exception tables.

In the case where just tables are part of the function section, this produces
more readable assembly by avoiding switching to the eh section and back
to .text.

This would also break with non unique section names, as trying to switch to
a unique section actually creates a new one.

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

9 years agoDon't repeat name in comment. NFC.
Rafael Espindola [Mon, 9 Mar 2015 18:11:42 +0000 (18:11 +0000)]
Don't repeat name in comment. NFC.

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

9 years agoRemove dummy method implementations.
Rafael Espindola [Mon, 9 Mar 2015 17:58:49 +0000 (17:58 +0000)]
Remove dummy method implementations.

These are pure virtual in the base class, so the compiler checks that they
are implemented.

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

9 years agoAdd logical ops to Mips fast-isel
Reed Kotler [Mon, 9 Mar 2015 16:28:10 +0000 (16:28 +0000)]
Add logical ops to Mips fast-isel

Summary:
Code is mostly copied from AArch64 port and modified where needed for Mips.

This handles the "non" legal cases of logical ops. Legal cases are handled by tablegen patterns.

Test Plan:
Make check test logopm.ll

All of test-suite passes at O0/O2 and mips32 r1/r2 with this new change.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: echristo, llvm-commits, aemerson, rfuhler

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

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

9 years agoMake helper functions static.
Benjamin Kramer [Mon, 9 Mar 2015 16:23:46 +0000 (16:23 +0000)]
Make helper functions static.

Found by -Wmissing-prototypes. NFC.

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

9 years agoR600/SI: Fix DS definitions and add missing instructions
Tom Stellard [Mon, 9 Mar 2015 16:03:45 +0000 (16:03 +0000)]
R600/SI: Fix DS definitions and add missing instructions

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

9 years agoR600/SI: Fix opcode for ds_read2_b64 and ds_read2st64_b64
Tom Stellard [Mon, 9 Mar 2015 16:03:39 +0000 (16:03 +0000)]
R600/SI: Fix opcode for ds_read2_b64 and ds_read2st64_b64

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

9 years agoMove unreferenced passes into the cpp file
Benjamin Kramer [Mon, 9 Mar 2015 15:50:58 +0000 (15:50 +0000)]
Move unreferenced passes into the cpp file

NFC.

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

9 years agoSymbolRewriter: Hide implementation details
Benjamin Kramer [Mon, 9 Mar 2015 15:50:47 +0000 (15:50 +0000)]
SymbolRewriter: Hide implementation details

NFC.

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

9 years agoR600/SI: Limit SGPRs to 80 on Tonga and Iceland
Marek Olsak [Mon, 9 Mar 2015 15:48:09 +0000 (15:48 +0000)]
R600/SI: Limit SGPRs to 80 on Tonga and Iceland

This is a candidate for stable.

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

9 years agoR600/SI: Fix getNumSGPRsAllowed for VI
Marek Olsak [Mon, 9 Mar 2015 15:48:00 +0000 (15:48 +0000)]
R600/SI: Fix getNumSGPRsAllowed for VI

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

9 years agoFix line ending in test CodeGen/X86/pr22774.ll. NFC.
Andrea Di Biagio [Mon, 9 Mar 2015 15:02:01 +0000 (15:02 +0000)]
Fix line ending in test CodeGen/X86/pr22774.ll. NFC.

Also, replaced line with 'target triple' with flag -mtriple on the RUN line.
Removed the data layout string as it is not needed.

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

9 years agoRevert r231630 - Run LICM pass after loop unrolling pass.
Kevin Qin [Mon, 9 Mar 2015 07:26:37 +0000 (07:26 +0000)]
Revert r231630 - Run LICM pass after loop unrolling pass.

As it broke llvm bootstrap.

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

9 years agoFix a bug in the LLParser where we failed to diagnose landingpads with non-constant...
Owen Anderson [Mon, 9 Mar 2015 07:13:42 +0000 (07:13 +0000)]
Fix a bug in the LLParser where we failed to diagnose landingpads with non-constant clause operands.

Fixing this also exposed a related issue where the landingpad under construction was not
cleaned up when an error was raised, which would cause bad reference errors before the
error could actually be printed.

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

9 years ago[AArch64] Enable partial & runtime unrolling on cortex-a57
Kevin Qin [Mon, 9 Mar 2015 06:14:28 +0000 (06:14 +0000)]
[AArch64] Enable partial & runtime unrolling on cortex-a57

For inner one of nested loops, it is more likely to be a hot loop,
and the runtime check can be promoted out from patch 0001, so the
overhead is less, we can try a doubled threshold to unroll more loops.

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

9 years agoIntroduce runtime unrolling disable matadata and use it to mark the scalar loop from...
Kevin Qin [Mon, 9 Mar 2015 06:14:18 +0000 (06:14 +0000)]
Introduce runtime unrolling disable matadata and use it to mark the scalar loop from vectorization.

Runtime unrolling is an expensive optimization which can bring benefit
only if the loop is hot and iteration number is relatively large enough.
For some loops, we know they are not worth to be runtime unrolled.
The scalar loop from vectorization is one of the cases.

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

9 years agoRun LICM pass after loop unrolling pass.
Kevin Qin [Mon, 9 Mar 2015 06:14:07 +0000 (06:14 +0000)]
Run LICM pass after loop unrolling pass.

Runtime unrollng will introduce a runtime check in loop prologue.
If the unrolled loop is a inner loop, then the proglogue will be inside
the outer loop. LICM pass can help to promote the runtime check out if
the checked value is loop invariant.

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

9 years agoInstCombine: fix fold "fcmp x, undef" to account for NaN
Mehdi Amini [Mon, 9 Mar 2015 03:20:25 +0000 (03:20 +0000)]
InstCombine: fix fold "fcmp x, undef" to account for NaN

Summary:
See the two test cases.

; Can fold fcmp with undef on one side by choosing NaN for the undef

; Can fold fcmp with undef on both side
;   fcmp u_pred undef, undef -> true
;   fcmp o_pred undef, undef -> false
; because whatever you choose for the first undef
; you can choose NaN for the other undef

Reviewers: hfinkel, chandlerc, majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

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

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

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

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