platform/upstream/llvm.git
8 years agoRe-submit ELF: Report multiple errors from the driver.
Rui Ueyama [Tue, 2 Feb 2016 21:13:09 +0000 (21:13 +0000)]
Re-submit ELF: Report multiple errors from the driver.

This reverts r259395 which reverted r259143.

llvm-svn: 259572

8 years agoELF: Rewrite "echo" command arguments in hope that would fix a test breakage.
Rui Ueyama [Tue, 2 Feb 2016 21:03:56 +0000 (21:03 +0000)]
ELF: Rewrite "echo" command arguments in hope that would fix a test breakage.

Previously, we used both single quotes and double quotes, and
some single-quoted tokens are concatenated with next tokens because
there were no spaces between them. That may be a cause of test flakiness
on Windows, which is reported as https://llvm.org/bugs/show_bug.cgi?id=26388.

The new test commands are more straightforward than before.

llvm-svn: 259559

8 years agoAMDGPU: Handle promoting memmove
Matt Arsenault [Tue, 2 Feb 2016 20:28:10 +0000 (20:28 +0000)]
AMDGPU: Handle promoting memmove

Also add missing tests for the others.

llvm-svn: 259558

8 years agoELF: Do not use fatal in LinkerScript.cpp.
Rui Ueyama [Tue, 2 Feb 2016 20:27:59 +0000 (20:27 +0000)]
ELF: Do not use fatal in LinkerScript.cpp.

This patch adds "Error" field to LinkerScript class. That field
is false by default, and set to true if there is a syntax error
in an input file. The linker script parser is a recursive-descedent
parser. Each function returns if Error is true -- so that
eventually the whole parser returns to a caller.

http://reviews.llvm.org/D16667

llvm-svn: 259557

8 years agoRevert "[NFC] Cleanup RangeMap.h"
Todd Fiala [Tue, 2 Feb 2016 20:26:50 +0000 (20:26 +0000)]
Revert "[NFC] Cleanup RangeMap.h"

This reverts commit r259538.  Caused 92 test failures on
the OS X testbot.

llvm-svn: 259556

8 years agoDo not use filename in a lit test.
Rui Ueyama [Tue, 2 Feb 2016 20:24:33 +0000 (20:24 +0000)]
Do not use filename in a lit test.

So that the file is move-safe.

llvm-svn: 259555

8 years agoELF: Use StringRef instead of std::string.
Rui Ueyama [Tue, 2 Feb 2016 20:24:31 +0000 (20:24 +0000)]
ELF: Use StringRef instead of std::string.

All MemoryBuffers for archive files are guaranteed to exist as long
as their children are used in the linker. So we don't need to copy
strings here. Thanks to Sean Silva for pointing this out.

llvm-svn: 259554

8 years ago[X86] Fix the merging of SP updates in prologue/epilogue insertions.
Quentin Colombet [Tue, 2 Feb 2016 20:11:17 +0000 (20:11 +0000)]
[X86] Fix the merging of SP updates in prologue/epilogue insertions.
When the merging was involving LEAs, we were taking the wrong immediate
from the list of operands.

rdar://problem/24446069

llvm-svn: 259553

8 years agoMachineVerifier: Check that defs/uses are live in subregisters as well.
Matthias Braun [Tue, 2 Feb 2016 20:04:51 +0000 (20:04 +0000)]
MachineVerifier: Check that defs/uses are live in subregisters as well.

llvm-svn: 259552

8 years agoAMDGPU: Skip promote alloca with no optimizations
Matt Arsenault [Tue, 2 Feb 2016 19:32:42 +0000 (19:32 +0000)]
AMDGPU: Skip promote alloca with no optimizations

llvm-svn: 259551

8 years agoAMDGPU: Minor cleanups for AMDGPUPromoteAlloca
Matt Arsenault [Tue, 2 Feb 2016 19:32:35 +0000 (19:32 +0000)]
AMDGPU: Minor cleanups for AMDGPUPromoteAlloca

Mostly convert to use range loops.

llvm-svn: 259550

8 years ago[Orc] Turn OrcX86_64::IndirectStubsInfo into a template helper class:
Lang Hames [Tue, 2 Feb 2016 19:31:15 +0000 (19:31 +0000)]
[Orc] Turn OrcX86_64::IndirectStubsInfo into a template helper class:
GenericIndirectStubsInfo.

This will allow architecture support classes for other architectures to re-use
this code.

llvm-svn: 259549

8 years ago[codeview] Correctly handle inlining functions post-dominated by unreachable
David Majnemer [Tue, 2 Feb 2016 19:22:34 +0000 (19:22 +0000)]
[codeview] Correctly handle inlining functions post-dominated by unreachable

CodeView requires us to accurately describe the extent of the inlined
code.  We did this by grabbing the next debug location in source order
and using *that* to denote where we stopped inlining.  However, this is
not sufficient or correct in instances where there is no next debug
location or the next debug location belongs to the start of another
function.

To get this correct, use the end symbol of the function to denote the
last possible place the inlining could have stopped at.

llvm-svn: 259548

8 years agoAMDGPU: Report AMDGPUPromoteAlloca changed the function
Matt Arsenault [Tue, 2 Feb 2016 19:18:57 +0000 (19:18 +0000)]
AMDGPU: Report AMDGPUPromoteAlloca changed the function

llvm-svn: 259547

8 years agoAMDGPU: Whitelist handled intrinsics
Matt Arsenault [Tue, 2 Feb 2016 19:18:53 +0000 (19:18 +0000)]
AMDGPU: Whitelist handled intrinsics

We shouldn't crash on unhandled intrinsics.
Also simplify failure handling in loop.

llvm-svn: 259546

8 years agoAMDGPU: Use inbounds when calculating workitem offset
Matt Arsenault [Tue, 2 Feb 2016 19:18:48 +0000 (19:18 +0000)]
AMDGPU: Use inbounds when calculating workitem offset

When promoting allocas to LDS, we know we are indexing
into a specific area just created, and the calculation
will also never overflow.

Also emit some of the muls as nsw nuw, because instcombine
infers this already from the range metadata. I think
putting this on the other adds and muls might be OK too,
but I'm not 100% sure.

llvm-svn: 259545

8 years agoReverting r259529 (Marking the mmap_stress.cc TSan test as unsupported on OS X)
Kuba Brecka [Tue, 2 Feb 2016 18:52:48 +0000 (18:52 +0000)]
Reverting r259529 (Marking the mmap_stress.cc TSan test as unsupported on OS X)

llvm-svn: 259544

8 years agoRe-write many skip decorators to use shared code.
Zachary Turner [Tue, 2 Feb 2016 18:50:34 +0000 (18:50 +0000)]
Re-write many skip decorators to use shared code.

This should be no functional change, just a refactoring of the
skip decorators to all centralize on a single function,
`skipTestIfFn` that does all the logic.  This allows easier
maintenance of the decorators and also centralizes all the
hard-to-understand logic in one place.

Reviewed by: Pavel Labath
Differential Revision: http://reviews.llvm.org/D16741

llvm-svn: 259543

8 years agoRe-commit r259512: [tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.
Daniel Sanders [Tue, 2 Feb 2016 18:43:53 +0000 (18:43 +0000)]
Re-commit r259512: [tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.

Summary:
This is a workaround to a problem in the 3.8 release that affects MIPS and
possibly other targets where the default is not supported but a sibling is
supported.

When TSAN_SUPPORTED_ARCH is not empty, cmake currently attempts to build a
tsan'd libcxx as well as test tsan for the default target regardless of whether
the default target is supported or not. This causes problems on MIPS32 since
tsan is supported for MIPS64 but not MIPS32.

This patch causes cmake to only build the libcxx and run the lit test-suite for
archictures in ${TSAN_SUPPORTED_ARCH}

This re-commit fixes an issue where 'check-tsan' continued to look for the
tsan'd libc++ in the directory it used to be built in.

Reviewers: hans, samsonov

Subscribers: tberghammer, llvm-commits, danalbert, srhines, dvyukov

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

llvm-svn: 259542

8 years agoCast the fifth arg to mremap to void *
Alexey Samsonov [Tue, 2 Feb 2016 18:36:28 +0000 (18:36 +0000)]
Cast the fifth arg to mremap to void *

Summary:
Since the prototype of mremap is

```
void *mremap(void *old_address, size_t old_size, size_t new_size,
             int flags, ... /* void *new_address*/);
```
we need to cast new_address to void * when calling mremap.  Otherwise,
the wrong value will be passed to mremap on x32.

Patch by H.J Lu!

Reviewers: kcc, eugenis, samsonov

Subscribers: samsonov, llvm-commits

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

llvm-svn: 259540

8 years agoFix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Eugene Zelenko [Tue, 2 Feb 2016 18:20:45 +0000 (18:20 +0000)]
Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.

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

llvm-svn: 259539

8 years ago[NFC] Cleanup RangeMap.h
Tamas Berghammer [Tue, 2 Feb 2016 18:18:13 +0000 (18:18 +0000)]
[NFC] Cleanup RangeMap.h

The file contained very similar 4 implementation of the same data
structure with a lot of duplicated code and some minor API differences.
This CL refactor the class to eliminate the duplicated codes and to
unify the APIs.

RangeMap.h also contained a class called AddressDataArray what have very
little added functionality over an std::vector and used only by
ObjectFileMacO The CL moves the class to ObjectFileMachO.cpp as it isn't
belongs into RangeMap.h and shouldn't be used in new places anyway
because of the little added functionality.

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

llvm-svn: 259538

8 years agoARM: allow both vfma and vfms intrinsics on v7.
Tim Northover [Tue, 2 Feb 2016 18:02:10 +0000 (18:02 +0000)]
ARM: allow both vfma and vfms intrinsics on v7.

The main purpose here is that vfma/vfms should be symmetric, and they are
supported on most v7 cores.

The new ArchGuard is suggested by ACLE but prophylactic for us. Almost all CPUs
with NEON *will* have vfma, and the few exceptions I know of (e.g. Cortex-A8)
are incorrectly modelled by Clang so can't trigger a test.

Fortunately, they're getting rarer. But if we ever do support them properly
arm_neon.h should now do the right thing.

llvm-svn: 259537

8 years ago[codeview] Wire up the .cv_inline_linetable directive
Reid Kleckner [Tue, 2 Feb 2016 17:41:18 +0000 (17:41 +0000)]
[codeview] Wire up the .cv_inline_linetable directive

This directive emits the binary annotations that describe line and code
deltas in inlined call sites. Single-stepping through inlined frames in
windbg now works.

llvm-svn: 259535

8 years agoPR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for-range...
Denis Zobnin [Tue, 2 Feb 2016 17:33:09 +0000 (17:33 +0000)]
PR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for-range expression.

Fix the issue discovered by fuzzing (PR23057, comment 18) by handling nullptr in Sema::ActOnCXXForRangeDecl
and correct delayed typos in for-range expression before calling Sema::ActOnCXXForRangeStmt. Also fixes PR26288.

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

llvm-svn: 259532

8 years ago[clang-tidy] Removed unnecessary parameters in the test
Alexander Kornienko [Tue, 2 Feb 2016 17:27:08 +0000 (17:27 +0000)]
[clang-tidy] Removed unnecessary parameters in the test

llvm-svn: 259531

8 years ago[clang-tidy] Add non-constant references in function parameters check.
Alexander Kornienko [Tue, 2 Feb 2016 17:27:01 +0000 (17:27 +0000)]
[clang-tidy] Add non-constant references in function parameters check.

Summary: This is implemented originally by Alexander Kornienko.

Reviewers: alexfh

Subscribers: cfe-commits

Patch by Haojian Wu!

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

llvm-svn: 259530

8 years agoMarking the mmap_stress.cc TSan test as unsupported on OS X (it's flaky here).
Kuba Brecka [Tue, 2 Feb 2016 17:21:12 +0000 (17:21 +0000)]
Marking the mmap_stress.cc TSan test as unsupported on OS X (it's flaky here).

llvm-svn: 259529

8 years ago[MC] Enable eip-relative addressing on x86-64 for X32 ABI
Derek Schuff [Tue, 2 Feb 2016 17:20:04 +0000 (17:20 +0000)]
[MC] Enable eip-relative addressing on x86-64 for X32 ABI

Summary:
Enables eip-based addressing, e.g.,

lea    constant(%eip), %rax
lea    constant(%eip), %eax

in MC, (used for the x32 ABI). EIP-base addressing is also valid in x86_64,
it is left enabled for that architecture as well.

Patch by João Porto

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

llvm-svn: 259528

8 years agoXFAIL TestConsecutiveBreakpoints.test_single_step_thread_specific on OSX
Pavel Labath [Tue, 2 Feb 2016 17:02:58 +0000 (17:02 +0000)]
XFAIL TestConsecutiveBreakpoints.test_single_step_thread_specific on OSX

llvm-svn: 259527

8 years agoskip TestWatchLocation on OS X
Todd Fiala [Tue, 2 Feb 2016 17:00:34 +0000 (17:00 +0000)]
skip TestWatchLocation on OS X

Skipping this test while I investigate.  It started failing
with r259379.  (It is generating an error due to unicode
decode issues.)

llvm-svn: 259526

8 years agoScopInfo: Split memory access construction into different cases
Tobias Grosser [Tue, 2 Feb 2016 16:46:49 +0000 (16:46 +0000)]
ScopInfo: Split memory access construction into different cases

We create separate functions for fixed-size multi-dimensional, parameteric-sized
multi-dimensional, as well as single-dimensional memory accesses to reduce the
complexity of a large monolithic function.

Suggested-by: Michael Kruse <llvm@meinersbur.de>
llvm-svn: 259522

8 years agoScopInfo: Do not track element-size as additional array size dimension [NFC]
Tobias Grosser [Tue, 2 Feb 2016 16:46:45 +0000 (16:46 +0000)]
ScopInfo: Do not track element-size as additional array size dimension [NFC]

There is no need to pass the size of the elements as the last size dimension
to ScopArrayInfo. This information is already available through the ElementType.
Tracking it twice is not only redundant but may result in inconsistencies.

llvm-svn: 259521

8 years agoRevert r259512 - [tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.
Daniel Sanders [Tue, 2 Feb 2016 16:05:52 +0000 (16:05 +0000)]
Revert r259512 - [tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.

check-tsan does not pick up the correct libc++.so. It succeeded on my machine
by picking up the libc++.so that was built before making this change.

llvm-svn: 259519

8 years agoMake CodeGen headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 16:05:18 +0000 (16:05 +0000)]
Make CodeGen headers self-contained.

llvm-svn: 259518

8 years agoRemove redundant test in TestExitDuringStep
Pavel Labath [Tue, 2 Feb 2016 15:58:30 +0000 (15:58 +0000)]
Remove redundant test in TestExitDuringStep

After recent changes, test_thread_state_is_stopped has become equivalent to test_step_in, as the
function exit_during_step_base was not using the "test_thread_state" parameter. As test was
XFAILed on all platforms anyway, and we have other tests for the bug which it (used to) test, I
am simply removing the function.

llvm-svn: 259517

8 years agoExpand comment a bit.
Rafael Espindola [Tue, 2 Feb 2016 15:45:37 +0000 (15:45 +0000)]
Expand comment a bit.

I have spent some time prototyping this idea. While it seems to work, I
now think it is probably not worth it.

llvm-svn: 259516

8 years ago[AArch64] Add a FIXME comment.
Chad Rosier [Tue, 2 Feb 2016 15:22:55 +0000 (15:22 +0000)]
[AArch64] Add a FIXME comment.

llvm-svn: 259515

8 years agoLog error message in SBTarget::Launch
Pavel Labath [Tue, 2 Feb 2016 15:16:20 +0000 (15:16 +0000)]
Log error message in SBTarget::Launch

llvm-svn: 259514

8 years agoMark TestProcessIO.test_stdin_redirection as flaky on android
Pavel Labath [Tue, 2 Feb 2016 15:16:16 +0000 (15:16 +0000)]
Mark TestProcessIO.test_stdin_redirection as flaky on android

bug #26437

llvm-svn: 259513

8 years ago[tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.
Daniel Sanders [Tue, 2 Feb 2016 15:04:35 +0000 (15:04 +0000)]
[tsan] Add a libc++ and lit testsuite for each ${TSAN_SUPPORTED_ARCH}.

Summary:
This is a workaround to a problem in the 3.8 release that affects MIPS and
possibly other targets where the default is not supported but a sibling is
supported.

When TSAN_SUPPORTED_ARCH is not empty, cmake currently attempts to build a
tsan'd libcxx as well as test tsan for the default target regardless of whether
the default target is supported or not. This causes problems on MIPS32 since
tsan is supported for MIPS64 but not MIPS32.

This patch causes cmake to only build the libcxx and run the lit test-suite for
archictures in ${TSAN_SUPPORTED_ARCH}

Reviewers: hans, samsonov

Subscribers: tberghammer, llvm-commits, danalbert, srhines, dvyukov

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

llvm-svn: 259512

8 years ago[WWW] Add our Polly/OpenCL paper
Johannes Doerfert [Tue, 2 Feb 2016 15:03:31 +0000 (15:03 +0000)]
[WWW] Add our Polly/OpenCL paper

llvm-svn: 259511

8 years ago[AArch64] Allocate the modified and used regs only once per function.
Chad Rosier [Tue, 2 Feb 2016 15:02:30 +0000 (15:02 +0000)]
[AArch64] Allocate the modified and used regs only once per function.

llvm-svn: 259510

8 years agoFix single stepping over the IT instruction
Tamas Berghammer [Tue, 2 Feb 2016 14:32:11 +0000 (14:32 +0000)]
Fix single stepping over the IT instruction

The ARM instruction emulator had 2 bugs related to the handling of the
IT instruction causing an error in single stepping:
* We haven't initialized the IT mask from the CPSR so if the last
  instruction of the IT block is a branch and the condition is false
  then the emulator evaluated the branch what resulted in an incorrect
  pc for the next instruction.
* The ITSTATE was advanced before the execution of each instruction. As
  a result the emulator was using the condition of following instruction
  in every case. The ITSTATE should be edvanced after the execution of
  an instruction except after an IT instruction.

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

llvm-svn: 259509

8 years agoWebAssembly: update expected GCC torture test failures
JF Bastien [Tue, 2 Feb 2016 14:27:34 +0000 (14:27 +0000)]
WebAssembly: update expected GCC torture test failures

The 3 programs used __attribute__((mode(?))) on enum, which clang r259497 fixed.

llvm-svn: 259508

8 years agoMake the remaining headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 14:24:21 +0000 (14:24 +0000)]
Make the remaining headers self-contained.

llvm-svn: 259507

8 years ago[StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic...
Benjamin Kramer [Tue, 2 Feb 2016 14:24:11 +0000 (14:24 +0000)]
[StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic includes.

llvm-svn: 259506

8 years agoRemove unneeded definition [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:16:22 +0000 (14:16 +0000)]
Remove unneeded definition [NFC]

llvm-svn: 259505

8 years agoAdd const keyword to MemoryAccess argument [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:16:01 +0000 (14:16 +0000)]
Add const keyword to MemoryAccess argument [NFC]

llvm-svn: 259504

8 years agoSort analysis members and unifiy documentation [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:15:37 +0000 (14:15 +0000)]
Sort analysis members and unifiy documentation [NFC]

llvm-svn: 259503

8 years agoRename the DataLayout member [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:15:13 +0000 (14:15 +0000)]
Rename the DataLayout member [NFC]

llvm-svn: 259502

8 years agoRemove helper function [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:14:40 +0000 (14:14 +0000)]
Remove helper function [NFC]

llvm-svn: 259501

8 years agoRemove unnecessary getAnalysis call [NFC]
Johannes Doerfert [Tue, 2 Feb 2016 14:14:20 +0000 (14:14 +0000)]
Remove unnecessary getAnalysis call [NFC]

llvm-svn: 259500

8 years agoAdd backend dignostic printer for unsupported features
Oliver Stannard [Tue, 2 Feb 2016 13:52:52 +0000 (13:52 +0000)]
Add backend dignostic printer for unsupported features

Re-commit of r258950 after fixing layering violation.

The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

llvm-svn: 259499

8 years agoRefactor backend diagnostics for unsupported features
Oliver Stannard [Tue, 2 Feb 2016 13:52:43 +0000 (13:52 +0000)]
Refactor backend diagnostics for unsupported features

Re-commit of r258951 after fixing layering violation.

The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.

There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.

llvm-svn: 259498

8 years agoFix for PR8901: attribute "mode" rejected for enums and dependent types.
Denis Zobnin [Tue, 2 Feb 2016 13:50:39 +0000 (13:50 +0000)]
Fix for PR8901: attribute "mode" rejected for enums and dependent types.

Allow "mode" attribute for enum types, except for vector modes, for compatibility with GCC.
Support "mode" attribute with dependent types.

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

llvm-svn: 259497

8 years ago[X86][AVX512] Add support for AVX512 VMOVQ (load) shuffle decoding
Simon Pilgrim [Tue, 2 Feb 2016 13:32:56 +0000 (13:32 +0000)]
[X86][AVX512] Add support for AVX512 VMOVQ (load) shuffle decoding

llvm-svn: 259496

8 years agoScopInfo: Rename AccessType -> ElementType to unify naming with method declaration
Tobias Grosser [Tue, 2 Feb 2016 13:22:54 +0000 (13:22 +0000)]
ScopInfo: Rename AccessType -> ElementType to unify naming with method declaration

llvm-svn: 259495

8 years agoFix build after clang interface change in r259489
Pavel Labath [Tue, 2 Feb 2016 13:07:27 +0000 (13:07 +0000)]
Fix build after clang interface change in r259489

llvm-svn: 259494

8 years ago[compiler-rt] add_custom_libcxx should pass LLVM_PATH and a C++ compiler
Daniel Sanders [Tue, 2 Feb 2016 12:55:28 +0000 (12:55 +0000)]
[compiler-rt] add_custom_libcxx should pass LLVM_PATH and a C++ compiler

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 259493

8 years agoTest commit (NFC).
Denis Zobnin [Tue, 2 Feb 2016 12:39:08 +0000 (12:39 +0000)]
Test commit (NFC).

llvm-svn: 259492

8 years ago[OpenCL] Eliminate warning when declaring OpenCL builtin functions.
Anastasia Stulova [Tue, 2 Feb 2016 11:29:43 +0000 (11:29 +0000)]
[OpenCL] Eliminate warning when declaring OpenCL builtin functions.

OpenCL builtin functions are usually declared in header files.
Currently clang emits warning for OpenCL builtin functions
which have the same name as standard C library functions.

This commit eliminates such warnings by not adding the C standard
includes following the restriction from OpenCL v1.2 s6.9.f.

Patch by Liu Yaxun (Sam)!

Review: http://reviews.llvm.org/D16692
llvm-svn: 259491

8 years agoMake headers self-contained.
Benjamin Kramer [Tue, 2 Feb 2016 11:06:57 +0000 (11:06 +0000)]
Make headers self-contained.

llvm-svn: 259490

8 years agoMove DebugInfoKind into its own header to cut the cyclic dependency edge from Driver...
Benjamin Kramer [Tue, 2 Feb 2016 11:06:51 +0000 (11:06 +0000)]
Move DebugInfoKind into its own header to cut the cyclic dependency edge from Driver to Frontend.

llvm-svn: 259489

8 years agoFix single-stepping onto a breakpoint
Pavel Labath [Tue, 2 Feb 2016 10:40:56 +0000 (10:40 +0000)]
Fix single-stepping onto a breakpoint

Summary:
r259344 introduced a bug, where we fail to perform a single step, when the instruction we are
stepping onto contains a breakpoint which is not valid for this thread. This fixes the problem
and add a test case.

Reviewers: tberghammer, emaste

Subscribers: abhishek.aggarwal, lldb-commits, emaste

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

llvm-svn: 259488

8 years agoclang-format: Make AlignAfterOpenBracket also affect angle brackets.
Daniel Jasper [Tue, 2 Feb 2016 10:28:11 +0000 (10:28 +0000)]
clang-format: Make AlignAfterOpenBracket also affect angle brackets.

Patch by Matthew Whitehead, thank you.

llvm-svn: 259487

8 years agowww: Mark full/partial tile separation for vectorization as 'done'
Tobias Grosser [Tue, 2 Feb 2016 09:55:59 +0000 (09:55 +0000)]
www: Mark full/partial tile separation for vectorization as 'done'

Roman contributed this

llvm-svn: 259486

8 years agowww: Update statistic code
Tobias Grosser [Tue, 2 Feb 2016 09:55:55 +0000 (09:55 +0000)]
www: Update statistic code

llvm-svn: 259485

8 years agoFix compiler lookup when specified without path
Pavel Labath [Tue, 2 Feb 2016 09:49:37 +0000 (09:49 +0000)]
Fix compiler lookup when specified without path

r259433 introduced a regression, where if a compiler is specified without a path (e.g., CC=clang,
relying on the fact that clang is in $PATH), then the test suite would fail (at the compiler
version detection step) because realpath would interpret this as a path relative to cwd). The fix
is to perform the $PATH expansion (via `which`) before the realpath step.

llvm-svn: 259484

8 years agowww: update formatting of polyhedral.info news
Tobias Grosser [Tue, 2 Feb 2016 09:30:01 +0000 (09:30 +0000)]
www: update formatting of polyhedral.info news

llvm-svn: 259483

8 years agoWebAssembly: add option to disable register coloring
JF Bastien [Tue, 2 Feb 2016 09:30:01 +0000 (09:30 +0000)]
WebAssembly: add option to disable register coloring

Having this hidden option makes it easier to debug other issues.

llvm-svn: 259482

8 years ago[ELF] Implemented -Bsymbolic-functions command line option
George Rimar [Tue, 2 Feb 2016 09:28:53 +0000 (09:28 +0000)]
[ELF] Implemented -Bsymbolic-functions command line option

-Bsymbolic-functions:
When creating a shared library, bind references to global
function symbols to the definition within the shared library, if any.

This patch also fixed behavior of already existent -Bsymbolic:
previously PLT entries were created even if -Bsymbolic was specified.

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

llvm-svn: 259481

8 years agoRemoved FeatureVFPOnlySP from the Cortex-R7 processor model
Sjoerd Meijer [Tue, 2 Feb 2016 09:28:20 +0000 (09:28 +0000)]
Removed FeatureVFPOnlySP from the Cortex-R7 processor model
description and changed the regression test accordingly.
The default configuration of a Cortex-R7 is to implement the
VFPv3-D16 architecture and the feature line as it was is too
restrictive.

llvm-svn: 259480

8 years ago[ELF] Remove redundant empty line. NFC
Simon Atanasyan [Tue, 2 Feb 2016 09:08:04 +0000 (09:08 +0000)]
[ELF] Remove redundant empty line. NFC

llvm-svn: 259479

8 years ago[ELF] Finalize .dynamic section at the end
Simon Atanasyan [Tue, 2 Feb 2016 09:07:47 +0000 (09:07 +0000)]
[ELF] Finalize .dynamic section at the end

Some dynamic table tags like RELSZ and PLTRELSZ depens on result of
finalizing corresponding relocation sections. Therefore we have to
finalize .dynamic section at the end.

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

llvm-svn: 259478

8 years agowww: Fix overlapping lines II
Tobias Grosser [Tue, 2 Feb 2016 08:49:34 +0000 (08:49 +0000)]
www: Fix overlapping lines II

llvm-svn: 259477

8 years agoAvoid overlapping lines
Tobias Grosser [Tue, 2 Feb 2016 08:47:56 +0000 (08:47 +0000)]
Avoid overlapping lines

llvm-svn: 259476

8 years agoELF: Include archive names in error messages.
Rui Ueyama [Tue, 2 Feb 2016 08:22:41 +0000 (08:22 +0000)]
ELF: Include archive names in error messages.

If object files are drawn from archive files, the error message should
be something like "conflict symbols in foo.a(bar.o) and baz.o" instead
of "conflict symbols in bar.o and baz.o". This patch implements that.

llvm-svn: 259475

8 years agoELF: Simplify and add comments.
Rui Ueyama [Tue, 2 Feb 2016 07:50:18 +0000 (07:50 +0000)]
ELF: Simplify and add comments.

llvm-svn: 259474

8 years ago[asan] Fix internal CHECK failure on double free in recovery mode.
Maxim Ostapenko [Tue, 2 Feb 2016 07:32:24 +0000 (07:32 +0000)]
[asan] Fix internal CHECK failure on double free in recovery mode.

This patches fixes https://github.com/google/sanitizers/issues/639

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

llvm-svn: 259473

8 years agoDo not use "No" prefix for boolean variables to make it simpler. NFC.
Rui Ueyama [Tue, 2 Feb 2016 07:18:15 +0000 (07:18 +0000)]
Do not use "No" prefix for boolean variables to make it simpler. NFC.

llvm-svn: 259472

8 years agoELF: Move GOT relocation handler code to one place. NFC.
Rui Ueyama [Tue, 2 Feb 2016 07:07:35 +0000 (07:07 +0000)]
ELF: Move GOT relocation handler code to one place. NFC.

llvm-svn: 259471

8 years agoELF: Move PLT relocation handler to one place. NFC.
Rui Ueyama [Tue, 2 Feb 2016 07:07:34 +0000 (07:07 +0000)]
ELF: Move PLT relocation handler to one place. NFC.

llvm-svn: 259470

8 years ago[RegisterCoalescer] Better DebugLoc for reMaterializeTrivialDef
David Majnemer [Tue, 2 Feb 2016 06:41:55 +0000 (06:41 +0000)]
[RegisterCoalescer] Better DebugLoc for reMaterializeTrivialDef

When rematerializing a computation by replacing the copy, use the copy's
location.  The location of the copy is more representative of the
original program.

This partially fixes PR10003.

llvm-svn: 259469

8 years agoELF: Move GNU_IFUNC relocation handler to one place. NFC.
Rui Ueyama [Tue, 2 Feb 2016 06:29:10 +0000 (06:29 +0000)]
ELF: Move GNU_IFUNC relocation handler to one place. NFC.

llvm-svn: 259468

8 years agoELF: Move copy relocation handler to one place. NFC.
Rui Ueyama [Tue, 2 Feb 2016 06:08:08 +0000 (06:08 +0000)]
ELF: Move copy relocation handler to one place. NFC.

llvm-svn: 259467

8 years agoELF: Move code for MIPS local GOT entries to one place. NFC.
Rui Ueyama [Tue, 2 Feb 2016 05:55:28 +0000 (05:55 +0000)]
ELF: Move code for MIPS local GOT entries to one place. NFC.

llvm-svn: 259466

8 years ago[OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.
Alexey Bataev [Tue, 2 Feb 2016 04:59:52 +0000 (04:59 +0000)]
[OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.

llvm-svn: 259465

8 years ago[OpenMP] Prevent nesting of target constructs within target code execution regions.
Arpith Chacko Jacob [Tue, 2 Feb 2016 04:00:47 +0000 (04:00 +0000)]
[OpenMP] Prevent nesting of target constructs within target code execution regions.

Summary:
This patch enhances Sema to check for the following restriction:

OpenMP 4.5 [2.17 Nesting of Regions]
If a target, target update, target data, target enter data, or
target exit data construct is encountered during execution of a
target region, the behavior is unspecified.

Reviewers: ABataev

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

llvm-svn: 259464

8 years ago[LCG] Build an edge abstraction for the LazyCallGraph and use it to
Chandler Carruth [Tue, 2 Feb 2016 03:57:13 +0000 (03:57 +0000)]
[LCG] Build an edge abstraction for the LazyCallGraph and use it to
differentiate between indirect references to functions an direct calls.

This doesn't do a whole lot yet other than change the print out produced
by the analysis, but it lays the groundwork for a very major change I'm
working on next: teaching the call graph to actually be a call graph,
modeling *both* the indirect reference graph and the call graph
simultaneously. More details on that in the next patch though.

The rest of this is essentially a bunch of over-engineering that won't
be interesting until the next patch. But this also isolates essentially
all of the churn necessary to introduce the edge abstraction from the
very important behavior change necessary in order to separately model
the two graphs. So it should make review of the subsequent patch a bit
easier at the cost of making this patch seem poorly motivated. ;]

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

llvm-svn: 259463

8 years agoNetBSD: Define initial RegisterContextNetBSD_x86_64
Kamil Rytarowski [Tue, 2 Feb 2016 03:47:44 +0000 (03:47 +0000)]
NetBSD: Define initial RegisterContextNetBSD_x86_64

Summary: Add basic support, i386 version will be added later.

Reviewers: emaste, joerg, clayborg, tfiala

Subscribers: lldb-commits

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

llvm-svn: 259462

8 years ago[LVI] Introduce an intersect operation on lattice values
Philip Reames [Tue, 2 Feb 2016 03:15:40 +0000 (03:15 +0000)]
[LVI] Introduce an intersect operation on lattice values

LVI has several separate sources of facts - edge local conditions, recursive queries, assumes, and control independent value facts - which all apply to the same value at the same location. The existing implementation was very conservative about exploiting all of these facts at once.

This change introduces an "intersect" function specifically to abstract the action of picking a good set of facts from all of the separate facts given. At the moment, this function is relatively simple (i.e. mostly just reuses the bits which were already there), but even the minor additions reveal the inherent power. For example, JumpThreading is now capable of doing an inductive proof that a particular value is always positive and removing a half range check.

I'm currently only using the new intersect function in one place. If folks are happy with the direction of the work, I plan on making a series of small changes without review to replace mergeIn with intersect at all the appropriate places.

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

llvm-svn: 259461

8 years agoAdd comments.
Rui Ueyama [Tue, 2 Feb 2016 03:11:27 +0000 (03:11 +0000)]
Add comments.

llvm-svn: 259460

8 years ago[libFuzzer] allow passing 1 or more files as individual inputs
Kostya Serebryany [Tue, 2 Feb 2016 03:03:47 +0000 (03:03 +0000)]
[libFuzzer] allow passing 1 or more files as individual inputs

llvm-svn: 259459

8 years agoUpdate a comment.
Rui Ueyama [Tue, 2 Feb 2016 02:53:58 +0000 (02:53 +0000)]
Update a comment.

llvm-svn: 259458

8 years agoMachineVerifier: Use report_context() instead of ad-hoc messages.
Matthias Braun [Tue, 2 Feb 2016 02:44:25 +0000 (02:44 +0000)]
MachineVerifier: Use report_context() instead of ad-hoc messages.

llvm-svn: 259457

8 years ago[X86] Fix a bug in getMemOpBaseRegImmOfs
Sanjoy Das [Tue, 2 Feb 2016 02:32:43 +0000 (02:32 +0000)]
[X86] Fix a bug in getMemOpBaseRegImmOfs

Fix a crash in `getMemOpBaseRegImmOfs` that happens if the base of
`MemOp` is a frame index memory operand.  The fix is to have
`getMemOpBaseRegImmOfs` bail out in such cases.  We can possibly be more
clever here, if needed.

llvm-svn: 259456

8 years agoReplace auto with the real type.
Rui Ueyama [Tue, 2 Feb 2016 02:29:03 +0000 (02:29 +0000)]
Replace auto with the real type.

llvm-svn: 259455

8 years ago[libFuzzer] fail if the corpus dir does not exist
Kostya Serebryany [Tue, 2 Feb 2016 02:07:26 +0000 (02:07 +0000)]
[libFuzzer] fail if the corpus dir does not exist

llvm-svn: 259454

8 years ago[asan] Add iOS support for Address Sanitizer
Anna Zaks [Tue, 2 Feb 2016 02:04:48 +0000 (02:04 +0000)]
[asan] Add iOS support for Address Sanitizer

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

llvm-svn: 259453