Commit Graph

212493 Commits

Author SHA1 Message Date
Rui Ueyama af311c1d01 ELF2: Call OutputSection::finalize() from createSections.
Previously, we did this in assignAddresses(), but finalization was
not part of assigning addresses, so this is a better place.

llvm-svn: 249842
2015-10-09 16:03:53 +00:00
Artur Pilipenko ffd132878a ValueTracking: use getAlignment in isAligned
Reviewed By: reames

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

llvm-svn: 249841
2015-10-09 15:58:26 +00:00
Bruce Mitchener 7d9a419a3a Remove long-forgotten plugin virtuals.
Summary:
EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't
implemented or used anywhere, so remove them from the Hexagon and POSIX
Dynamic Loaders as well as the FreeBSD process.

Reviewers: clayborg, labath, emaste

Subscribers: lldb-commits, emaste

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

llvm-svn: 249840
2015-10-09 15:37:10 +00:00
Rui Ueyama bf3fd7c9a0 ELF2: Emit a PT_PHDR header as the first entry of the program header.
PT_PHDR entry points to the program header itself.

llvm-svn: 249839
2015-10-09 15:31:49 +00:00
Mohit K. Bhakkad 18af8a20c5 [LLDB] Fix display of value of a vector variables in watchpoint operations
Reviewers: clayborg, zturner.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13202

llvm-svn: 249838
2015-10-09 15:13:20 +00:00
Mohit K. Bhakkad 5df85cebfb [LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13548

llvm-svn: 249837
2015-10-09 15:05:45 +00:00
Frederic Riss 9f5013a138 [dsymutil] Prevent warning
llvm-svn: 249836
2015-10-09 15:04:05 +00:00
Rafael Espindola d540919ff1 Revert "[ELF2] - Implemented rel[a].plt sections"
This reverts commit r249816.

It broke building llvm with lld:

$ ./bin/FileCheck
./bin/FileCheck: error while loading shared libraries: unexpected PLT reloc type 0x06

I think the only thing that is wrong with this patch is that it is too soon.

The plt we create (and its relocs) don't support lazy loading, so they have
to be relocated as ordinary dynamic relocations.

llvm-svn: 249835
2015-10-09 14:25:49 +00:00
Jun Bum Lim 0aace13d18 Improve ISel across lane float min/max reduction
In vectorized float min/max reduction code, the final "reduce" step
is sub-optimal. In AArch64, this change wll combine :

  svn0 = vector_shuffle t0, undef<2,3,u,u>
  fmin = fminnum t0,svn0
  svn1 = vector_shuffle fmin, undef<1,u,u,u>
  cc = setcc fmin, svn1, ole
  n0 = extract_vector_elt cc, #0
  n1 = extract_vector_elt fmin, #0
  n2 = extract_vector_elt fmin, #1
  result = select n0, n1,n2
into :
  result = llvm.aarch64.neon.fminnmv t0

This change extends r247575.

llvm-svn: 249834
2015-10-09 14:11:25 +00:00
Aaron Ballman 6269236a8e Amending r249721 to properly handle pathological attribute-related names like __ and ____.
Patch by Adrian Zgorzalek!

llvm-svn: 249833
2015-10-09 13:53:24 +00:00
Benjamin Kramer 49692eda7e [VFS] Rename RedirectingFS internals to avoid collisions with public clang classes
Hopefully fixes the MSVC build. NFC intended.

llvm-svn: 249832
2015-10-09 13:28:13 +00:00
Benjamin Kramer 407eb79fbf [VFS] Wire up driver VFS through tooling.
Sadly I don't currently have a way to tests this as the driver is always
initialized with the default triple and finding system headers is system
specific.

llvm-svn: 249831
2015-10-09 13:03:25 +00:00
Benjamin Kramer decb2aeab3 [VFS] Just normalize away .. and . in paths for in-memory file systems.
This simplifies the code and gets us support for .. for free.

llvm-svn: 249830
2015-10-09 13:03:22 +00:00
Benjamin Kramer c5862f08de [VFS] Wire up multilib toolchain code to the VFS.
This lets a VFSified driver actually validate the GCC paths.

llvm-svn: 249829
2015-10-09 13:03:18 +00:00
Pavel Labath 6204506fa6 dotest.py: Fail if we detect multiple tests with the same name
Summary:
Log files produced by dotest have names derived from the test name, and this produces errors in
case we have multiple tests with the same name. Additionally, it's good if the test name explains
what the test is testing (which it clearly doesn't do well if there are multiple tests with
identical names). This commit makes the presence of such tests a hard error.

Reviewers: tberghammer, zturner

Subscribers: iancottrell, lldb-commits

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

llvm-svn: 249828
2015-10-09 12:48:17 +00:00
Tamas Berghammer 69d0b330dd Fix a crash, an UB and add some assert to dwo symbol file handling
llvm-svn: 249827
2015-10-09 12:43:08 +00:00
Tamas Berghammer 3a6b82b605 Fix the windows build after r249747
llvm-svn: 249826
2015-10-09 12:06:10 +00:00
Tamas Berghammer 6f5d647c17 Fix the way dwo tests are skipped on darwin
We want to skip these tests when the target platform is darwin, not
when the host because they have to be enabled in case of darwin ->
android

llvm-svn: 249825
2015-10-09 12:06:07 +00:00
Jonas Paulsson ee3685fd45 [SystemZ] Remove unused code in SystemZElimCompare.cpp
The Reference IndirectDef and IndirectUse members were unused and therefore
removed.

llvm-svn: 249824
2015-10-09 11:27:44 +00:00
Pavel Labath 2a7e046c7f Rename one of the TestGoASTContexts
llvm-svn: 249823
2015-10-09 11:15:50 +00:00
Nemanja Ivanovic d389657399 Vector element extraction without stack operations on Power 8
This patch corresponds to review:
http://reviews.llvm.org/D12032

This patch builds onto the patch that provided scalar to vector conversions
without stack operations (D11471).
Included in this patch:

    - Vector element extraction for all vector types with constant element number
    - Vector element extraction for v16i8 and v8i16 with variable element number
    - Removal of some unnecessary COPY_TO_REGCLASS operations that ended up
      unnecessarily moving things around between registers

Not included in this patch (will be in upcoming patch):

    - Vector element extraction for v4i32, v4f32, v2i64 and v2f64 with
      variable element number
    - Vector element insertion for variable/constant element number

Testing is provided for all extractions. The extractions that are not
implemented yet are just placeholders.

llvm-svn: 249822
2015-10-09 11:12:18 +00:00
Tamas Berghammer 62a1514ca7 Fix regression caused by r249769
* Change TestSettings to test qith go instead of pascal as ToT pascal
  support isn't complete
* Fix crash inside PluginManager

llvm-svn: 249821
2015-10-09 11:01:56 +00:00
Andrea Di Biagio 99493df257 [MemCpyOpt] Fix wrong merging adjacent nontemporal stores into memset calls.
Pass MemCpyOpt doesn't check if a store instruction is nontemporal.
As a consequence, adjacent nontemporal stores are always merged into a
memset call.

Example:

;;;
define void @foo(<4 x float>* nocapture %p) {
entry:
  store <4 x float> zeroinitializer, <4 x float>* %p, align 16, !nontemporal !0
  %p1 = getelementptr inbounds <4 x float>, <4 x float>* %dst, i64 1
  store <4 x float> zeroinitializer, <4 x float>* %p1, align 16, !nontemporal !0
  ret void
}

!0 = !{i32 1}
;;;

In this example, the two nontemporal stores are combined to a memset of zero
which does not preserve the nontemporal hint. Later on the backend (tested on a
x86-64 corei7) expands that memset call into a sequence of two normal 16-byte
aligned vector stores.

opt -memcpyopt example.ll -S -o - | llc -mcpu=corei7 -o -

Before:
  xorps  %xmm0, %xmm0
  movaps  %xmm0, 16(%rdi)
  movaps  %xmm0, (%rdi)

With this patch, we no longer merge nontemporal stores into calls to memset.
In this example, llc correctly expands the two stores into two movntps:
  xorps  %xmm0, %xmm0
  movntps %xmm0, 16(%rdi)
  movntps  %xmm0, (%rdi)

In theory, we could extend the usage of !nontemporal metadata to memcpy/memset
calls. However a change like that would only have the effect of forcing the
backend to expand !nontemporal memsets back to sequences of store instructions.
A memset library call would not have exactly the same semantic of a builtin
!nontemporal memset call. So, SelectionDAG will have to conservatively expand
it back to a sequence of !nontemporal stores (effectively undoing the merging).

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

llvm-svn: 249820
2015-10-09 10:53:41 +00:00
Pavel Labath 8112dd9951 Fix disabling of dwo tests
without this, dwo tests would be run even if they were meant to be disabled.

llvm-svn: 249819
2015-10-09 10:09:36 +00:00
Igor Kudrin 65bddeaacf [ELF2] Check for TLS mismatch in symbol resolution.
The linker should generate an error if a TLS symbol is resolved
for a non-TLS reference and vice versa.

The patch addresses PR24244 (https://llvm.org/bugs/show_bug.cgi?id=24244)

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

llvm-svn: 249817
2015-10-09 09:58:39 +00:00
George Rimar b352b9ce69 [ELF2] - Implemented rel[a].plt sections
.rela.plt contains list of elements in the PLT, which are liable to the relocation during the dynamic linking.

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

llvm-svn: 249816
2015-10-09 09:58:08 +00:00
Benjamin Kramer c4cb3b10dc [VFS] Port tooling to use the in-memory file system.
This means file remappings can now be managed by ClangTool (or a
ToolInvocation user) instead of by ToolInvocation itself. The
ToolInvocation remapping is still in place so users can migrate.

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

llvm-svn: 249815
2015-10-09 09:54:37 +00:00
Arnaud A. de Grandmaison 859b2ac07d [EarlyCSE] Address post commit review for r249523.
llvm-svn: 249814
2015-10-09 09:23:01 +00:00
Jonas Paulsson 5b3bab40b2 [SystemZ] Remove superfluous braces in SystemZShortenInst.cpp
llvm-svn: 249812
2015-10-09 07:19:20 +00:00
Jonas Paulsson 18d877f79b [SystemZ] Minor bugfixes.
LLCH, LLHH and CLIH had the wrong register classes for the def-operand.
Tie operands if changing opcode to an instruction with tied ops.
Comment typo fix.

These fixes were needed in order to make regression test case
SystemZ/asm-18.ll pass with -verify-machineinstrs (not used by
default).

Reviewed by Ulrich Weigand.

llvm-svn: 249811
2015-10-09 07:19:16 +00:00
Jonas Paulsson 0a9049ba82 [SystemZ] Bugfix in SystemZAsmParser.cpp.
Let parseRegister() allow RegFP Group if expecting RegV Group, since the
%f register prefix yields the FP group even while used with vector instructions.

Reviewed by Ulrich Weigand.

llvm-svn: 249810
2015-10-09 07:19:12 +00:00
Mohit K. Bhakkad 8087745c47 Addressing warning due to rL249651
llvm-svn: 249809
2015-10-09 06:34:52 +00:00
Kostya Serebryany e95022ac14 [libFuzzer] don't print large artifacts to stderr
llvm-svn: 249808
2015-10-09 04:03:14 +00:00
Kostya Serebryany bd5d1cdbb9 [libFuzzer] add -artifact_prefix flag
llvm-svn: 249807
2015-10-09 03:57:59 +00:00
Bruce Mitchener 6ec5d61bda Fix handling of LLDB_VERS_GENERATED_FILE.
Summary:
This is Darwin only.

The symbol defined by ${LLDB_VERS_GENERATED_FILE} is used by
source/lldb.cpp, so anything that uses lldb.cpp (which is in
lldbBase) should also have the generated symbol. This means
that the entire process can be centralized within source/CMakeLists.txt
where lldbBase is constructed.

Additionally, the custom command should have dependencies on the
project file as well as the generation script so that if either
changes, the version file is correctly re-generated and everything
is re-linked appropriately.

* cmake/LLDBDependencies.cmake: Remove everything related to
  the generated version file from here.

* source/CMakeLists.txt: On Darwin, add the generated version
  file to the sources that make up lldbBase.  Also, create a
  custom target and make lldbBase depend on it to re-generate
  the generated file as needed.

* source/API/CMakeLists.txt: Don't need to build the generated
  version file here or use it to control linking against swig_wrapper.

* tools/lldb-server/CMakeLists.txt: Likewise.

Reviewers: dawn, sas, clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 249806
2015-10-09 03:40:55 +00:00
Saleem Abdulrasool 1825fac3c9 ARM: tweak WoA frame lowering
Accept r11 when targeting Windows on ARM rather than just low registers.
Because we are in a thumb-2 only mode, this may be slightly more expensive in
code size, but results in better code for the environment since it spills the
frame register, which is generally desired for fast stack walking as per the
ABI.

llvm-svn: 249804
2015-10-09 03:19:03 +00:00
Rui Ueyama fe7eeed585 ELF2: Sort. NFC.
llvm-svn: 249803
2015-10-09 02:46:28 +00:00
Sanjoy Das 648956118b [SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCI
The current implementation of `StrengthenNoWrapFlags` is agnostic to the
order of `Ops`, so this commit should not change anything semantic.  An
upcoming change will make `StrengthenNoWrapFlags` sensitive to the order
of `Ops`.

llvm-svn: 249802
2015-10-09 02:44:45 +00:00
Vedant Kumar 55c214484c [Sema] Add "Ty" suffix to QualType variables for clarity (NFC)
llvm-svn: 249801
2015-10-09 01:47:26 +00:00
Richard Smith a51c8eee6e Split <stdlib.h> out of <cstdlib>.
llvm-svn: 249800
2015-10-09 01:41:45 +00:00
Reid Kleckner 8da160173c Remove the XFAIL for the C++ EH test
It works on Windows now.

llvm-svn: 249799
2015-10-09 01:33:15 +00:00
Richard Smith d32827408e Split <stdio.h> out of <cstdio>.
As with <stddef.h>, skip our custom header if __need_FILE or __need___FILE is defined.

llvm-svn: 249798
2015-10-09 01:29:09 +00:00
Reid Kleckner ba77cd2737 Re-enable the coff-dwarf test on Windows
Apparently system-windows was only a clang lit suite feature.

llvm-svn: 249797
2015-10-09 01:18:27 +00:00
Reid Kleckner ae44e871cd Revert "Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64"""
This reverts commit r249794.

Apparently my checkouts are full of unexpected surprises today.

llvm-svn: 249796
2015-10-09 01:13:17 +00:00
Reid Kleckner 37bb6810f2 Fix coff-dwarf test for non-Windows platforms that cannot demangle MS C++ names
llvm-svn: 249795
2015-10-09 01:11:40 +00:00
Reid Kleckner b510401785 Revert "Revert r248959, "[WinEH] Emit int3 after noreturn calls on Win64""
This reverts commit r249032.

TODO write commit msg

llvm-svn: 249794
2015-10-09 01:11:37 +00:00
Rui Ueyama 36f69229e6 Simplify expressions. NFC.
llvm-svn: 249793
2015-10-09 00:50:05 +00:00
Joseph Tremoulet 676e5cf07f [WinEH] Fix cleanup state numbering
Summary:
 - Recurse from cleanupendpads to their cleanuppads, to make sure the
   cleanuppad is visited if it has a cleanupendpad but no cleanupret.
 - Check for and avoid double-processing cleanuppads, to allow for them to
   have multiple cleanuprets (plus cleanupendpads).
 - Update Cxx state numbering to visit toplevel cleanupendpads and to
   recurse from cleanupendpads to their preds, to ensure we number any
   funclets in inlined cleanups.  SEH state numbering already did this.

Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 249792
2015-10-09 00:46:08 +00:00
Rui Ueyama 49c68a7cf7 Remove getters/setters that don't provide much abstraction.
llvm-svn: 249791
2015-10-09 00:42:06 +00:00
Eric Christopher b1abfed324 Fix a few typos in the required feature set for some of the x86
builtins:

avx512vd -> avx512vl
rdrand -> rdrnd
avx512ff -> avx512f

no functional change.

llvm-svn: 249790
2015-10-09 00:35:30 +00:00