Commit Graph

205956 Commits

Author SHA1 Message Date
Chaoren Lin f8e102da6a Xfail test_dyld_library_path for Android.
Originally, the source for the hidden lib_d and the regular lib_d were the same
file, so we always got the "correct" source for each. Splitting them up in
D11367 exposed a bug of showing the incorrect source file for the hidden lib_d.

llvm-svn: 242862
2015-07-22 01:17:51 +00:00
Eric Fiselier d1bac4ce57 [libcxx] Add support for sanitizers on OS X.
Summary: This patch adds special configuration logic to find the compiler_rt libraries required by sanitizers on OS X. The supported sanitizers are Address and Undefined.

Reviewers: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 242858
2015-07-22 00:33:36 +00:00
Davide Italiano f179e36e0e [Sema] Diagnose use of declaration correctly.
Before we skipped that for virtual functions not fully qualified (r81507).
This commit basically reverts this to the older behaviour, which seems
more consistent. We now also correctly consider ill-formed calls to deleted
member functions, which were silently passed before in some cases.
The review contains the whole discussion.

PR:		20268
Differential Revision:	 http://reviews.llvm.org/D11334

llvm-svn: 242857
2015-07-22 00:30:58 +00:00
Bruce Mitchener e171da5cb7 Fix typos.
Summary: Fix a bunch of typos.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 242856
2015-07-22 00:16:02 +00:00
Richard Smith a534a31c5e [modules] In C++, stop serializing and deserializing a list of declarations in
the identifier table. This is redundant, since the TU-scope lookups are also
serialized as part of the TU DeclContext, and wasteful in a number of ways. We
still emit the decls for PCH / preamble builds, since for those we want
identical results, not merely semantically equivalent ones.

llvm-svn: 242855
2015-07-21 23:54:07 +00:00
Richard Trieu 159e5ed9dc Change a test to follow the formatting of the rest of the tests in the file.
No functional change.

llvm-svn: 242854
2015-07-21 23:38:30 +00:00
Evgeniy Stepanov df9ed542b5 [sanitizer] Implement include_if_exists with process name substitution.
include_if_exists=/path/to/sanitizer/options reads flags from the
file if it is present. "%b" in the include file path (for both
variants of the flag) is replaced with the basename of the main
executable.

llvm-svn: 242853
2015-07-21 23:03:13 +00:00
Greg Clayton 5115bf8e73 Improve the performance of DWARFDebugInfo::GetCompileUnitContainingDIE() by using a binary search.
Also switched DWARFDebugInfo::GetCompileUnit() over to using the same kind of binary search instead of using bsearch().

llvm-svn: 242852
2015-07-21 22:53:51 +00:00
Alexey Samsonov 4800c2de28 [Fuzzer] Rely on $PATH expansion instead of hardcoding paths in tests. NFC.
llvm-svn: 242851
2015-07-21 22:51:55 +00:00
Alexey Samsonov dc324e1644 [Fuzzer] Clearly separate regular and DFSan tests. NFC.
llvm-svn: 242850
2015-07-21 22:51:49 +00:00
Daniel Jasper bcad06640b clang-format: Fix unary operator detection in for loops.
Before:
  for (;; * a = b) {}

After:
  for (;; *a = b) {}

llvm-svn: 242849
2015-07-21 22:51:00 +00:00
Frederic Riss 1c65094d5b [dsymutil] Implement ODR uniquing for C++ code.
This optimization allows the DWARF linker to reuse definition of
types it has emitted in previous CUs rather than reemitting them
in each CU that references them. The size and link time gains are
huge. For example when linking the DWARF for a debug build of
clang, this generates a ~150M dwarf file instead of a ~700M one
(the numbers date back a bit and must not be totally accurate
these days).

As with all the other parts of the llvm-dsymutil codebase, the
goal is to keep bit-for-bit compatibility with dsymutil-classic.
The code is littered with a lot of FIXMEs that should be
addressed once we can get rid of the compatibilty goal.

llvm-svn: 242847
2015-07-21 22:41:43 +00:00
Aaron Ballman e4de1a51ec Use range-based for loops; NFC.
llvm-svn: 242846
2015-07-21 22:33:52 +00:00
Alex Lorenz f4baeb51b2 MIR Serialization: Start serializing the CFI operands with .cfi_def_cfa_offset.
This commit begins serialization of the CFI index machine operands by
serializing one kind of CFI instruction - the .cfi_def_cfa_offset instruction.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242845
2015-07-21 22:28:27 +00:00
Dawn Perchik 23b1decbe7 Add support for specifying a language to use when parsing breakpoints.
Target and breakpoints options were added:
    breakpoint set --language lang --name func
    settings set target.language pascal
These specify the Language to use when interpreting the breakpoint's
expression (note: currently only implemented for breakpoints on
identifiers).  If the breakpoint language is not set, the target.language
setting is used.
This support is required by Pascal, for example, to set breakpoint at 'ns.foo'
for function 'foo' in namespace 'ns'.
Tests on the language were also added to Module::PrepareForFunctionNameLookup
for efficiency.

Reviewed by: clayborg
Subscribers: jingham, lldb-commits
Differential Revision: http://reviews.llvm.org/D11119

llvm-svn: 242844
2015-07-21 22:05:07 +00:00
Nick Lewycky f836c89c49 Fix a performance problem in memcpyopt by removing a linear scan over ranges when inserting a new range. No functionality change intended. Patch by Anthony Pesch!
llvm-svn: 242843
2015-07-21 21:56:26 +00:00
Jingyue Wu d058ea927f [MDA] change BlockScanLimit into a command line option.
Summary:
In the benchmark (https://github.com/vetter/shoc) we are researching,
the duplicated load is not eliminated because MemoryDependenceAnalysis
hit the BlockScanLimit. This patch change it into a command line option
instead of a hardcoded value.

Patched by Xuetian Weng. 

Test Plan: test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll

Reviewers: jingyue, reames

Subscribers: reames, llvm-commits

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

llvm-svn: 242842
2015-07-21 21:50:39 +00:00
Tim Northover 525c73ceb7 ARM: actually define __ARM_ARCH_7S__ for the armv7s slice
We ended up with the wrong predefine after the recent TargetParser shuffle, and
I accidentally solidified it with a test. This should fix it.

llvm-svn: 242841
2015-07-21 21:47:33 +00:00
Bruno Cardoso Lopes e8640518a9 [AsmPrinter] Check for valid constants in handleIndirectSymViaGOTPCRel
Check whether BaseCst is valid before extracting a GlobalValue.
This fixes PR24163.

Patch by David Majnemer.

llvm-svn: 242840
2015-07-21 21:45:42 +00:00
Michael J. Spencer 402a4f1088 [Object][ELF] Handle files with no section header string table.
llvm-svn: 242839
2015-07-21 21:40:33 +00:00
Bill Schmidt 2be8054b49 [PPC64LE] More vector swap optimization TLC
This makes one substantive change and a few stylistic changes to the
VSX swap optimization pass.

The substantive change is to permit LXSDX and LXSSPX instructions to
participate in swap optimization computations.  The previous change to
insert a swap following a SUBREG_TO_REG widening operation makes this
almost trivial.

I experimented with also permitting STXSDX and STXSSPX instructions.
This can be done using similar techniques:  we could insert a swap
prior to a narrowing COPY operation, and then permit these stores to
participate.  I prototyped this, but discovered that the pattern of a
narrowing COPY followed by an STXSDX does not occur in any of our
test-suite code.  So instead, I added commentary indicating that this
could be done.

Other TLC:
 - I changed SH_COPYSCALAR to SH_COPYWIDEN to more clearly indicate
 the direction of the copy.
 - I factored the insertion of swap instructions into a separate
 function.

Finally, I added a new test case to check that the scalar-to-vector
loads are working properly with swap optimization.

llvm-svn: 242838
2015-07-21 21:40:17 +00:00
Alex Lorenz c1fbb3540a MIR Parser: Reuse the function 'lexName' when lexing global value tokens. NFC.
This commit refactors the function 'maybeLexGlobalValue' so that now it reuses
the function 'lexName' when lexing a named global value token.

llvm-svn: 242837
2015-07-21 21:23:08 +00:00
Aaron Ballman 2bf2cadc00 Use a range-based for loop; NFC.
llvm-svn: 242836
2015-07-21 21:18:29 +00:00
Aaron Ballman d4a392c53e Replace some uses of Self.Context with the local variable C; NFC.
llvm-svn: 242835
2015-07-21 21:07:11 +00:00
Sanjoy Das 135e5b9d53 [SCEV][NFC] Fix a typo in a comment.
llvm-svn: 242834
2015-07-21 20:59:22 +00:00
Rafael Espindola bbfd90fca4 Don't iterate over the program headers in the constructor of ELFFile.
Not every program needs this information.

In particular, it is necessary and sufficient for a static linker to scan the
section table.

llvm-svn: 242833
2015-07-21 20:50:53 +00:00
Rafael Espindola 1cb8a19bcb Don't assume ELFFile iterates over the program headers.
It will stop doing so shortly.

llvm-svn: 242832
2015-07-21 20:46:21 +00:00
Tanya Lattner af346433b1 Remove oversight group. Replace with LLVM Foundation Board of Directors.
llvm-svn: 242830
2015-07-21 20:14:20 +00:00
Rafael Espindola 3a0b1dc800 Make printValue a member function.
We were already passing 3 values it can get from ELFDumper.

llvm-svn: 242829
2015-07-21 19:57:43 +00:00
Rafael Espindola c7b0ee2c87 Remove always null argument.
llvm-svn: 242828
2015-07-21 19:38:32 +00:00
Philip Reames 6ff1a1e3d6 [RewriteStatepointsForGC] minor style cleanup
Use a named lambda for readability, common some code, remove a stale comments, and use llvm style variable names.

llvm-svn: 242827
2015-07-21 19:04:38 +00:00
David Blaikie fd7c2198e4 Fix GCC build due to shadowing
llvm-svn: 242826
2015-07-21 18:59:10 +00:00
David Blaikie f05779e21c Pass an iterator range to EmitCallArgs
llvm-svn: 242824
2015-07-21 18:37:18 +00:00
David Blaikie adc8d721e0 Add some utilities to iterator_range for trimming a range and constructing one from a container.
To be used in clang in a follow-up commit.

llvm-svn: 242823
2015-07-21 18:37:12 +00:00
Rafael Espindola 87dff0e05a Remove getDynamicSymbolName.
llvm-svn: 242821
2015-07-21 18:20:17 +00:00
Rafael Espindola 5f95fa31b3 Drop last use of getDynamicSymbolName.
llvm-svn: 242820
2015-07-21 18:15:32 +00:00
Richard Smith d520a250b6 [modules] Produce an error if -cc1 wants to implicitly build a module and no
module cache has been provided, rather than creating one in the current
directory.

llvm-svn: 242819
2015-07-21 18:07:47 +00:00
Rafael Espindola bd05101e67 Remove getStaticSymbolName.
Every user now keeps track of the correct string table to use.

llvm-svn: 242818
2015-07-21 18:04:29 +00:00
Jonathan Peyton 3fdf3294ab Fix OMPT support for task frames, parallel regions, and parallel regions + loops
This patch makes it possible for a performance tool that uses call stack
unwinding to map implementation-level call stacks from master and worker
threads into a unified global view. There are several components to this patch.

include/*/ompt.h.var
  Add a new enumeration type that indicates whether the code for a master task
    for a parallel region is invoked by the user program or the runtime system
  Change the signature for OMPT parallel begin/end callbacks to indicate whether
    the master task will be invoked by the program or the runtime system. This
    enables a performance tool using call stack unwinding to handle these two
    cases differently. For this case, a profiler that uses call stack unwinding
    needs to know that the call path prefix for the master task may differ from
    those available within the begin/end callbacks if the program invokes the
    master.

kmp.h
  Change the signature for __kmp_join_call to take an additional parameter
  indicating the fork_context type. This is needed to supply the OMPT parallel
  end callback with information about whether the compiler or the runtime
  invoked the master task for a parallel region.

kmp_csupport.c
  Ensure that the OMPT task frame field reenter_runtime_frame is properly set
    and cleared before and after calls to fork and join threads for a parallel
    region.
  Adjust the code for the new signature for __kmp_join_call.
  Adjust the OMPT parallel begin callback invocations to carry the extra
    parameter indicating whether the program or the runtime invokes the master
    task for a parallel region.

kmp_gsupport.c
  Apply all of the analogous changes described for kmp_csupport.c for the GOMP
    interface
  Add OMPT support for the GOMP combined parallel region + loop API to
    maintain the OMPT task frame field reenter_runtime_frame.

kmp_runtime.c:
  Use the new information passed by __kmp_join_call to adjust the OMPT
    parallel end callback invocations to carry the extra parameter indicating
    whether the program or the runtime invokes the master task for a parallel
    region.

ompt_internal.h:
  Use the flavor of the parallel region API (GNU or Intel) to determine who
    invokes the master task.

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

llvm-svn: 242817
2015-07-21 18:03:30 +00:00
Rafael Espindola 16154afb06 Keep track of which string table is associated with a symbol table.
This removes the last uses of getStaticSymbolName in lld.

llvm-svn: 242816
2015-07-21 18:00:39 +00:00
Chaoren Lin 5699eed608 Xfail TestGdbRemoteAbort for Android API <= 16.
Reviewers: sivachandra

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242815
2015-07-21 17:50:52 +00:00
Chaoren Lin 06ebba4fe5 Re-enable static Android build after build master restart.
llvm-svn: 242814
2015-07-21 17:50:49 +00:00
Chaoren Lin 29449150e5 Update TestLoadUnload to use base Makefile.
Summary:
The current Makefile scheme only allows one dylib to be specified in each make
invocation, so TestLoadUnload had a custom Makefile that's unrelated to the
base Makefile.rules. This change uses recursive make invocations to bypass the
single dylib restriction. See D11202 for more context.

Reviewers: clayborg

Subscribers: chaoren, lldb-commits

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

llvm-svn: 242813
2015-07-21 17:50:16 +00:00
Chad Rosier fe5399fe88 Follow up to r242810. NFC.
llvm-svn: 242812
2015-07-21 17:47:56 +00:00
Reid Kleckner 12f6b9c8c0 [asan] Remove AsanPlatformThreadInit
Since the CoreFoundation allocator replacement was moved in r173134, all
implementations of this function have been empty.

Reviewers: samsonov

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

llvm-svn: 242811
2015-07-21 17:42:37 +00:00
Chad Rosier 96a18a96cc [AArch64] Simplify the passing of arguments. NFC.
This is setup for future work planned for the AArch64 Load/Store Opt pass.

llvm-svn: 242810
2015-07-21 17:42:04 +00:00
Reid Kleckner 2f907557c3 Re-land 242726 to use RAII to do cleanup
The LooksLikeCodeInBug11395() codepath was returning without clearing
the ProcessedAllocas cache.

llvm-svn: 242809
2015-07-21 17:40:14 +00:00
Philip Reames 94babb7030 [RewriteStatepointsForGC] Hoist some code out of a loop
llvm-svn: 242808
2015-07-21 17:18:03 +00:00
Arnold Schwaighofer 3651233004 MergeFunc: Transfer the callee's attributes when replacing a direct caller
We insert a bitcast which obfuscates the getCalledFunction for the utility
function which looks up attributes from the called function. Loosing ABI
changing parameter attributes is a bad thing.

rdar://21516488

llvm-svn: 242807
2015-07-21 17:07:07 +00:00
Alex Lorenz 6ede37442d MIR Serialization: Serialize the external symbol machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242806
2015-07-21 16:59:53 +00:00