platform/upstream/llvm.git
9 years agoAvoid a call to getOrCreateSymbol when we already have the symbol.
Rafael Espindola [Wed, 3 Jun 2015 00:02:40 +0000 (00:02 +0000)]
Avoid a call to getOrCreateSymbol when we already have the symbol.

llvm-svn: 238890

9 years agoInt128 is also a built-in preconstructed type.
Nick Lewycky [Tue, 2 Jun 2015 23:56:53 +0000 (23:56 +0000)]
Int128 is also a built-in preconstructed type.

llvm-svn: 238889

9 years ago[mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mips
Daniel Sanders [Tue, 2 Jun 2015 23:20:40 +0000 (23:20 +0000)]
[mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mips

The test exposes pre-existing bugs when the endian of the host and target do
not match.

llvm-svn: 238888

9 years agoClarify when we can avoid creating names for temp symbols.
Rafael Espindola [Tue, 2 Jun 2015 22:52:13 +0000 (22:52 +0000)]
Clarify when we can avoid creating names for temp symbols.

Some temporary symbols are created by MC itself. These symbols are never used
for lookup and are never included in the object symbol table, so we can
avoid creating a name for them.

Other temporaries are created by CodeGen or by the user by explicitly asking
for a name starting with .L (or L on MachO).

These temporaries behave like regular symbols, we just try to avoid including
them in the object symbol table, but sometimes they end up there:

const char *foo() {
  return "abc" + 3;
}

will have a relocation pointing to a .L symbol.

It just so happens that almost all MC created temporary has the AlwaysAddSuffix
option and CodeGen/user created ones don't.

One interesting future optimization would be to use unnamed symbols for
all temporaries, but that would require use an st_name of 0 or
having the object writer create the names if a symbol does end up in the
symbol table.

No testcase since this just avoid creating a few extra names for MC created
temporaries.

llvm-svn: 238887

9 years agoFix LLDB so that it can correctly track down dependent shared libraries that use...
Greg Clayton [Tue, 2 Jun 2015 22:43:29 +0000 (22:43 +0000)]
Fix LLDB so that it can correctly track down dependent shared libraries that use @rpath.

<rdar://problem/8371885>

llvm-svn: 238886

9 years agoFix typo in tutorial.
Douglas Katzman [Tue, 2 Jun 2015 22:40:27 +0000 (22:40 +0000)]
Fix typo in tutorial.

llvm-svn: 238885

9 years ago[NFC] Fix spelling in comment.
Sanjoy Das [Tue, 2 Jun 2015 22:33:39 +0000 (22:33 +0000)]
[NFC] Fix spelling in comment.

llvm-svn: 238884

9 years ago[RewriteStatepointsForGC] Strip deref info after rewriting.
Sanjoy Das [Tue, 2 Jun 2015 22:33:37 +0000 (22:33 +0000)]
[RewriteStatepointsForGC] Strip deref info after rewriting.

Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logical references.
Logical dereferencability does not imply physical dereferencability and
after RewriteStatepointsForGC has run any attributes that imply
dereferencability of the logical references need to be stripped.

This current approach is conservative, and can be made more precise
later if needed.  For starters, we need to strip dereferencable
attributes only from pointers that live in the GC address space.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

llvm-svn: 238883

9 years ago[NFCI] Change RewriteStatepointsForGC to a ModulePass.
Sanjoy Das [Tue, 2 Jun 2015 22:33:34 +0000 (22:33 +0000)]
[NFCI] Change RewriteStatepointsForGC to a ModulePass.

Summary:
A later change that has RewriteStatepointsForGC change function
attributes throughout the module depends on this.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

llvm-svn: 238882

9 years ago[SelectionDAG] Fix PR23603.
Sanjoy Das [Tue, 2 Jun 2015 22:33:30 +0000 (22:33 +0000)]
[SelectionDAG] Fix PR23603.

Summary:
LLVM's MI level notion of invariant_load is different from LLVM's IR
level notion of invariant_load with respect to dereferenceability.  The
IR notion of invariant_load only guarantees that all *non-faulting*
invariant loads result in the same value.  The MI notion of invariant
load guarantees that the load can be legally moved to any location
within its containing function.  The MI notion of invariant_load is
stronger than the IR notion of invariant_load -- an MI invariant_load is
an IR invariant_load + a guarantee that the location being loaded from
is dereferenceable throughout the function's lifetime.

Reviewers: hfinkel, reames

Subscribers: llvm-commits

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

llvm-svn: 238881

9 years agoRevert changes inadvertantly committed
Marshall Clow [Tue, 2 Jun 2015 22:26:29 +0000 (22:26 +0000)]
Revert changes inadvertantly committed

llvm-svn: 238880

9 years agoMove uncaught_exeption() definition inside the #ifdef block like uncaught_exceptions()
Marshall Clow [Tue, 2 Jun 2015 22:25:23 +0000 (22:25 +0000)]
Move uncaught_exeption() definition inside the #ifdef block like uncaught_exceptions()

llvm-svn: 238879

9 years agoGet rid of some dead code.
Jonathan Peyton [Tue, 2 Jun 2015 22:21:37 +0000 (22:21 +0000)]
Get rid of some dead code.

Some old references to RML and IOMP which aren't used anywhere are deleted.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000664.html

Patch by Jack Howarth and Jonathan Peyton

llvm-svn: 238878

9 years ago[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr
David Majnemer [Tue, 2 Jun 2015 22:15:12 +0000 (22:15 +0000)]
[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr

The MSVC 2013 and 2015 implementation of std::atomic is specialized for
pointer types.  The member functions are implemented using a static_cast
from void-ptr to function-ptr which is not allowed in the standard.
Permit this conversion if -fms-compatibility is present.

This fixes PR23733.

llvm-svn: 238877

9 years agoCorrect DriverInternals.rst: ccc-print-options is gone.
Douglas Katzman [Tue, 2 Jun 2015 22:06:32 +0000 (22:06 +0000)]
Correct DriverInternals.rst: ccc-print-options is gone.

Was removed in svn r189802.

llvm-svn: 238876

9 years agoclang-format: [JS] Always add space after fat arrow.
Daniel Jasper [Tue, 2 Jun 2015 22:06:07 +0000 (22:06 +0000)]
clang-format: [JS] Always add space after fat arrow.

Before:
  return () =>[];

After:
  return () => [];

llvm-svn: 238875

9 years agoTests: disable test of /proc filesystem on Darwin.
Tim Northover [Tue, 2 Jun 2015 21:59:04 +0000 (21:59 +0000)]
Tests: disable test of /proc filesystem on Darwin.

We don't have it. I'm not entirely sure "Posix" is a good name for that
directory, but perhaps we should see how it develops.

llvm-svn: 238874

9 years agoclang-format: [JS] Array literal detection fix #4.
Daniel Jasper [Tue, 2 Jun 2015 21:57:51 +0000 (21:57 +0000)]
clang-format: [JS] Array literal detection fix #4.

llvm-svn: 238873

9 years agoUpdate TestConcurrentEvents to use UnixSignals instead of python signals.
Chaoren Lin [Tue, 2 Jun 2015 21:54:22 +0000 (21:54 +0000)]
Update TestConcurrentEvents to use UnixSignals instead of python signals.

Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 238872

9 years agoFixed the logic to determine the TRIPLE_VERSION correctly when it isn't specified.
Greg Clayton [Tue, 2 Jun 2015 21:42:31 +0000 (21:42 +0000)]
Fixed the logic to determine the TRIPLE_VERSION correctly when it isn't specified.

llvm-svn: 238871

9 years agoFix breakage that I introduced in r238848
Marshall Clow [Tue, 2 Jun 2015 21:40:58 +0000 (21:40 +0000)]
Fix breakage that I introduced in r238848

llvm-svn: 238870

9 years agoAdded the ability for the "make" command to take a triple:
Greg Clayton [Tue, 2 Jun 2015 21:38:10 +0000 (21:38 +0000)]
Added the ability for the "make" command to take a triple:

% cd lldb/test/lang/c/array_types
% make TRIPLE=x86_64-apple-ios
% make clean
% make TRIPLE=x86_64-apple-ios8.1
% make clean
% make TRIPLE=armv7-apple-ios
% make clean
% make TRIPLE=armv7-apple-ios8.1
% make clean

The TRIPLE variable will automatically set the following variables:
    SDKROOT if it isn't specified manually
    ARCH will be set to the architecture from the triple
    CFLAGS will include the extras needed for the triple which are set in TRIPLE_CFLAGS
    TRIPLE_VENDOR set to the triple vendor ("apple" in the above cases)
    TRIPLE_OS set to the triple OS ("ios" in the above cases)
    TRIPLE_VERSION set to the version that was specified, or automatically set to the SDK version if it is missing

This allows you to change directory into any test case on MacOSX and quickly build for desktop:

% make

iOS simulator:

% make TRIPLE=x86_64-apple-ios

or iOS device:

% make TRIPLE=armv7-apple-ios

llvm-svn: 238869

9 years agoPass a MCSymbolELF to a few ELF only functions. NFC.
Rafael Espindola [Tue, 2 Jun 2015 21:30:13 +0000 (21:30 +0000)]
Pass a MCSymbolELF to a few ELF only functions. NFC.

llvm-svn: 238868

9 years ago[IR/AsmWriter] Output escape sequences if the first character isdigit()
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:08 +0000 (21:25 +0000)]
[IR/AsmWriter] Output escape sequences if the first character isdigit()

If the first character in a metadata attachment's name is a digit, it has
to be output using an escape sequence, otherwise it's not valid text IR.

Removed an over-zealous assert from LLVMContext which didn't allow this.
The rule should only apply to text IR. Actual names can have any sequence
of non-NUL bytes.

Also added some documentation on accepted names.

Bug found with AFL fuzz.

llvm-svn: 238867

9 years agoCHECK-LABEL-ize test. NFC
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:03 +0000 (21:25 +0000)]
CHECK-LABEL-ize test. NFC

llvm-svn: 238866

9 years agoclang-format a few functions. NFC
Filipe Cabecinhas [Tue, 2 Jun 2015 21:25:00 +0000 (21:25 +0000)]
clang-format a few functions. NFC

llvm-svn: 238865

9 years agoMerge MCELF.h into MCSymbolELF.h.
Rafael Espindola [Tue, 2 Jun 2015 20:38:46 +0000 (20:38 +0000)]
Merge MCELF.h into MCSymbolELF.h.

Now that we have a dedicated type for ELF symbol, these helper functions can
become member function of MCSymbolELF.

llvm-svn: 238864

9 years ago[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Daniel Sanders [Tue, 2 Jun 2015 20:32:50 +0000 (20:32 +0000)]
[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.

Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

Previous attempts at committing this broke the buildbots due to bugs in IAS.
These bugs have now been fixed so trying again.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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

llvm-svn: 238863

9 years agoFix up some comments to be more explicit. Remove some long-commented out code.
Jim Ingham [Tue, 2 Jun 2015 20:26:13 +0000 (20:26 +0000)]
Fix up some comments to be more explicit.  Remove some long-commented out code.

llvm-svn: 238862

9 years ago[x86-64 ABI] Fix for PR23082: an assertion failure when passing/returning a wrapper...
Andrea Di Biagio [Tue, 2 Jun 2015 19:34:40 +0000 (19:34 +0000)]
[x86-64 ABI] Fix for PR23082: an assertion failure when passing/returning a wrapper union in a full YMM register.

This patch fixes an assertion failure in method
'X86_64ABIInfo::GetByteVectorType'.

Method 'GetByteVectorType' (in TargetInfo.cpp) is responsible
for mapping a QualType 'Ty' (for an argument or return value) to an LLVM IR
type that, according to the ABI, must be passed in a XMM/YMM vector register.

When selecting the IR vector type, method 'GetByteVectorType' always tries to
choose the "best" IR vector type for the 'Ty' in input. In particular, if Ty
is a wrapper structure, it keeps unwrapping it until it finds a vector type VTy.
That VTy is the "preferred IR type".

However, function 'isSingleElementStructure' (used to unwrap structures) does
not know how to look through union types. So, before this patch, if Ty was in
a nest of wrapper structures with at least two union types, we would have
triggered an assertion failure (added at revision 230971).

With this patch, if method 'GetByteVectorType' fails to find the preferred
vector type, we just return a valid (although potentially 'less friendly')
vector type based on the type size. So, rather than asserting on an 'unexpected'
'Ty' in input, we conservatively return vector type <2 x double> if Ty is 16
bytes, or <4 x double> if Ty is 32 bytes.

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

llvm-svn: 238861

9 years agoFix PlatformAndroid::PutFile to support relative destination paths.
Oleksiy Vyalov [Tue, 2 Jun 2015 19:29:48 +0000 (19:29 +0000)]
Fix PlatformAndroid::PutFile to support relative destination paths.

llvm-svn: 238860

9 years agoUse wildcard instead of relying on shell globbing.
Chaoren Lin [Tue, 2 Jun 2015 19:07:26 +0000 (19:07 +0000)]
Use wildcard instead of relying on shell globbing.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 238859

9 years agoAArch64: fix typo in SMIN far atomics and add tests
Tim Northover [Tue, 2 Jun 2015 18:37:20 +0000 (18:37 +0000)]
AArch64: fix typo in SMIN far atomics and add tests

llvm-svn: 238858

9 years agoCheck that debugger is valid before enumerating targets.
Chaoren Lin [Tue, 2 Jun 2015 18:31:57 +0000 (18:31 +0000)]
Check that debugger is valid before enumerating targets.

Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 238857

9 years agoTestGlobalVariables no longer fails on FreeBSD
Ed Maste [Tue, 2 Jun 2015 18:29:42 +0000 (18:29 +0000)]
TestGlobalVariables no longer fails on FreeBSD

It has passed since ~ r223393.

llvm.org/21599

llvm-svn: 238856

9 years agoadd missing dependency for CodeGen lib
Sanjay Patel [Tue, 2 Jun 2015 18:02:13 +0000 (18:02 +0000)]
add missing dependency for CodeGen lib

This looks to be exposed on some bots by r238851.

llvm-svn: 238855

9 years agoDebugInfo: Really support 2^16 arguments in a subprogram
Duncan P. N. Exon Smith [Tue, 2 Jun 2015 17:17:44 +0000 (17:17 +0000)]
DebugInfo: Really support 2^16 arguments in a subprogram

As a follow-up to r235955, actually support up to 65535 arguments in a
subprogram.  r235955 missed assembly support, having only tested the new
limit via C++ unit tests.  Code patch by Amjad Aboud.

llvm-svn: 238854

9 years agoDebugInfo: Rename testcases from MD* to DI*, NFC
Duncan P. N. Exon Smith [Tue, 2 Jun 2015 17:13:25 +0000 (17:13 +0000)]
DebugInfo: Rename testcases from MD* to DI*, NFC

As a follow-up to r236120, rename testcases to match the new names.

llvm-svn: 238853

9 years agoUse new get_signal_number utility function for tests.
Chaoren Lin [Tue, 2 Jun 2015 17:01:13 +0000 (17:01 +0000)]
Use new get_signal_number utility function for tests.

Summary:
This fixes TestLldbGdbServer and TestSendSignal from Windows to Android.
This change depends on D10171.

Reviewers: clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238852

9 years agoadd the -mrecip driver flag and process its options (2nd try)
Sanjay Patel [Tue, 2 Jun 2015 16:55:12 +0000 (16:55 +0000)]
add the -mrecip driver flag and process its options (2nd try)

The first try to land this (r238055) was reverted due to bot failures
caused by the LLVM part of the patch. That was hopefully fixed by r238788,
and the LLVM patch was resubmitted at r238842.

This is the front-end counterpart to D8982.

The -mrecip option interface is based on maintaining compatibility with gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289

...while adding more functionality (allowing users to specify the number of refinement steps for each
estimate type).

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

llvm-svn: 238851

9 years agoAdded utility function to get correct signal number from remote platform.
Chaoren Lin [Tue, 2 Jun 2015 16:46:28 +0000 (16:46 +0000)]
Added utility function to get correct signal number from remote platform.

Summary:
This change adds a utility that uses the `kill -l` command to get the
correct signal number. Falls back to using `SBUnixSignals`, and finally
`signal.SIG<signal>` if all else fails.

Reviewers: tberghammer, clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238850

9 years agoFix OBJCOPY and AR for Android.
Chaoren Lin [Tue, 2 Jun 2015 16:43:19 +0000 (16:43 +0000)]
Fix OBJCOPY and AR for Android.

Summary:
Previously, OBJCOPY was empty because of the missing comma,
and ar was just `ar`.

Reviewers: ovyalov, tberghammer

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238849

9 years agoImplement the first part of N4258 - allocator_traits<X>::is_always_equal. Also fixes...
Marshall Clow [Tue, 2 Jun 2015 16:34:03 +0000 (16:34 +0000)]
Implement the first part of N4258 - allocator_traits<X>::is_always_equal. Also fixes PR#23723

llvm-svn: 238848

9 years agoRemove unused KMP_IOMP_NAME macro from kmp.h
Jonathan Peyton [Tue, 2 Jun 2015 16:19:44 +0000 (16:19 +0000)]
Remove unused KMP_IOMP_NAME macro from kmp.h

Getting rid of more iomp references.
http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000659.html

llvm-svn: 238847

9 years agoImplement uncaught_exceptions() using the newly added hooks in libc++abi, when available
Marshall Clow [Tue, 2 Jun 2015 15:33:38 +0000 (15:33 +0000)]
Implement uncaught_exceptions() using the newly added hooks in libc++abi, when available

llvm-svn: 238846

9 years agoclang-format: Don't try to detect C++ lambdas in other languages.
Daniel Jasper [Tue, 2 Jun 2015 15:31:37 +0000 (15:31 +0000)]
clang-format: Don't try to detect C++ lambdas in other languages.

llvm-svn: 238845

9 years ago[mips][mcjit] Add support for R_MIPS_PC32.
Daniel Sanders [Tue, 2 Jun 2015 15:28:29 +0000 (15:28 +0000)]
[mips][mcjit] Add support for R_MIPS_PC32.

Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.

Also fixed a nearby typo.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

llvm-svn: 238844

9 years agoPush constness through LoopInfo::isLoopHeader and clean it up a bit.
Benjamin Kramer [Tue, 2 Jun 2015 15:28:27 +0000 (15:28 +0000)]
Push constness through LoopInfo::isLoopHeader and clean it up a bit.

NFC.

llvm-svn: 238843

9 years agomake reciprocal estimate code generation more flexible by adding command-line options...
Sanjay Patel [Tue, 2 Jun 2015 15:28:15 +0000 (15:28 +0000)]
make reciprocal estimate code generation more flexible by adding command-line options (2nd try)

The first try (r238051) to land this was reverted due to bot failures
that were hopefully addressed by r238788.

This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.

The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.

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

llvm-svn: 238842

9 years agoclang-format: [JS] Fix incorrect line length calculation.
Daniel Jasper [Tue, 2 Jun 2015 15:14:21 +0000 (15:14 +0000)]
clang-format: [JS] Fix incorrect line length calculation.

llvm-svn: 238841

9 years agoChange Intel(R) OpenMP* to LLVM* OpenMP* in libomp.rc.var
Jonathan Peyton [Tue, 2 Jun 2015 15:06:08 +0000 (15:06 +0000)]
Change Intel(R) OpenMP* to LLVM* OpenMP* in libomp.rc.var

Missed some places that referenced the Intel(R) OpenMP* Runtime Library.

llvm-svn: 238840

9 years agoclang-format: [JS] Array literal detection fix #3.
Daniel Jasper [Tue, 2 Jun 2015 15:04:29 +0000 (15:04 +0000)]
clang-format: [JS] Array literal detection fix #3.

llvm-svn: 238839

9 years ago[mips] Add RuntimeDyld tests for currently supported O32 relocations.
Daniel Sanders [Tue, 2 Jun 2015 15:01:25 +0000 (15:01 +0000)]
[mips] Add RuntimeDyld tests for currently supported O32 relocations.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

llvm-svn: 238838

9 years ago[ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!
Yury Gribov [Tue, 2 Jun 2015 14:59:26 +0000 (14:59 +0000)]
[ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!

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

llvm-svn: 238837

9 years agoMark TestHelloWorld as XTIMEOUT for Linux
Tamas Berghammer [Tue, 2 Jun 2015 14:45:25 +0000 (14:45 +0000)]
Mark TestHelloWorld as XTIMEOUT for Linux

It is times out on the build bot ~10% of the times

llvm-svn: 238836

9 years agoclang-format: [JS] Fix another regression when detecting array literals.
Daniel Jasper [Tue, 2 Jun 2015 14:20:08 +0000 (14:20 +0000)]
clang-format: [JS] Fix another regression when detecting array literals.

llvm-svn: 238835

9 years agoAVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lower...
Elena Demikhovsky [Tue, 2 Jun 2015 14:12:54 +0000 (14:12 +0000)]
AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lowering for all these forms.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)

llvm-svn: 238834

9 years agoSkip TestChangeProcessGroup on FreeBSD for now
Ed Maste [Tue, 2 Jun 2015 14:11:25 +0000 (14:11 +0000)]
Skip TestChangeProcessGroup on FreeBSD for now

It consistently times out. The test is already XTIMEOUT'd, but causes
tests to take an extra 5 minutes waiting for the timeout to expire.

llvm.org/pr23731

llvm-svn: 238833

9 years agoclang-format: [JS] Fix regression of detecting array literals.
Daniel Jasper [Tue, 2 Jun 2015 13:56:43 +0000 (13:56 +0000)]
clang-format: [JS] Fix regression of detecting array literals.

llvm-svn: 238832

9 years agoFix some places where we could call memmove(null,xxx,0) - which is UB
Marshall Clow [Tue, 2 Jun 2015 13:52:16 +0000 (13:52 +0000)]
Fix some places where we could call memmove(null,xxx,0) - which is UB

llvm-svn: 238831

9 years agoAVX-512: Shorten implementation of lowerV16X32VectorShuffle()
Elena Demikhovsky [Tue, 2 Jun 2015 13:43:18 +0000 (13:43 +0000)]
AVX-512: Shorten implementation of lowerV16X32VectorShuffle()
using lowerVectorShuffleWithSHUFPS() and other shuffle-helpers routines.
Added matching of VALIGN instruction.

llvm-svn: 238830

9 years ago[mips] Add support for dynamic stack realignment.
Vasileios Kalintiris [Tue, 2 Jun 2015 13:14:46 +0000 (13:14 +0000)]
[mips] Add support for dynamic stack realignment.

Summary:
With this change we are able to realign the stack dynamically, whenever it
contains objects with alignment requirements that are larger than the
alignment specified from the given ABI.

We have to use the $fp register as the frame pointer when we perform
dynamic stack realignment. In complex stack frames, with variably-sized
objects, we reserve additionally the callee-saved register $s7 as the
base pointer in order to reference locals.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 238829

9 years agoIn the case where we are copying/moving zero elements, do less work
Marshall Clow [Tue, 2 Jun 2015 13:04:18 +0000 (13:04 +0000)]
In the case where we are copying/moving zero elements, do less work

llvm-svn: 238828

9 years agoImplement uncaught_exceptions() to get a count, rather than a bool. Update the libc...
Marshall Clow [Tue, 2 Jun 2015 13:03:17 +0000 (13:03 +0000)]
Implement uncaught_exceptions() to get a count, rather than a bool. Update the libc++abi version. Reviewed as reviews.llvm.org/D10067

llvm-svn: 238827

9 years agoUn-enable TestEvents test on linux
Pavel Labath [Tue, 2 Jun 2015 12:50:25 +0000 (12:50 +0000)]
Un-enable TestEvents test on linux

Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion.

llvm-svn: 238826

9 years agoUpdate for LLVM api change.
Rafael Espindola [Tue, 2 Jun 2015 12:05:36 +0000 (12:05 +0000)]
Update for LLVM api change.

llvm-svn: 238825

9 years agoSimplify now that we always use an alignment of 2 for ELF files.
Rafael Espindola [Tue, 2 Jun 2015 12:05:27 +0000 (12:05 +0000)]
Simplify now that we always use an alignment of 2 for ELF files.

This saves 123144 bytes out of llvm-nm on powerpc64le.

llvm-svn: 238824

9 years agoMake vim also output a helpful message in some error cases.
Manuel Klimek [Tue, 2 Jun 2015 12:01:50 +0000 (12:01 +0000)]
Make vim also output a helpful message in some error cases.

When clang-format encounters a syntax error, it will not format that
line; we're now using the same mechanism we're already using in emacs to
show a helpful error message to the user.

llvm-svn: 238823

9 years agoRemove error message when using the fallback style.
Manuel Klimek [Tue, 2 Jun 2015 11:52:15 +0000 (11:52 +0000)]
Remove error message when using the fallback style.

llvm-svn: 238822

9 years agoRevert "ARM: Thumb2 LDRD/STRD supports independent input/output regs"
Renato Golin [Tue, 2 Jun 2015 11:47:30 +0000 (11:47 +0000)]
Revert "ARM: Thumb2 LDRD/STRD supports independent input/output regs"

This reverts commit r238795, as it broke the Thumb2 self-hosting buildbot.

Since self-hosting issues with Clang are hard to investigate, I'm taking the
liberty to revert now, so we can investigate it offline.

llvm-svn: 238821

9 years ago[LLDB][MIPS] MIPS64 Branch instruction emulation for SW single stepping
Mohit K. Bhakkad [Tue, 2 Jun 2015 11:22:29 +0000 (11:22 +0000)]
[LLDB][MIPS] MIPS64 Branch instruction emulation for SW single stepping
Patch by Jaydeep Patil

Reviewers: clayborg, jasonmolenda
Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D10155

llvm-svn: 238820

9 years agoChange use of keyword 'or' to '||' as keyword not supported by visual studio 2013.
Aidan Dodds [Tue, 2 Jun 2015 11:20:44 +0000 (11:20 +0000)]
Change use of keyword 'or' to '||'  as keyword not supported by visual studio 2013.

llvm-svn: 238819

9 years ago[AArch64] Add v8.1a atomic instructions
Vladimir Sukharev [Tue, 2 Jun 2015 10:58:41 +0000 (10:58 +0000)]
[AArch64] Add v8.1a atomic instructions

Patch by: Tom Coxon

Reviewers: t.p.northover

Subscribers: llvm-commits

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

llvm-svn: 238818

9 years ago[mips] [IAS] Reformat mips-expansions.s. NFC.
Toma Tabacu [Tue, 2 Jun 2015 10:34:10 +0000 (10:34 +0000)]
[mips] [IAS] Reformat mips-expansions.s. NFC.

Summary:
Make mips-expansions.s more readable by grouping the instructions with their respective CHECK's.
This test is going to get a lot bigger soon and it will become essentially unreadable if the current formatting is kept.

I've also made the comments more useful and accurate, and I've restricted the RUN lines to under 80 columns.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 238817

9 years agoEnable TestEvents test on linux
Pavel Labath [Tue, 2 Jun 2015 10:19:33 +0000 (10:19 +0000)]
Enable TestEvents test on linux

This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It
seems to work fine with LLGS, so I'm enabling it.

llvm-svn: 238816

9 years ago[mips] Test both %dtprel_hi and %dtprel_lo instead of testing %dtprel_hi twice.
Daniel Sanders [Tue, 2 Jun 2015 10:09:08 +0000 (10:09 +0000)]
[mips] Test both %dtprel_hi and %dtprel_lo instead of testing %dtprel_hi twice.

The second %dtprel_hi is used on an addiu so it looks like a copy/paste error.

llvm-svn: 238815

9 years ago[mips] Expand tabs in test/MC/Mips/mips-relocations.s
Daniel Sanders [Tue, 2 Jun 2015 10:02:00 +0000 (10:02 +0000)]
[mips] Expand tabs in test/MC/Mips/mips-relocations.s

llvm-svn: 238814

9 years ago[mips] [IAS] Add support for the .set softfloat/hardfloat directives.
Toma Tabacu [Tue, 2 Jun 2015 09:48:04 +0000 (09:48 +0000)]
[mips] [IAS] Add support for the .set softfloat/hardfloat directives.

Summary: These directives are used to set the current value of the SoftFloat feature.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits, mpf

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

llvm-svn: 238813

9 years ago[Mips] Fix enumeral vs. non-enumeral warning in ternary. NFC
Denis Protivensky [Tue, 2 Jun 2015 09:22:38 +0000 (09:22 +0000)]
[Mips] Fix enumeral vs. non-enumeral warning in ternary. NFC

That's a weird gcc's complain.

llvm-svn: 238812

9 years agoAVX-512: Implemented VFIXUPIMMSD and VFIXUPIMMSS instructions for KNL
Elena Demikhovsky [Tue, 2 Jun 2015 08:28:57 +0000 (08:28 +0000)]
AVX-512: Implemented VFIXUPIMMSD and VFIXUPIMMSS instructions for KNL
Implemented DAG lowering for all these forms.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)

llvm-svn: 238811

9 years agorevert 238809
Asaf Badouh [Tue, 2 Jun 2015 07:45:19 +0000 (07:45 +0000)]
revert 238809

llvm-svn: 238810

9 years agoAVX-512: Implemented GETEXP instruction for KNL and SKX
Asaf Badouh [Tue, 2 Jun 2015 07:18:14 +0000 (07:18 +0000)]
AVX-512: Implemented GETEXP instruction for KNL and SKX
Added rounding mode modifier for SQRTPS/PD
Added tests for encoding and intrinsics.

llvm-svn: 238809

9 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Tue, 2 Jun 2015 06:19:28 +0000 (06:19 +0000)]
[TableGen] Use range-based for loops. NFC

llvm-svn: 238808

9 years agoFix typo in comment. NFC
Craig Topper [Tue, 2 Jun 2015 06:19:25 +0000 (06:19 +0000)]
Fix typo in comment. NFC

llvm-svn: 238807

9 years ago[TableGen] Rename ListInit::getSize to just 'size' to be more consistent.
Craig Topper [Tue, 2 Jun 2015 04:15:57 +0000 (04:15 +0000)]
[TableGen] Rename ListInit::getSize to just 'size' to be more consistent.

llvm-svn: 238806

9 years ago[TableGen] Use range-based for loops. NFC.
Craig Topper [Tue, 2 Jun 2015 04:15:51 +0000 (04:15 +0000)]
[TableGen] Use range-based for loops. NFC.

llvm-svn: 238805

9 years ago[RuntimeDydlELF] Use range-based loop.
Davide Italiano [Tue, 2 Jun 2015 01:52:28 +0000 (01:52 +0000)]
[RuntimeDydlELF] Use range-based loop.

Differential Revision: http://reviews.llvm.org/D10165
Reviewed by: rafael

llvm-svn: 238804

9 years agoAdd missing return statements in C++03 std::function
Eric Fiselier [Tue, 2 Jun 2015 01:31:33 +0000 (01:31 +0000)]
Add missing return statements in C++03 std::function

llvm-svn: 238803

9 years agoAdd TODO items and remove use of 'noexcept' in C++03 test.
Eric Fiselier [Tue, 2 Jun 2015 01:25:34 +0000 (01:25 +0000)]
Add TODO items and remove use of 'noexcept' in C++03 test.

llvm-svn: 238802

9 years agoCreate a MCSymbolELF.
Rafael Espindola [Tue, 2 Jun 2015 00:25:12 +0000 (00:25 +0000)]
Create a MCSymbolELF.

This create a MCSymbolELF class and moves SymbolSize since only ELF
needs a size expression.

This reduces the size of MCSymbol from 56 to 48 bytes.

llvm-svn: 238801

9 years agoMC: Tidy up LOH naming a bit. NFC.
Jim Grosbach [Mon, 1 Jun 2015 23:55:06 +0000 (23:55 +0000)]
MC: Tidy up LOH naming a bit. NFC.

llvm-svn: 238800

9 years agoMC: Tidy up formatting a bit. NFC.
Jim Grosbach [Mon, 1 Jun 2015 23:55:02 +0000 (23:55 +0000)]
MC: Tidy up formatting a bit. NFC.

llvm-svn: 238799

9 years ago[Support] Simplify Triple::getOSVersion
David Majnemer [Mon, 1 Jun 2015 23:45:25 +0000 (23:45 +0000)]
[Support] Simplify Triple::getOSVersion

Those who are interested in the Android version can use
getEnvironmentVersion instead of getOSVersion.

llvm-svn: 238798

9 years ago[Basic] Transition getEnvironmentVersion from getOSVersion for android
David Majnemer [Mon, 1 Jun 2015 23:38:25 +0000 (23:38 +0000)]
[Basic] Transition getEnvironmentVersion from getOSVersion for android

'android' occupies the environment component of the triple.  Let's use
getEnvironmentVersion to extract it instead of getOSVersion.

llvm-svn: 238797

9 years ago[ADT] Add Triple::getEnvironmentVersion
David Majnemer [Mon, 1 Jun 2015 23:38:09 +0000 (23:38 +0000)]
[ADT] Add Triple::getEnvironmentVersion

This allows us to extract version numbers from the environment.
getOSVersion is currently overloaded for that purpose, this allows us to
clean it up.

llvm-svn: 238796

9 years agoARM: Thumb2 LDRD/STRD supports independent input/output regs
Matthias Braun [Mon, 1 Jun 2015 23:27:08 +0000 (23:27 +0000)]
ARM: Thumb2 LDRD/STRD supports independent input/output regs

The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.

Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.

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

llvm-svn: 238795

9 years agoFix a race condition where 2 threads might try to call Process::SetExitStatus() at...
Greg Clayton [Mon, 1 Jun 2015 23:14:09 +0000 (23:14 +0000)]
Fix a race condition where 2 threads might try to call Process::SetExitStatus() at the same time.

The problem was the mutex was only protecting the setting of m_exit_string and m_exit_string, but this function relies on the m_private_state being set to eStateExited in order to prevent more than 1 client setting the exit status. We want to only allow the first caller to succeed.

On MacOSX we have a thread that reaps the process we are debugging, and we also have a thread that monitors the debugserver process. When a process exists, the ProcessGDBRemote::AsyncThread() would set the exit status to the correct value and then another thread would reap the debugserver process and they would often both end up in Process::SetExitStatus() at the same time. With the mutex at the top we allow all variables to be set and the m_private_state to be set to eStateExited _before_ the other thread (debugserver reaped) can try to set th exist status to -1 and "lost connection to debugserver" being set as the exit status.

This was probably an issue for lldb-server as well and could very well cleanup some tests that might have been expecting a specific exit status from the process being debugged.

llvm-svn: 238794

9 years agoAArch64: Use CMP;CCMP sequences for and/or/setcc trees.
Matthias Braun [Mon, 1 Jun 2015 22:31:17 +0000 (22:31 +0000)]
AArch64: Use CMP;CCMP sequences for and/or/setcc trees.

Previously CCMP/FCCMP instructions were only used by the
AArch64ConditionalCompares pass for control flow. This patch uses them
for SELECT like instructions as well by matching patterns in ISelLowering.

PR20927, rdar://18326194

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

llvm-svn: 238793

9 years ago[bpf] fix build
Alexei Starovoitov [Mon, 1 Jun 2015 22:24:36 +0000 (22:24 +0000)]
[bpf] fix build

fix breakage due to r238634

Patch by Vijay Subramanian.

llvm-svn: 238792

9 years agoMove the name pointer out of Value into a map that lives on the
Owen Anderson [Mon, 1 Jun 2015 22:24:01 +0000 (22:24 +0000)]
Move the name pointer out of Value into a map that lives on the
LLVMContext.  Production builds of clang do not set names on most
Value's, so this is wasted space on almost all subclasses of Value.
This reduces the size of all Value subclasses by 8 bytes on 64 bit
hosts.

The one tricky part of this change is averting compile time regression
by keeping Value::hasName() fast.  This required stealing bits out of
NumOperands.

With this change, peak memory usage on verify-uselistorder-nodbg.lto.bc
is decreased by approximately 2.3% (~3MB absolute on my machine).

llvm-svn: 238791