platform/upstream/llvm.git
8 years agoFix typo
Xinliang David Li [Tue, 8 Dec 2015 22:51:40 +0000 (22:51 +0000)]
Fix typo

llvm-svn: 255068

8 years ago[PPC64, TSAN] Enable thread sanitizer for PPC64
Bill Schmidt [Tue, 8 Dec 2015 22:48:02 +0000 (22:48 +0000)]
[PPC64, TSAN] Enable thread sanitizer for PPC64

Patch by Simone Atzeni.

This enables the -fsanitize=thread flag for PPC64 and PPC64LE.

llvm-svn: 255067

8 years agoObjective-C properties: fix bogus use of "isa<>" on a QualType.
Douglas Gregor [Tue, 8 Dec 2015 22:45:17 +0000 (22:45 +0000)]
Objective-C properties: fix bogus use of "isa<>" on a QualType.

The code used "isa" to check the type and then "getAs" to look through
sugar; we need to look through the sugar when checking, too, otherwise
any kind of sugar (nullability qualifiers in the example; or a
typedef) will thwart this semantic check. Fixes rdar://problem/23804250.

llvm-svn: 255066

8 years agoModule file extensions: pass a Sema through to the extension writer.
Douglas Gregor [Tue, 8 Dec 2015 22:43:32 +0000 (22:43 +0000)]
Module file extensions: pass a Sema through to the extension writer.

Module file extensions are likely to need access to
Sema/Preprocessor/ASTContext, and cannot get it through other
sources.

llvm-svn: 255065

8 years agoRemove caching in FunctionImport: a Module can't be reused after being linked from
Mehdi Amini [Tue, 8 Dec 2015 22:39:40 +0000 (22:39 +0000)]
Remove caching in FunctionImport: a Module can't be reused after being linked from

The Linker destroys the source module (API change coming to make it explicit)

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255064

8 years agoRevert "[CGP] Check that we have an insert point before moving llvm.dbg.value around"
Reid Kleckner [Tue, 8 Dec 2015 22:33:23 +0000 (22:33 +0000)]
Revert "[CGP] Check that we have an insert point before moving llvm.dbg.value around"

This reverts commit r255055.

Breakage has been reported.

llvm-svn: 255063

8 years ago[OperandBundles] Fix a transform in simplifycfg
Sanjoy Das [Tue, 8 Dec 2015 22:26:08 +0000 (22:26 +0000)]
[OperandBundles] Fix a transform in simplifycfg

Reviewers: pcc, majnemer, reames

Subscribers: reames, llvm-commits

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

llvm-svn: 255062

8 years ago[X86][AVX] Fold loads + splats into broadcast instructions
Simon Pilgrim [Tue, 8 Dec 2015 22:17:11 +0000 (22:17 +0000)]
[X86][AVX] Fold loads + splats into broadcast instructions

On AVX and AVX2, BROADCAST instructions can load a scalar into all elements of a target vector.

This patch improves the lowering of 'splat' shuffles of a loaded vector into a broadcast - currently the lowering only works for cases where we are splatting the zero'th element, which is now generalised to any element.

Fix for PR23022

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

llvm-svn: 255061

8 years agoRemove the -c option from dotest.py.
Zachary Turner [Tue, 8 Dec 2015 22:15:48 +0000 (22:15 +0000)]
Remove the -c option from dotest.py.

This seems to be a legacy relic from days gone by where the
remote test suite runner operated completely differently than it
does today.  git blames and comments traced this functionality
back to about 2012, and nobody seems to know anything about it
now.

llvm-svn: 255060

8 years ago[PPC64, TSAN] Provide setjmp interceptor support for PPC64
Bill Schmidt [Tue, 8 Dec 2015 22:14:34 +0000 (22:14 +0000)]
[PPC64, TSAN] Provide setjmp interceptor support for PPC64

This patch provides the assembly support for setjmp/longjmp for use
with the thread sanitizer.  This is a big more complicated than for
aarch64, because sibcalls are only legal under our ABIs if the TOC
pointer is unchanged.  Since the true setjmp function trashes the TOC
pointer, and we have to leave the stack in a correct state, we emulate
the setjmp function rather than branching to it.

We also need to materialize the TOC for cases where the _setjmp code
is called from libc.  This is done differently under the ELFv1 and
ELFv2 ABIs.

llvm-svn: 255059

8 years ago[Sema] Add warning when comparing nonnull and null
George Burgess IV [Tue, 8 Dec 2015 22:02:00 +0000 (22:02 +0000)]
[Sema] Add warning when comparing nonnull and null

Currently, we emit warnings in some cases where nonnull function
parameters are compared against null. This patch extends this support
to warn when comparing the result of `returns_nonnull` functions
against null.

More specifically, we will now warn cases like:

int *foo() __attribute__((returns_nonnull));
int main() {
  if (foo() == NULL) {} // warning: will always evaluate to false
}

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

llvm-svn: 255058

8 years ago[PPC64, TSAN] LLVM basic enablement of thread sanitizer for PPC64 (BE and LE)
Bill Schmidt [Tue, 8 Dec 2015 21:54:39 +0000 (21:54 +0000)]
[PPC64, TSAN] LLVM basic enablement of thread sanitizer for PPC64 (BE and LE)

This patch is by Simone Atzeni with portions by Adhemerval Zanella.

This contains the LLVM patches to enable the thread sanitizer for
PPC64, both big- and little-endian.  Two different virtual memory
sizes are supported:  Old kernels use a 44-bit address space, while
newer kernels require a 46-bit address space.

There are two companion patches that will be added shortly.  There is
a Clang patch to actually turn on the use of the thread sanitizer for
PPC64.  There is also a patch that I wrote to provide interceptor
support for setjmp/longjmp on PPC64.

Patch discussion at reviews.llvm.org/D12841.

llvm-svn: 255057

8 years ago[CMake] Ignore externalizing debuginfo for unit tests
Chris Bieneman [Tue, 8 Dec 2015 21:51:48 +0000 (21:51 +0000)]
[CMake] Ignore externalizing debuginfo for unit tests

If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test.

llvm-svn: 255056

8 years ago[CGP] Check that we have an insert point before moving llvm.dbg.value around
Reid Kleckner [Tue, 8 Dec 2015 21:50:52 +0000 (21:50 +0000)]
[CGP] Check that we have an insert point before moving llvm.dbg.value around

llvm-svn: 255055

8 years ago[EarlyCSE] Value forwarding for unordered atomics
Philip Reames [Tue, 8 Dec 2015 21:45:41 +0000 (21:45 +0000)]
[EarlyCSE] Value forwarding for unordered atomics

This patch teaches the fully redundant load part of EarlyCSE how to forward from atomic and volatile loads and stores, and how to eliminate unordered atomics (only). This patch does not include dead store elimination support for unordered atomics, that will follow in the near future.

The basic idea is that we allow all loads and stores to be tracked by the AvailableLoad table. We store a bit in the table which tracks whether load/store was atomic, and then only replace atomic loads with ones which were also atomic.

No attempt is made to refine our handling of ordered loads or stores. Those are still treated as full fences. We could pretty easily extend the release fence handling to release stores, but that should be a separate patch.

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

llvm-svn: 255054

8 years ago[X86][SSE4A] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:43:41 +0000 (21:43 +0000)]
[X86][SSE4A] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse4a-builtins.c

llvm-svn: 255053

8 years ago[X86][SSSE3] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:32:08 +0000 (21:32 +0000)]
[X86][SSSE3] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/ssse3-builtins.c

llvm-svn: 255052

8 years ago[X86][SSE3] Added fast-isel intrinsics tests
Simon Pilgrim [Tue, 8 Dec 2015 21:27:19 +0000 (21:27 +0000)]
[X86][SSE3] Added fast-isel intrinsics tests

As discussed on PR24580, this patch adds fast-isel codegen tests to match the IR generated in clang/test/CodeGen/sse3-builtins.c

llvm-svn: 255051

8 years ago[X86][AVX2] Stripped backend codegen tests
Simon Pilgrim [Tue, 8 Dec 2015 21:16:45 +0000 (21:16 +0000)]
[X86][AVX2] Stripped backend codegen tests

As discussed on the ml, backend tests need to be put in llvm/test/CodeGen/X86 as fast-isel tests using IR that is as close to what is generated here as possible.

The llvm tests will (re)added in a future commit.

llvm-svn: 255050

8 years agoRemove default case in switch which covers all enumeration values
Ed Maste [Tue, 8 Dec 2015 20:50:35 +0000 (20:50 +0000)]
Remove default case in switch which covers all enumeration values

This also conveniently eliminates another warning from the unintentional
use of a trigraph:

warning: trigraph converted to '[' character [-Wtrigraphs]
        default: printf("???(%u)", type);
                          ^
llvm-svn: 255049

8 years agoRemove the -X option from dotest.py
Zachary Turner [Tue, 8 Dec 2015 20:36:22 +0000 (20:36 +0000)]
Remove the -X option from dotest.py

This removes the option to exclude a single directory.  This is
part of an effort to remove unused options and cleanup the interface
to the test suite.

llvm-svn: 255048

8 years agoFix ARMv4T (Thumb1) epilogue generation
Artyom Skrobov [Tue, 8 Dec 2015 19:59:01 +0000 (19:59 +0000)]
Fix ARMv4T (Thumb1) epilogue generation

Summary:
Before ARMv5T, Thumb1 code could not pop PC, as described at D14357 and D14986;
so we need the special fixup in the epilogue.

Reviewers: jroelofs, qcolombet

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 255047

8 years ago[CMake] Adding simulator supported runtimes should be done in the block that tests...
Chris Bieneman [Tue, 8 Dec 2015 19:31:33 +0000 (19:31 +0000)]
[CMake] Adding simulator supported runtimes should be done in the block that tests simulator capabilities.

Not sure why I put this in the iOS block originally, it shouldn't be there.

llvm-svn: 255046

8 years agoRevert "Add Available Externally linkage type to isWeakForLinker()"
Mehdi Amini [Tue, 8 Dec 2015 19:13:31 +0000 (19:13 +0000)]
Revert "Add Available Externally linkage type to isWeakForLinker()"

This reverts r255043, as per post-review concern were raised on the correctness.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255045

8 years agoCleanup test: remove useless alignment
Mehdi Amini [Tue, 8 Dec 2015 19:02:55 +0000 (19:02 +0000)]
Cleanup test: remove useless alignment

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255044

8 years agoAdd Available Externally linkage type to isWeakForLinker()
Mehdi Amini [Tue, 8 Dec 2015 19:01:29 +0000 (19:01 +0000)]
Add Available Externally linkage type to isWeakForLinker()

Per LangRef: "Globals with available_externally linkage are
allowed to be discarded at will, and are otherwise the same
as linkonce_odr", since linkonce_odr is in this list it makes
sense to have available_externally there as well.

Reviewers: rafael

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 255043

8 years agoUse range loops and autos in utils/TableGen/ClangAttrEmitter.cpp and generated code.
Eugene Zelenko [Tue, 8 Dec 2015 18:49:01 +0000 (18:49 +0000)]
Use range loops and autos in utils/TableGen/ClangAttrEmitter.cpp and generated code.

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

llvm-svn: 255042

8 years agoRemove the -g option from dotest.py
Zachary Turner [Tue, 8 Dec 2015 18:48:53 +0000 (18:48 +0000)]
Remove the -g option from dotest.py

This removes the non-exclusive filterspec option as part of an
effort to remove unused / deprecated command line options from
dotest.

llvm-svn: 255041

8 years agoRemove the -b option from dotest.py
Zachary Turner [Tue, 8 Dec 2015 18:43:16 +0000 (18:43 +0000)]
Remove the -b option from dotest.py

This removes the blacklist option as part of an effort to remove
unused / unmaintained command line options from the test suite.

llvm-svn: 255040

8 years agoCOFF: Create an empty but valid PDF file.
Rui Ueyama [Tue, 8 Dec 2015 18:39:55 +0000 (18:39 +0000)]
COFF: Create an empty but valid PDF file.

MSVC linker considers PDB files created with this patch valid.
So you don't have to remove PDB files created by lld before
running MSVC linker.

This patch has no test since llvm-pdbdump dislikes PDB files
with no metadata streams.

llvm-svn: 255039

8 years agoChange DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque...
Greg Clayton [Tue, 8 Dec 2015 18:39:50 +0000 (18:39 +0000)]
Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName.

llvm-svn: 255038

8 years agoRemove +b option from dotest.py
Zachary Turner [Tue, 8 Dec 2015 18:36:05 +0000 (18:36 +0000)]
Remove +b option from dotest.py

llvm-svn: 255037

8 years agoX86: produce more friendly errors during MachO relocation handling
Tim Northover [Tue, 8 Dec 2015 18:31:35 +0000 (18:31 +0000)]
X86: produce more friendly errors during MachO relocation handling

llvm-svn: 255036

8 years agoRemove the -D option from dotest.py.
Zachary Turner [Tue, 8 Dec 2015 18:25:38 +0000 (18:25 +0000)]
Remove the -D option from dotest.py.

This removes the option to dump Python sys.path variable as part
of an effort to remove unused options.

llvm-svn: 255035

8 years ago[ARM] Allowing SP/PC for AND/BIC mod_imm_not
Renato Golin [Tue, 8 Dec 2015 18:10:58 +0000 (18:10 +0000)]
[ARM] Allowing SP/PC for AND/BIC mod_imm_not

AND/BIC instructions do accept SP/PC, so the register class should be
more generic (rGPR -> GPR) to cope with that case. Adding more tests.

llvm-svn: 255034

8 years agoUse range loops and autos in lib/Serialization/ASTWriter.cpp.
Eugene Zelenko [Tue, 8 Dec 2015 18:00:11 +0000 (18:00 +0000)]
Use range loops and autos in lib/Serialization/ASTWriter.cpp.

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

llvm-svn: 255033

8 years ago[TSan] Remove legacy Makefile.old!
Alexey Samsonov [Tue, 8 Dec 2015 17:59:33 +0000 (17:59 +0000)]
[TSan] Remove legacy Makefile.old!

Summary:
It was barely supported for a several years for now, somewhat
rotten and doesn't correspond to the way we build/test TSan runtime
in Clang anymore.

CMake build has proper compile flags, library layout, build
dependencies etc.

Shell scripts that depended on the output of Makefile.old are
either obsolete now (check_cmake.sh), or moved to lit tests
(check_memcpy.sh), or kept as a standalone scripts not suitable
for generic test suite, but invoked on bots (check_analyze.sh).

It is not used on bots anymore: all "interesting" configurations
(gcc/clang as a host compiler; debug/release build types) are now
tested via CMake.

Reviewers: dvyukov, kcc

Subscribers: llvm-commits

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

llvm-svn: 255032

8 years ago[CMake] Remove debug output leftovers.
Alexey Samsonov [Tue, 8 Dec 2015 17:59:30 +0000 (17:59 +0000)]
[CMake] Remove debug output leftovers.

llvm-svn: 255031

8 years agotsan: fix test invisible barrier
Dmitry Vyukov [Tue, 8 Dec 2015 17:54:47 +0000 (17:54 +0000)]
tsan: fix test invisible barrier

Another attempt at fixing tsan_invisible_barrier.
Current implementation causes:
https://llvm.org/bugs/show_bug.cgi?id=25643

There were several unsuccessful iterations for this functionality:

Initially it was implemented in user code using REAL(pthread_barrier_wait). But pthread_barrier_wait is not supported on MacOS. Futexes are linux-specific for this matter.
Then we switched to atomics+usleep(10). But usleep produced parasitic "as-if synchronized via sleep" messages in reports which failed some output tests.
Then we switched to atomics+sched_yield. But this produced tons of tsan- visible events, which lead to "failed to restore stack trace" failures.
Move implementation into runtime and use internal_sched_yield in the wait loop.
This way tsan should see no events from the barrier, so not trace overflows and
no "as-if synchronized via sleep" messages.

llvm-svn: 255030

8 years agoUpdate clang-format-vs README
Hans Wennborg [Tue, 8 Dec 2015 17:54:27 +0000 (17:54 +0000)]
Update clang-format-vs README

VS2013 is requried after r231084.

llvm-svn: 255029

8 years agoadding readability-identifier-naming to llvm clang-tidy configuration.
Mike Aizatsky [Tue, 8 Dec 2015 17:44:51 +0000 (17:44 +0000)]
adding readability-identifier-naming to llvm clang-tidy configuration.

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

llvm-svn: 255028

8 years ago[Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu
Ron Lieberman [Tue, 8 Dec 2015 16:28:32 +0000 (16:28 +0000)]
[Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu

llvm-svn: 255027

8 years agoflip on executable bit on test runner tests
Todd Fiala [Tue, 8 Dec 2015 16:22:27 +0000 (16:22 +0000)]
flip on executable bit on test runner tests

llvm-svn: 255025

8 years agoMove all private members together. NFC.
Rafael Espindola [Tue, 8 Dec 2015 14:54:49 +0000 (14:54 +0000)]
Move all private members together. NFC.

llvm-svn: 255021

8 years ago[tsan] Add dispatch_group API interceptors and synchronization
Kuba Brecka [Tue, 8 Dec 2015 14:54:43 +0000 (14:54 +0000)]
[tsan] Add dispatch_group API interceptors and synchronization

This patch adds release and acquire semantics for dispatch groups, plus a test case.

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

llvm-svn: 255020

8 years ago[tsan] Fix memcmp interceptor to correctly use COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED
Kuba Brecka [Tue, 8 Dec 2015 14:48:21 +0000 (14:48 +0000)]
[tsan] Fix memcmp interceptor to correctly use COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED

The memcmp interceptor checks COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED only after it calls COMMON_INTERCEPTOR_ENTER, which causes an early process launch crash when running TSan in iOS simulator. Let's fix this by checking COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED as the very first thing in the interceptor.

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

llvm-svn: 255019

8 years ago[mips][ias] Range check uimm8 operands
Daniel Sanders [Tue, 8 Dec 2015 14:42:10 +0000 (14:42 +0000)]
[mips][ias] Range check uimm8 operands

Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

llvm-svn: 255018

8 years agoFix MSVC build after rL255016
Tamas Berghammer [Tue, 8 Dec 2015 14:27:40 +0000 (14:27 +0000)]
Fix MSVC build after rL255016

llvm-svn: 255017

8 years agoModify "platform connect" to connect to processes as well
Tamas Berghammer [Tue, 8 Dec 2015 14:08:19 +0000 (14:08 +0000)]
Modify "platform connect" to connect to processes as well

The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.

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

llvm-svn: 255016

8 years ago[mips][ias] Range check uimm6 operands and fix a bug this revealed.
Daniel Sanders [Tue, 8 Dec 2015 13:49:19 +0000 (13:49 +0000)]
[mips][ias] Range check uimm6 operands and fix a bug this revealed.

Summary:
We don't check the size operand on ext/dext*/ins/dins* yet because the
permitted range depends on the pos argument and we can't check that using
this mechanism.

The bug was that dextu/dinsu accepted 0..31 in the pos operand instead of 32..63.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

llvm-svn: 255015

8 years agoAdd a new option to Platform::LoadImage to install the image
Tamas Berghammer [Tue, 8 Dec 2015 13:43:59 +0000 (13:43 +0000)]
Add a new option to Platform::LoadImage to install the image

This change introduce 3 different working mode for Platform::LoadImage
depending on the file specs specified.
* If only a remote file is specified then the remote file is loaded on
  the target (same behavior as before)
* If only a local file is specified then the local file is installed to
  the current working directory and then loaded from there.
* If both local and remote file is specified then the local file is
  installed to the specified location and then loaded from there.

The same options are exposed on the SB API with a new method LoadImage
method while the old signature presers its meaning.

On the command line the installation of the shared library can be specified
with the "--install" option of "process load".

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

llvm-svn: 255014

8 years agoFixup dotest.py on mac for the configuration package
Pavel Labath [Tue, 8 Dec 2015 13:32:07 +0000 (13:32 +0000)]
Fixup dotest.py on mac for the configuration package

llvm-svn: 255013

8 years ago[x86][avx512] more changes in intrinsics to be align with gcc format
Asaf Badouh [Tue, 8 Dec 2015 12:34:38 +0000 (12:34 +0000)]
[x86][avx512] more changes in intrinsics to be align with gcc format

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

llvm-svn: 255012

8 years ago[x86][avx512] more changes in intrinsics to be align with gcc format
Asaf Badouh [Tue, 8 Dec 2015 12:34:34 +0000 (12:34 +0000)]
[x86][avx512] more changes in intrinsics to be align with gcc format

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

llvm-svn: 255011

8 years ago[AArch64] Add ARMv8.2-A FP16 vector instructions
Oliver Stannard [Tue, 8 Dec 2015 12:16:10 +0000 (12:16 +0000)]
[AArch64] Add ARMv8.2-A FP16 vector instructions

ARMv8.2-A adds 16-bit floating point versions of all existing SIMD
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

Note that VFP without SIMD is not a valid combination for any version of
ARMv8-A, but I have ensured that these instructions all depend on both
FeatureNEON and FeatureFullFP16 for consistency.

The ".2h" vector type specifier is now legal (for the scalar pairwise
reduction instructions), so some unrelated tests have been modified as
different error messages are emitted. This is not a problem as the
invalid operands are still caught.

llvm-svn: 255010

8 years agoFixup dotest.py after the configuration package introduction
Pavel Labath [Tue, 8 Dec 2015 12:09:56 +0000 (12:09 +0000)]
Fixup dotest.py after the configuration package introduction

llvm-svn: 255009

8 years ago[OPENMP 4.5] Parsing/sema for 'num_tasks' clause.
Alexey Bataev [Tue, 8 Dec 2015 12:06:20 +0000 (12:06 +0000)]
[OPENMP 4.5] Parsing/sema for 'num_tasks' clause.
OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause.

llvm-svn: 255008

8 years agodding test for fnstsw
Michael Zuckerman [Tue, 8 Dec 2015 12:00:24 +0000 (12:00 +0000)]
dding test for fnstsw

continue of Wrong FNSTSW size operator
url: http://reviews.llvm.org/D14953

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

llvm-svn: 255007

8 years agoReplace bitwise AND with logical AND in an expression that already had another logica...
Craig Topper [Tue, 8 Dec 2015 06:49:15 +0000 (06:49 +0000)]
Replace bitwise AND with logical AND in an expression that already had another logical AND. NFC

llvm-svn: 255006

8 years ago[LLDB][MIPS] Handle PIC calling convention for MIPS32
Bhushan D. Attarde [Tue, 8 Dec 2015 06:05:57 +0000 (06:05 +0000)]
[LLDB][MIPS] Handle PIC calling convention for MIPS32

    SUMMARY:
    - PrepareTrivialCall() to setup register r25 with the address of function to be called.
    - RegisterIsCalleeSaved() to use name of a register instead of its byte_offset.

    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D15273

llvm-svn: 255005

8 years ago[Sema] Remove tab characters. NFC
Craig Topper [Tue, 8 Dec 2015 04:33:04 +0000 (04:33 +0000)]
[Sema] Remove tab characters. NFC

llvm-svn: 255004

8 years ago[SCEV] Move some struct declarations inside functions; NFC
Sanjoy Das [Tue, 8 Dec 2015 04:32:54 +0000 (04:32 +0000)]
[SCEV] Move some struct declarations inside functions; NFC

Reduces the scope over which the struct is visible, making its usages
obvious.  I did not move structs in cases where this wasn't a clear
win (the struct is too large, or is grouped in some other interesting
way).

llvm-svn: 255003

8 years ago[SCEV] Fix indentation; NFC
Sanjoy Das [Tue, 8 Dec 2015 04:32:51 +0000 (04:32 +0000)]
[SCEV] Fix indentation; NFC

llvm-svn: 255002

8 years agoAdd parse and sema for OpenMP distribute directive and all its clauses excluding...
Carlo Bertolli [Tue, 8 Dec 2015 04:21:03 +0000 (04:21 +0000)]
Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule.

llvm-svn: 255001

8 years ago[OperandBundles] Remove unncessary constructor
Sanjoy Das [Tue, 8 Dec 2015 03:50:32 +0000 (03:50 +0000)]
[OperandBundles] Remove unncessary constructor

The StringRef constructor is unnecessary (since we're converting to
std::string anyway), and having it requires an explicit call to
StringRef's or std::string's constructor.

llvm-svn: 255000

8 years ago[WebAssembly] Fix a typo in a comment.
Dan Gohman [Tue, 8 Dec 2015 03:43:03 +0000 (03:43 +0000)]
[WebAssembly] Fix a typo in a comment.

llvm-svn: 254999

8 years ago[WebAssembly] Remove an unneeded static_cast.
Dan Gohman [Tue, 8 Dec 2015 03:42:50 +0000 (03:42 +0000)]
[WebAssembly] Remove an unneeded static_cast.

llvm-svn: 254998

8 years ago[WebAssembly] Fix an emacs syntax highlighting comment.
Dan Gohman [Tue, 8 Dec 2015 03:36:00 +0000 (03:36 +0000)]
[WebAssembly] Fix an emacs syntax highlighting comment.

llvm-svn: 254997

8 years ago[WebAssembly] Convert a file-level comment to doxygen style.
Dan Gohman [Tue, 8 Dec 2015 03:33:51 +0000 (03:33 +0000)]
[WebAssembly] Convert a file-level comment to doxygen style.

llvm-svn: 254996

8 years ago[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.
Dan Gohman [Tue, 8 Dec 2015 03:30:42 +0000 (03:30 +0000)]
[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.

llvm-svn: 254995

8 years ago[WebAssembly] Trim some unneeded #includes.
Dan Gohman [Tue, 8 Dec 2015 03:25:35 +0000 (03:25 +0000)]
[WebAssembly] Trim some unneeded #includes.

llvm-svn: 254994

8 years ago[WebAssembly] Remove the override of haveFastSqrt.
Dan Gohman [Tue, 8 Dec 2015 03:22:33 +0000 (03:22 +0000)]
[WebAssembly] Remove the override of haveFastSqrt.

The default implementation in BasicTTI already checks TLI and does
the right thing.

llvm-svn: 254993

8 years agoExplicitly permit undefined behavior in constant initializers for global
Richard Smith [Tue, 8 Dec 2015 03:21:47 +0000 (03:21 +0000)]
Explicitly permit undefined behavior in constant initializers for global
variables in C, in the cases where we can constant-fold it to a value
regardless (such as floating-point division by zero and signed integer
overflow). Strictly enforcing this rule breaks too much code.

llvm-svn: 254992

8 years agoIR: Allow vectors of halfs to be ConstantDataVectors
Justin Bogner [Tue, 8 Dec 2015 03:01:16 +0000 (03:01 +0000)]
IR: Allow vectors of halfs to be ConstantDataVectors

Currently, vectors of halfs end up as ConstantVectors, but there isn't
a good reason they can't be ConstantDataVectors. This should save some
memory.

llvm-svn: 254991

8 years ago[llvm-objdump/MachO] Don't cut'n'paste the same code over and over.
Davide Italiano [Tue, 8 Dec 2015 02:45:59 +0000 (02:45 +0000)]
[llvm-objdump/MachO] Don't cut'n'paste the same code over and over.

Use the appropriate helper instead.

llvm-svn: 254990

8 years agoAdd a test showing that we internalize lazily linked GVs.
Rafael Espindola [Tue, 8 Dec 2015 02:38:14 +0000 (02:38 +0000)]
Add a test showing that we internalize lazily linked GVs.

llvm-svn: 254989

8 years agoAsmPrinter: Use emitGlobalConstantFP to emit elements of constant data
Justin Bogner [Tue, 8 Dec 2015 02:37:48 +0000 (02:37 +0000)]
AsmPrinter: Use emitGlobalConstantFP to emit elements of constant data

It's strange to duplicate the logic for emitting FP values into
emitGlobalConstantDataSequential, and it's even stranger that we end
up printing the verbose assembly comments differently between the two
paths. Just call into emitGlobalConstantFP rather than crudely
duplicating its logic.

llvm-svn: 254988

8 years agoSimplify test. NFC.
Rafael Espindola [Tue, 8 Dec 2015 02:29:45 +0000 (02:29 +0000)]
Simplify test. NFC.

llvm-svn: 254987

8 years agoReplace a bunch of duplicate conditions with the call from types::.
Eric Christopher [Tue, 8 Dec 2015 02:10:19 +0000 (02:10 +0000)]
Replace a bunch of duplicate conditions with the call from types::.

llvm-svn: 254986

8 years agoRemove name from FIXME.
Eric Christopher [Tue, 8 Dec 2015 01:59:51 +0000 (01:59 +0000)]
Remove name from FIXME.

llvm-svn: 254985

8 years agoUpdate comment to reflect that we use other tools via the toolchain to
Eric Christopher [Tue, 8 Dec 2015 01:59:47 +0000 (01:59 +0000)]
Update comment to reflect that we use other tools via the toolchain to
handle more than just C.

llvm-svn: 254984

8 years agoMove LLDBTestResult class to its own module.
Zachary Turner [Tue, 8 Dec 2015 01:15:44 +0000 (01:15 +0000)]
Move LLDBTestResult class to its own module.

llvm-svn: 254983

8 years agoGet rid of global variables in dotest.py
Zachary Turner [Tue, 8 Dec 2015 01:15:30 +0000 (01:15 +0000)]
Get rid of global variables in dotest.py

This moves all the global variables into a separate module called
`configuration`.  This has a number of advantages:

1. Configuration data is centrally maintained so it's easy to get
   a high level overview of what configuration data the test suite
   makes use of.
2. The method of sharing configuration data among different parts
   of the test suite becomes standardized.  Previously we would
   put some things into the `lldb` module, some things into the
   `lldbtest_config` module, and some things would not get shared.
   Now everything is shared through one module and is available to
   the entire test suite.
3. It opens the door to moving some of the initialization code into
   the `configuration` module, simplifying the implementation of
   `dotest.py`.

There are a few stragglers that didn't get converted over to using
the `configuration` module in this patch, because it would have grown
the size of the patch unnecessarily.  This includes everything
currently in the `lldbtest_config` module, as well as the
`lldb.remote_platform` variable.  We can address these in the future.

llvm-svn: 254982

8 years ago[diagnostics] Avoid crashes while printing macro backtraces
Reid Kleckner [Tue, 8 Dec 2015 01:08:09 +0000 (01:08 +0000)]
[diagnostics] Avoid crashes while printing macro backtraces

When attempting to map a source into a given level of macro expansion,
this code was ignoring the possibility that the start and end of the
range might take wildly different paths through the tree of macro
expansions. It was assuming that the begin spelling location would
always precede the end spelling location, which is false. A macro can
easily transpose its arguments.

This also fixes a related issue where there are extra macro arguments
between the begin location and the end location. In this situation, we
now highlight the entire macro invocation.

Pair programmed with Richard Smith.

Fixes PR12818.

llvm-svn: 254981

8 years agoTrying to submit 254476 one more time. This implement -gmodule debugging support.
Greg Clayton [Tue, 8 Dec 2015 01:02:08 +0000 (01:02 +0000)]
Trying to submit 254476 one more time. This implement -gmodule debugging support.

It was previously reverted due to issues that showed up only on linux. I was able to reproduce these issues and fix the underlying cause.

So this is the same patch as 254476 with the following two fixes:
- Fix not trying to complete classes that don't have external sources
- Fix ClangASTSource::CompleteType() to check the decl context of types that it finds by basename to ensure we don't complete a type "S" with a type like "std::S". Before this fix ClangASTSource::CompleteType() would accept _any_ type that had a matching basename and copy it into the other type.

<rdar://problem/22992457>

llvm-svn: 254980

8 years agoRefactor ResultsFormatter creation into result_formatter.
Todd Fiala [Tue, 8 Dec 2015 00:53:56 +0000 (00:53 +0000)]
Refactor ResultsFormatter creation into result_formatter.

This cleans up dotest.py and is a pre-step for getting
the test inferior runner to send post-inferior run events
to the events collector, as this code needs to be accessed
from within dosep.py.

llvm-svn: 254979

8 years ago[CXX TLS calling convention] Add support for AArch64.
Manman Ren [Tue, 8 Dec 2015 00:14:38 +0000 (00:14 +0000)]
[CXX TLS calling convention] Add support for AArch64.

rdar://9001553

llvm-svn: 254978

8 years ago[IndVars] Have getInsertPointForUses preserve LCSSA
Sanjoy Das [Tue, 8 Dec 2015 00:13:21 +0000 (00:13 +0000)]
[IndVars] Have getInsertPointForUses preserve LCSSA

Summary:
Also add a stricter post-condition for IndVarSimplify.

Fixes PR25578.  Test case by Michael Zolotukhin.

Reviewers: hfinkel, atrick, mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 254977

8 years ago[SCEVExpander] Have hoistIVInc preserve LCSSA
Sanjoy Das [Tue, 8 Dec 2015 00:13:17 +0000 (00:13 +0000)]
[SCEVExpander] Have hoistIVInc preserve LCSSA

Summary:
(Note: the problematic invocation of hoistIVInc that caused PR24804 came
from IndVarSimplify, not from SCEVExpander itself)

Fixes PR24804.  Test case by David Majnemer.

Reviewers: hfinkel, majnemer, atrick, mzolotukhin

Subscribers: llvm-commits

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

llvm-svn: 254976

8 years agoAdd Instruction::getFunction; NFC
Sanjoy Das [Tue, 8 Dec 2015 00:13:12 +0000 (00:13 +0000)]
Add Instruction::getFunction; NFC

Will be used in a upcoming patch.

llvm-svn: 254975

8 years ago[PassManager] Tuning Memory Usage of AnalysisUsage
Philip Reames [Tue, 8 Dec 2015 00:10:56 +0000 (00:10 +0000)]
[PassManager] Tuning Memory Usage of AnalysisUsage

We were using unneccessarily large initial sizes for these SmallVectors.  This was wasting around 50kb of memory for the O3 pipeline, even after the uniquing changes.  We're still using around 20kb which is a bit much, but it's definitely better.  This is about a 6% improvement in total O3 memory usage.

Note: The raw data on structure size which were used to pick these thresholds can be found in the review thread.

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

llvm-svn: 254974

8 years ago80-column fixup.
Eric Christopher [Tue, 8 Dec 2015 00:10:13 +0000 (00:10 +0000)]
80-column fixup.

llvm-svn: 254973

8 years agoUpdate comment.
Eric Christopher [Tue, 8 Dec 2015 00:10:10 +0000 (00:10 +0000)]
Update comment.

llvm-svn: 254972

8 years agoCleaned up the intro for the TS status page; really need much more info here
Marshall Clow [Tue, 8 Dec 2015 00:08:23 +0000 (00:08 +0000)]
Cleaned up the intro for the TS status page; really need much more info here

llvm-svn: 254971

8 years agofix return values to match bool return type; NFC
Sanjay Patel [Mon, 7 Dec 2015 23:34:30 +0000 (23:34 +0000)]
fix return values to match bool return type; NFC

llvm-svn: 254968

8 years agoFactor two calls to a common location.
Rafael Espindola [Mon, 7 Dec 2015 23:32:39 +0000 (23:32 +0000)]
Factor two calls to a common location.

llvm-svn: 254967

8 years ago[TSan] Enforce TSan runtime doesn't include system headers with --sysroot flag.
Alexey Samsonov [Mon, 7 Dec 2015 23:21:36 +0000 (23:21 +0000)]
[TSan] Enforce TSan runtime doesn't include system headers with --sysroot flag.

llvm-svn: 254966

8 years agoStabilize llvm/test/Object/archive-update.test a bit.
NAKAMURA Takumi [Mon, 7 Dec 2015 23:15:57 +0000 (23:15 +0000)]
Stabilize llvm/test/Object/archive-update.test a bit.

A manipulation (in this case, mkdir) can make slack between creating and touching %t.older/evenlen.

I would make this rewrote with python if this were still unstable.

llvm-svn: 254965

8 years agoSupport: Teach Asan about BumpPtrAllocator
Justin Bogner [Mon, 7 Dec 2015 23:12:26 +0000 (23:12 +0000)]
Support: Teach Asan about BumpPtrAllocator

Based on patch by Pete Cooper.

llvm-svn: 254964

8 years agoLet llvm-lto installed. A few tests in clang/test are using it.
NAKAMURA Takumi [Mon, 7 Dec 2015 23:07:16 +0000 (23:07 +0000)]
Let llvm-lto installed. A few tests in clang/test are using it.

llvm-svn: 254963