Commit Graph

173345 Commits

Author SHA1 Message Date
Alexey Samsonov 414b6fb170 Move logic for calculating DBG_VALUE history map into separate file/class.
Summary: No functionality change.

Test Plan: llvm regression test suite.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: echristo, llvm-commits

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

llvm-svn: 207708
2014-04-30 21:34:11 +00:00
Greg Fitzgerald 6759fd9fdd Allow any test to be executed via a %run command.
Configure %run with COMPILER_RT_EMULATOR:

  $ cmake -DCOMPILER_RT_EMULATOR="qemu-arm -L $SYSROOT"

llvm-svn: 207707
2014-04-30 21:32:30 +00:00
James Molloy cbb9791e3b Move a testcase from ELF to ARM64, incorrectly placed in r207627.
llvm-svn: 207706
2014-04-30 21:31:11 +00:00
David Blaikie 3b2a53a437 Emit DW_AT_object_pointer once, on the declaration, for each function.
This effectively reverts r164326, but adds some comments and
justification and ensures we /don't/ emit the DW_AT_object_pointer on
the (abstract and concrete) definitions. (while still preserving it on
standalone definitions involving ObjC Blocks)

This does increase the size of member function declarations from 7 to 11
bytes, unfortunately, but still seems like the Right Thing to do so that
callers that see only the declaration still have the information about
the object pointer. That said, I don't know what, if any, DWARF
consumers don't have a heuristic to guess this in the case of normal
C++ member functions - perhaps we can remove it entirely.

llvm-svn: 207705
2014-04-30 21:29:41 +00:00
Alexey Samsonov c717e7803c Don't expect to find fpcmp and PerfectShuffle when running lit tests
llvm-svn: 207704
2014-04-30 21:26:35 +00:00
Jay Foad f517c0f21b Remove unused field hash_state::seed.
llvm-svn: 207703
2014-04-30 21:12:17 +00:00
Weiming Zhao 7f6daf1799 [ARM64] Prevent bit extraction to be adjusted by following shift
For pattern like ((x >> C1) & Mask) << C2, DAG combiner may convert it
into (x >> (C1-C2)) & (Mask << C2), which makes pattern matching of ubfx
more difficult.
For example:
Given
  %shr = lshr i64 %x, 4
  %and = and i64 %shr, 15
  %arrayidx = getelementptr inbounds [8 x [64 x i64]]* @arr, i64 0, %i64 2, i64 %and
  %0 = load i64* %arrayidx
With current shift folding, it takes 3 instrs to compute base address:
  lsr x8, x0, #1
  and x8, x8, #0x78
  add x8, x9, x8

If using ubfx, it only needs 2 instrs:
  ubfx  x8, x0, #4, #4
  add x8, x9, x8, lsl #3

This fixes bug 19589

llvm-svn: 207702
2014-04-30 21:07:24 +00:00
Reid Kleckner dd2647edcf Fix the clang-cl self-host build by defining ~DwarfDebug out of line
DwarfDebug.h has a SmallVector member containing a unique_ptr of an
incomplete type.  MSVC doesn't have key functions, so the vtable and
dtor are emitted in AsmPrinter.cpp, where DwarfDebug's ctor is called.
AsmPrinter.cpp include DwarfUnit.h and doesn't get a complete definition
of DwarfTypeUnit.  We could fix the problem by including DwarfUnit.h in
DwarfDebug.h, but that would increase header bloat.  Instead, define
~DwarfDebug out of line.

llvm-svn: 207701
2014-04-30 20:34:31 +00:00
Greg Clayton 40286e0b6d Sometimes when launching through a shell, we can run into cases where the /bin/sh or /usr/bin/arch can crash the process due to security measures. Now we correctly report when a process exited in the process of launching so we can show the reason why it crashed instead of just showing “initial process state wasn't stopped: exited”.
llvm-svn: 207700
2014-04-30 20:29:09 +00:00
Greg Clayton bb49289023 Allow for a task port to change when we exec.
llvm-svn: 207699
2014-04-30 20:27:01 +00:00
Greg Clayton 040c560f2c Report the result of waitpid() a little more clearly as well as clearly logging the process status.
llvm-svn: 207698
2014-04-30 20:24:10 +00:00
James Molloy 3ef43692b4 Add a testcase for r207627.
llvm-svn: 207697
2014-04-30 20:06:26 +00:00
Arnaud A. de Grandmaison e1265143e2 PR19601: std::remove_if does not really remove the elements.
It moves them at the end of the range instead, so an extra erase is needed.

It is strange that this code works without the erase. On the other hand, removing the remove_if will make fail some tests.

llvm-svn: 207696
2014-04-30 19:59:22 +00:00
Joerg Sonnenberger a1fbf3459f Exceptions store the message as reference counted string for
compatibility to libstdc++. Move the implementation into a header for
easier sharing with libc++abi. Merge a number of improvements from that
version. Provide a POD definition for <stdexcept>'s public use to avoid
cast dances. Discussed with Marshall Clow.

llvm-svn: 207695
2014-04-30 19:54:11 +00:00
Hans Wennborg 59f0cba30f Use the new StringTableBuilder in yaml2elf
http://reviews.llvm.org/D3574

llvm-svn: 207694
2014-04-30 19:38:09 +00:00
Yi Jiang e2d5f29c2f Revert r207571 - Add slp vectorization to LTO passes
llvm-svn: 207693
2014-04-30 19:27:24 +00:00
Michael Zolotukhin 1f4a960ccf [X86] Never hoist the shift value of a shift instruction.
There is no need to check if we want to hoist the immediate value of an
shift instruction. Simply return TCC_Free right away.

This change is like r206101, but for X86.

rdar://problem/16190769

llvm-svn: 207692
2014-04-30 19:17:32 +00:00
Simon Atanasyan a64f34b759 [Driver] Check type of InputElement before request a error message. If the
element is a FileNode, request error description. If the element is Group,
print hard coded error message. We need to implement a better diagnostics
here but even current solution is better than a segmentation fault output.

llvm-svn: 207691
2014-04-30 19:04:01 +00:00
Simon Atanasyan db8a4a8578 [ELF] Return result from the function ASAP.
No functional changes.

llvm-svn: 207690
2014-04-30 19:03:56 +00:00
Simon Atanasyan a54d34d4ad [ELF] Factor out the code builds a library search directory path
into the separate function.

No functional changes.

llvm-svn: 207689
2014-04-30 19:03:51 +00:00
Simon Atanasyan 76d8d36c3c [Driver] Remove the redundant cast.
No functional changes.

llvm-svn: 207688
2014-04-30 19:03:45 +00:00
Simon Atanasyan e33f2add5d [Mips] Recognize MIPS emulation name 'elf32ltsmip'.
llvm-svn: 207687
2014-04-30 19:03:40 +00:00
Reid Kleckner f1dccebe6a Fix typos in carries_dependency docs
llvm-svn: 207686
2014-04-30 18:50:03 +00:00
Tom Stellard 98dccb109b Fix build broken by LLVM commit r207593
llvm-svn: 207685
2014-04-30 18:35:20 +00:00
Tom Stellard 998602dac2 Remove clc/gentype.inc
This file duplicates clc/math/gentype.inc and is not
actually being used.

Patch by: Jeroen Ketema

llvm-svn: 207684
2014-04-30 18:35:17 +00:00
Alexey Samsonov 41b977dffd Convert several loops over MachineFunction basic blocks to range-based loops
llvm-svn: 207683
2014-04-30 18:29:51 +00:00
David Majnemer deca705593 Sema: Implement DR477
Summary: Friend declarations shouldn't mention explicit or virtual.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 207682
2014-04-30 18:24:01 +00:00
Richard Smith d94f2f16bd When typo-correcting a member using declaration, don't exclude member templates.
llvm-svn: 207681
2014-04-30 18:15:00 +00:00
Richard Smith 21866c3267 When typo-correcting a member using-declaration, only consider members of base classes.
llvm-svn: 207680
2014-04-30 18:03:21 +00:00
Carlo Kok 307625c974 [IPO/MergeFunctions] changes so it doesn't try to bitcast a struct return type but instead recreates it with insert/extract value.
llvm-svn: 207679
2014-04-30 17:53:04 +00:00
Tobias Grosser f56af204b9 Add delinearization testcase for ivs that do not follow the loop order
This is a test case that is currently failing, but that should start working
with an upcoming version of our delinearization pass.

llvm-svn: 207678
2014-04-30 17:49:22 +00:00
Richard Smith 30a615dca8 Fix crash if typo correction corrects a member using-declaration to a
non-member declaration. Patch by Dinesh Dwivedi!

llvm-svn: 207677
2014-04-30 17:40:35 +00:00
David Majnemer 91db08bfe4 IR: Conservatively verify inalloca arguments
Summary: Try to spot obvious mismatches with inalloca use.

Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 207676
2014-04-30 17:22:00 +00:00
Reid Kleckner 92fc0178c6 __thread: Move constant init check to CheckCompleteVariableDeclaration
We were emitting dynamic initializers for __thread variables if there
was no explicit initializer, as in this test case:

struct S { S(); };
__thread S s;

llvm-svn: 207675
2014-04-30 17:10:18 +00:00
Rafael Espindola 553e5ebe4a Simplify ELFObjectWriter::SymbolValue.
It now defers all offset computation to getSymbolOffset.

llvm-svn: 207674
2014-04-30 16:59:35 +00:00
Matheus Almeida e844872830 [mips] Add instruction alias (negu).
Summary: negu $reg is equivalent to negu $reg, $reg.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 207673
2014-04-30 16:53:49 +00:00
Reid Kleckner 121b1a1fa5 -Wunused-parameter: Don't fire on defaulted or deleted functions
Patch by Dinesh Dwivedi!

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

llvm-svn: 207672
2014-04-30 16:31:28 +00:00
Matheus Almeida b7be52343d [mips] Add instruction alias (sltu).
Summary:
The pattern sltu $r1, $r2, $imm is found in handwritten assembly which
is just a shorthand version of sltui $r1, $r2, $imm.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 207671
2014-04-30 16:29:56 +00:00
Hans Wennborg 83e6e1e926 ELFObjectWriter: deduplicate suffices in strtab
We already do this for shstrtab, so might as well do it for strtab. This
extracts the string table building code into a separate class. The idea
is to use it for other object formats too.

I mostly wanted to do this for the general principle, but it does save a
little bit on object file size. I tried this on a clang bootstrap and
saved 0.54% on the sum of object file sizes (1.14 MB out of 212 MB for
a release build).

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

llvm-svn: 207670
2014-04-30 16:25:02 +00:00
Tim Northover a8c577e454 ARM64: print fp immediates without using scientific notation.
llvm-svn: 207669
2014-04-30 16:13:34 +00:00
Tim Northover 7346f062b6 AArch64/ARM64: implement remaining TLS relocations (purely MC).
llvm-svn: 207668
2014-04-30 16:13:26 +00:00
Tim Northover b8fb7f4193 AArch64/ARM64: add specific diagnostic for MRS/MSR and enable tests.
llvm-svn: 207667
2014-04-30 16:13:20 +00:00
Tim Northover 3c9a9401d5 AArch64/ARM64: accept and print floating-point immediate 0 as "#0.0"
It's been decided that in the future, the floating-point immediate in
instructions like "fcmeq v0.2s, v1.2s, #0.0" will be canonically "0.0", which
has been implemented on AArch64 already but not ARM64.

This fixes that issue.

llvm-svn: 207666
2014-04-30 16:13:07 +00:00
David Majnemer 6b3244c460 IR: Alloca clones should remember inalloca state
Pretty straightforward, we weren't propagating whether or not an
AllocaInst had 'inalloca' marked on it when it came time to clone it.

The inliner exposed this bug.  A reduced testcase is forthcoming.

llvm-svn: 207665
2014-04-30 16:12:21 +00:00
Matheus Almeida 56df6ff2c5 [mips] Add instruction alias (dsll and dsrl).
Summary:
The pattern dsll/dsrl $rd, $rt, $rs is found in handwritten assembly which
is just a shorthand version of dsllv/dsrlv $rd, $rt, $rs.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 207664
2014-04-30 16:00:49 +00:00
Douglas Gregor 8451cdff2f Fix a use of uninitialized memory in SmallVector's move-assignment operator.
When we were moving from a larger vector to a smaller one but didn't
need to re-allocate, we would move-assign over uninitialized memory in
the target, then move-construct that same data again.

llvm-svn: 207663
2014-04-30 15:49:06 +00:00
Rafael Espindola b36f6189a5 Relax the test a bit.
It is not relevant where the symbol and section names are stored, just their
values.

llvm-svn: 207662
2014-04-30 15:32:21 +00:00
Tom Stellard 1bd80725b3 R600/SI: Use VALU instructions for copying i1 values
We can't use SALU instructions for this since they ignore the EXEC mask
and are always executed.

This fixes several OpenCV tests.

llvm-svn: 207661
2014-04-30 15:31:33 +00:00
Tom Stellard 0c354f25c9 R600/SI: Teach moveToVALU how to handle some SMRD instructions
llvm-svn: 207660
2014-04-30 15:31:29 +00:00
Chad Rosier 864e35db0a [ARM64][fast-isel] Fast-isel doesn't know how to handle f128.
llvm-svn: 207659
2014-04-30 15:29:57 +00:00