Commit Graph

206660 Commits

Author SHA1 Message Date
Dawn Perchik 6a40cd71f6 [lldb-mi] Fix tests added in r243484 for breakpoints using file:func syntax.
llvm-svn: 243510
2015-07-29 01:01:14 +00:00
Michael J. Spencer 5a6f5f178e [ELF2] Emit correct section types.
llvm-svn: 243509
2015-07-29 00:52:17 +00:00
Jason Molenda 6ab659a922 First part of an attempt to indicate to the user when they are
debugging optimized code.  Adds new methods on Function/SBFunction
to query whether a given function is optimized.  Adds a new
function.is-optimized format entity and changes the default 
frame-format to append "[opt]" if the function was built with
optimization.

The only indication that a binary was built with optimization
that we have right now is the presence of the DW_AT_APPLE_optimized
attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit.
The absence of this flag may mean that the compile_unit was not
compiled with optimization, or it may mean that the producer 
does not generate this attribute.

Currently this only works for dSYM debugging.  When we create
the CompileUnit with dwarf-in-.o-file debugging we don't have
the attribute value yet so it's not set.  I need to find the
flag value when we do start to read the .o file DWARF and 
set the CompileUnit's status at that point - but haven't 
done it yet.

I'm also going to add a mechanism for issuing warnings to users
such that they're only issued once in a debug session and 
there is away for users to suppress these warnings altogether
via .lldbinit file settings.  But I want to get this changeset
committed now that it's at a useful state.

<rdar://problem/19281172> 

llvm-svn: 243508
2015-07-29 00:42:47 +00:00
Jim Ingham ff244c1d97 Lock the owners mutex in the BreakpointSite before updating the hit
counts.  If you delete a breakpoint belonging to a site just as you are
processing a hit on that site, you could cause the BreakpointSite loop to
access a now deleted location.

<rdar://problem/19310323>

llvm-svn: 243507
2015-07-29 00:40:36 +00:00
Michael J. Spencer 8039dae26d [ELF2] Emit section table.
llvm-svn: 243506
2015-07-29 00:30:10 +00:00
Bjarke Hammersholt Roune 3747a6dbb8 Make function comments consistently imperative.
(tiny edit, mostly a test that my new commit access works)

llvm-svn: 243505
2015-07-29 00:29:08 +00:00
Dawn Perchik a16faba6b0 [lldb-mi] XFAIL new test added in r243484.
llvm-svn: 243504
2015-07-29 00:22:53 +00:00
Eric Fiselier 7eb30deff1 [libcxx] Cleanup CMake configuration and integrate with LLVM
Summary:
This patch contains the following changes:

1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does.
2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros.

The goals for this patch are:

1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671).
2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option.
3. Make libc++'s CMakeLists.txt file easier to understand and change.
4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs). 
5. Move towards allowing  libc++ to use other LLVM utilities such as `not` and `FileCheck`.

  

Reviewers: mclow.lists, jroelofs, danalbert

Subscribers: cfe-commits

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

llvm-svn: 243503
2015-07-29 00:03:51 +00:00
Sanjoy Das cfe41f050c [Statepoints] Let patchable statepoints have a symbolic call target.
Summary:
As added initially, statepoints required their call targets to be a
constant pointer null if ``numPatchBytes`` was non-zero.  This turns out
to be a problem ergonomically, since there is no way to mark patchable
statepoints as calling a (readable) symbolic value.

This change remove the restriction of requiring ``null`` call targets
for patchable statepoints, and changes PlaceSafepoints to maintain the
symbolic call target through its transformation.

Reviewers: reames, swaroop.sridhar

Subscribers: llvm-commits

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

llvm-svn: 243502
2015-07-28 23:50:30 +00:00
Alex Lorenz d8a1e542ab Fix broken ArrayRef conversion from r243497.
llvm-svn: 243501
2015-07-28 23:34:27 +00:00
Sanjay Patel 133e68b45c ignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)
PR24141: https://llvm.org/bugs/show_bug.cgi?id=24141
contains a test case where we have duplicate entries in a node's uses() list.

After r241826, we use CombineTo() to delete dead nodes when combining the uses into
reciprocal multiplies, but this fails if we encounter the just-deleted node again in
the list.

The solution in this patch is to not add duplicate entries to the list of users that
we will subsequently iterate over. For the test case, this avoids triggering the
combine divisors logic entirely because there really is only one user of the divisor.

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

llvm-svn: 243500
2015-07-28 23:28:22 +00:00
Eric Fiselier 99a47ef90e Remove sanitizer XFAILs on a test.
llvm-svn: 243499
2015-07-28 23:27:03 +00:00
Sanjay Patel 1dd15598cf fix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold
This fix was suggested as part of D11345 and is part of fixing PR24141.

With this change, we can avoid walking the uses of a divisor node if the target
doesn't want the combineRepeatedFPDivisors transform in the first place.

There is no NFC-intended other than that.

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

llvm-svn: 243498
2015-07-28 23:05:48 +00:00
Alex Lorenz ef5c196fb0 MIR Serialization: Serialize the target index machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243497
2015-07-28 23:02:45 +00:00
Michael J. Spencer cdae0a4e2d [ELF2] Devirtualize SymbolBody.
llvm-svn: 243496
2015-07-28 22:58:25 +00:00
Rui Ueyama 506f6d1ae1 COFF: _tls_used is __tls_used on x86.
llvm-svn: 243495
2015-07-28 22:56:02 +00:00
Evgeniy Stepanov 8e36aa6e02 [asan] Support per-application flags in the Android setup script.
llvm-svn: 243494
2015-07-28 22:45:24 +00:00
Akira Hatanaka 2670f4a550 [ARM] Define subtarget feature strict-align.
This commit defines subtarget feature strict-align and uses it instead of
cl::opt -arm-strict-align to decide whether strict alignment should be
forced. Also, remove the logic that was checking the OS and architecture
as clang is now responsible for setting strict-align based on the command
line options specified and the target architecute and OS.

rdar://problem/21529937

http://reviews.llvm.org/D11470

llvm-svn: 243493
2015-07-28 22:44:28 +00:00
Tim Northover 17ae83a25f AArch64: be careful of large immediates when optimising cmps.
llvm-svn: 243492
2015-07-28 22:42:32 +00:00
NAKAMURA Takumi 0dae64a554 Move an extra switch to clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp from check_clang_tidy.sh.
It also rolls back r242984 and r242985.

llvm-svn: 243491
2015-07-28 22:41:04 +00:00
Rui Ueyama 9420dee328 COFF: Fix export symbol names for x86.
I don't fully understand the rationale behind the name mangling
scheme used for the DLL export table and the import library.
Why only leading "_" is dropped for the import library while
both "_" and "@" are dropped from DLL symbol table? But this seems
to be what MSVC linker does.

llvm-svn: 243490
2015-07-28 22:34:24 +00:00
Akira Hatanaka 7651dd8359 [ARM] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align" to the
IR instead of using backend option "arm-strict-align". This is needed for LTO.

Also, move the logic in ARM backend that was deciding whether strict alignment
should be forced to the front-end.

rdar://problem/21529937

http://reviews.llvm.org/D11472

llvm-svn: 243489
2015-07-28 22:26:45 +00:00
Dawn Perchik fc6eb071ab Fix comment in TestExprOptions to match change of language from ObjC to ObjC++.
llvm-svn: 243488
2015-07-28 22:19:42 +00:00
Davide Italiano f75bf454e4 [tests] Use llvm-readobj instead of macho-dump.
llvm-svn: 243487
2015-07-28 21:58:08 +00:00
Bruno Cardoso Lopes 3c235763e5 [PeepholeOptimizer] Look through PHIs to find additional register sources
Reapply 243271 with more fixes; although we are not handling multiple
sources with coalescable copies, we were not properly skipping this
case.

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/20404526

llvm-svn: 243486
2015-07-28 21:45:50 +00:00
Vasileios Kalintiris 9876946aee [mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.
Summary:
Currently, we support only the MIPS O32 ABI calling convention for call
lowering. With this change we avoid using the O32 calling convetion for
lowering calls marked as using the fast calling convention.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 243485
2015-07-28 21:43:31 +00:00
Dawn Perchik c69780d797 [lldb-mi] Fix setting of breakpoints using file:func syntax.
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11499

llvm-svn: 243484
2015-07-28 21:40:57 +00:00
Enrico Granata 2646469671 Cleanup a few stale comments in FormattersContainer.h
llvm-svn: 243483
2015-07-28 21:28:33 +00:00
Enrico Granata 45619555d9 Make ClangASTType::RemoveFastQualifiers() actually do something useful
llvm-svn: 243482
2015-07-28 21:24:39 +00:00
Evgeniy Stepanov 30257173b3 [sanitizer] Fix Mac build.
llvm-svn: 243480
2015-07-28 21:01:42 +00:00
Artem Belevich baae093e49 Silence unused argument warning for --cuda-host-only.
Differential Revision: http://reviews.llvm.org/D11575

llvm-svn: 243479
2015-07-28 21:01:30 +00:00
Artem Belevich 4242f41d8a --cuda-host-only should not disable linking phase.
Host-only cuda compilation does produce valid host object
file and in some cases users do want to proceed on to the linking phase.
The change removes special case that stopped compilation pipeline at
the Assembly phase. Device-side compilation is still stopped early
by the types::getCompilationPhases().

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

llvm-svn: 243478
2015-07-28 21:01:21 +00:00
Richard Trieu 97c45b6588 Use an iterative method instead of recursion for printing macro backtraces.
Store the locations for a macro expansion in a vector, then iterate over them
instead of using recursion.  This simplifies the logic around the backtrace
limit and gives easier access to the source locations.  No functionality change.

Patch by Zhengkai Wu.

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

llvm-svn: 243477
2015-07-28 20:53:46 +00:00
Lang Hames 5c969333b8 [RuntimeDyld] Remove a memory-leak that was introduced in r243456. Thanks to Ben
Kramer for catching this.

llvm-svn: 243476
2015-07-28 20:51:53 +00:00
Chih-Hung Hsieh 41169c5487 Fix typo.
llvm-svn: 243475
2015-07-28 20:38:29 +00:00
Chih-Hung Hsieh c5e53ca1b7 Limit this test only on linux.
Differential Revision: http://reviews.llvm.org/D10522

llvm-svn: 243474
2015-07-28 20:31:10 +00:00
Evgeniy Stepanov 7eeb02bd09 [asan] Read process name from /proc/self/cmdline on Linux.
Rename getBinaryBasename() to getProcessName() and, on Linux,
read it from /proc/self/cmdline instead of /proc/self/exe. The former
can be modified by the process. The main motivation is Android, where
application processes re-write cmdline to a package name. This lets
us setup per-application ASAN_OPTIONS through include=/some/path/%b.

llvm-svn: 243473
2015-07-28 20:27:51 +00:00
Enrico Granata 8eb9c3068c Fix a bug where the std::list synthetic child provider would not clean its cache correctly on update, causing stale children to be returned in some circumstances
Fixes rdar://20560680

llvm-svn: 243472
2015-07-28 20:19:45 +00:00
Michael Zolotukhin 80d13bac02 [Unroll] Add debug dumps to loop-unroll analyzer.
llvm-svn: 243471
2015-07-28 20:07:29 +00:00
Bill Schmidt 66c8b9ce82 Add commentary explaining PPC access to return address
llvm-svn: 243470
2015-07-28 20:05:06 +00:00
Vasileios Kalintiris 9ec6114860 [mips][FastISel] Fix generated code for IR's select instruction.
Summary:
Generate correct code for the select instruction by zero-extending
it's boolean/condition operand to GPR-width. This is necessary because
the conditional-move instructions operate on the whole register.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 243469
2015-07-28 19:57:25 +00:00
Ed Maste a43ce0dc98 FreeBSDThread::GetRegisterContext is only for FreeBSD targets
The removal of in-process Linux debug support left a switch statement
with llvm::Triple::FreeBSD as the only case. Simplify by replacing it
with a now-equivalent assertion.

llvm-svn: 243468
2015-07-28 19:47:00 +00:00
Bill Schmidt a32fa81c09 PowerPC's ABIs differ from those of other architectures in that the
callee-saved return address is stored in the caller's stack frame, not
the callee's.  This patch adjusts the logic to find the LR in the
correct place for PowerPC.

Patch joint with Bill Seurer.

llvm-svn: 243467
2015-07-28 19:41:49 +00:00
Michael Zolotukhin a425c9d0e3 [Unroll] Don't analyze blocks outside the loop.
llvm-svn: 243466
2015-07-28 19:21:21 +00:00
Tobias Grosser d20aba7047 Remove some dead code
llvm-svn: 243465
2015-07-28 19:16:46 +00:00
Tobias Grosser 2be13913bb Do not end lines with '\'
This fixes 'warning: multi-line comment [-Wcomment]'

llvm-svn: 243464
2015-07-28 19:16:42 +00:00
Richard Trieu 8d4006a079 Do not give a -Wredundant-move warning when removing the move will result in an
error.

If the object being moved has a move constructor and a deleted copy constructor,
std::move is required, otherwise Clang will give a deleted constructor error.

llvm-svn: 243463
2015-07-28 19:06:16 +00:00
Matt Arsenault 7227cc1a48 AMDGPU: Don't try to use LDS/vector for private if pointer value stored
If the pointer is the store's value operand, this would produce
a broken module. Make sure the use is actually for the pointer operand.

llvm-svn: 243462
2015-07-28 18:47:00 +00:00
Matt Arsenault fdcd39a8ad AMDGPU: Fix crash if called function is a bitcast
getCalledFunction() is null, so this would crash. Replace
crash with an error on unsupported call.

llvm-svn: 243461
2015-07-28 18:29:14 +00:00
Jingyue Wu 42f1d67a45 [SCEV] Apply NSW and NUW flags via poison value analysis
Summary:
Make Scalar Evolution able to propagate NSW and NUW flags from instructions to SCEVs in some cases. This is based on reasoning about when poison from instructions with these flags would trigger undefined behavior. This gives a 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.

There does not seem to be clear agreement about when poison should be considered to propagate through instructions. In this analysis, poison propagates only in cases where that should be uncontroversial.

This change makes LSR able to create induction variables for expressions like &ptr[i + offset] for loops like this:

  for (int i = 0; i < limit; ++i) {
    sum += ptr[i + offset];
  }

Here ptr is a 64 bit pointer and offset is a 32 bit integer. For NVPTX, LSR currently creates an induction variable for i + offset instead, which is not as fast. Improving this situation is what brings the 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.


There are more details in this discussion on llvmdev.
June: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/thread.html#87234
July: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-July/thread.html#87392

Patch by Bjarke Roune

Reviewers: eliben, atrick, sanjoy

Subscribers: majnemer, hfinkel, jingyue, meheff, llvm-commits

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

llvm-svn: 243460
2015-07-28 18:22:40 +00:00