oota-llvm.git
9 years agoAsmParser: remove deprecated LLIR support
Saleem Abdulrasool [Wed, 23 Jul 2014 18:09:31 +0000 (18:09 +0000)]
AsmParser: remove deprecated LLIR support

linker_private and linker_private_weak were deprecated in 3.5.  Remove support
for them now that the 3.5 branch has been created.

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

9 years agoExecutionEngine: remove a stray semicolon
Saleem Abdulrasool [Wed, 23 Jul 2014 18:09:28 +0000 (18:09 +0000)]
ExecutionEngine: remove a stray semicolon

Detected via GCC 4.8 [-Wpedantic].

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

9 years ago[SKX] Fix lowercase "error:" in rev 213757
Robert Khasanov [Wed, 23 Jul 2014 17:42:13 +0000 (17:42 +0000)]
[SKX] Fix lowercase "error:" in rev 213757

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

9 years ago[NVPTX] Make sure we do not generate MULWIDE ISD nodes when optimizations are disabled
Justin Holewinski [Wed, 23 Jul 2014 17:40:45 +0000 (17:40 +0000)]
[NVPTX] Make sure we do not generate MULWIDE ISD nodes when optimizations are disabled

With optimizations disabled, we disable the isel patterns for mul.wide; but we
were still generating MULWIDE ISD nodes.  Now, we only try to generate MULWIDE
ISD nodes in DAGCombine if the optimization level is not zero.

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

9 years agoIn unroll pragma syntax and loop hint metadata, change "enable" forms to a new form...
Mark Heffernan [Wed, 23 Jul 2014 17:31:37 +0000 (17:31 +0000)]
In unroll pragma syntax and loop hint metadata, change "enable" forms to a new form using the string "full".

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

9 years agotest commit: remove trailing space
Alex Lorenz [Wed, 23 Jul 2014 17:18:05 +0000 (17:18 +0000)]
test commit: remove trailing space

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

9 years ago[AArch64] Lower sdiv x, pow2 using add + select + shift.
Chad Rosier [Wed, 23 Jul 2014 14:57:52 +0000 (14:57 +0000)]
[AArch64] Lower sdiv x, pow2 using add + select + shift.

The target-independent DAGcombiner will generate:
asr w1, X, #31 w1 = splat sign bit.
add X, X, w1, lsr #28 X = X + 0 or pow2-1
asr w0, X, asr #4 w0 = X/pow2

However, the add + shifts is expensive, so generate:
add w0, X, 15 w0 = X + pow2-1
cmp X, wzr X - 0
csel X, w0, X, lt X = (X < 0) ? X + pow2-1 : X;
asr w0, X, asr 4 w0 = X/pow2

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

9 years ago[SKX] Enabling mask instructions: encoding, lowering
Robert Khasanov [Wed, 23 Jul 2014 14:49:42 +0000 (14:49 +0000)]
[SKX] Enabling mask instructions: encoding, lowering
KMOVB, KMOVW, KMOVD, KMOVQ, KNOTB, KNOTW, KNOTD, KNOTQ

Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>

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

9 years agoARM: spot SBFX-compatbile code expressed with sign_extend_inreg
Tim Northover [Wed, 23 Jul 2014 13:59:12 +0000 (13:59 +0000)]
ARM: spot SBFX-compatbile code expressed with sign_extend_inreg

We were assuming all SBFX-like operations would have the shl/asr form, but
often when the field being extracted is an i8 or i16, we end up with a
SIGN_EXTEND_INREG acting on a shift instead. Simple enough to check for though.

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

9 years agoARM: add patterns for [su]xta[bh] from just a shift.
Tim Northover [Wed, 23 Jul 2014 13:59:07 +0000 (13:59 +0000)]
ARM: add patterns for [su]xta[bh] from just a shift.

Although the final shifter operand is a rotate, this actually only matters for
the half-word extends when the amount == 24. Otherwise folding a shift in is
just as good.

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

9 years agoEnable partial libcall inlining for all targets by default.
James Molloy [Wed, 23 Jul 2014 13:33:00 +0000 (13:33 +0000)]
Enable partial libcall inlining for all targets by default.

This pass attempts to speculatively use a sqrt instruction if one exists on the target, falling back to a libcall if the target instruction returned NaN.

This was enabled for MIPS and System-Z, but is well guarded and is good for most targets - GCC does this for (that I've checked) X86, ARM and AArch64.

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

9 years ago[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STRB instructions.
Tilmann Scheller [Wed, 23 Jul 2014 13:03:47 +0000 (13:03 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STRB instructions.

The ARM ARM prohibits STRB instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STRB instructions with unpredictable behavior.

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

9 years agoAdded release notes for MIPS.
Daniel Sanders [Wed, 23 Jul 2014 12:59:26 +0000 (12:59 +0000)]
Added release notes for MIPS.

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

9 years agoAArch64: remove "arm64_be" support in favour of "aarch64_be".
Tim Northover [Wed, 23 Jul 2014 12:58:11 +0000 (12:58 +0000)]
AArch64: remove "arm64_be" support in favour of "aarch64_be".

There really is no arm64_be: it was a useful fiction to test big-endian support
while both backends existed in parallel, but now the only platform that uses
the name (iOS) doesn't have a big-endian variant, let alone one called
"arm64_be".

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

9 years ago[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STR instructions.
Tilmann Scheller [Wed, 23 Jul 2014 12:38:17 +0000 (12:38 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STR instructions.

The ARM ARM prohibits STR instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STR instructions with unpredictable behavior.

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

9 years agoAArch64: remove arm64 triple enumerator.
Tim Northover [Wed, 23 Jul 2014 12:32:47 +0000 (12:32 +0000)]
AArch64: remove arm64 triple enumerator.

Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and
invites bugs where only one is checked. In reality, the only legitimate
difference between the two (arm64 usually means iOS) is also present in the OS
part of the triple and that's what should be checked.

We still parse the "arm64" triple, just canonicalise it to Triple::aarch64, so
there aren't any LLVM-side test changes.

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

9 years agoRevert r211771. It was: "[X86] Improve the selection of SSE3/AVX addsub instructions".
Andrea Di Biagio [Wed, 23 Jul 2014 11:20:24 +0000 (11:20 +0000)]
Revert r211771. It was: "[X86] Improve the selection of SSE3/AVX addsub instructions".

This chang fully reverts r211771.
That revision added a canonicalization rule which has the potential to causes a
combine-cycle in the target-independent canonicalizing DAG combine.

The plan is to move the logic that forms target specific addsub nodes as part of
the lowering of shuffles.

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

9 years ago[x86] Clean up a test case to use check labels and spell out the exact
Chandler Carruth [Wed, 23 Jul 2014 09:11:48 +0000 (09:11 +0000)]
[x86] Clean up a test case to use check labels and spell out the exact
instruction sequences with CHECK-NEXT for these test cases.

This notably exposes how absolutely horrible the generated code is for
several of these test cases, and will make any future updates to the
test as our vector instruction selection gets better.

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

9 years ago[ARM] Add regression test for the earlyclobber constraint of ARM STRB.
Tilmann Scheller [Wed, 23 Jul 2014 08:39:50 +0000 (08:39 +0000)]
[ARM] Add regression test for the earlyclobber constraint of ARM STRB.

The constraint was added in r213369.

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

9 years ago[ARM] Add earlyclobber constraint to pre/post-indexed ARM STRH instructions.
Tilmann Scheller [Wed, 23 Jul 2014 08:12:51 +0000 (08:12 +0000)]
[ARM] Add earlyclobber constraint to pre/post-indexed ARM STRH instructions.

The post-indexed instructions were missing the constraint, causing unpredictable STRH instructions to be emitted.

The earlyclobber constraint on the pre-indexed STR instructions is not strictly necessary, as the instruction selection for pre-indexed STR instructions goes through an additional layer of pseudo instructions which have the constraint defined, however it doesn't hurt to specify the constraint directly on the pre-indexed instructions as well, since at some point someone might create instances of them programmatically and then the constraint is definitely needed.

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

9 years ago[SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate
Chandler Carruth [Wed, 23 Jul 2014 07:08:53 +0000 (07:08 +0000)]
[SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate
insertions.

The old behavior could cause arbitrarily bad memory usage in the DAG
combiner if there was heavy traffic of adding nodes already on the
worklist to it. This commit switches the DAG combine worklist to work
the same way as the instcombine worklist where we null-out removed
entries and only add new entries to the worklist. My measurements of
codegen time shows slight improvement. The memory utilization is
unsurprisingly dominated by other factors (the IR and DAG itself
I suspect).

This change results in subtle, frustrating churn in the particular order
in which DAG combines are applied which causes a number of minor
regressions where we fail to match a pattern previously matched by
accident. AFAICT, all of these should be using AddToWorklist to directly
or should be written in a less brittle way. None of the changes seem
drastically bad, and a few of the changes seem distinctly better.

A major change required to make this work is to significantly harden the
way in which the DAG combiner handle nodes which become dead
(zero-uses). Previously, we relied on the ability to "priority-bump"
them on the combine worklist to achieve recursive deletion of these
nodes and ensure that the frontier of remaining live nodes all were
added to the worklist. Instead, I've introduced a routine to just
implement that precise logic with no indirection. It is a significantly
simpler operation than that of the combiner worklist proper. I suspect
this will also fix some other problems with the combiner.

I think the x86 changes are really minor and uninteresting, but the
avx512 change at least is hiding a "regression" (despite the test case
being just noise, not testing some performance invariant) that might be
looked into. Not sure if any of the others impact specific "important"
code paths, but they didn't look terribly interesting to me, or the
changes were really minor. The consensus in review is to fix any
regressions that show up after the fact here.

Thanks to the other reviewers for checking the output on other
architectures. There is a specific regression on ARM that Tim already
has a fix prepped to commit.

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

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

9 years agoWe may visit a call that uses an alloca multiple times in callUsesLocalStack, sometim...
Nick Lewycky [Wed, 23 Jul 2014 06:24:49 +0000 (06:24 +0000)]
We may visit a call that uses an alloca multiple times in callUsesLocalStack, sometimes with IsNocapture true and sometimes with IsNocapture false. We accidentally skipped work we needed to do in the IsNocapture=false case if we were called with IsNocapture=true the first time. Fixes PR20405!

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

9 years agoRework to let RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s pass on win32.
NAKAMURA Takumi [Wed, 23 Jul 2014 04:32:21 +0000 (04:32 +0000)]
Rework to let RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s pass on win32.

FIXME: "llvm-rtdyld -verify -check" is still sensitive to path separator.
Fix searching StubMap to be tolerant of both '/' and '\\' on Win32.

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

9 years agoSuppress a test on win32 for now, llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86...
NAKAMURA Takumi [Wed, 23 Jul 2014 04:05:58 +0000 (04:05 +0000)]
Suppress a test on win32 for now, llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s.

FIXME: Fix searching StubMap with '/' and '\\' on Win32.

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

9 years agoRuntimeDyld/X86/MachO_x86-64_PIC_relocations.s: Use %/T here, or sed(1) would be...
NAKAMURA Takumi [Wed, 23 Jul 2014 04:05:46 +0000 (04:05 +0000)]
RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s: Use %/T here, or sed(1) would be confused with dos path.

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

9 years agoTrailing whitespace.
NAKAMURA Takumi [Wed, 23 Jul 2014 00:42:52 +0000 (00:42 +0000)]
Trailing whitespace.

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

9 years agoRuntimeDyldMachOAArch64.h: Fix a warning. [-Wunused-variable]
NAKAMURA Takumi [Wed, 23 Jul 2014 00:17:44 +0000 (00:17 +0000)]
RuntimeDyldMachOAArch64.h: Fix a warning. [-Wunused-variable]

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

9 years ago[MCJIT] Make stub_addr functionality in RuntimeDyldChecker work in release mode.
Lang Hames [Tue, 22 Jul 2014 23:50:51 +0000 (23:50 +0000)]
[MCJIT] Make stub_addr functionality in RuntimeDyldChecker work in release mode.

There's no reason to restrict this particular piece of RuntimeDyldChecker
functionality to +Asserts builds.

This should fix failures in MachO_x86-64_PIC_relocations.s on release bots.

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

9 years ago[MCJIT] Teach RuntimeDyldChecker to handle underscores at the start of symbols.
Lang Hames [Tue, 22 Jul 2014 23:17:21 +0000 (23:17 +0000)]
[MCJIT] Teach RuntimeDyldChecker to handle underscores at the start of symbols.

RuntimeDyldChecker had been testing isalpha(Expr[0]) to recognise symbol tokens,
and throwing unrecognized token errors when it hit symbols with leading
underscores. This fixes that.

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

9 years agoXFAIL the test on MIPS
Juergen Ributzka [Tue, 22 Jul 2014 23:15:01 +0000 (23:15 +0000)]
XFAIL the test on MIPS

Not sure how to debug this one without a MIPS machine. Any takers?

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

9 years ago[FastIsel][AArch64] Add support for the FastLowerCall and FastLowerIntrinsicCall...
Juergen Ributzka [Tue, 22 Jul 2014 23:14:58 +0000 (23:14 +0000)]
[FastIsel][AArch64] Add support for the FastLowerCall and FastLowerIntrinsicCall target-hooks.

This commit modifies the existing call lowering functions to be used as the
FastLowerCall and FastLowerIntrinsicCall target-hooks instead.

This enables patchpoint intrinsic lowering for AArch64.

This fixes <rdar://problem/17733076>

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

9 years ago[AArch64] Use CHECK-LABEL in ARM64 ABI unit tests.
Juergen Ributzka [Tue, 22 Jul 2014 23:14:54 +0000 (23:14 +0000)]
[AArch64] Use CHECK-LABEL in ARM64 ABI unit tests.

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

9 years ago[MCJIT] Improve stub_addr file-not-found diagnostic to help track down a
Lang Hames [Tue, 22 Jul 2014 23:07:52 +0000 (23:07 +0000)]
[MCJIT] Improve stub_addr file-not-found diagnostic to help track down a
buildbot failure.

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

9 years ago[MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.
Lang Hames [Tue, 22 Jul 2014 22:47:39 +0000 (22:47 +0000)]
[MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.

This patch introduces a 'stub_addr' builtin that can be used to find the address
of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be
used both to verify the contents of stubs (by loading from the returned address)
and to verify references to stubs (by comparing against the returned address).

Example (1) - Verifying stub contents:

Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text
section of f.o, and compare that value against the addres of 'x'.

# rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x

Example (2) - Verifying references to stubs:

Decode the immediate of the instruction at label 'l', and verify that it's
equal to the offset from the next instruction's PC to the stub for 'y' in the
__text section of f.o (i.e. it's the correct PC-rel difference).

# rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l)
l:
        movq    y@GOTPCREL(%rip), %rax

Since stub inspection requires cooperation with RuntimeDyldImpl this patch
pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class,
RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl.

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

9 years agoAppease the buildbots.
Juergen Ributzka [Tue, 22 Jul 2014 22:02:19 +0000 (22:02 +0000)]
Appease the buildbots.

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

9 years ago[RuntimeDyld][MachO][AArch64] Add a helper function for encoding addends in instructions.
Juergen Ributzka [Tue, 22 Jul 2014 21:42:55 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Add a helper function for encoding addends in instructions.

Factor out the addend encoding into a helper function and simplify the
processRelocationRef.

Also add a few simple rtdyld tests. More tests to come once GOTs can be tested too.

Related to <rdar://problem/17768539>

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

9 years ago[RuntimeDyld][MachO][AArch64] Implement the decodeAddend method.
Juergen Ributzka [Tue, 22 Jul 2014 21:42:51 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Implement the decodeAddend method.

This adds the required functionality to decode the immediate encoded in an
instruction that is referenced in a relocation entry.

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

9 years ago[RuntimeDyld][MachO][AArch64] Add assertion to check for duplicate addend definition.
Juergen Ributzka [Tue, 22 Jul 2014 21:42:49 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Add assertion to check for duplicate addend definition.

In MachO for AArch64 it is possible to have an explicit addend defined by
the ARM64_RELOC_ADDEND relocation or having an addend encoded within the
instruction. Only one of them are allowed per relocation.

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

9 years ago[RuntimeDyld] Change the return type of decodeAddend to match the storage type.
Juergen Ributzka [Tue, 22 Jul 2014 21:42:46 +0000 (21:42 +0000)]
[RuntimeDyld] Change the return type of decodeAddend to match the storage type.

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

9 years agoThis patch implements optimization as mentioned in PR19753: Optimize comparisons...
Suyog Sarda [Tue, 22 Jul 2014 19:19:36 +0000 (19:19 +0000)]
This patch implements optimization as mentioned in PR19753: Optimize comparisons with "ashr/lshr exact" of a constanst.
It handles the errors which were seen in PR19958 where wrong code was being emitted due to earlier patch.
Added code for lshr as well as non-exact right shifts.

It implements :
(icmp eq/ne (ashr/lshr const2, A), const1)" ->
(icmp eq/ne A, Log2(const2/const1)) ->
(icmp eq/ne A, Log2(const2) - Log2(const1))

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

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

9 years agoAdded InstCombine transform for pattern "(A & B) ^ (A ^ B) -> (A | B)"
Suyog Sarda [Tue, 22 Jul 2014 18:30:54 +0000 (18:30 +0000)]
Added InstCombine transform for pattern "(A & B) ^ (A ^ B) -> (A | B)"

Patch idea by Ankit Jain !

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

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

9 years agoAdded InstCombine Transform for patterns:
Suyog Sarda [Tue, 22 Jul 2014 18:09:41 +0000 (18:09 +0000)]
Added InstCombine Transform for patterns:
"((~A & B) | A) -> (A | B)" and "((A & B) | ~A) -> (~A | B)"

Original Patch credit to Ankit Jain !!

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

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

9 years agoRevert "Treat warnings in Sphinx as errors. The reasons for doing this are..."
Dan Liew [Tue, 22 Jul 2014 18:09:17 +0000 (18:09 +0000)]
Revert "Treat warnings in Sphinx as errors. The reasons for doing this are..."

This reverts commit r213661.

Reverting at the request of Sean Silva.

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

9 years agoAdd LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients
Dan Liew [Tue, 22 Jul 2014 17:48:51 +0000 (17:48 +0000)]
Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients
of LLVM using CMake can easily find the tools directory.

LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now
superfluous.

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

9 years ago[ASan] Fix comments about __sanitizer_cov function
Alexey Samsonov [Tue, 22 Jul 2014 17:46:09 +0000 (17:46 +0000)]
[ASan] Fix comments about __sanitizer_cov function

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

9 years agoMake use of the align parameter attribute for all pointer arguments
Hal Finkel [Tue, 22 Jul 2014 16:58:55 +0000 (16:58 +0000)]
Make use of the align parameter attribute for all pointer arguments

We previously supported the align attribute on all (pointer) parameters, but we
only used it for byval parameters. However, it is completely consistent at the
IR level to treat 'align n' on all pointer parameters as an alignment
assumption on the pointer, and now we wll. Specifically, this causes
computeKnownBits to use the align attribute on all pointer parameters, not just
byval parameters. I've also added an explicit parameter attribute test for this
to test/Bitcode/attributes.ll.

And I've updated the LangRef to document the align parameter attribute (as it
turns out, it was not documented at all previously, although the byval
documentation mentioned that it could be used).

There are (at least) two benefits to doing this:
 - It allows enhancing alignment based on the pointer alignment after inlining callees.
 - It allows simplification of pointer arithmetic.

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

9 years agoX86: drop relocations on __eh_frame sections globally.
Tim Northover [Tue, 22 Jul 2014 15:47:09 +0000 (15:47 +0000)]
X86: drop relocations on __eh_frame sections globally.

Without this, we produce non-extern relocations when targeting older OS X
versions that ld64 can't cope with in the particular context of __eh_frame
sections (who'd want generic relocation-processing anyway?).

This means that an updated linker (ld64 from Xcode 3.2.6 or later) may be
needed when targeting such platforms with a modern version of LLVM, but this is
probably the case anyway and a reasonable requirement.

PR20212, rdar://problem/17544795

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

9 years agoExport LLVM_ENABLE_RTTI and LLVM_ENABLE_EH in LLVMConfig.cmake so
Dan Liew [Tue, 22 Jul 2014 15:41:33 +0000 (15:41 +0000)]
Export LLVM_ENABLE_RTTI and LLVM_ENABLE_EH in LLVMConfig.cmake so
clients of LLVM know if RTTI and/or EH were enabled in the build of
LLVM they are trying to link against.

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

9 years agoAdded LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EH
Dan Liew [Tue, 22 Jul 2014 15:41:18 +0000 (15:41 +0000)]
Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EH
to globally be controlled. Individual targets (e.g.  ExceptionDemo) can
still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if
they need to be compiled with RTTI or exception handling respectively.

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

9 years agoThis patch implements transform for pattern "(A | B) ^ (~A) -> (A | ~B)".
Suyog Sarda [Tue, 22 Jul 2014 15:37:39 +0000 (15:37 +0000)]
This patch implements transform for pattern "(A | B) ^ (~A) -> (A | ~B)".

Patch Credit to Ankit Jain !!

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

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

9 years agoTreat warnings in Sphinx as errors. The reasons for doing this are...
Dan Liew [Tue, 22 Jul 2014 15:07:35 +0000 (15:07 +0000)]
Treat warnings in Sphinx as errors. The reasons for doing this are...

- When CMake builds the documentation with sphinx-build it treats
  warnings as errors. We should be consistent with what we do in
  CMake.
- Having warnings treated as errors will hopefully encourage
  developers to write documentation correctly.

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

9 years agoFix Sphinx warning.
Dan Liew [Tue, 22 Jul 2014 14:59:38 +0000 (14:59 +0000)]
Fix Sphinx warning.

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

9 years ago[OCaml] Don't truncate constants over 32 bits in Llvm.const_int.
Peter Zotov [Tue, 22 Jul 2014 13:55:20 +0000 (13:55 +0000)]
[OCaml] Don't truncate constants over 32 bits in Llvm.const_int.

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

9 years ago[mips] Fix two patterns that select i32's (for MIPS32r6) / i64's (for MIPS64r6)
Sasa Stankovic [Tue, 22 Jul 2014 13:36:02 +0000 (13:36 +0000)]
[mips] Fix two patterns that select i32's (for MIPS32r6) / i64's (for MIPS64r6)
from setne comparison with an i32.

The patterns that are fixed:
  * (select (i32 (setne i32, immZExt16)), i32, i32) (for MIPS32r6)
  * (select (i32 (setne i32, immZExt16)), i64, i64) (for MIPS64r6)

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

9 years agoAVX-512: Fixed intrinsic of VSQRTPS/PD instructions.
Elena Demikhovsky [Tue, 22 Jul 2014 11:07:31 +0000 (11:07 +0000)]
AVX-512: Fixed intrinsic of VSQRTPS/PD instructions.
I set number and types of parameters according to GCC intrinsics.

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

9 years agofixed typo in comment
Sanjay Patel [Tue, 22 Jul 2014 04:57:06 +0000 (04:57 +0000)]
fixed typo in comment

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

9 years ago[SDAG] Refactor the code for inserting a newly allocated SDNode into the
Chandler Carruth [Tue, 22 Jul 2014 04:07:55 +0000 (04:07 +0000)]
[SDAG] Refactor the code for inserting a newly allocated SDNode into the
DAG into a helper function.

This adds a trip through the (very minimal) verification logic in
a bunch of places that were missing it, but shouldn't have any other
impact outside of refactoring. I'm hoping to use this to do more clever
things when DAG nodes are inserted into the graph.

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

9 years ago[SDAG] Remove a giant pile of asserts that may have helped track down
Chandler Carruth [Tue, 22 Jul 2014 04:03:22 +0000 (04:03 +0000)]
[SDAG] Remove a giant pile of asserts that may have helped track down
a bug in 2010 when they were added but are adding no value today.

In fact, they are utter lies. NodeAllocator is used to allocate almost
all of these node types. I don't know what we were trying to assert
here, and the docs don't give any answer. Until we once again stumble
upon a bug needing help, let's clear the path for improvements.

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

9 years agoAdd openmp to the list of tagged things.
Bill Wendling [Tue, 22 Jul 2014 03:17:30 +0000 (03:17 +0000)]
Add openmp to the list of tagged things.

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

9 years agoRevert of r213521. This change introduced a non-hermetic test (depending on a
Richard Smith [Tue, 22 Jul 2014 02:32:12 +0000 (02:32 +0000)]
Revert of r213521. This change introduced a non-hermetic test (depending on a
file not in the test/ area). Backing out now so that this test isn't part of
the 3.5 branch.

Original commit message: "TableGen: Allow AddedComplexity values to be negative
[...]"

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

9 years agoRename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.
Mark Heffernan [Mon, 21 Jul 2014 23:11:03 +0000 (23:11 +0000)]
Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.

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

9 years agoAdd some tests for NVPTX lowering of cmpxchg
Eli Bendersky [Mon, 21 Jul 2014 22:54:44 +0000 (22:54 +0000)]
Add some tests for NVPTX lowering of cmpxchg

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

9 years agoMatch semantics of PointerMayBeCapturedBefore to its name by default
Hal Finkel [Mon, 21 Jul 2014 21:30:22 +0000 (21:30 +0000)]
Match semantics of PointerMayBeCapturedBefore to its name by default

As it turns out, the capture tracker named CaptureBefore used by AA, and now
available via the PointerMayBeCapturedBefore function, would have been
more-aptly named CapturedBeforeOrAt, because it considers captures at the
instruction provided. This is not always what one wants, and it is difficult to
get the strictly-before behavior given only the current interface. This adds an
additional parameter which controls whether or not you want to include
captures at the provided instruction. The default is not to include the
instruction provided, so that 'Before' matches its name.

No functionality change intended.

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

9 years agoRevert "Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for...
David Blaikie [Mon, 21 Jul 2014 20:45:59 +0000 (20:45 +0000)]
Revert "Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information."

This reverts commit r212649 while I investigate/reduce/etc PR20367.

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

9 years agotest-release.sh: Add support for dot releases
Tom Stellard [Mon, 21 Jul 2014 20:20:08 +0000 (20:20 +0000)]
test-release.sh: Add support for dot releases

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

9 years agoR600: silence GCC warning
Saleem Abdulrasool [Mon, 21 Jul 2014 17:52:00 +0000 (17:52 +0000)]
R600: silence GCC warning

GCC believes it may be possible to not return a value from the switch:
  lib/Target/R600/SIRegisterInfo.cpp:187:1: warning: control reaches end of non-void function [-Wreturn-type]

Add an unreachable label to indicate that this is not possible and still permit
switch coverage checking.

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

9 years agoR600/SI: Refactor VOP3 instruction definitions
Tom Stellard [Mon, 21 Jul 2014 17:44:29 +0000 (17:44 +0000)]
R600/SI: Refactor VOP3 instruction definitions

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

9 years agoR600/SI: Separate encoding and operand definitions into their own classes
Tom Stellard [Mon, 21 Jul 2014 17:44:28 +0000 (17:44 +0000)]
R600/SI: Separate encoding and operand definitions into their own classes

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

9 years agoReplace the result usages while legalizing cmpxchg.
Logan Chien [Mon, 21 Jul 2014 17:33:44 +0000 (17:33 +0000)]
Replace the result usages while legalizing cmpxchg.

We should update the usages to all of the results;
otherwise, we might get assertion failure or SEGV during
the type legalization of ATOMIC_CMP_SWAP_WITH_SUCCESS
with two or more illegal types.

For example, in the following sequence, both i8 and i1
might be illegal in some target, e.g. armv5, mipsel, mips64el,

    %0 = cmpxchg i8* %ptr, i8 %desire, i8 %new monotonic monotonic
    %1 = extractvalue { i8, i1 } %0, 1

Since both i8 and i1 should be legalized, the corresponding
ATOMIC_CMP_SWAP_WITH_SUCCESS dag will be checked/replaced/updated
twice.

If we don't update the usage to *ALL* of the results in the
first round, the DAG for extractvalue might be processed earlier.
The GetPromotedInteger() will result in assertion failure,
because its operand (i.e. the success bit of cmpxchg) is not
promoted beforehand.

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

9 years agoR600/SI: Initailize encoding fields of unused VOP3 modifiers to 0
Tom Stellard [Mon, 21 Jul 2014 17:12:40 +0000 (17:12 +0000)]
R600/SI: Initailize encoding fields of unused VOP3 modifiers to 0

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

9 years agoR600/SI: Initialize unused VOP3 sources to 0 instead of SIOperand.ZERO
Tom Stellard [Mon, 21 Jul 2014 17:12:37 +0000 (17:12 +0000)]
R600/SI: Initialize unused VOP3 sources to 0 instead of SIOperand.ZERO

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

9 years agoRevert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator...
Duncan P. N. Exon Smith [Mon, 21 Jul 2014 17:06:51 +0000 (17:06 +0000)]
Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."

This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build.  I'll reply on the list in a moment.

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

9 years agoR600/SI: Add instruction shrinking pass
Tom Stellard [Mon, 21 Jul 2014 16:55:33 +0000 (16:55 +0000)]
R600/SI: Add instruction shrinking pass

This pass converts 64-bit instructions to 32-bit when possible.

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

9 years agoFix Sphinx warnings.
Dan Liew [Mon, 21 Jul 2014 16:39:00 +0000 (16:39 +0000)]
Fix Sphinx warnings.

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

9 years agoR600/SI: VOPC instructions explicitly define VCC
Tom Stellard [Mon, 21 Jul 2014 16:27:24 +0000 (16:27 +0000)]
R600/SI: VOPC instructions explicitly define VCC

Therefore we don't need to add it to the implict defs list.

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

9 years agoCorrect the ownership passing semantics of object::createBinary and make them explici...
David Blaikie [Mon, 21 Jul 2014 16:26:24 +0000 (16:26 +0000)]
Correct the ownership passing semantics of object::createBinary and make them explicit in the type system.

createBinary documented that it destroyed the parameter in error cases,
though by observation it does not. By passing the unique_ptr by value
rather than lvalue reference, callers are now explicit about passing
ownership and the function implements the documented contract. Remove
the explicit documentation, since now the behavior cannot be anything
other than what was documented, so it's redundant.

Also drops a unique_ptr::release in llvm-nm that was always run on a
null unique_ptr anyway.

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

9 years agoRemove unnecessary use of unique_ptr::release() used to construct another unique_ptr.
David Blaikie [Mon, 21 Jul 2014 16:23:21 +0000 (16:23 +0000)]
Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr.

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

9 years agoRemove unused variable.
David Blaikie [Mon, 21 Jul 2014 16:13:24 +0000 (16:13 +0000)]
Remove unused variable.

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

9 years agoR600/SI: Clean up some of the unused REGISTER_{LOAD,STORE} code
Tom Stellard [Mon, 21 Jul 2014 15:45:06 +0000 (15:45 +0000)]
R600/SI: Clean up some of the unused REGISTER_{LOAD,STORE} code

There are a few more cleanups to do, but I ran into some problems
with ext loads and trunc stores, when I tried to change some of the
vector loads and stores from custom to legal, so I wasn't able to
get rid of everything.

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

9 years agoR600/SI: Use scratch memory for large private arrays
Tom Stellard [Mon, 21 Jul 2014 15:45:01 +0000 (15:45 +0000)]
R600/SI: Use scratch memory for large private arrays

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

9 years agoR600/SI: Specify wavefront size for SI and CI
Tom Stellard [Mon, 21 Jul 2014 15:44:58 +0000 (15:44 +0000)]
R600/SI: Specify wavefront size for SI and CI

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

9 years agoR600/SI: Remove vaddr operand from BUFFER_LOAD_*_OFFSET instructions
Tom Stellard [Mon, 21 Jul 2014 15:44:55 +0000 (15:44 +0000)]
R600/SI: Remove vaddr operand from BUFFER_LOAD_*_OFFSET instructions

This operand is never used.

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

9 years ago[mips] Do not emit '.module fp=...' unless we really need to.
Daniel Sanders [Mon, 21 Jul 2014 15:25:24 +0000 (15:25 +0000)]
[mips] Do not emit '.module fp=...' unless we really need to.

We now emit this value when we need to contradict the default value. This
restores support for binutils 2.24.

When a suitable binutils has been released we can resume unconditionally
emitting .module directives. This is preferable to omitting the .module
directives since the .module directives protect against, for example,
accidentally assembling FP32 code with -mfp64 and producing an unusuable object.

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

9 years ago[SKX] Enabling SKX target and AVX512BW, AVX512DQ, AVX512VL features.
Robert Khasanov [Mon, 21 Jul 2014 14:54:21 +0000 (14:54 +0000)]
[SKX] Enabling SKX target and AVX512BW, AVX512DQ, AVX512VL features.

Enabling HasAVX512{DQ,BW,VL} predicates.
Adding VK2, VK4, VK32, VK64 masked register classes.
Adding new types (v64i8, v32i16) to VR512.
Extending calling conventions for new types (v64i8, v32i16)

Patch by Zinovy Nis <zinovy.y.nis@intel.com>
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>

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

9 years agodocs: Update relaease documents to include the patch number in the RELEASE tags
Tom Stellard [Mon, 21 Jul 2014 14:28:31 +0000 (14:28 +0000)]
docs: Update relaease documents to include the patch number in the RELEASE tags

This will make it easier to update the release scripts to support
bug-fix releases.

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

9 years agoExport LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients know
Dan Liew [Mon, 21 Jul 2014 14:17:15 +0000 (14:17 +0000)]
Export LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients know
if the version of LLVM they are trying to use was built with or
without assertions.

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

9 years agoR600/SI: Store constant initializer data in constant memory
Tom Stellard [Mon, 21 Jul 2014 14:01:14 +0000 (14:01 +0000)]
R600/SI: Store constant initializer data in constant memory

This implements a solution for constant initializers suggested
by Vadim Girlin, where we store the data after the shader code
and then use the S_GETPC instruction to compute its address.

This saves use the trouble of creating a new buffer for constant data
and then having to pass the pointer to the kernel via user SGPRs or the
input buffer.

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

9 years agoR600/SI: Add isCFDepth0 Predicate to SALU addc pattern
Tom Stellard [Mon, 21 Jul 2014 14:01:12 +0000 (14:01 +0000)]
R600/SI: Add isCFDepth0 Predicate to SALU addc pattern

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

9 years agoR600/SI: Use VALU for i1 XOR
Tom Stellard [Mon, 21 Jul 2014 14:01:10 +0000 (14:01 +0000)]
R600/SI: Use VALU for i1 XOR

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

9 years agoR600/SI: Use a custom encoding method for simm16 in SOPP branch instructions
Tom Stellard [Mon, 21 Jul 2014 14:01:08 +0000 (14:01 +0000)]
R600/SI: Use a custom encoding method for simm16 in SOPP branch instructions

This allows us to explicitly define the type of fixup that is needed,
so we can distinguish this from future fixup types.

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

9 years agoR600/SI: Rename SOPP operands to match the encoding fields
Tom Stellard [Mon, 21 Jul 2014 14:01:05 +0000 (14:01 +0000)]
R600/SI: Rename SOPP operands to match the encoding fields

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

9 years ago[mips] Add MipsOptionRecord abstraction and use it to implement .reginfo/.MIPS.options
Daniel Sanders [Mon, 21 Jul 2014 13:30:55 +0000 (13:30 +0000)]
[mips] Add MipsOptionRecord abstraction and use it to implement .reginfo/.MIPS.options

This abstraction allows us to support the various records that can be placed in
the .MIPS.options section in the future. We currently use it to record register
usage information (the ODK_REGINFO record in our ELF64 spec).

Each .MIPS.options record should subclass MipsOptionRecord and provide an
implementation of EmitMipsOptionRecord.

Patch by Matheus Almeida and Toma Tabacu

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

9 years agoTableGen: Allow AddedComplexity values to be negative
Tom Stellard [Mon, 21 Jul 2014 13:28:54 +0000 (13:28 +0000)]
TableGen: Allow AddedComplexity values to be negative

This is useful for cases when stand-alone patterns are preferred to the
patterns included in the instruction definitions.  Instead of requiring
that stand-alone patterns set a larger AddedComplexity value, which
can be confusing to new developers, the allows us to reduce the
complexity of the included patterns to achieve the same result.

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

9 years agoMove the CapturesBefore tracker from AA into CaptureTracking
Hal Finkel [Mon, 21 Jul 2014 13:15:48 +0000 (13:15 +0000)]
Move the CapturesBefore tracker from AA into CaptureTracking

There were two generally-useful CaptureTracker classes defined in LLVM: the
simple tracker defined in CaptureTracking (and made available via the
PointerMayBeCaptured utility function), and the CapturesBefore tracker
available only inside of AA. This change moves the CapturesBefore tracker into
CaptureTracking, generalizes it slightly (by adding a ReturnCaptures
parameter), and makes it generally available via a PointerMayBeCapturedBefore
utility function.

This logic will be needed, for example, to perform noalias function parameter
attribute inference.

No functionality change intended.

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

9 years agoThis declaration has no definition, which is causing MSVC to emit several "no suitabl...
Aaron Ballman [Mon, 21 Jul 2014 13:08:08 +0000 (13:08 +0000)]
This declaration has no definition, which is causing MSVC to emit several "no suitable definition provided for explicit template instantiation request" C4661 warnings.

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

9 years agoFixing an MSVC conversion warning about implicitly converting the shift results to...
Aaron Ballman [Mon, 21 Jul 2014 12:31:43 +0000 (12:31 +0000)]
Fixing an MSVC conversion warning about implicitly converting the shift results to 64-bits. No functional change intended.

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

9 years agoMove isIdentifiedFunctionLocal from BasicAA to AA
Hal Finkel [Mon, 21 Jul 2014 12:27:23 +0000 (12:27 +0000)]
Move isIdentifiedFunctionLocal from BasicAA to AA

The ability to identify function locals will exist outside of BasicAA (for
example, logic for inferring noalias function arguments will need this), so
make this concept generally accessible without code duplication.

No functionality change.

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

9 years ago[mips] Try to fix the test/ExecutionEngine tests on a MIPS host.
Daniel Sanders [Mon, 21 Jul 2014 12:25:34 +0000 (12:25 +0000)]
[mips] Try to fix the test/ExecutionEngine tests on a MIPS host.

Fix a dangerous default case that caused MipsCodeEmitter to discard pseudo
instructions it didn't recognize. It will now call llvm_unreachable() for
unrecognized pseudo's and explicitly handles PseudoReturn, PseudoReturn64,
PseudoIndirectBranch, PseudoIndirectBranch64, CFI_INSTRUCTION, IMPLICIT_DEF,
and KILL.

There may be other pseudos that need handling but this was enough for the
ExecutionEngine tests to pass on my test system.

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

9 years ago[mips] Do not emit '.module [no]oddspreg' unless we really need to.
Daniel Sanders [Mon, 21 Jul 2014 10:45:47 +0000 (10:45 +0000)]
[mips] Do not emit '.module [no]oddspreg' unless we really need to.

We now emit this directive when we need to contradict the default value (e.g.
-mno-odd-spreg is given) or an option changed the default value (e.g. -mfpxx
is given).

This restores support for the currently available head of binutils. However,
at this point binutils 2.24 is still not sufficient since it does not support
'.module fp=...'.

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

9 years agoFileCheck-ize a test.
Chandler Carruth [Mon, 21 Jul 2014 09:23:21 +0000 (09:23 +0000)]
FileCheck-ize a test.

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