Commit Graph

206105 Commits

Author SHA1 Message Date
NAKAMURA Takumi d12ebaf9a4 Reorder alphabetically.
llvm-svn: 243080
2015-07-24 01:12:28 +00:00
Eric Christopher 1fb23395c3 Clean up function attributes on PPC fast-isel tests.
llvm-svn: 243079
2015-07-24 01:07:50 +00:00
Kostya Serebryany 404c69f2c8 [libFuzzer] allow users to supply their own implementation of rand
llvm-svn: 243078
2015-07-24 01:06:40 +00:00
Enrico Granata 636cd262d6 Fix an issue where LLDB would run out of stack space trying to decide if a deeply nested child can be updated in the face of an invalid execution context
The issue is that a child can't really ask the root object, since this decision could actually hinge on whether a dynamic and/or synthetic value is present
To do this, make values vote lazily for whether they are willing to allow this, so that we can navigate up the chain without recursively invoking ourselves

Tentative fix for rdar://21949558

llvm-svn: 243077
2015-07-24 00:57:19 +00:00
Philip Reames 29e9ae7891 [RewriteStatepointsForGC] Fix release build warning
llvm-svn: 243076
2015-07-24 00:42:55 +00:00
Jonathan Roelofs b032e04efd Add missing underlines for a docs section. NFC
llvm-svn: 243075
2015-07-24 00:29:50 +00:00
Bruce Mitchener 8a67bf7298 Add UNUSED_IF_ASSERT_DISABLED and apply it.
Summary:
This replaces (void)x; usages where they x was subsequently
involved in an assertion with this macro to make the
intent more clear.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 243074
2015-07-24 00:23:29 +00:00
Logan Chien ff8fbf9f90 unwind: Fix libc++abi and libgcc build.
To build libc++abi without libunwind, we should make sure that all
function calls to _Unwind_{Get,Set}{GR,IP}() are inlined as function
calls to _Unwind_VRS_{Get,Set}().  Otherwise, libc++abi.so will fail to
link since libgcc does not provide these symbol at all.

This commit fixes the problem by providing both the inlined version and
exported version.

llvm-svn: 243073
2015-07-24 00:16:48 +00:00
Bruce Mitchener b1e77a3642 Fix Mac OS X build, debugserver version handling.
Summary:
No longer rely on cmake to set DEBUGSERVER_VERSION_STR,
but now generate the _vers.c file like xcode does
and include the generated file into the build on Mac OS X.

This fixes the cmake Mac OS X build after an earlier change
by Jason Molenda.

Reviewers: clayborg, jasonmolenda

Subscribers: lldb-commits

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

llvm-svn: 243072
2015-07-24 00:13:45 +00:00
Philip Reames 88958b2df3 [RewriteStatepointsForGC] Use a worklist algorithm for first part of base pointer algorithm [NFC]
The new code should hopefully be equivalent to the old code; it just uses a worklist to track instructions which need to visited rather than iterating over all instructions visited each time. This should be faster, but the primary benefit is that the purpose should be more clear and the diff of adding another instruction type (forthcoming) much more obvious.

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

llvm-svn: 243071
2015-07-24 00:02:11 +00:00
Lawrence Hu 687097a0a9 test commit, only added one space
llvm-svn: 243070
2015-07-23 23:55:28 +00:00
John McCall 1c78f085c3 Fix the equal-vector-size rule for reinterpret_casts in C++
to consider the storage size of the vector instead of its
sizeof.  In other words, ban <3 x int> to <4 x int> casts,
which produced invalid IR anyway.

Also, attempt to be a little more rigorous, or at least
explicit, about when enums are allowed in these casts.

rdar://21901132

llvm-svn: 243069
2015-07-23 23:54:07 +00:00
Justin Bogner 3cfb62da14 InstrProf: Fix a typo in the test for r243066
llvm-svn: 243068
2015-07-23 23:34:26 +00:00
Greg Clayton f9d9db4975 Disable mutex error checking so it doesn't create problems with the multi-threaded test case. The error would cause an assertion that could cause lldb to crash when unlocking a mutex returned an error because it was in use.
llvm-svn: 243067
2015-07-23 23:32:08 +00:00
Justin Bogner 61bf8cb9af InstrProf: Don't extend coverage regions into the catch keyword
The catch keyword isn't really part of a region, so it's fairly
meaningless to extend into it. This was usually harmless, but it could
crash when catch blocks involved macros in strange ways.

llvm-svn: 243066
2015-07-23 23:24:21 +00:00
Jingyue Wu 2e424da39b [NaryReassociate] remove redundant code
This check is already done by findClosestMatchingDominator.

llvm-svn: 243065
2015-07-23 23:13:37 +00:00
Alex Lorenz 8cfc68677c MIR Serialization: Serialize the '.cfi_offset' CFI instruction.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243062
2015-07-23 23:09:07 +00:00
Rui Ueyama 8abca7e729 Fix -Wextra-semi.
Patch from Eugene.Zelenko!

llvm-svn: 243060
2015-07-23 23:03:55 +00:00
JF Bastien 8969666450 WebAssembly: test that valid -mcpu flags are accepted.
Summary: AArch64 has a similar test.

Subscribers: sunfish, aemerson, llvm-commits, jfb

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

llvm-svn: 243058
2015-07-23 23:00:04 +00:00
Sanjay Patel f2fa58e744 fix crash in machine trace metrics due to processing dbg_value instructions (PR24199)
The test in PR24199 ( https://llvm.org/bugs/show_bug.cgi?id=24199 ) crashes because machine
trace metrics was not ignoring dbg_value instructions when calculating data dependencies.

The machine-combiner pass asks machine trace metrics to calculate an instruction trace, 
does some reassociations, and calls MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval()
along with MachineTraceMetrics::invalidate(). The dbg_value instructions have their operands
invalidated, but the instructions are not expected to be deleted.

On a subsequent loop iteration of the machine-combiner pass, machine trace metrics would be
called again and die while accessing the invalid debug instructions.

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

llvm-svn: 243057
2015-07-23 22:56:53 +00:00
Philip Reames 9b141ed48e [RewriteStatepointsForGC] Rename PhiState to reflect that it's associated w/more than just PHIs
Today, Select instructions also have associated PhiStates.  In the near future, so will ExtractElement and SuffleVector.

llvm-svn: 243056
2015-07-23 22:49:14 +00:00
Evgeniy Stepanov 6bd82ce870 [sanitizer] Fix double definition of a function.
llvm-svn: 243055
2015-07-23 22:37:39 +00:00
Philip Reames 2a892a630b [RewriteStatepointsForGC] Use idomatic mechanisms for debug tracing [NFC]
Deleting much of the code using trace-rewrite-statepoints and use idiomatic DEBUG statements instead.  This includes adding operator<< to a helper class.

llvm-svn: 243054
2015-07-23 22:25:26 +00:00
Enrico Granata fe563d5573 Several improvements to the Either<T,U> type
llvm-svn: 243053
2015-07-23 22:17:39 +00:00
David Gross d9c1bc9955 [ARM] Register (existing) ARMLoadStoreOpt pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass.

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 243052
2015-07-23 22:12:46 +00:00
Evgeniy Stepanov 5a268b10b3 [sanitizer] Implement logging to syslog.
Previously, Android target had a logic of duplicating all sanitizer
output to logcat. This change extends it to all posix platforms via
the use of syslog, controlled by log_to_syslog flag. Enabled by
default on Android, off everywhere else.

A bit of cmake magic is required to allow Printf() to call a libc
function. I'm adding a stub implementation to support no-libc builds
like dfsan and safestack.

This is a second attempt. I believe I've fixed all the issues that
prompted the revert: Mac build, and all kinds of non-CMake builds
(there are 3 of those).

llvm-svn: 243051
2015-07-23 22:05:20 +00:00
Colin LeMahieu 333a19f6c3 Moving tests in to X86 directory.
llvm-svn: 243049
2015-07-23 21:55:26 +00:00
Alex Denisov 3cf8efd969 Add documentation for the objc_boxable attribute
llvm-svn: 243048
2015-07-23 21:53:13 +00:00
David Gross 2ad5d173ce Test commit.
llvm-svn: 243046
2015-07-23 21:46:09 +00:00
Philip Reames 273e6bbd11 [RewriteStatepointsForGC] Simplify code around meet of PhiStates [NFC]
We don't need to pass in the map from BDV to PhiStates; we can instead handle that externally and let the MeetPhiStates helper class just meet PhiStates.

llvm-svn: 243045
2015-07-23 21:41:27 +00:00
Colin LeMahieu 0e4386c43b Using an input object file instead of trying to generate an object file.
llvm-svn: 243044
2015-07-23 21:40:19 +00:00
Colin LeMahieu 88783e97f3 Specifying a test triple.
llvm-svn: 243042
2015-07-23 21:24:52 +00:00
Colin LeMahieu f34933e425 [llvm-objdump] Add -D and --disassemble-all flags that attempt disassembly on all sections instead of just text sections.
llvm-svn: 243041
2015-07-23 20:58:49 +00:00
Matt Wala 878c144f8a [Scalarizer] Fix potential for stale data in Scattered across invocations
Summary:
Scalarizer has two data structures that hold information about changes
to the function, Gathered and Scattered. These are cleared in finish()
at the end of runOnFunction() if finish() detects any changes to the
function.

However, finish() was checking for changes by only checking if
Gathered was non-empty. The function visitStore() only modifies
Scattered without touching Gathered. As a result, Scattered could have
ended up having stale data if Scalarizer only scalarized store
instructions. Since the data in Scattered is used during the execution
of the pass, this introduced dangling pointer errors.

The fix is to check whether both Scattered and Gathered are empty
before deciding what to do in finish(). This also fixes a problem
where the Function can be modified although the pass returns false.

Reviewers: rnk

Subscribers: rnk, srhines, llvm-commits

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

llvm-svn: 243040
2015-07-23 20:53:46 +00:00
Duncan P. N. Exon Smith dccc30a7ef Sema: Avoid a stack overflow on large CFGs
Large CFGs cause `checkForFunctionCall()` to overflow its stack.  Break
the recursion by manually managing the call stack instead.

Patch by Vedant Kumar!

llvm-svn: 243039
2015-07-23 20:15:50 +00:00
Duncan P. N. Exon Smith f0eafc78e0 Sema: Split out helper from checkForFunctionCall(), NFC
Split out `hasRecursiveCallInPath()` from `checkForFunctionCall()` to
flatten nesting and clarify the code.  This also simplifies a follow-up
patch that refactors the other logic in `checkForFunctionCall()`.

Patch by Vedant Kumar!

llvm-svn: 243038
2015-07-23 20:11:47 +00:00
Michael Kruse 5e9f249c3e Add LICM test cases
These test cases check whether Polly still gives the same results if
LICM runs before.  Currently, it does not and therefore these cases are
expected fails. 

llvm-svn: 243037
2015-07-23 20:05:11 +00:00
Michael Kruse 75b6b0c5bd Always execute polly::CodePreparation before Polly
ScopDetection does not allow scops to begin with the entry block, were
allocas are added at code generation.

llvm-svn: 243036
2015-07-23 20:00:20 +00:00
Jim Ingham 9b03fa0c69 Most thread plans don't handle eStopReasonInstrumentation stop reasons,
but that wasn't added to the list of reasons they don't explain.  That
would mean we keep stepping after hitting the AsanDie breakpoint rather
than stopping when the Asan event occurred.

<rdar://problem/21925479>

llvm-svn: 243035
2015-07-23 19:55:02 +00:00
Duncan P. N. Exon Smith d531322149 X86: Use dyn_cast instead of isa+cast, NFC
llvm-svn: 243034
2015-07-23 19:27:07 +00:00
Weiming Zhao b33a5557f4 This patch eanble register coalescing to coalesce the following:
%vreg2<def> = MOVi32imm 1; GPR32:%vreg2
  %W1<def> = COPY %vreg2; GPR32:%vreg2
into:
  %W1<def> = MOVi32imm 1
Patched by Lawrence Hu (lawrence@codeaurora.org)

llvm-svn: 243033
2015-07-23 19:24:53 +00:00
Jonathan Peyton c96dcb0914 Patch out a fatal assertion in OpenMP runtime until preconditions are met
Compiling simple testcase with g++ and linking it to the LLVM OpenMP runtime
compiled in debug mode trips an assertion that produces a fatal error. When
the assertion is skipped, the program runs successfully to completion and 
produces the same answer as the sequential code. Intel will restore the
assertion with a patch that fixes the issues that cause it to trip.

Patch by John Mellor-Crummey

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

llvm-svn: 243032
2015-07-23 18:58:37 +00:00
Kostya Serebryany 2b7d2e91cc [libFuzzer] dump long running units to disk
llvm-svn: 243031
2015-07-23 18:37:22 +00:00
Marshall Clow 983d178108 Detect and throw on a class of bad regexes that we mistakenly accepted before. Thanks to Trevor Smigiel for the report
llvm-svn: 243030
2015-07-23 18:27:51 +00:00
Aaron Ballman 3f07e7b063 Updating the documentation for the hasAttr AST matcher, which behaves somewhat differently when used within clang-query. Fixes PR24217.
llvm-svn: 243029
2015-07-23 17:54:59 +00:00
Daniel Jasper 1c6fc3b8f0 misc-unused-parameters: Fix bug where the check was looking at
ParmVarDecls of function types.

llvm-svn: 243026
2015-07-23 17:26:36 +00:00
Renato Golin 830f0c4c46 [Compiler-RT] Remove dependency on libgcc_s/eh
Currently, for --rtlib=compiler-rt on GNU systems, we're assuming
that one has libgcc_s and libgcc_eh as low-level libraries, which
when used in conjunction with -lunwind or -lc++abi, breaks that
assumption.

My original fix was wrong, and this patch reverts it to prepare for
a new flag to choose the unwinder/C++ libraries. For the time being,
people can use "-lgcc_s -lgcc_eh" or "-lunwind -lc++abi" or any
combination they need explicitly.

llvm-svn: 243025
2015-07-23 17:24:41 +00:00
Johannes Doerfert 338b42c329 Removed redundant alias checks generated during run time.
As specified in PR23888, run-time alias check generation is expensive
  in terms of compile-time. This reduces the compile time by computing
  minimal/maximal access only once for each base pointer

Contributed-by: Pratik Bhatu <cs12b1010@iith.ac.in>
llvm-svn: 243024
2015-07-23 17:04:54 +00:00
Tobias Grosser 6d32f8fbba isl: Translate brisebarre to use UNIX line endings
A similar patch will be upstreamed to ISL. We commit this ahead of time to
unblock people that are annoyed the permanent diffs we see in git.

llvm-svn: 243020
2015-07-23 15:35:45 +00:00
Pavel Labath 162fb8e8ab Speed up NativeProcessLinux::GetLoadedModuleFileSpec
Summary:
GetLoadedModuleFileSpec was reading /proc/pid/maps character by character, which was very slow,
since we do that for every shared library, which android tends to have a lot. Switching to
ProcFileReader saves us about 0.4 seconds in attach time.

Reviewers: tberghammer

Subscribers: tberghammer, danalbert, lldb-commits

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

llvm-svn: 243019
2015-07-23 14:47:33 +00:00