Matheus Almeida [Mon, 21 Oct 2013 12:07:26 +0000 (12:07 +0000)]
[mips][msa] Direct Object Emission of SPLAT instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193077
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Mon, 21 Oct 2013 11:47:56 +0000 (11:47 +0000)]
[mips][msa] Fix definition of SLD instruction.
The second parameter of the SLD intrinsic is the number of columns (GPR) to
slide left the source array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193076
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 21 Oct 2013 05:20:11 +0000 (05:20 +0000)]
Fix the predecessor removal logic in r193045.
Additionally some small comment/stylistic fixes are included as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193068
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 21 Oct 2013 04:09:17 +0000 (04:09 +0000)]
Don't eliminate a partially redundant load if it's in a landing pad.
A landing pad can be jumped to only by the unwind edge of an invoke
instruction. If we eliminate a partially redundant load in a landing pad, it
will create a basic block that violates this constraint. It then leads to other
problems down the line if it tries to merge that basic block with the landing
pad. Avoid this by not eliminating the load in a landing pad.
PR17621
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193064
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 21 Oct 2013 00:46:21 +0000 (00:46 +0000)]
Fix typo in test's XFAIL line. Patch by Dimitry Andric!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193063
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sun, 20 Oct 2013 07:04:37 +0000 (07:04 +0000)]
Teach simplify-cfg how to correctly create covered lookup tables for switches on iN with N >= 3.
One optimization simplify-cfg performs is the converting of switches to
lookup tables if the switch has > 4 cases. This is done by:
1. Finding the max/min case value and calculating the switch case range.
2. Create a lookup table basic block.
3. Perform a check in the switch's BB to see if the input value is in
the switch's case range. If the input value satisfies said predicate
branch to the lookup table BB, otherwise branch to the switch's default
destination BB using the default value as the result.
The conditional check consists of subtracting the min case value of the
table from any input iN value and then ensuring that said value is
unsigned less than the size of the lookup table represented as an iN
value.
If the lookup table is a covered lookup table, the size of the table will be N
which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN
value against 0 which is always false yielding the incorrect result.
This patch fixes this problem by recognizing if we have a covered lookup table
and if we do, unconditionally jumps to the lookup table BB since the covering
property of the lookup table implies no input values could not be handled by
said BB.
rdar://
15268442
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193045
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 Oct 2013 03:19:25 +0000 (03:19 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193043
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 Oct 2013 02:16:21 +0000 (02:16 +0000)]
Emit prefix data after debug and EH directives.
This ensures that the prefix data is treated as part of the function for
the purpose of debug info. This provides a better debugging experience,
among other things by allowing a debug info client to correctly look up
a function in debug info given a function pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193042
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 20 Oct 2013 02:16:18 +0000 (02:16 +0000)]
Emit DWARF line entries for all data in the instruction stream.
r182712 attempted to do this, but it failed to handle data emitted via
EmitBytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193041
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 19 Oct 2013 16:32:15 +0000 (16:32 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193038
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 19 Oct 2013 11:27:12 +0000 (11:27 +0000)]
Perform an intelligent splice of the predecessor with the single successor.
If the predecessor's being spliced into a landing pad, then we need the PHIs to
come first and the rest of the predecessor's code to come *after* the landing
pad instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193035
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 19 Oct 2013 09:04:26 +0000 (09:04 +0000)]
Avoid duplicate search by reusing the iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193034
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 19 Oct 2013 09:03:20 +0000 (09:03 +0000)]
Added comments from Andrew Kaylor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193033
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 19 Oct 2013 07:30:37 +0000 (07:30 +0000)]
Remove NDBEUG from all release types compile flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193031
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 19 Oct 2013 01:04:47 +0000 (01:04 +0000)]
Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193024
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 19 Oct 2013 01:04:42 +0000 (01:04 +0000)]
Fix up a few minor performance problems spotted in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193023
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 19 Oct 2013 00:14:04 +0000 (00:14 +0000)]
Update PPC loop tests after SCEV non-unit-stride checkin r193015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193021
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 18 Oct 2013 23:43:53 +0000 (23:43 +0000)]
SCEV should use NSW to get trip count for positive nonunit stride loops.
SCEV currently fails to compute loop counts for nonunit stride
loops. This comes up frequently. It prevents loop optimization and
forces vectorization to insert extra loop checks.
For example:
void foo(int n, int *x) {
for (int i = 0; i < n; i += 3) {
x[i] = i;
x[i+1] = i+1;
x[i+2] = i+2;
}
}
We need to properly handle the case in which limit > INT_MAX-stride. In
the above case: n > INT_MAX-3. In this case the loop counter will step
beyond the limit and overflow at the same time. However, knowing that
signed integer overlow in undefined, we can assume the loop test
behavior is arbitrary after overflow. This obeys both C undefined
behavior rules, and the more strict LLVM poison value rules.
I'm finally fixing this in response to Hal Finkel's persistence.
The most probable reason that we never optimized this before is that
we were being careful to handle case where the developer expected a
side-effect free infinite loop relying on overflow:
for (int i = 0; i < n; i += s) {
++j;
}
return j;
If INT_MAX+1 is a multiple of s and n > INT_MAX-s, then we might
expect an infinite loop. However there are plenty of ways to achieve
this effect without relying on undefined behavior of signed overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193015
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Oct 2013 23:41:25 +0000 (23:41 +0000)]
Write a simple description of the 'target triple' directive. This should be expanded. PR8976.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193014
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 18 Oct 2013 23:38:13 +0000 (23:38 +0000)]
Mark some command line flags as hidden
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193013
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Oct 2013 23:26:55 +0000 (23:26 +0000)]
Clarify that an alignment of 0 or 1 on a mem* intrinsic means 'no alignment'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193012
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 18 Oct 2013 23:25:39 +0000 (23:25 +0000)]
YAMLBench.cpp: Use llvm_move instead of std::move also here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193011
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Oct 2013 23:11:25 +0000 (23:11 +0000)]
Remove reference to obsolete arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193009
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Oct 2013 23:09:06 +0000 (23:09 +0000)]
Update to reflect current GC APIs and usage. The example code is taken from the Erlang GC implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193008
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 18 Oct 2013 23:07:01 +0000 (23:07 +0000)]
Can we move to C++11 already?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193007
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 18 Oct 2013 22:38:04 +0000 (22:38 +0000)]
[Support][YAML] Add support for accessing tags and tag handle substitution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193004
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 18 Oct 2013 21:14:19 +0000 (21:14 +0000)]
Debug Info: add a newly-created DIE to a parent in the same function.
With this commit, all DIEs created in CompileUnit will be added to parents
inside the same function. Also make getOrCreateTemplateType|Value functions
private.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193002
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 18 Oct 2013 20:52:22 +0000 (20:52 +0000)]
Debug Info: simplify code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193001
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 18 Oct 2013 20:46:28 +0000 (20:46 +0000)]
MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asm
This is another (final?) stab at making us able to parse our own asm output
on Windows.
Symbols on Windows often contain @'s and ?'s in their names. Our asm parser
didn't like this. ?'s were not allowed, and @'s were intepreted as trying to
reference PLT/GOT/etc.
We can't just add quotes around the bad names, since e.g. for MinGW, we use gas
to assemble, and it doesn't like quotes in some places (notably in .def
directives).
This commit makes us allow ?'s in symbol names, and @'s in symbol names for MS
assembly.
Differential Revision: http://llvm-reviews.chandlerc.com/D1978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193000
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 18 Oct 2013 19:32:06 +0000 (19:32 +0000)]
Check for errors when calling lto_codegen_add_module in the gold plugin.
Thanks to Milan Lenčo for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192996
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 18 Oct 2013 16:56:48 +0000 (16:56 +0000)]
Revert the rest of r192749 to bring back the buildbot. These two
error messages should not be able to occur at the same time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192985
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 18 Oct 2013 14:49:59 +0000 (14:49 +0000)]
Test case for r192957
Forgot to 'svn add'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192978
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Fri, 18 Oct 2013 14:41:50 +0000 (14:41 +0000)]
Pure refactoring change.
Patch by Artyom Skrobov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192977
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 18 Oct 2013 14:20:11 +0000 (14:20 +0000)]
[PATCH] Fix PR17168 (DAG scheduler inserts DBG_VALUE before PHI with fast-isel)
PR17168 describes a test case that fails when compiling for debug with
fast-isel. Investigation showed that the test was failing because a DBG_VALUE
machine instruction was placed prior to a PHI.
For this problem to occur requires the following:
* Compile for debug
* Compile with fast-isel
* In a block B, fast-isel must partially succeed before punting to DAG-isel
* B must start with a PHI
* The first unhandled node in the DAG must not generate a machine instruction
* A debug value with an order less than that of that first node exists
When all of these circumstances apply, the existing test that an instruction
was not inserted won't fire. Currently it tests whether the block is empty,
or whether the last instruction generated is a phi. When fast-isel has
partially succeeded, the last instruction generated will not be a phi.
Instead, we need to check whether the current insert position is immediately
following a phi. This patch adds that check, and adds the test case from the
PR as a regression test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192976
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 18 Oct 2013 14:12:50 +0000 (14:12 +0000)]
R600: Remove \ at EOL from ascii art comments.
Completely harmless, but GCC likes to warn about it even when the next line is
a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192974
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Fri, 18 Oct 2013 14:09:49 +0000 (14:09 +0000)]
Add hint disassembly syntax for 16-bit Thumb hint instructions.
Patch by Artyom Skrobov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 18 Oct 2013 14:03:24 +0000 (14:03 +0000)]
[AArch64] Add support for NEON scalar extract narrow instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192970
91177308-0d34-0410-b5e6-
96231b3b80d8
Ed Maste [Fri, 18 Oct 2013 13:01:33 +0000 (13:01 +0000)]
Correct log message typo: ended ad -> ended at
(From LLDB r192897)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192968
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Fri, 18 Oct 2013 10:18:40 +0000 (10:18 +0000)]
Add hardware division as a default feature on Cortex-A15. Also add test cases to check this, and change diagnostics for the hwdiv-arm feature to something useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192963
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 18 Oct 2013 09:52:21 +0000 (09:52 +0000)]
[mips][msa] Added a regression test that depended on multiple patches to pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192961
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 18 Oct 2013 08:45:43 +0000 (08:45 +0000)]
Developer policy amendment regarding confidentiality notices
Thanks to Daniel Berlin and Nadav Rotem for feedback and rewording!
Discussion:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20131014/191677.html
Reviewed by: nrotem, dberlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192958
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 18 Oct 2013 08:03:43 +0000 (08:03 +0000)]
CodeGen: Emit a libcall if the target doesn't support 16-byte wide atomics
There are targets that support i128 sized scalars but cannot emit
instructions that modify them directly. The proper thing to do is to
emit a libcall.
This fixes PR17481.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192957
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 18 Oct 2013 07:53:25 +0000 (07:53 +0000)]
Fix a conversion warning in the mingw32 build
gcc diagnoses this:
warning: converting to non-pointer type 'unsigned int' from NULL
Also remove an empty statement.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192955
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 18 Oct 2013 07:13:32 +0000 (07:13 +0000)]
[DebugInfo] Remove unneeded struct member and hide struct definition. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192954
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 18 Oct 2013 07:09:58 +0000 (07:09 +0000)]
Fix initialization order warning in mingw32 build
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192953
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 18 Oct 2013 07:03:16 +0000 (07:03 +0000)]
[DebugInfo] Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192952
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 18 Oct 2013 02:14:40 +0000 (02:14 +0000)]
Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output"
This caused the clang-native-mingw32-win7 buildbot to break.
The assembler was complaining about the following lines that were showing up
in the asm for CrashRecoveryContext.cpp:
movl $"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4", 4(%eax)
calll "_AddVectoredExceptionHandler@8"
.def "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4";
"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4":
calll "_RemoveVectoredExceptionHandler@4"
Reverting for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192940
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 18 Oct 2013 01:57:30 +0000 (01:57 +0000)]
Temporarily revert r192749 as it is causing problems for LTO and
requires a more in depth change to the IR structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192938
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 17 Oct 2013 22:14:08 +0000 (22:14 +0000)]
DIEHash: Add more things (and remove one character) from the COLLECT_ATTR macro
Makes the uses more terse and requires that they use a semicolon at the
end that helps editors indent proceeding lines correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192925
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 17 Oct 2013 22:07:09 +0000 (22:07 +0000)]
DIEHash: Support for simple (non-recursive, non-reused) type references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192924
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 17 Oct 2013 19:52:05 +0000 (19:52 +0000)]
17309 ARM backend incorrectly lowers COPY_STRUCT_BYVAL_I32 for thumb1 targets
This commit implements the correct lowering of the
COPY_STRUCT_BYVAL_I32 pseudo-instruction for thumb1 targets.
Previously, the lowering of COPY_STRUCT_BYVAL_I32 generated the
post-increment forms of ldr/ldrh/ldrb instructions. Thumb1 does not
have the post-increment form of these instructions so the generated
assembly contained invalid instructions.
Passing the generated assembly to gcc caused it to complain with an
error like this:
Error: cannot honor width suffix -- `ldrb r3,[r0],#1'
and the integrated assembler would generate an object file with an
invalid instruction encoding.
This commit contains a small test case that demonstrates the problem
with thumb1 targets as well as an expanded test case that more
throughly tests the lowering of byval struct passing for arm,
thumb1, and thumb2 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192916
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 17 Oct 2013 19:49:22 +0000 (19:49 +0000)]
Refactor lowering for COPY_STRUCT_BYVAL_I32
This commit refactors the lowering of the COPY_STRUCT_BYVAL_I32
pseudo-instruction in the ARM backend. We introduce a new helper
class that encapsulates all of the operations needed during the
lowering. The operations are implemented for each subtarget in
different subclasses. Currently only arm and thumb2 subtargets are
supported.
This refactoring was done to easily implement support for thumb1
subtargets. This initial patch does not add support for thumb1, but
is only a refactoring. A follow on patch will implement the support
for thumb1 subtargets.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192915
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Thu, 17 Oct 2013 18:51:01 +0000 (18:51 +0000)]
llvm-c: Add LLVMIntPtrType{,ForAS}InContext
All of the Core API functions have versions which accept explicit context, in
addition to ones which work on global context. This commit adds functions
which accept explicit context to the Target API for consistency.
Patch by Peter Zotov
Differential Revision: http://llvm-reviews.chandlerc.com/D1912
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192913
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Oct 2013 18:39:47 +0000 (18:39 +0000)]
CMake: set stack size for MSVC in just one place
After r192904, Reid pointed out he thought we already set the stack
size for MSVC. Turns out we did, but it didn't seem to work.
This commit sets the stack size in a single place, using
CMAKE_EXE_LINKER_FLAGS because that seems to be the way that works
best.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192912
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 17 Oct 2013 18:18:52 +0000 (18:18 +0000)]
Rename fields of GlobalStatus to match the coding style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192910
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 17 Oct 2013 18:12:29 +0000 (18:12 +0000)]
[AArch64] Add support for NEON scalar three register different instruction
class. The instruction class includes the signed saturating doubling
multiply-add long, signed saturating doubling multiply-subtract long, and
the signed saturating doubling multiply long instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192908
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 17 Oct 2013 18:06:32 +0000 (18:06 +0000)]
rename SafeToDestroyConstant to isSafeToDestroyConstant and clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192907
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 17 Oct 2013 18:00:25 +0000 (18:00 +0000)]
Simplify the interface of AnalyzeGlobal a bit and rename to analyzeGlobal.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192906
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Oct 2013 17:49:57 +0000 (17:49 +0000)]
CMake: set stack size to 2MB for MSVC builds
Compiling under Visual C++ 2012 with the default stack size of 1MB, the stack
overflows at a depth of 216 template instantiations, well before the 256
default limit. This patch modifies the default MSVC stack size to 2MB.
Patch by Yaron Keren!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192904
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 17 Oct 2013 17:38:49 +0000 (17:38 +0000)]
Add testcase to make sure we don't generate a compact unwind section for ELF binaries.
This tests r190354.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192903
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 13:38:20 +0000 (13:38 +0000)]
[mips][msa] Added lsa instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192895
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 17 Oct 2013 13:28:16 +0000 (13:28 +0000)]
[DebugInfo] Delete dead code, simplify and fix code style for some existing code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192894
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Oct 2013 13:11:13 +0000 (13:11 +0000)]
Lit: LIT_PRESERVES_TMP should be aware of TMPDIR, too.
TMPDIR is preferred in Unix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192891
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 17 Oct 2013 12:41:05 +0000 (12:41 +0000)]
Fix tests not to depend on specific regalloc or instruction order.
They were failing with -mcpu=atom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192890
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 12:36:35 +0000 (12:36 +0000)]
Fix r192888: test/CodeGen/Mips/msa/3r_ld_st.ll should have been deleted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192889
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 12:16:03 +0000 (12:16 +0000)]
[mips][msa] Removed ldx.[bhwd] and stx.[bhwd].
These were present in a previous version of the MSA spec but are not
present in the published version. There is no hardware that uses these
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192888
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Oct 2013 12:10:12 +0000 (12:10 +0000)]
Lit: Introduce an environment variable, $LIT_PRESERVES_TMP, to preserve TMP (and TEMP).
This is intended to check how many temporary files would be generated in automated builders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192887
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 17 Oct 2013 11:16:57 +0000 (11:16 +0000)]
Replace sra with srl if a single sign bit is required
E.g. (and (sra (i32 x) 31) 2) -> (and (srl (i32 x) 30) 2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192884
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 17 Oct 2013 11:02:58 +0000 (11:02 +0000)]
Fix edge condition in DAGCombiner to improve codegen of shift sequences.
When canonicalizing dags according to the rule
(shl (zext (shr X, c1) ), c1) ==> (zext (shl (shr X, c1), c1))
remember to add the new shl dag to the DAGCombiner worklist of nodes.
If we don't explicitly add it to the worklist of nodes to visit, we
may not trigger later on the rule that folds the shift left + logical
shift right into a AND instruction with bitmask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192883
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 17 Oct 2013 10:53:50 +0000 (10:53 +0000)]
[msan] Use zero-extension in shadow cast by default.
Switch to sign-extension in r192575 caused 7% perf loss on 482.sphinx3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192882
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Thu, 17 Oct 2013 10:39:35 +0000 (10:39 +0000)]
llvm-c: Don't assert in LLVMTargetMachineEmitToFile on nonexistent file
Error handling code for raw_fd_ostream constructor is present, but
never used, because formatted_raw_ostream will always assert on closed
fd's before.
Patch by Peter Zotov
Differential Revision: http://llvm-reviews.chandlerc.com/D1909
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192881
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 17 Oct 2013 10:30:12 +0000 (10:30 +0000)]
[mips][msa] Correct definition order of ftrunc_[su], ftint_[su], and ftq.
Define these three instructions in alphabetical order (like the rest of the
file).
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192880
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 17 Oct 2013 10:27:12 +0000 (10:27 +0000)]
Changing DebugInfoFinder to iterate over all the compile units.
Solves http://llvm.org/bugs/show_bug.cgi?id=17507
Committed on behalf of alon.mishne@intel.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192879
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Thu, 17 Oct 2013 10:25:24 +0000 (10:25 +0000)]
llvm-c: Return NULL from LLVMGetFirstTarget instead of asserting
If no targets are registered, LLVMGetFirstTarget currently fails with
an assertion. This patch makes it return NULL instead, similarly to
how LLVMGetNextTarget would.
Patch by Peter Zotov
Differential Revision: http://llvm-reviews.chandlerc.com/D1908
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192878
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Vyukov [Thu, 17 Oct 2013 07:20:06 +0000 (07:20 +0000)]
tsan: implement no_sanitize_thread attribute
If a function has no_sanitize_thread attribute,
do not instrument memory accesses in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192871
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 17 Oct 2013 02:58:06 +0000 (02:58 +0000)]
x86: Move bitcasts outside concat_vector.
Consider the following:
typedef unsigned short ushort4U __attribute__((ext_vector_type(4),
aligned(2)));
typedef unsigned short ushort4 __attribute__((ext_vector_type(4)));
typedef unsigned short ushort8 __attribute__((ext_vector_type(8)));
typedef int int4 __attribute__((ext_vector_type(4)));
int4 __bbase_cvt_int(ushort4 v) {
ushort8 a;
a.lo = v;
return _mm_cvtepu16_epi32(a);
}
This generates the, not unreasonable, IR:
define <4 x i32> @foo0(double %v.coerce) nounwind ssp {
%tmp = bitcast double %v.coerce to <4 x i16>
%tmp1 = shufflevector <4 x i16> %tmp, <4 x i16> undef, <8 x i32> <i32
%0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
%tmp2 = tail call <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16> %tmp1)
ret <4 x i32> %tmp2
}
The problem is when type legalization gets hold of the v4i16. It
legalizes that by spilling to the stack, then doing a zero-extending
load. Things go even more silly from there, ending up with something
like:
_foo0:
movsd %xmm0, -8(%rsp) <== Spill to the stack.
movq -8(%rsp), %xmm0 <== Reload it right back out.
pmovzxwd %xmm0, %xmm1 <== Here's what we actually asked for.
pblendw $1, %xmm1, %xmm0 <== We don't need this at all
pmovzxwd %xmm0, %xmm0 <== We already did this
ret
The v8i8 to v8i16 zext intrinsic gives even worse results, with two
table lookups via pshufb instructions(!!).
To avoid all that, we can move the bitcasting until after we've formed
the wider (legal) vector type. Then our normal codegen flows along
nicely and we get the expected:
_foo0:
pmovzxwd %xmm0, %xmm0
ret
rdar://
15245794
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192866
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 17 Oct 2013 02:06:06 +0000 (02:06 +0000)]
According to the dwarf standard pubnames and pubtypes for languages
like C++ should be the fully qualified names for the type.
Add a routine that does a language specific context walk to build
up the qualified name and use it when we add types/names to the
tables. Expand the gnu pubnames testcase as it's the most complex
to make sure that qualified types are also being added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192865
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Thu, 17 Oct 2013 01:38:28 +0000 (01:38 +0000)]
Expose install_fatal_error_handler() through the C API.
I expose the API with some caveats:
- The C++ API involves a traditional void* opaque pointer for the fatal
error callback. The C API doesn’t do this. I don’t think that the void*
opaque pointer makes any sense since this is a global callback - there will
only be one of them. So if you need to pass some data to your callback,
just put it in a global variable.
- The bindings will ignore the gen_crash_diag boolean. I ignore it because
(1) I don’t know what it does, (2) it’s not documented AFAIK, and (3) I
couldn’t imagine any use for it. I made the gut call that it probably
wasn’t important enough to expose through the C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192864
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 17 Oct 2013 01:34:33 +0000 (01:34 +0000)]
[projects/test-suite] White space and long line fixes.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192863
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 17 Oct 2013 01:31:12 +0000 (01:31 +0000)]
Add the subprogram DIEs to the context they're created with only
if they're a declaration, otherwise they're owned by the compile
unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192861
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Oct 2013 01:13:02 +0000 (01:13 +0000)]
Re-commit r192758 - MC: quote tricky symbol names in asm output
The reason this got reverted was that the @feat.00 symbol which was emitted
for every TU became quoted, and on cygwin/mingw we use the gas assembler which
couldn't handle the quotes.
This commit fixes the problem by only emitting @feat.00 for win32, where we use
clang -cc1as to assemble. gas would just drop this symbol anyway, so there is no
loss there.
With @feat.00 gone, there shouldn't be quoted symbols showing up on cygwin since
it uses the Itanium ABI, which doesn't put these funny characters in symbols.
> Because of win32 mangling, we produce symbol and section names with
> funny characters in them, most notably @ characters.
>
> MC would choke on trying to parse its own assembly output. This patch addresses
> that by:
>
> - Making @ trigger quoting of symbol names
> - Also quote section names in the same way
> - Just parse section names like other identifiers (to allow for quotes)
> - Don't assume @ signifies a symbol variant if it is in a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192859
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 17 Oct 2013 00:10:34 +0000 (00:10 +0000)]
DIEHash: Include the type's context in the type hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192856
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 Oct 2013 23:36:20 +0000 (23:36 +0000)]
DIEHash: Use DW_FORM_sdata for integers, per spec.
This allows us to produce the same hash as GCC for at least some simple
examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192855
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 Oct 2013 22:43:10 +0000 (22:43 +0000)]
Invert arguments to ASSERT_EQ to match gtest diagnostic printing
GTest assumes the left hand side of the assert is the expectation and
the right hand side is the test result. It's easier to read gtest
failures when these things are ordered correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192854
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Wed, 16 Oct 2013 21:30:25 +0000 (21:30 +0000)]
llvm-c: Add LLVMDumpType
The C API currently allows to dump values (LLVMDumpValue), but a similar method for types was not exported.
Patch by Peter Zotov
Differential Revision: http://llvm-reviews.chandlerc.com/D1911
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192852
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 Oct 2013 21:21:51 +0000 (21:21 +0000)]
Update test case due to DIE hashing in r192836
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192850
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 21:04:39 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar negate instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Oct 2013 21:04:34 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar absolute value instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192842
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 Oct 2013 20:40:46 +0000 (20:40 +0000)]
Remove ambiguity introduced in r192836
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192840
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 16 Oct 2013 20:38:58 +0000 (20:38 +0000)]
Add support for the VSX target attribute. No functional change
as we don't actually use it to emit any code yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192837
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 16 Oct 2013 20:29:06 +0000 (20:29 +0000)]
DIEHash: Include the trailing zero byte after the children of a DIE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192836
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 20:21:39 +0000 (20:21 +0000)]
Allow repeated registration again.
Our use of -fvisibility-inlines-hidden means we cannot check function pointers
against non null values.
Unfortunately, we also cannot assert that the callbacks are initialized only
once. The problem is that lldb has multiple subsystems that need to call this
and they don't have a unique initialization order.
Thanks to Sean Callanan for reporting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192835
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Wed, 16 Oct 2013 19:04:11 +0000 (19:04 +0000)]
Enabling 3DNow! prefetch instruction for a few AMD processors: bobcat, jaguar,
bulldozer and piledriver. Support for the instruction itself seems to have
already been added in r178040.
Differential Revision: http://llvm-reviews.chandlerc.com/D1933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192828
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 19:03:14 +0000 (19:03 +0000)]
Create an atom with just the data that failed to disassemble.
Patch by Stephen Checkoway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192827
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 18:37:51 +0000 (18:37 +0000)]
Remove an outdated statement.
Aliases now have their own section where we document which linkages they can
have.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192825
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 16 Oct 2013 18:30:23 +0000 (18:30 +0000)]
After PostRA scheduling, don't set kill flags on undef operands.
This should fix the ATOM buildbot failing on break-avx-dep.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192824
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 16 Oct 2013 18:26:16 +0000 (18:26 +0000)]
Fix MCDataAtom never calling remap when adding data.
This patch fixes a small mistake in MCDataAtom::addData() where it doesn't ever
call remap():
- if (Data.size() > Begin - End - 1)
+ if (Data.size() > End + 1 - Begin)
remap(Begin, End + 1);
This is currently not visible because of another bug is the disassembler, so
the patch includes a unit test.
Patch by Stephen Checkoway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192823
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Wed, 16 Oct 2013 18:00:54 +0000 (18:00 +0000)]
[llvm-c] Add LLVMPrintModuleToString.
Like LLVMDumpModule but returns the string (that needs to be freed
with LLVMDisposeMessage) instead of printing it to stderr.
Differential Revision: http://llvm-reviews.chandlerc.com/D1941
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192821
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 16 Oct 2013 17:52:40 +0000 (17:52 +0000)]
SLPVectorizer: Don't vectorize volatile memory operations
radar://
15231682
Reapply r192799,
http://lab.llvm.org:8011/builders/lldb-x86_64-debian-clang/builds/8226
showed that the bot is still broken even with this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192820
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 16 Oct 2013 17:19:40 +0000 (17:19 +0000)]
Revert "SLPVectorizer: Don't vectorize volatile memory operations"
This speculatively reverts commit 192799. It might have broken a linux buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192816
91177308-0d34-0410-b5e6-
96231b3b80d8