platform/upstream/llvm.git
9 years agoRemove support for building sanitizers from Makefile/autoconf build on Linux.
Alexey Samsonov [Wed, 18 Feb 2015 22:26:49 +0000 (22:26 +0000)]
Remove support for building sanitizers from Makefile/autoconf build on Linux.

This is a re-application of r229554 restricted to Linux build only.
Apple still uses Makefile/autoconf to build Clang and sanitizers.

llvm-svn: 229756

9 years agoRemove support for building sanitizers from Makefile/autoconf build on Linux.
Alexey Samsonov [Wed, 18 Feb 2015 22:26:22 +0000 (22:26 +0000)]
Remove support for building sanitizers from Makefile/autoconf build on Linux.

This is a re-application of r229554 restricted to Linux build only.
Apple still uses Makefile/autoconf to build Clang and sanitizers.

llvm-svn: 229755

9 years ago[docs] Recommend to use CMake for building sanitizers.
Alexey Samsonov [Wed, 18 Feb 2015 22:26:20 +0000 (22:26 +0000)]
[docs] Recommend to use CMake for building sanitizers.

llvm-svn: 229754

9 years agoCMake: Fix add_lit_target for the case where a test suite has zero target dependencies.
Peter Collingbourne [Wed, 18 Feb 2015 22:25:35 +0000 (22:25 +0000)]
CMake: Fix add_lit_target for the case where a test suite has zero target dependencies.

This can happen with a standalone project containing a test suite with no
internal dependencies.

llvm-svn: 229753

9 years agoR600/SI: Fix READLANE and WRITELANE lane select for VI
Marek Olsak [Wed, 18 Feb 2015 22:12:45 +0000 (22:12 +0000)]
R600/SI: Fix READLANE and WRITELANE lane select for VI

VOP2 declares vsrc1, but VOP3 declares src1.
We can't use the same "ins" if the operands have different names in VOP2
and VOP3 encodings.

This fixes a hang in geometry shaders which spill M0 on VI.
(BTW it doesn't look like M0 needs spilling and the spilling seems
duplicated 3 times)

llvm-svn: 229752

9 years agoR600/SI: Simplify verification of AMDGPU::OPERAND_REG_INLINE_C
Marek Olsak [Wed, 18 Feb 2015 22:12:41 +0000 (22:12 +0000)]
R600/SI: Simplify verification of AMDGPU::OPERAND_REG_INLINE_C

llvm-svn: 229751

9 years agoR600/SI: Remove explicit VOP operand checking
Marek Olsak [Wed, 18 Feb 2015 22:12:37 +0000 (22:12 +0000)]
R600/SI: Remove explicit VOP operand checking

This should be handled by the OperandType checking.

llvm-svn: 229750

9 years agoFix use-after-free bug identified by the Address Sanitizer
Greg Fitzgerald [Wed, 18 Feb 2015 21:54:32 +0000 (21:54 +0000)]
Fix use-after-free bug identified by the Address Sanitizer

atomContent's memory is freed at the end of the stack frame,
but it is referenced by the atom pushed into _definedAtoms.

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

llvm-svn: 229749

9 years agoInstrProf: Rewrite most of coverage mapping generation in a simpler way
Justin Bogner [Wed, 18 Feb 2015 21:24:51 +0000 (21:24 +0000)]
InstrProf: Rewrite most of coverage mapping generation in a simpler way

The coverage mapping generation code previously generated a large
number of redundant coverage regions and then tried to merge similar
ones back together. This then relied on some awkward heuristics to
prevent combining of regions that were importantly different but
happened to have the same count. The end result was inefficient and
hard to follow.

Now, we more carefully create the regions we actually want. This makes
it much easier to create regions at precise locations as well as
making the basic approach quite a bit easier to follow. There's still
a fair bit of complexity here dealing with included code and macro
expansions, but that's pretty hard to avoid without significantly
reducing the quality of data we provide.

I had to modify quite a few tests where the source ranges became more
precise or the old ranges seemed to be wrong anyways, and I've added
quite a few new tests since a large number of constructs didn't seem
to be tested before.

llvm-svn: 229748

9 years agoIR: Swap order of name and value in MDEnum
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 21:16:33 +0000 (21:16 +0000)]
IR: Swap order of name and value in MDEnum

Put the name before the value in assembly for `MDEnum`.  While working
on the testcase upgrade script for the new hierarchy, I noticed that it
"looks nicer" to have the name first, since it lines the names up in the
(somewhat typical) case that they have a common prefix.

llvm-svn: 229747

9 years agoAdd decorator for failure setting prompt on FreeBSD
Ed Maste [Wed, 18 Feb 2015 20:55:13 +0000 (20:55 +0000)]
Add decorator for failure setting prompt on FreeBSD

llvm.org/pr22611

llvm-svn: 229745

9 years agoIR: Add MDCompositeTypeBase::replace*()
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 20:47:52 +0000 (20:47 +0000)]
IR: Add MDCompositeTypeBase::replace*()

Add `replaceElements()`, `replaceVTableHolder()`, and
`replaceTemplateParams()` to `MDCompositeTypeBase`.  Included an
assertion in `replaceElements()` to match the one in
`DICompositeType::replaceArrays()`.

llvm-svn: 229744

9 years agoIR: Add MDCompileUnit::replace*()
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 20:36:09 +0000 (20:36 +0000)]
IR: Add MDCompileUnit::replace*()

Add `MDCompileUnit::replaceGlobalVariables()` and
`MDCompileUnit::replaceSubprograms()`.

llvm-svn: 229743

9 years agoIR: Add MDSubprogram::replaceFunction()
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 20:32:57 +0000 (20:32 +0000)]
IR: Add MDSubprogram::replaceFunction()

llvm-svn: 229742

9 years agoAdd decorators for failing lldb-mi tests
Ed Maste [Wed, 18 Feb 2015 20:31:30 +0000 (20:31 +0000)]
Add decorators for failing lldb-mi tests

Tests fail intermittently on FreeBSD and Linux, apparently due to
threading race conditions in lldb-mi.

See comments in http://reviews.llvm.org/D7529 and
http://reviews.llvm.org/D7727 for more information.

llvm.org/pr22411

llvm-svn: 229741

9 years agoIR: Drop the scope in DI template parameters
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 20:30:45 +0000 (20:30 +0000)]
IR: Drop the scope in DI template parameters

The scope/context is always the compile unit, which we replace with
`nullptr` anyway (via `getNonCompileUnitScope()`).  Drop it explicitly.

I noticed this field was always null while writing testcase upgrade
scripts to transition to the new hierarchy.  Seems wasteful to
transition it over if it's already out-of-use.

llvm-svn: 229740

9 years agoRevert "Enable ASAN build and test on AArch64"
Renato Golin [Wed, 18 Feb 2015 20:30:32 +0000 (20:30 +0000)]
Revert "Enable ASAN build and test on AArch64"

This reverts commit r229665. It seems that the AArch64 ASAN tests, that
pass on all our internal machines, doesn't like the public buildbot.

Turning this off until we can investigate the public bot for a better
understanding.

llvm-svn: 229739

9 years agoAdd decorator for process launch w/ glob not working on FreeBSD
Ed Maste [Wed, 18 Feb 2015 20:17:21 +0000 (20:17 +0000)]
Add decorator for process launch w/ glob not working on FreeBSD

llvm-svn: 229738

9 years agoAdd decorators for failing lldb-mi tests
Ed Maste [Wed, 18 Feb 2015 20:08:07 +0000 (20:08 +0000)]
Add decorators for failing lldb-mi tests

Tests fail intermittently on FreeBSD and Linux, apparently due to
threading race conditions in lldb-mi.

See comments in http://reviews.llvm.org/D7529 and
http://reviews.llvm.org/D7727 for more information.

llvm.org/pr22411

llvm-svn: 229737

9 years agoFix -DNDEBUG -Werror build after r229733
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 19:56:50 +0000 (19:56 +0000)]
Fix -DNDEBUG -Werror build after r229733

llvm-svn: 229736

9 years agodos2unix the WinEH file and tests
Reid Kleckner [Wed, 18 Feb 2015 19:52:46 +0000 (19:52 +0000)]
dos2unix the WinEH file and tests

llvm-svn: 229735

9 years agoIR: isScopeRef() should check isScope()
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 19:46:02 +0000 (19:46 +0000)]
IR: isScopeRef() should check isScope()

r229733 removed an invalid use of `DIScopeRef`, so now we can enforce
that a `DIScopeRef` is actually a scope.

llvm-svn: 229734

9 years agoIR: Avoid DIScopeRef in DIImportedEntity::getEntity()
Duncan P. N. Exon Smith [Wed, 18 Feb 2015 19:39:36 +0000 (19:39 +0000)]
IR: Avoid DIScopeRef in DIImportedEntity::getEntity()

`DIImportedEntity::getEntity()` currently returns a `DIScopeRef`, but
the nodes it references aren't always `DIScope`s.  In particular, it can
reference global variables.

Introduce `DIDescriptorRef` to avoid the lie.

llvm-svn: 229733

9 years agoMake frem.ll flush after calling printf.
Zachary Turner [Wed, 18 Feb 2015 19:32:28 +0000 (19:32 +0000)]
Make frem.ll flush after calling printf.

Without this, the test was flaky, and FileCheck would sometimes
not detect any input on stdin.

llvm-svn: 229732

9 years agoPartial fix for bug 22589
Sanjoy Das [Wed, 18 Feb 2015 19:32:25 +0000 (19:32 +0000)]
Partial fix for bug 22589

Don't spend the entire iteration space in the scalar loop prologue if
computing the trip count overflows.  This change also gets rid of the
backedge check in the prologue loop and the extra check for
overflowing trip-count.

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

llvm-svn: 229731

9 years agoModify llvm-readobj to dump symbol record bytes.
Zachary Turner [Wed, 18 Feb 2015 19:32:05 +0000 (19:32 +0000)]
Modify llvm-readobj to dump symbol record bytes.

This will help us study the format of individual symbol
records more closely.

Differential Revision: http://reviews.llvm.org/D7664
Reviewed by: Timur Iskhodzhanov

llvm-svn: 229730

9 years agoRemove unused diagnostic.
Benjamin Kramer [Wed, 18 Feb 2015 19:30:34 +0000 (19:30 +0000)]
Remove unused diagnostic.

llvm-svn: 229729

9 years agoRemove several unused forward declarations. Fixes PR22605.
Marshall Clow [Wed, 18 Feb 2015 19:28:35 +0000 (19:28 +0000)]
Remove several unused forward declarations. Fixes PR22605.

llvm-svn: 229728

9 years agoAdding install targets for individual LLVM tools and libraries.
Chris Bieneman [Wed, 18 Feb 2015 19:25:47 +0000 (19:25 +0000)]
Adding install targets for individual LLVM tools and libraries.

Summary:
* add_llvm_tool and add_llvm_library now add install-${name} targets to install specific components
* added installhdrs target to install just the LLVM headers
* The above changes only apply for single-configuration generators (Ninja, Makefiles...), not for multi-configuration generators (Visual Studio, Xcode...)

Reviewers: pete

Reviewed By: pete

Subscribers: pete, llvm-commits

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

llvm-svn: 229727

9 years agoItanium ABI: Write a character instead of a string literal
David Majnemer [Wed, 18 Feb 2015 19:08:14 +0000 (19:08 +0000)]
Itanium ABI: Write a character instead of a string literal

No functional change intended.

llvm-svn: 229726

9 years agoItanium ABI: Restore disabled tests which are correctly mangled
David Majnemer [Wed, 18 Feb 2015 19:08:12 +0000 (19:08 +0000)]
Itanium ABI: Restore disabled tests which are correctly mangled

llvm-svn: 229725

9 years agoItanium ABI: Properly mangle extern "C" template arguments
David Majnemer [Wed, 18 Feb 2015 19:08:11 +0000 (19:08 +0000)]
Itanium ABI: Properly mangle extern "C" template arguments

extern "C" declarations should be considered like global declarations
for mangling purposes.

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

llvm-svn: 229724

9 years agoInstrProf: Don't combine expansion regions with code regions
Justin Bogner [Wed, 18 Feb 2015 19:01:06 +0000 (19:01 +0000)]
InstrProf: Don't combine expansion regions with code regions

This was leading to duplicate counts when a code region happened to
overlap exactly with an expansion. The combining behaviour only makes
sense for code regions.

llvm-svn: 229723

9 years agoRemove unused member variables (-Wunused-private-field)
David Blaikie [Wed, 18 Feb 2015 18:52:49 +0000 (18:52 +0000)]
Remove unused member variables (-Wunused-private-field)

llvm-svn: 229722

9 years agoFixing a CMake developer warning.
Chris Bieneman [Wed, 18 Feb 2015 18:52:11 +0000 (18:52 +0000)]
Fixing a CMake developer warning.

llvm-svn: 229721

9 years agoEnable standard so versioning for libLLVM.
Chris Bieneman [Wed, 18 Feb 2015 18:52:06 +0000 (18:52 +0000)]
Enable standard so versioning for libLLVM.

Summary: This resolves Bugzilla bug 15493.

Reviewers: chapuni, pete

Reviewed By: pete

Subscribers: pete, llvm-commits

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

Conflicts:
cmake/modules/AddLLVM.cmake

llvm-svn: 229720

9 years agoDriver: Fix use of dangling std::string temporary
Benjamin Kramer [Wed, 18 Feb 2015 18:45:54 +0000 (18:45 +0000)]
Driver: Fix use of dangling std::string temporary

What's going on here is that the ternary operator produces a std::string rvalue
that the StringRef points to. I'd hoped bugs like this were a thing of the past
with our asan testing but apparently this code path is only used when LLVM is
configured with a custom --with-c-include-dirs setting.

Unbreaks bootstrapping with GCC5 on Fedora (PR22625), patch by Jonathan Wakely!

llvm-svn: 229719

9 years agoFix warning that not all control-paths return from function.
Zachary Turner [Wed, 18 Feb 2015 18:44:03 +0000 (18:44 +0000)]
Fix warning that not all control-paths return from function.

llvm-svn: 229718

9 years agoInstrProf: Handle unknown functions if they consist only of zero-regions
Justin Bogner [Wed, 18 Feb 2015 18:40:46 +0000 (18:40 +0000)]
InstrProf: Handle unknown functions if they consist only of zero-regions

This comes up when we generate coverage for a function but don't end
up emitting the function at all - dead static functions or inline
functions that aren't referenced in a particular TU, for example. In
these cases we'd like to show that the function was never called,
which is trivially true.

llvm-svn: 229717

9 years agoSema: Allow 'constexpr' variables in range loops
Meador Inge [Wed, 18 Feb 2015 18:34:59 +0000 (18:34 +0000)]
Sema: Allow 'constexpr' variables in range loops

This fixes PR22492, which is in response to CWG issue #1204.
Per the CWG issue 'contexpr' variables are now allowed in
for range loops.

llvm-svn: 229716

9 years agoAdding implementation to outline C++ catch handlers for native Windows 64 exception...
Andrew Kaylor [Wed, 18 Feb 2015 18:31:51 +0000 (18:31 +0000)]
Adding implementation to outline C++ catch handlers for native Windows 64 exception handling.

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

llvm-svn: 229715

9 years ago[ASan] Set DYLD_LIBRARY_PATH on Darwin
Greg Fitzgerald [Wed, 18 Feb 2015 18:26:58 +0000 (18:26 +0000)]
[ASan] Set DYLD_LIBRARY_PATH on Darwin

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

llvm-svn: 229714

9 years agoDon't use AVX/XSTATE API on Windows.
Zachary Turner [Wed, 18 Feb 2015 18:04:50 +0000 (18:04 +0000)]
Don't use AVX/XSTATE API on Windows.

CopyContext is necessary to safely get the XState, but LLDB doesn't currently
use the XState. CopyContext is available as of Windows 7 SP1, so it can't be
used on Vista.  Furthermore, it requires the Windows 8 SDK it compile,
making the baseline for compiling and running LLDB higher than necessary.

Patch by: Adrian McCarthy
Reviewed by: Zachary Turner
Differential Revision: http://reviews.llvm.org/D7572

llvm-svn: 229710

9 years agoInstrProf: Make CoverageMapping testable and add a basic unit test
Justin Bogner [Wed, 18 Feb 2015 18:01:14 +0000 (18:01 +0000)]
InstrProf: Make CoverageMapping testable and add a basic unit test

Make CoverageMapping easier to create, so that we can write targeted
unit tests for its internals, and add a some infrastructure to write
these tests. Finally, add a simple unit test for basic functionality.

llvm-svn: 229709

9 years agoMove the default template arguments into the forward declarations for the container...
Marshall Clow [Wed, 18 Feb 2015 17:51:56 +0000 (17:51 +0000)]
Move the default template arguments into the forward declarations for the container adapters: stack and queue. References PR#22605.

llvm-svn: 229708

9 years ago[libcxx] Tired of colorless compile errors? Enable color diagnostics today!
Eric Fiselier [Wed, 18 Feb 2015 17:39:45 +0000 (17:39 +0000)]
[libcxx] Tired of colorless compile errors? Enable color diagnostics today!

Summary:
This patch adds a lit option to enable color diagnostics when either `--param=color_diagnostics` is passed to LIT or `LIBCXX_COLOR_DIAGNOSTICS` is present in the environment.

My only concern with this patch is that GCC and Clang take different flags and that only GCC 4.9 and greater support `-fdiagnostics-color=always`

Does anybody have objections to this going in?

Reviewers: jroelofs, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 229707

9 years ago[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Jozef Kolek [Wed, 18 Feb 2015 17:33:56 +0000 (17:33 +0000)]
[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator

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

llvm-svn: 229706

9 years agoMove the default template arguments into the forward declarations for the containers...
Marshall Clow [Wed, 18 Feb 2015 17:24:08 +0000 (17:24 +0000)]
Move the default template arguments into the forward declarations for the containers: deque, forwardlist and list. References PR#22605.

llvm-svn: 229705

9 years agoAdd decorator for fd leak test failing on FreeBSD
Ed Maste [Wed, 18 Feb 2015 17:23:52 +0000 (17:23 +0000)]
Add decorator for fd leak test failing on FreeBSD

An fd leak comes from Python on FreeBSD

FreeBSD ports PR: https://bugs.freebsd.org/197376
Python issue: https://bugs.python.org/issue23458

llvm-svn: 229704

9 years agoclang-format: [JS] support AtScript style annotations for JS.
Daniel Jasper [Wed, 18 Feb 2015 17:17:15 +0000 (17:17 +0000)]
clang-format: [JS] support AtScript style annotations for JS.

Based on Java annotation support and style.

Patch by Martin Probst.

llvm-svn: 229703

9 years ago[mips][microMIPS] Implement JALX instruction
Jozef Kolek [Wed, 18 Feb 2015 17:15:48 +0000 (17:15 +0000)]
[mips][microMIPS] Implement JALX instruction

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

llvm-svn: 229702

9 years agoclang-format: [JS] Support classes.
Daniel Jasper [Wed, 18 Feb 2015 17:14:05 +0000 (17:14 +0000)]
clang-format: [JS] Support classes.

This adds support for JavaScript class definitions (again following
TypeScript & AtScript style). This only required support for
visibility modifiers in JS, everything else was already working.

Patch by Martin Probst, thank you.

llvm-svn: 229701

9 years agoclang-format: [JS] Support type annotations.
Daniel Jasper [Wed, 18 Feb 2015 17:09:53 +0000 (17:09 +0000)]
clang-format: [JS] Support type annotations.

This patch adds support for type annotations that follow TypeScript's,
Flow's, and AtScript's syntax style.

Patch by Martin Probst, thank you.
Review: http://reviews.llvm.org/D7721

llvm-svn: 229700

9 years agoFixed missing checkins.
John Thompson [Wed, 18 Feb 2015 17:08:00 +0000 (17:08 +0000)]
Fixed missing checkins.

llvm-svn: 229699

9 years agoEnable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.
Eric Fiselier [Wed, 18 Feb 2015 17:00:31 +0000 (17:00 +0000)]
Enable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.

llvm-svn: 229698

9 years agoFix broken link to 'Obtaining Commit Access'
Alex Denisov [Wed, 18 Feb 2015 16:51:30 +0000 (16:51 +0000)]
Fix broken link to 'Obtaining Commit Access'

llvm-svn: 229697

9 years ago[libc++] Fix PR20084 - std::is_function<void() const> failed.
Eric Fiselier [Wed, 18 Feb 2015 16:31:46 +0000 (16:31 +0000)]
[libc++] Fix PR20084 - std::is_function<void() const> failed.

Summary:
This patch introduces some black magic to detect const and volatile qualified function types such as `void () const`.

The patch works in the following way:

We first rule out any type that satisfies on of the following. These restrictions are important so that the test below works properly.
* `is_class<_Tp>::value`
* `is_union<_Tp>::value`
* `is_void<_Tp>::value`
* `is_reference<_Tp>::value`
* `__is_nullptr_t<_Tp>::value`

If none of the above is true we perform overload resolution on `__source<_Tp>(0)` to determine the return type.
*  If `_Tp&` is well-formed we select `_Tp& __source(int)`. `_Tp&` is only ill formed for cv void types and cv/ref qualified function types.
* Otherwise we select `__dummy_type __source(...)`. Since we know `_Tp` cannot be void then it must be a function type.

let `R` be the returned from `__source<_Tp>(0)`.
We perform overload resolution on `__test<_Tp>(R)`.
* If `R` is `__dummy_type` we call `true_type __test(__dummy_type)`.
* if `R` is `_Tp&` and `_Tp&` decays to `_Tp*` we call `true_type __test(_Tp*)`.  Only references to function types decay to a pointer of the same type.
* In all other cases we call `false_type __test(...)`.

`__source<_Tp>(0)` will try and form `_Tp&`  in the return type. if `_Tp&` is not well formed the return type of `__source<_Tp>(0)` will be dummy type. `_Tp&` is only ill-formed for cv/ref qualified function types (and void which is dealt with elsewhere).

This fixes PR20084 - http://llvm.org/bugs/show_bug.cgi?id=20084

Reviewers: rsmith, K-ballo, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 229696

9 years ago[mips] Add backend support for Mips32r[35] and Mips64r[35].
Daniel Sanders [Wed, 18 Feb 2015 16:24:50 +0000 (16:24 +0000)]
[mips] Add backend support for Mips32r[35] and Mips64r[35].

Summary:
These ISA's didn't add any instructions so they are almost identical to
Mips32r2 and Mips64r2. Even the ELF e_flags are the same, However the ISA
revision in .MIPS.abiflags is 3 or 5 respectively instead of 2.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: tomatabacu, llvm-commits, atanasyan

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

llvm-svn: 229695

9 years agoThis patch adds the VSX logical instructions introduced in the Power ISA 2.07. It...
Kit Barton [Wed, 18 Feb 2015 16:21:46 +0000 (16:21 +0000)]
This patch adds the VSX logical instructions introduced in the Power ISA 2.07. It also removes the added complexity that favors VMX versions of the three instructions.

Phabricator review: http://reviews.llvm.org/D7616

Commiting on Nemanja's behalf.

llvm-svn: 229694

9 years agoAdded support for extracting headers from module maps as a source for the header...
John Thompson [Wed, 18 Feb 2015 16:14:32 +0000 (16:14 +0000)]
Added support for extracting headers from module maps as a source for the header list.

llvm-svn: 229692

9 years agoAdd missing exports file and remove unused ones
Tamas Berghammer [Wed, 18 Feb 2015 16:14:02 +0000 (16:14 +0000)]
Add missing exports file and remove unused ones

These files required by the excode project

Patch from: flackr <flackr@google.com>

llvm-svn: 229691

9 years agoTemporary hack to avoid false errors. Real fix comming.
John Thompson [Wed, 18 Feb 2015 16:12:26 +0000 (16:12 +0000)]
Temporary hack to avoid false errors. Real fix comming.

llvm-svn: 229690

9 years agoR600/SI: Don't set isCodeGenOnly = 1 on all instructions
Tom Stellard [Wed, 18 Feb 2015 16:08:17 +0000 (16:08 +0000)]
R600/SI: Don't set isCodeGenOnly = 1 on all instructions

We only need to set this on pseudo instructions which won't
be used by the assembler.

llvm-svn: 229689

9 years agoR600/SI: Add missing VOP1 instructions
Tom Stellard [Wed, 18 Feb 2015 16:08:15 +0000 (16:08 +0000)]
R600/SI: Add missing VOP1 instructions

llvm-svn: 229688

9 years agoR600/SI: Add missing VOP2 instructions
Tom Stellard [Wed, 18 Feb 2015 16:08:14 +0000 (16:08 +0000)]
R600/SI: Add missing VOP2 instructions

llvm-svn: 229687

9 years agoR600/SI: Add definition for S_CBRANCH_G_FORK
Tom Stellard [Wed, 18 Feb 2015 16:08:13 +0000 (16:08 +0000)]
R600/SI: Add definition for S_CBRANCH_G_FORK

llvm-svn: 229686

9 years agoR600/SI: Add missing SOP1 instructions
Tom Stellard [Wed, 18 Feb 2015 16:08:11 +0000 (16:08 +0000)]
R600/SI: Add missing SOP1 instructions

llvm-svn: 229685

9 years agoR600/SI: Refactor SOP2 definitions
Tom Stellard [Wed, 18 Feb 2015 16:08:09 +0000 (16:08 +0000)]
R600/SI: Refactor SOP2 definitions

llvm-svn: 229684

9 years agoMerge lldb-platform and lldb-gdbserver into a single binary
Tamas Berghammer [Wed, 18 Feb 2015 15:39:41 +0000 (15:39 +0000)]
Merge lldb-platform and lldb-gdbserver into a single binary

This commit merges lldb-platform and lldb-gdbserver into a single binary
of the same size as each of the previous individual binaries. Execution
mode is controlled by the first argument being either platform or
gdbserver.

Patch from: flackr <flackr@google.com>

Differential revision: http://reviews.llvm.org/D7545

llvm-svn: 229683

9 years agoFix make_symlink in case when symlink already exists (after r229517)
Ilia K [Wed, 18 Feb 2015 15:30:18 +0000 (15:30 +0000)]
Fix make_symlink in case when symlink already exists (after r229517)

llvm-svn: 229682

9 years agoFix line crossing 80 column border.
Hafiz Abid Qadeer [Wed, 18 Feb 2015 15:25:25 +0000 (15:25 +0000)]
Fix line crossing 80 column border.

llvm-svn: 229681

9 years agoChange representation of member function pointers for MIPS targets
Zoran Jovanovic [Wed, 18 Feb 2015 15:21:35 +0000 (15:21 +0000)]
Change representation of member function pointers for MIPS targets
Differential Revision: http://reviews.llvm.org/D7148

llvm-svn: 229680

9 years ago[ASan/Win] Speculative fix to make the sed command line work with all sed implementations
Timur Iskhodzhanov [Wed, 18 Feb 2015 15:14:07 +0000 (15:14 +0000)]
[ASan/Win] Speculative fix to make the sed command line work with all sed implementations

llvm-svn: 229679

9 years agotsan: fix signal handling during stop-the-world
Dmitry Vyukov [Wed, 18 Feb 2015 15:13:29 +0000 (15:13 +0000)]
tsan: fix signal handling during stop-the-world

Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL.
This breaks programs that handle and continue after SIGSEGV (namely JVM).
See the test and comments for details.

http://reviews.llvm.org/D7722

llvm-svn: 229678

9 years agoUpdated file comment on modularize usage, as it was out-of-date.
John Thompson [Wed, 18 Feb 2015 15:11:12 +0000 (15:11 +0000)]
Updated file comment on modularize usage, as it was out-of-date.

llvm-svn: 229677

9 years agoFix test/CodeGen/atomic_ops.c failure on clang-cmake-mips builder (and others).
Daniel Sanders [Wed, 18 Feb 2015 15:08:37 +0000 (15:08 +0000)]
Fix test/CodeGen/atomic_ops.c failure on clang-cmake-mips builder (and others).

Not all targets generate 'store atomic' instructions for
'_Atomic(_Complex int)'. Some targets use the __atomic_store builtin instead.

This commit makes the test accept either one.

llvm-svn: 229676

9 years ago[mips] Avoid redundant sign extension of the result of binary bitwise instructions.
Vasileios Kalintiris [Wed, 18 Feb 2015 14:57:05 +0000 (14:57 +0000)]
[mips] Avoid redundant sign extension of the result of binary bitwise instructions.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 229675

9 years agoFix typo in make_symlink after r229517. It fixes symlinks on a UNIX style platform.
Ilia K [Wed, 18 Feb 2015 14:16:48 +0000 (14:16 +0000)]
Fix typo in make_symlink after r229517. It fixes symlinks on a UNIX style platform.

llvm-svn: 229674

9 years agoPrevent use after free caused by accessing a member into a dense set.
Daniel Jasper [Wed, 18 Feb 2015 14:13:46 +0000 (14:13 +0000)]
Prevent use after free caused by accessing a member into a dense set.

The member gets invalidated as elements are added to the dense set. Directly
access the underlying pointer instead. Not sure how to create a test case for
this :-(. Maybe Richard can help.

llvm-svn: 229673

9 years agoX86: Use bitset to manage a bag of bits. NFC.
Benjamin Kramer [Wed, 18 Feb 2015 14:10:44 +0000 (14:10 +0000)]
X86: Use bitset to manage a bag of bits. NFC.

Doesn't matter in terms of memory usage or perf here, but it's a neat
simplification.

llvm-svn: 229672

9 years ago[mips] [IAS] Fix using .cpsetup with local labels (PR22518).
Toma Tabacu [Wed, 18 Feb 2015 13:46:53 +0000 (13:46 +0000)]
[mips] [IAS] Fix using .cpsetup with local labels (PR22518).

Summary:
Parse for an MCExpr instead of an Identifier and use the symbol for relocations, not just the symbol's name.

This fixes errors when using local labels in .cpsetup (PR22518).

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: seanbruno, emaste, llvm-commits

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

llvm-svn: 229671

9 years ago[x86] Tighten the assertions to document that canonicalization has
Chandler Carruth [Wed, 18 Feb 2015 11:46:29 +0000 (11:46 +0000)]
[x86] Tighten the assertions to document that canonicalization has
actually removed all but a *very* small number of choices for v2i64.
Also remove dead code handling cases that simply cannot arise.

llvm-svn: 229670

9 years ago[x86] Switch an if which is trivially true to an assert. NFC
Chandler Carruth [Wed, 18 Feb 2015 11:46:27 +0000 (11:46 +0000)]
[x86] Switch an if which is trivially true to an assert. NFC

llvm-svn: 229669

9 years ago[x86] Remove some more 'bit' nomenclature from the generic shift
Chandler Carruth [Wed, 18 Feb 2015 11:46:23 +0000 (11:46 +0000)]
[x86] Remove some more 'bit' nomenclature from the generic shift
lowering.

llvm-svn: 229668

9 years ago[MSan][MIPS] VarArgHelper for MIPS64
Mohit K. Bhakkad [Wed, 18 Feb 2015 11:41:24 +0000 (11:41 +0000)]
[MSan][MIPS] VarArgHelper for MIPS64

Reviewers: Reviewers: eugenis, kcc, samsonov, petarj

Subscribers: dsanders, sagar, llvm-commits

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

llvm-svn: 229667

9 years agoRemove alias template from GDBRemoteCommunicationServerCommon
Tamas Berghammer [Wed, 18 Feb 2015 11:37:46 +0000 (11:37 +0000)]
Remove alias template from GDBRemoteCommunicationServerCommon

It is required because MSVC 2013 doesn't generate correct code for
template aliases.

llvm-svn: 229666

9 years agoEnable ASAN build and test on AArch64
Renato Golin [Wed, 18 Feb 2015 11:34:41 +0000 (11:34 +0000)]
Enable ASAN build and test on AArch64

llvm-svn: 229665

9 years agoFix some warnings in MSVC build.
Hafiz Abid Qadeer [Wed, 18 Feb 2015 11:12:11 +0000 (11:12 +0000)]
Fix some warnings in MSVC build.
Platform.h was causing soem warning due to multiple defined maros.
It already has a define that excludes the singal.h but that was not being
used at correct place. It has been fixed now.

Tested by building on Windows(MSVC) and Linux(gcc).

llvm-svn: 229664

9 years agoFix a typo.
Hafiz Abid Qadeer [Wed, 18 Feb 2015 11:04:17 +0000 (11:04 +0000)]
Fix a typo.

llvm-svn: 229663

9 years ago[x86] Fold together the two shift lowering strategies. They were doing
Chandler Carruth [Wed, 18 Feb 2015 10:40:38 +0000 (10:40 +0000)]
[x86] Fold together the two shift lowering strategies. They were doing
quite literally the same work, we just need to special case the >64-bit
element shift code emission to emit the byte shift instructions and
offsets. This also makes reasoning about each of the vector lowering
strategies easier as we don't have to remember to use both forms.

llvm-svn: 229662

9 years ago[ARM] Add missing M/R class CPUs
Bradley Smith [Wed, 18 Feb 2015 10:34:48 +0000 (10:34 +0000)]
[ARM] Add missing M/R class CPUs

Add some of the missing M and R class Cortex CPUs, namely:

Cortex-M0+ (called Cortex-M0plus for GCC compatibility)
Cortex-M1
SC000
SC300
Cortex-R5

llvm-svn: 229661

9 years ago[ARM] Add missing M/R class CPUs
Bradley Smith [Wed, 18 Feb 2015 10:33:30 +0000 (10:33 +0000)]
[ARM] Add missing M/R class CPUs

Add some of the missing M and R class Cortex CPUs, namely:

Cortex-M0+ (called Cortex-M0plus for GCC compatibility)
Cortex-M1
SC000
SC300
Cortex-R5

llvm-svn: 229660

9 years agoFixes two issue in SimplifyDemandedBits of sext_in_reg:
Michael Kuperstein [Wed, 18 Feb 2015 09:43:40 +0000 (09:43 +0000)]
Fixes two issue in SimplifyDemandedBits of sext_in_reg:
1) We should not try to simplify if the sext has multiple uses
2) There is no need to simplify is the source value is already sign-extended.

Patch by Gil Rapaport <gil.rapaport@intel.com>

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

llvm-svn: 229659

9 years ago[SystemZ] Clean up warning
Ulrich Weigand [Wed, 18 Feb 2015 09:42:23 +0000 (09:42 +0000)]
[SystemZ] Clean up warning

Removed (unreachable) default case in switch to clean up warning:

lib/Target/SystemZ/SystemZISelLowering.cpp:1974:5:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]

llvm-svn: 229658

9 years agotsan: add -Wno-maybe-uninitialized to mingw gcc build flags
Dmitry Vyukov [Wed, 18 Feb 2015 09:37:31 +0000 (09:37 +0000)]
tsan: add -Wno-maybe-uninitialized to mingw gcc build flags

As per discussion with David Blaikie here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150216/260289.html

llvm-svn: 229657

9 years ago[MSan][MIPS] Fix for some failing tests on MIPS64
Mohit K. Bhakkad [Wed, 18 Feb 2015 09:24:19 +0000 (09:24 +0000)]
[MSan][MIPS] Fix for some failing tests on MIPS64

Enabling internal ptrace for mips, which fixes some
ptrace related tests. Along with this fixing some
other failures.

Reviewers: Reviewers: eugenis, kcc, samsonov

Subscribers: dsanders, sagar, lldb-commits

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

llvm-svn: 229656

9 years ago[x86] Refactor the bit shift code the same as I just did the byte shift
Chandler Carruth [Wed, 18 Feb 2015 09:19:58 +0000 (09:19 +0000)]
[x86] Refactor the bit shift code the same as I just did the byte shift
code.

While this didn't have the miscompile (it used MatchLeft consistently)
it missed some cases where it could use right shifts. I've added a test
case Craig Topper came up with to exercise the right shift matching.

This code is really identical between the two. I'm going to merge them
next so that we don't keep two copies of all of this logic.

llvm-svn: 229655

9 years ago[SystemZ] Support all TLS access models - CodeGen part
Ulrich Weigand [Wed, 18 Feb 2015 09:13:27 +0000 (09:13 +0000)]
[SystemZ] Support all TLS access models - CodeGen part

The current SystemZ back-end only supports the local-exec TLS access model.
This patch adds all required CodeGen support for the other TLS models, which
means in particular:

- Expand initial-exec TLS accesses by loading TLS offsets from the GOT
  using @indntpoff relocations.

- Expand general-dynamic and local-dynamic accesses by generating the
  appropriate calls to __tls_get_offset.  Note that this routine has
  a non-standard ABI and requires loading the GOT pointer into %r12,
  so the patch also adds support for the GLOBAL_OFFSET_TABLE ISD node.

- Add a new platform-specific optimization pass to remove redundant
  __tls_get_offset calls in the local-dynamic model (modeled after
  the corresponding X86 pass).

- Add test cases verifying all access models and optimizations.

llvm-svn: 229654

9 years agoTesting commit access
Igor Laevsky [Wed, 18 Feb 2015 09:11:50 +0000 (09:11 +0000)]
Testing commit access

llvm-svn: 229653

9 years ago[SystemZ] Support all TLS access models - MC part
Ulrich Weigand [Wed, 18 Feb 2015 09:11:36 +0000 (09:11 +0000)]
[SystemZ] Support all TLS access models - MC part

The current SystemZ back-end only supports the local-exec TLS access model.
This patch adds all required MC support for the other TLS models, which
means in particular:

- Support additional relocation types for
  Initial-exec model: R_390_TLS_IEENT
  Local-dynamic-model: R_390_TLS_LDO32, R_390_TLS_LDO64,
                       R_390_TLS_LDM32, R_390_TLS_LDM64, R_390_TLS_LDCALL
  General-dynamic model: R_390_TLS_GD32, R_390_TLS_GD64, R_390_TLS_GDCALL

- Support assembler syntax to generate additional relocations
  for use with __tls_get_offset calls:
    :tls_gdcall:
    :tls_ldcall:

The patch also adds a new test to verify fixups and relocations,
and removes the (already unused) FK_390_PLT16DBL/FK_390_PLT32DBL
fixup kinds.

llvm-svn: 229652