Commit Graph

97002 Commits

Author SHA1 Message Date
Richard Barton
485333df71 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
2013-10-18 14:09:49 +00:00
Chad Rosier
c439c205ba [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
2013-10-18 14:03:24 +00:00
Ed Maste
e1bc6ddc0b 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
2013-10-18 13:01:33 +00:00
Silviu Baranga
b1c480900b 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
2013-10-18 10:18:40 +00:00
Daniel Sanders
e019c08bf6 [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
2013-10-18 09:52:21 +00:00
Alp Toker
46c635251f 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
2013-10-18 08:45:43 +00:00
David Majnemer
641bea117d 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
2013-10-18 08:03:43 +00:00
Alp Toker
7a7fc90ba3 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
2013-10-18 07:53:25 +00:00
Alexey Samsonov
8d433bd458 [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
2013-10-18 07:13:32 +00:00
Alp Toker
d07a8a2491 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
2013-10-18 07:09:58 +00:00
Alexey Samsonov
71f6d6ee1a [DebugInfo] Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192952 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-18 07:03:16 +00:00
Hans Wennborg
ab887bf52c 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
2013-10-18 02:14:40 +00:00
Eric Christopher
1c165b8ee3 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
2013-10-18 01:57:30 +00:00
David Blaikie
0d87c201b1 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
2013-10-17 22:14:08 +00:00
David Blaikie
47f66d5a75 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
2013-10-17 22:07:09 +00:00
David Peixotto
7014d274e4 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
2013-10-17 19:52:05 +00:00
David Peixotto
6483751a36 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
2013-10-17 19:49:22 +00:00
Anders Waldenborg
f4094e5ed7 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
2013-10-17 18:51:01 +00:00
Hans Wennborg
4d1a925675 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
2013-10-17 18:39:47 +00:00
Rafael Espindola
b75fcecb0f 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
2013-10-17 18:18:52 +00:00
Chad Rosier
3b370a2ac4 [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
2013-10-17 18:12:29 +00:00
Rafael Espindola
9bb874cea2 rename SafeToDestroyConstant to isSafeToDestroyConstant and clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192907 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17 18:06:32 +00:00
Rafael Espindola
4a7cef2202 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
2013-10-17 18:00:25 +00:00
Hans Wennborg
acc1f8b20f 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
2013-10-17 17:49:57 +00:00
Bill Wendling
20a7ec9247 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
2013-10-17 17:38:49 +00:00
Daniel Sanders
52244da7f2 [mips][msa] Added lsa instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192895 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17 13:38:20 +00:00
Alexey Samsonov
2e56d575b7 [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
2013-10-17 13:28:16 +00:00
NAKAMURA Takumi
651ffc703e 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
2013-10-17 13:11:13 +00:00
Benjamin Kramer
3d5694dca9 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
2013-10-17 12:41:05 +00:00
Daniel Sanders
071aed9422 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
2013-10-17 12:36:35 +00:00
Daniel Sanders
db8a16252b [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
2013-10-17 12:16:03 +00:00
NAKAMURA Takumi
9f64a56aba 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
2013-10-17 12:10:12 +00:00
Richard Sandiford
f9a5e40b90 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
2013-10-17 11:16:57 +00:00
Andrea Di Biagio
888cbad774 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
2013-10-17 11:02:58 +00:00
Evgeniy Stepanov
f5e3811607 [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
2013-10-17 10:53:50 +00:00
Anders Waldenborg
0738387d08 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
2013-10-17 10:39:35 +00:00
Daniel Sanders
ed785629be [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
2013-10-17 10:30:12 +00:00
Michael Kuperstein
c3b6e80d29 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
2013-10-17 10:27:12 +00:00
Anders Waldenborg
2fee43f9b2 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
2013-10-17 10:25:24 +00:00
Dmitry Vyukov
4ef1999d61 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
2013-10-17 07:20:06 +00:00
Jim Grosbach
49af380e3b 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
2013-10-17 02:58:06 +00:00
Eric Christopher
9198657e1e 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
2013-10-17 02:06:06 +00:00
Filip Pizlo
0739140b05 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
2013-10-17 01:38:28 +00:00
Jack Carter
adbd3ae1df [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
2013-10-17 01:34:33 +00:00
Eric Christopher
bdfed1687b 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
2013-10-17 01:31:12 +00:00
Hans Wennborg
b74b88edac 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
2013-10-17 01:13:02 +00:00
David Blaikie
88a68cbbb5 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
2013-10-17 00:10:34 +00:00
David Blaikie
c098708220 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
2013-10-16 23:36:20 +00:00
David Blaikie
a85ad23a1f 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
2013-10-16 22:43:10 +00:00
Anders Waldenborg
75a5df1d1e 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
2013-10-16 21:30:25 +00:00