platform/upstream/llvm.git
9 years agoReorder alphabetically.
NAKAMURA Takumi [Fri, 24 Jul 2015 01:12:28 +0000 (01:12 +0000)]
Reorder alphabetically.

llvm-svn: 243080

9 years agoClean up function attributes on PPC fast-isel tests.
Eric Christopher [Fri, 24 Jul 2015 01:07:50 +0000 (01:07 +0000)]
Clean up function attributes on PPC fast-isel tests.

llvm-svn: 243079

9 years ago[libFuzzer] allow users to supply their own implementation of rand
Kostya Serebryany [Fri, 24 Jul 2015 01:06:40 +0000 (01:06 +0000)]
[libFuzzer] allow users to supply their own implementation of rand

llvm-svn: 243078

9 years agoFix an issue where LLDB would run out of stack space trying to decide if a deeply...
Enrico Granata [Fri, 24 Jul 2015 00:57:19 +0000 (00:57 +0000)]
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

9 years ago[RewriteStatepointsForGC] Fix release build warning
Philip Reames [Fri, 24 Jul 2015 00:42:55 +0000 (00:42 +0000)]
[RewriteStatepointsForGC] Fix release build warning

llvm-svn: 243076

9 years agoAdd missing underlines for a docs section. NFC
Jonathan Roelofs [Fri, 24 Jul 2015 00:29:50 +0000 (00:29 +0000)]
Add missing underlines for a docs section. NFC

llvm-svn: 243075

9 years agoAdd UNUSED_IF_ASSERT_DISABLED and apply it.
Bruce Mitchener [Fri, 24 Jul 2015 00:23:29 +0000 (00:23 +0000)]
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

9 years agounwind: Fix libc++abi and libgcc build.
Logan Chien [Fri, 24 Jul 2015 00:16:48 +0000 (00:16 +0000)]
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

9 years agoFix Mac OS X build, debugserver version handling.
Bruce Mitchener [Fri, 24 Jul 2015 00:13:45 +0000 (00:13 +0000)]
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

9 years ago[RewriteStatepointsForGC] Use a worklist algorithm for first part of base pointer...
Philip Reames [Fri, 24 Jul 2015 00:02:11 +0000 (00:02 +0000)]
[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

9 years agotest commit, only added one space
Lawrence Hu [Thu, 23 Jul 2015 23:55:28 +0000 (23:55 +0000)]
test commit, only added one space

llvm-svn: 243070

9 years agoFix the equal-vector-size rule for reinterpret_casts in C++
John McCall [Thu, 23 Jul 2015 23:54:07 +0000 (23:54 +0000)]
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

9 years agoInstrProf: Fix a typo in the test for r243066
Justin Bogner [Thu, 23 Jul 2015 23:34:26 +0000 (23:34 +0000)]
InstrProf: Fix a typo in the test for r243066

llvm-svn: 243068

9 years agoDisable mutex error checking so it doesn't create problems with the multi-threaded...
Greg Clayton [Thu, 23 Jul 2015 23:32:08 +0000 (23:32 +0000)]
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

9 years agoInstrProf: Don't extend coverage regions into the catch keyword
Justin Bogner [Thu, 23 Jul 2015 23:24:21 +0000 (23:24 +0000)]
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

9 years ago[NaryReassociate] remove redundant code
Jingyue Wu [Thu, 23 Jul 2015 23:13:37 +0000 (23:13 +0000)]
[NaryReassociate] remove redundant code

This check is already done by findClosestMatchingDominator.

llvm-svn: 243065

9 years agoMIR Serialization: Serialize the '.cfi_offset' CFI instruction.
Alex Lorenz [Thu, 23 Jul 2015 23:09:07 +0000 (23:09 +0000)]
MIR Serialization: Serialize the '.cfi_offset' CFI instruction.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243062

9 years agoFix -Wextra-semi.
Rui Ueyama [Thu, 23 Jul 2015 23:03:55 +0000 (23:03 +0000)]
Fix -Wextra-semi.

Patch from Eugene.Zelenko!

llvm-svn: 243060

9 years agoWebAssembly: test that valid -mcpu flags are accepted.
JF Bastien [Thu, 23 Jul 2015 23:00:04 +0000 (23:00 +0000)]
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

9 years agofix crash in machine trace metrics due to processing dbg_value instructions (PR24199)
Sanjay Patel [Thu, 23 Jul 2015 22:56:53 +0000 (22:56 +0000)]
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

9 years ago[RewriteStatepointsForGC] Rename PhiState to reflect that it's associated w/more...
Philip Reames [Thu, 23 Jul 2015 22:49:14 +0000 (22:49 +0000)]
[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

9 years ago[sanitizer] Fix double definition of a function.
Evgeniy Stepanov [Thu, 23 Jul 2015 22:37:39 +0000 (22:37 +0000)]
[sanitizer] Fix double definition of a function.

llvm-svn: 243055

9 years ago[RewriteStatepointsForGC] Use idomatic mechanisms for debug tracing [NFC]
Philip Reames [Thu, 23 Jul 2015 22:25:26 +0000 (22:25 +0000)]
[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

9 years agoSeveral improvements to the Either<T,U> type
Enrico Granata [Thu, 23 Jul 2015 22:17:39 +0000 (22:17 +0000)]
Several improvements to the Either<T,U> type

llvm-svn: 243053

9 years ago[ARM] Register (existing) ARMLoadStoreOpt pass with LLVM pass manager.
David Gross [Thu, 23 Jul 2015 22:12:46 +0000 (22:12 +0000)]
[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

9 years ago[sanitizer] Implement logging to syslog.
Evgeniy Stepanov [Thu, 23 Jul 2015 22:05:20 +0000 (22:05 +0000)]
[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

9 years agoMoving tests in to X86 directory.
Colin LeMahieu [Thu, 23 Jul 2015 21:55:26 +0000 (21:55 +0000)]
Moving tests in to X86 directory.

llvm-svn: 243049

9 years agoAdd documentation for the objc_boxable attribute
Alex Denisov [Thu, 23 Jul 2015 21:53:13 +0000 (21:53 +0000)]
Add documentation for the objc_boxable attribute

llvm-svn: 243048

9 years agoTest commit.
David Gross [Thu, 23 Jul 2015 21:46:09 +0000 (21:46 +0000)]
Test commit.

llvm-svn: 243046

9 years ago[RewriteStatepointsForGC] Simplify code around meet of PhiStates [NFC]
Philip Reames [Thu, 23 Jul 2015 21:41:27 +0000 (21:41 +0000)]
[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

9 years agoUsing an input object file instead of trying to generate an object file.
Colin LeMahieu [Thu, 23 Jul 2015 21:40:19 +0000 (21:40 +0000)]
Using an input object file instead of trying to generate an object file.

llvm-svn: 243044

9 years agoSpecifying a test triple.
Colin LeMahieu [Thu, 23 Jul 2015 21:24:52 +0000 (21:24 +0000)]
Specifying a test triple.

llvm-svn: 243042

9 years ago[llvm-objdump] Add -D and --disassemble-all flags that attempt disassembly on all...
Colin LeMahieu [Thu, 23 Jul 2015 20:58:49 +0000 (20:58 +0000)]
[llvm-objdump] Add -D and --disassemble-all flags that attempt disassembly on all sections instead of just text sections.

llvm-svn: 243041

9 years ago[Scalarizer] Fix potential for stale data in Scattered across invocations
Matt Wala [Thu, 23 Jul 2015 20:53:46 +0000 (20:53 +0000)]
[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

9 years agoSema: Avoid a stack overflow on large CFGs
Duncan P. N. Exon Smith [Thu, 23 Jul 2015 20:15:50 +0000 (20:15 +0000)]
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

9 years agoSema: Split out helper from checkForFunctionCall(), NFC
Duncan P. N. Exon Smith [Thu, 23 Jul 2015 20:11:47 +0000 (20:11 +0000)]
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

9 years agoAdd LICM test cases
Michael Kruse [Thu, 23 Jul 2015 20:05:11 +0000 (20:05 +0000)]
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

9 years agoAlways execute polly::CodePreparation before Polly
Michael Kruse [Thu, 23 Jul 2015 20:00:20 +0000 (20:00 +0000)]
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

9 years agoMost thread plans don't handle eStopReasonInstrumentation stop reasons,
Jim Ingham [Thu, 23 Jul 2015 19:55:02 +0000 (19:55 +0000)]
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

9 years agoX86: Use dyn_cast instead of isa+cast, NFC
Duncan P. N. Exon Smith [Thu, 23 Jul 2015 19:27:07 +0000 (19:27 +0000)]
X86: Use dyn_cast instead of isa+cast, NFC

llvm-svn: 243034

9 years agoThis patch eanble register coalescing to coalesce the following:
Weiming Zhao [Thu, 23 Jul 2015 19:24:53 +0000 (19:24 +0000)]
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

9 years agoPatch out a fatal assertion in OpenMP runtime until preconditions are met
Jonathan Peyton [Thu, 23 Jul 2015 18:58:37 +0000 (18:58 +0000)]
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

9 years ago[libFuzzer] dump long running units to disk
Kostya Serebryany [Thu, 23 Jul 2015 18:37:22 +0000 (18:37 +0000)]
[libFuzzer] dump long running units to disk

llvm-svn: 243031

9 years agoDetect and throw on a class of bad regexes that we mistakenly accepted before. Thanks...
Marshall Clow [Thu, 23 Jul 2015 18:27:51 +0000 (18:27 +0000)]
Detect and throw on a class of bad regexes that we mistakenly accepted before. Thanks to Trevor Smigiel for the report

llvm-svn: 243030

9 years agoUpdating the documentation for the hasAttr AST matcher, which behaves somewhat differ...
Aaron Ballman [Thu, 23 Jul 2015 17:54:59 +0000 (17:54 +0000)]
Updating the documentation for the hasAttr AST matcher, which behaves somewhat differently when used within clang-query. Fixes PR24217.

llvm-svn: 243029

9 years agomisc-unused-parameters: Fix bug where the check was looking at
Daniel Jasper [Thu, 23 Jul 2015 17:26:36 +0000 (17:26 +0000)]
misc-unused-parameters: Fix bug where the check was looking at
ParmVarDecls of function types.

llvm-svn: 243026

9 years ago[Compiler-RT] Remove dependency on libgcc_s/eh
Renato Golin [Thu, 23 Jul 2015 17:24:41 +0000 (17:24 +0000)]
[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

9 years agoRemoved redundant alias checks generated during run time.
Johannes Doerfert [Thu, 23 Jul 2015 17:04:54 +0000 (17:04 +0000)]
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

9 years agoisl: Translate brisebarre to use UNIX line endings
Tobias Grosser [Thu, 23 Jul 2015 15:35:45 +0000 (15:35 +0000)]
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

9 years agoSpeed up NativeProcessLinux::GetLoadedModuleFileSpec
Pavel Labath [Thu, 23 Jul 2015 14:47:33 +0000 (14:47 +0000)]
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

9 years agoAdd missing files for objc_boxable feature.
Alex Denisov [Thu, 23 Jul 2015 14:45:41 +0000 (14:45 +0000)]
Add missing files for objc_boxable feature.

Original patch [r240761] is missing all new files because of committer's mistake.

llvm-svn: 243018

9 years ago[CMake] Fix libomp_check_linker_flag function
Jonathan Peyton [Thu, 23 Jul 2015 14:41:35 +0000 (14:41 +0000)]
[CMake] Fix libomp_check_linker_flag function

libomp_check_linker_flag rewrites src_to_link.c and CMakeLists.txt in build
directory for test project, but cmake does not rebuild the project. The root
cause is that on some filesystems (ext3, reiserfs) timestamp resoultion is 1
second. So cmake does not rebuild test project if check takes less than 1 second.
This patch puts each test in its own directory to avoid the timestamp problem.

Patch by Chris Bergstrom

http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-July/000817.html

llvm-svn: 243017

9 years agoNFC. Explicitly specify attributes in BasicAA/cs-cs.ll test.
Igor Laevsky [Thu, 23 Jul 2015 14:31:18 +0000 (14:31 +0000)]
NFC. Explicitly specify attributes in BasicAA/cs-cs.ll test.
This will simplify verifying correctness for a changes which modify attributes.

llvm-svn: 243016

9 years agoDelete dead code.
Rafael Espindola [Thu, 23 Jul 2015 13:42:16 +0000 (13:42 +0000)]
Delete dead code.

llvm-svn: 243015

9 years agoUse the getSymbol with an explicit symbol table. NFC.
Rafael Espindola [Thu, 23 Jul 2015 13:41:25 +0000 (13:41 +0000)]
Use the getSymbol with an explicit symbol table. NFC.

llvm-svn: 243014

9 years ago[NativeProcessLinux] Fix a couple of warnings
Pavel Labath [Thu, 23 Jul 2015 13:07:37 +0000 (13:07 +0000)]
[NativeProcessLinux] Fix a couple of warnings

llvm-svn: 243013

9 years agoUse helper function. NFC.
Rafael Espindola [Thu, 23 Jul 2015 12:51:44 +0000 (12:51 +0000)]
Use helper function. NFC.

llvm-svn: 243012

9 years agoAdd a version of getSymbol with an explicit symbol table. Use it. NFC.
Rafael Espindola [Thu, 23 Jul 2015 12:49:40 +0000 (12:49 +0000)]
Add a version of getSymbol with an explicit symbol table. Use it. NFC.

llvm-svn: 243011

9 years ago[X86] Allow load folding into PUSH instructions
Michael Kuperstein [Thu, 23 Jul 2015 12:23:45 +0000 (12:23 +0000)]
[X86] Allow load folding into PUSH instructions

Adds pushes to the folding tables.
This also required a fix to the TD definition, since the memory forms of
the push instructions did not have the right mayLoad/mayStore flags.

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

llvm-svn: 243010

9 years ago[X86][AVX512F] Add FP scalar intrinsics
Asaf Badouh [Thu, 23 Jul 2015 12:13:32 +0000 (12:13 +0000)]
[X86][AVX512F] Add FP scalar intrinsics
intrinsics for: add/sub/mul/div/min/max in their FP scalar versions

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

llvm-svn: 243009

9 years ago[x86] change FP scalar builtin naming convention
Asaf Badouh [Thu, 23 Jul 2015 12:10:51 +0000 (12:10 +0000)]
[x86] change FP scalar builtin naming convention

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

llvm-svn: 243008

9 years ago[asan] Trying to make peace with the Windows bots, take 2
Kuba Brecka [Thu, 23 Jul 2015 11:53:58 +0000 (11:53 +0000)]
[asan] Trying to make peace with the Windows bots, take 2

There are some test failures after r243003 and r243004 ("Rename the ABI
versioning symbol to '__asan_version_mismatch_check' instead abusing
'__asan_init'"). See http://reviews.llvm.org/D11004

llvm-svn: 243007

9 years ago[LinkerScript] Fix case when setting custom NONE segment
Denis Protivensky [Thu, 23 Jul 2015 11:46:59 +0000 (11:46 +0000)]
[LinkerScript] Fix case when setting custom NONE segment

llvm-svn: 243006

9 years ago[asan] Trying to make peace with the Windows bots
Kuba Brecka [Thu, 23 Jul 2015 11:20:14 +0000 (11:20 +0000)]
[asan] Trying to make peace with the Windows bots

There are some test failures after r243003 and r243004 ("Rename the ABI
versioning symbol to '__asan_version_mismatch_check' instead abusing
'__asan_init'"). See http://reviews.llvm.org/D11004

llvm-svn: 243005

9 years ago[asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead...
Kuba Brecka [Thu, 23 Jul 2015 10:55:13 +0000 (10:55 +0000)]
[asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init'

We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking.

Reviewed at http://reviews.llvm.org/D11004

llvm-svn: 243004

9 years ago[asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead...
Kuba Brecka [Thu, 23 Jul 2015 10:54:06 +0000 (10:54 +0000)]
[asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init'

We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking.

Reviewed at http://reviews.llvm.org/D11004

llvm-svn: 243003

9 years ago[ELF] Apply segments from linker scripts
Denis Protivensky [Thu, 23 Jul 2015 10:34:30 +0000 (10:34 +0000)]
[ELF] Apply segments from linker scripts

Put sections to segments according to linker scripts if available.
Rework the code of TargetLayout::assignSectionsToSegments so it operates
on the given list of segments, which can be either read from linker scripts
or constructed as before.
Handle NONE segments defined in linker scripts by putting corresponding sections
to PT_NULL segment.
Consider flags set for segments through linker scripts.

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

llvm-svn: 243002

9 years ago[X86] Fix order of operands for ins and outs instructions when parsing intel syntax
Michael Kuperstein [Thu, 23 Jul 2015 10:23:48 +0000 (10:23 +0000)]
[X86] Fix order of operands for ins and outs instructions when parsing intel syntax

Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11337

llvm-svn: 243001

9 years agoRemove XFAIL from ReturnValueTestCase after rL242972
Tamas Berghammer [Thu, 23 Jul 2015 09:49:59 +0000 (09:49 +0000)]
Remove XFAIL from ReturnValueTestCase after rL242972

llvm-svn: 243000

9 years ago[GMR] Add a late run of GlobalsModRef to the main pass pipeline behind
Chandler Carruth [Thu, 23 Jul 2015 09:34:01 +0000 (09:34 +0000)]
[GMR] Add a late run of GlobalsModRef to the main pass pipeline behind
the general GMR-in-non-LTO flag.

Without this, we have the global information during the CGSCC pipeline
for GVN and such, but don't have it available during the late loop
optimizations such as the vectorizer. Moreover, after the CGSCC pipeline
has finished we have substantially more accurate and refined call graph
information, function annotations, etc, which will make GMR even more
powerful than it is early in the pipelien.

Note that we have to play silly games with preserving AliasAnalysis
(which is now trivially preserved) in order to let a module analysis
magically be preserved into the entire function pass pipeline.
Simultaneously we have to not make GMR an immutable pass in order to be
able to re-run it and collect fresh data on the final call graph.

llvm-svn: 242999

9 years agoSupport printing relocations in files with no section table.
Rafael Espindola [Thu, 23 Jul 2015 09:11:05 +0000 (09:11 +0000)]
Support printing relocations in files with no section table.

llvm-svn: 242998

9 years agoAdd jstopinfo support to llgs
Pavel Labath [Thu, 23 Jul 2015 09:09:29 +0000 (09:09 +0000)]
Add jstopinfo support to llgs

Summary:
This adds support for jstopinfo field of stop-reply packets. This field enables us to avoid
querying full thread stop data on most stops  (see r242593 for more details).

Reviewers: ovyalov, clayborg

Subscribers: lldb-commits

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

llvm-svn: 242997

9 years ago[lldb-mi] Remove unwanted comment blocks.
Bruce Mitchener [Thu, 23 Jul 2015 09:04:56 +0000 (09:04 +0000)]
[lldb-mi] Remove unwanted comment blocks.

Summary:
This removes Authors:, Gotchas:, Changes: and Copyright:.

It leaves a couple of Gotcha: blocks that were not empty.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

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

llvm-svn: 242996

9 years agoUse typdef to simplify the code. NFC.
Rafael Espindola [Thu, 23 Jul 2015 08:48:14 +0000 (08:48 +0000)]
Use typdef to simplify the code. NFC.

llvm-svn: 242995

9 years agoX86: Fixed assertion failure in 32-bit mode
Elena Demikhovsky [Thu, 23 Jul 2015 08:25:23 +0000 (08:25 +0000)]
X86: Fixed assertion failure in 32-bit mode
The DAG Node "SCALAR_TO_VECTOR" may be created if the type of the scalar element is legal.
Added a check for the scalar type before creating this node.
Added a test that fails with assertion on the current version.

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

llvm-svn: 242994

9 years agoAvoid using -Wl,-z,defs on Cygwin.
Yaron Keren [Thu, 23 Jul 2015 08:06:12 +0000 (08:06 +0000)]
Avoid using -Wl,-z,defs on Cygwin.

Prior to CMAKE 2.8.4 that was covered by the WIN32 conditional but
from 2.8.4 CMAKE no longer defined WIN32 when running under Cygwin
and it needs its own test.

Patch by Martell Malone!

http://reviews.llvm.org/D11347

llvm-svn: 242993

9 years agoRevert r242990: "AVX-512: Implemented encoding , DAG lowering and ..."
Chandler Carruth [Thu, 23 Jul 2015 08:03:44 +0000 (08:03 +0000)]
Revert r242990: "AVX-512: Implemented encoding , DAG lowering and ..."

This commit broke the build. Numerous build bots broken, and it was
blocking my progress so reverting.

It should be trivial to reproduce -- enable the BPF backend and it
should fail when running llvm-tblgen.

llvm-svn: 242992

9 years ago[GMR] Switch the function info we store for every function to be a much
Chandler Carruth [Thu, 23 Jul 2015 07:50:52 +0000 (07:50 +0000)]
[GMR] Switch the function info we store for every function to be a much
more dense datastructure. We actually only have 3 bits of information
and an often-null pointer here. This fits very nicely into a
pointer-size value in the DenseMap from Function -> Info. Then we take
one more pointer hop to get to a secondary DenseMap from GlobalValue ->
ModRefInfo when we actually have precise info for particular globals.

This is more code than I would really like to do this packing, but it
ended up reasonably cleanly laid out. It should ensure we don't hit
scaling limitations with more widespread use of GMR.

llvm-svn: 242991

9 years agoAVX-512: Implemented encoding , DAG lowering and intrinsics for Integer Truncate...
Igor Breger [Thu, 23 Jul 2015 07:39:21 +0000 (07:39 +0000)]
AVX-512: Implemented encoding , DAG lowering and intrinsics for Integer Truncate with/without saturation
Added tests for DAG lowering ,encoding and intrinsic

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

llvm-svn: 242990

9 years ago[ScalarEvolution] Change addRequired to addRequiredTransitive on two passes where...
Craig Topper [Thu, 23 Jul 2015 07:33:48 +0000 (07:33 +0000)]
[ScalarEvolution] Change addRequired to addRequiredTransitive on two passes where ScalarEvolution stores long lived raw pointers to objects those passes own.

This prevents the pointers from dangling when those passes are freed.

http://reviews.llvm.org/D11236
Patch by Steve King.

llvm-svn: 242989

9 years agoReplace a 0 with nullptr. NFC
Craig Topper [Thu, 23 Jul 2015 07:17:53 +0000 (07:17 +0000)]
Replace a 0 with nullptr. NFC

llvm-svn: 242988

9 years agoAVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only...
Igor Breger [Thu, 23 Jul 2015 07:11:14 +0000 (07:11 +0000)]
AVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only if AVX512BW and AVX512VL present.
Tests added.

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

llvm-svn: 242987

9 years ago[X86][AVX512BW] add madd and maddubs intrinsics
Asaf Badouh [Thu, 23 Jul 2015 07:07:25 +0000 (07:07 +0000)]
[X86][AVX512BW] add madd and maddubs intrinsics

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

llvm-svn: 242986

9 years agoFix the shell script check_clang_tidy.sh in r242984.
NAKAMURA Takumi [Thu, 23 Jul 2015 06:03:40 +0000 (06:03 +0000)]
Fix the shell script check_clang_tidy.sh in r242984.

llvm-svn: 242985

9 years agoAppease test/clang-tidy/misc-unused-parameters.cpp for targeting *-win32, to add...
NAKAMURA Takumi [Thu, 23 Jul 2015 05:52:02 +0000 (05:52 +0000)]
Appease test/clang-tidy/misc-unused-parameters.cpp for targeting *-win32, to add -fno-delayed-template-parsing.

Note, clang-tidy tests wouldn't run on Windows hosts since they are disabled with REQUIRES:shell.
The failure would be raised with cross building.

llvm-svn: 242984

9 years agoRemove unnecessary in C++11 c_str() calls
Yaron Keren [Thu, 23 Jul 2015 05:49:29 +0000 (05:49 +0000)]
Remove unnecessary in C++11 c_str() calls

While theoratically required in pre-C++11 to avoid re-allocation upon call,
C++11 guarantees that c_str() returns a pointer to the internal array so
pre-calling c_str() is no longer required.

llvm-svn: 242983

9 years ago[NVPTX] run LSR before straight-line optimizations
Jingyue Wu [Thu, 23 Jul 2015 04:59:07 +0000 (04:59 +0000)]
[NVPTX] run LSR before straight-line optimizations

Summary:
Straight-line optimizations can simplify the loop body and make LSR's
cost analysis more precise. This significantly improves several Eigen3
CUDA benchmarks.

With this change, EigenContractionKernel runs up to 40% faster
(https://bitbucket.org/eigen/eigen/src/753ceee5f206ff7dde9f6a41a5a420749fc9406f/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h?at=default#cl-502).
EigenConvolutionKernel2D runs up to 10% faster
(https://bitbucket.org/eigen/eigen/src/753ceee5f206ff7dde9f6a41a5a420749fc9406f/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h?at=default#cl-605).

I have some difficulties writing small tests that benefit from this
reordering due to a seemingly issue with LSR (being discussed at
http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-July/088244.html).

See the review thread for the compilation time impact of GVN.

Reviewers: eliben, jholewinski

Subscribers: llvm-commits, jholewinski

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

llvm-svn: 242982

9 years agoRefactor duplicated code and check for invalid symbol table size.
Rafael Espindola [Thu, 23 Jul 2015 03:24:22 +0000 (03:24 +0000)]
Refactor duplicated code and check for invalid symbol table size.

llvm-svn: 242981

9 years agoAdd test to verify we emit warning when the deprecated virtual function is overloaded.
Davide Italiano [Thu, 23 Jul 2015 02:54:59 +0000 (02:54 +0000)]
Add test to verify we emit warning when the deprecated virtual function is overloaded.

Suggested by Richard Smith.

llvm-svn: 242980

9 years agoFix comment in test.
Dawn Perchik [Thu, 23 Jul 2015 02:15:55 +0000 (02:15 +0000)]
Fix comment in test.

llvm-svn: 242979

9 years agoRevert r242975.
Evgeniy Stepanov [Thu, 23 Jul 2015 01:29:26 +0000 (01:29 +0000)]
Revert r242975.

Breaks Mac build.

llvm-svn: 242978

9 years agoArrayRef-ize a pointer/length pair.
Richard Smith [Thu, 23 Jul 2015 00:53:59 +0000 (00:53 +0000)]
ArrayRef-ize a pointer/length pair.

llvm-svn: 242977

9 years ago[GMR] Further improve the FunctionInfo API inside of GlobalsModRef, NFC.
Chandler Carruth [Thu, 23 Jul 2015 00:12:32 +0000 (00:12 +0000)]
[GMR] Further improve the FunctionInfo API inside of GlobalsModRef, NFC.

This takes the operation of merging a callee's information into the
current information and embeds it into the FunctionInfo type itself.
This is much cleaner as now we don't need to expose iteration of the
globals, etc.

Also, switched all the uses of a raw integer two maintain the mod/ref
info during the SCC walk into just directly manipulating it in the
FunctionInfo object.

llvm-svn: 242976

9 years ago[sanitizer] Implement logging to syslog.
Evgeniy Stepanov [Wed, 22 Jul 2015 23:57:19 +0000 (23:57 +0000)]
[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.

llvm-svn: 242975

9 years ago[GMR] Wrap all of the per-function information behind a more strongly
Chandler Carruth [Wed, 22 Jul 2015 23:56:31 +0000 (23:56 +0000)]
[GMR] Wrap all of the per-function information behind a more strongly
typed interface as a precursor to rewriting how it is stored.

This way we know that the access paths are controlled and it should be
easy to store these bits in a different way.

No functionality changed.

llvm-svn: 242974

9 years agoDowngrade error about adding 'dllimport' to used free function to warning (PR24215)
Hans Wennborg [Wed, 22 Jul 2015 23:54:51 +0000 (23:54 +0000)]
Downgrade error about adding 'dllimport' to used free function to warning (PR24215)

The code will still work as it can reference the function via its thunk.

llvm-svn: 242973

9 years agoFix TestReturnValue.py after 242903 changes that added vector register return value...
Greg Clayton [Wed, 22 Jul 2015 23:47:29 +0000 (23:47 +0000)]
Fix TestReturnValue.py after 242903 changes that added vector register return value tests. These were failing on x86_64 and i386.

It also pointed out an error in our return values where the ABI only relies on xmm registers, not ymm registers for vector return types.

llvm-svn: 242972

9 years agoMove EHPersonality to CGCleanup
David Majnemer [Wed, 22 Jul 2015 23:46:21 +0000 (23:46 +0000)]
Move EHPersonality to CGCleanup

This makes it possible to use EHPersonality in other parts of CodeGen.

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

llvm-svn: 242971

9 years ago[MS Compat] Allow _Atomic(Type) and 'struct _Atomic' to coexist
David Majnemer [Wed, 22 Jul 2015 23:46:18 +0000 (23:46 +0000)]
[MS Compat] Allow _Atomic(Type) and 'struct _Atomic' to coexist

MSVC 2013 ships, as part of its STL implementation, a class named
'_Atomic'.  This is unfortunate because this keyword is in conflict with
the C11 keyword with the same name.  Our solution was to disable this
keyword when targeting MSVC 2013 and reenable it for 2015.

However, this makes it impossible for clang's headers to make use of
_Atomic.  This is problematic in the case of libc++ as it makes heavy
use of this keyword.

Let the keywordness of _Atomic float under certain circumstances:
the body of a class named _Atomic, or a class with a base specifier
named _Atomic, will not have the keyword variant of _Atomic for the
duration of the class body.  This is sufficient to allow us to correctly
handle _Atomic in the STL while permitting us to use _Atomic as a
keyword everywhere else.

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

llvm-svn: 242970

9 years agoDon't specify languages when setting breakpoints in C function names. We won't be...
Greg Clayton [Wed, 22 Jul 2015 23:45:52 +0000 (23:45 +0000)]
Don't specify languages when setting breakpoints in C function names. We won't be able to tell from the symbol value alone what language the symbol is.

llvm-svn: 242969