platform/upstream/llvm.git
9 years agoUpdate for llvm api change.
Rafael Espindola [Mon, 20 Jul 2015 20:08:04 +0000 (20:08 +0000)]
Update for llvm api change.

llvm-svn: 242701

9 years agoRemove Elf_Rela_Iter and Elf_Rel_Iter.
Rafael Espindola [Mon, 20 Jul 2015 20:07:50 +0000 (20:07 +0000)]
Remove Elf_Rela_Iter and Elf_Rel_Iter.

Use just the pointers and check for invalid relocation sections.

llvm-svn: 242700

9 years agoEnable timeout on Windows
Ying Chen [Mon, 20 Jul 2015 20:04:22 +0000 (20:04 +0000)]
Enable timeout on Windows

Summary: - launch dotest with gtimeout if found on Windows

Reviewers: chaoren

Subscribers: lldb-commits

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

llvm-svn: 242699

9 years agoFixed style issues pointed out by Justin Bogner.
Artem Belevich [Mon, 20 Jul 2015 20:02:54 +0000 (20:02 +0000)]
Fixed style issues pointed out by Justin Bogner.

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

llvm-svn: 242698

9 years ago[lit] Implement 'env' in the internal shell
Reid Kleckner [Mon, 20 Jul 2015 19:42:08 +0000 (19:42 +0000)]
[lit] Implement 'env' in the internal shell

The MSys 2 version of 'env' cannot be used to set 'TZ' in the
environment due to some portability hacks in the process spawning
compatibility layer[1]. This affects test/Object/archive-toc.test, which
tries to set TZ in the environment.

Other than that, this saves a subprocess invocation of a small unix
utility, which is makes the tests faster.

The internal shell does not support shell variable expansion, so this
idiom in the ASan tests isn't supported yet:
  RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:opt=1 ...

[1] https://github.com/Alexpux/MSYS2-packages/issues/294

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

llvm-svn: 242696

9 years agoMark new tests as unsupported before C++11
Marshall Clow [Mon, 20 Jul 2015 19:27:47 +0000 (19:27 +0000)]
Mark new tests as unsupported before C++11

llvm-svn: 242695

9 years ago[AArch64] Change EON pattern to match more often.
Chad Rosier [Mon, 20 Jul 2015 18:42:27 +0000 (18:42 +0000)]
[AArch64] Change EON pattern to match more often.

Phabricator: http://reviews.llvm.org/D11359
Patch by Geoff Berry <gberry@codeaurora.org>

llvm-svn: 242694

9 years agoMiscellaneous Fixes for SparseBitVector
Daniel Berlin [Mon, 20 Jul 2015 18:26:23 +0000 (18:26 +0000)]
Miscellaneous Fixes for SparseBitVector

Summary:

1. Fix return value in `SparseBitVector::operator&=`.
2. Add checks if SBV is being assigned is invoking SBV.

Reviewers: dberlin

Subscribers: llvm-commits

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

Committed on behalf of sl@

llvm-svn: 242693

9 years agoFix quoting of #pragma comment for PS4.
Yunzhong Gao [Mon, 20 Jul 2015 17:46:56 +0000 (17:46 +0000)]
Fix quoting of #pragma comment for PS4.

This is the PS4 counterpart to r229376, which quotes the library name if the
name contains space. It was discovered that if a library name contains both
double-quote and space characters, quoting the name might produce unexpected
results, but we are mostly concerned with a Windows host environment, which
does not allow double-quote or slashes in file/folder names.

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

llvm-svn: 242689

9 years agoRevert static Android build until build master restarts.
Chaoren Lin [Mon, 20 Jul 2015 17:35:52 +0000 (17:35 +0000)]
Revert static Android build until build master restarts.

llvm-svn: 242688

9 years agoEliminated a potential infinite recursion in structure layout when the origin
Sean Callanan [Mon, 20 Jul 2015 16:55:19 +0000 (16:55 +0000)]
Eliminated a potential infinite recursion in structure layout when the origin
for a CXXRecordDecl gets pointed at that record.  This can happen when a type is
imported out of and then into the target's AST context without being laid out.

Also added a testcase that covers this scenario.

<rdar://problem/21844453>

llvm-svn: 242687

9 years agoImplement the default searcher for std::experimental::search.
Marshall Clow [Mon, 20 Jul 2015 16:39:28 +0000 (16:39 +0000)]
Implement the default searcher for std::experimental::search.

llvm-svn: 242682

9 years ago[NativeProcessLinux] Bugfix in the monitor thread
Pavel Labath [Mon, 20 Jul 2015 16:14:46 +0000 (16:14 +0000)]
[NativeProcessLinux] Bugfix in the monitor thread

Make sure we dont treat EINTR as a fatal error. I was getting this when trying to profile the
debugger. I'm not sure why this wasn't surfacing before, it could be that the profiler is using
some signals internally.

llvm-svn: 242681

9 years agoAdd missing test for r242296 (vec_sld)
Bill Schmidt [Mon, 20 Jul 2015 15:43:21 +0000 (15:43 +0000)]
Add missing test for r242296 (vec_sld)

llvm-svn: 242680

9 years agoImplement the plugin-based version of std::search. There are no searchers yet; those...
Marshall Clow [Mon, 20 Jul 2015 15:40:27 +0000 (15:40 +0000)]
Implement the plugin-based version of std::search. There are no searchers yet; those are coming soon.

llvm-svn: 242679

9 years ago[CodeGen] Flip lanes when lowering __builtin_palignr with one lane
Benjamin Kramer [Mon, 20 Jul 2015 15:31:17 +0000 (15:31 +0000)]
[CodeGen] Flip lanes when lowering __builtin_palignr with one lane

Otherwise we'd pick the wrong lane for the resulting shuffle and
miscompile code. PR24187.

llvm-svn: 242678

9 years ago[asan] Speed up ASan unit tests by turning off symbolication
Kuba Brecka [Mon, 20 Jul 2015 15:03:39 +0000 (15:03 +0000)]
[asan] Speed up ASan unit tests by turning off symbolication

ASan unit tests don't depend on the symbolizer and they never test its output, but currently they still run it for every crash. This patch simply disables the symbolizer for unit tests, which provides some speed up. On my system (OS X) that's about 1.4x faster, but this could be potentially much more e.g. when using atos on OS X.

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

llvm-svn: 242677

9 years agoReport errors an invalid virtual addresses.
Rafael Espindola [Mon, 20 Jul 2015 14:45:03 +0000 (14:45 +0000)]
Report errors an invalid virtual addresses.

llvm-svn: 242676

9 years agoAdd some missing 'F' flags to libm/libc builtins.
Charlie Turner [Mon, 20 Jul 2015 14:36:59 +0000 (14:36 +0000)]
Add some missing 'F' flags to libm/libc builtins.

More discussion available in http://reviews.llvm.org/D9913

llvm-svn: 242675

9 years agoRemove unnecessary code.
Rafael Espindola [Mon, 20 Jul 2015 14:29:00 +0000 (14:29 +0000)]
Remove unnecessary code.

We were locating the dynamic string table via both the section and segment
headers.

llvm-svn: 242674

9 years agoAMDGPU/SI: Add VI patterns to select FLAT instructions for global memory ops
Tom Stellard [Mon, 20 Jul 2015 14:28:41 +0000 (14:28 +0000)]
AMDGPU/SI: Add VI patterns to select FLAT instructions for global memory ops

Summary:
The MUBUF addr64 bit has been removed on VI, so we must use FLAT
instructions when the pointer is stored in VGPRs.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 242673

9 years agoSimplify the search for which segment has a virtual address. NFC.
Rafael Espindola [Mon, 20 Jul 2015 14:15:38 +0000 (14:15 +0000)]
Simplify the search for which segment has a virtual address. NFC.

llvm-svn: 242672

9 years agoImprove aarch64 instruction emulation
Tamas Berghammer [Mon, 20 Jul 2015 13:52:50 +0000 (13:52 +0000)]
Improve aarch64 instruction emulation

* Add emulation for STR/LDR immediate instructions
* Cleanup existing emulation code

llvm-svn: 242671

9 years agoSilence a -Wtype-limits warning; NFC.
Aaron Ballman [Mon, 20 Jul 2015 13:36:07 +0000 (13:36 +0000)]
Silence a -Wtype-limits warning; NFC.

llvm-svn: 242670

9 years agoSimplify iterating over program headers and detect corrupt ones.
Rafael Espindola [Mon, 20 Jul 2015 13:35:33 +0000 (13:35 +0000)]
Simplify iterating over program headers and detect corrupt ones.

We now use a simple pointer and have range loops.

llvm-svn: 242669

9 years agoRemove erroneous space in "lib64" string constant.
Yaron Keren [Mon, 20 Jul 2015 12:40:25 +0000 (12:40 +0000)]
Remove erroneous space in "lib64" string constant.

llvm-svn: 242667

9 years ago[mips] Added support for the ERETNC instruction.
Vasileios Kalintiris [Mon, 20 Jul 2015 12:28:56 +0000 (12:28 +0000)]
[mips] Added support for the ERETNC instruction.

Summary: This required adding the instruction predicate HasMips32r5.

Patch by Scott Egerton.

Reviewers: dsanders, vkalintiris

Subscribers: llvm-commits

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

llvm-svn: 242666

9 years ago[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch...
Alexey Bataev [Mon, 20 Jul 2015 12:08:00 +0000 (12:08 +0000)]
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)

Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536

llvm-svn: 242665

9 years agoAllow case-insensitive values for -mtune for AArch64 target in line with GCC.
Gabor Ballabas [Mon, 20 Jul 2015 11:28:20 +0000 (11:28 +0000)]
Allow case-insensitive values for -mtune for AArch64 target in line with GCC.

GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -mtune option for the AArch64 target.

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

llvm-svn: 242663

9 years agoFix typo found by Joerg Sonnenberger.
Yaron Keren [Mon, 20 Jul 2015 10:20:57 +0000 (10:20 +0000)]
Fix typo found by Joerg Sonnenberger.

llvm-svn: 242662

9 years agoAttempt to fix greendragon buildbot failures; apparently wc sometimes inserts a leadi...
Richard Smith [Mon, 20 Jul 2015 08:40:51 +0000 (08:40 +0000)]
Attempt to fix greendragon buildbot failures; apparently wc sometimes inserts a leading space into its output. Just check for a matching number anywhere in the output.

llvm-svn: 242661

9 years agoSupport mingw toolchain include and lib directories on Arch Linux.
Yaron Keren [Mon, 20 Jul 2015 06:38:39 +0000 (06:38 +0000)]
Support mingw toolchain include and lib directories on Arch Linux.
Thanks to Thomas Pochtrager for testing this!

llvm-svn: 242660

9 years agoExtend misc-unused-parameters to delete parameters of local functions.
Daniel Jasper [Mon, 20 Jul 2015 03:42:38 +0000 (03:42 +0000)]
Extend misc-unused-parameters to delete parameters of local functions.

Also see: llvm.org/PR24180.

llvm-svn: 242659

9 years agollvm-readobj: Handle invalid references to the string table.
Rafael Espindola [Mon, 20 Jul 2015 03:38:17 +0000 (03:38 +0000)]
llvm-readobj: Handle invalid references to the string table.

llvm-svn: 242658

9 years agoMove CHECKs closer to the RUN line.
Rafael Espindola [Mon, 20 Jul 2015 03:31:25 +0000 (03:31 +0000)]
Move CHECKs closer to the RUN line.

llvm-svn: 242657

9 years agollvm-readobj: call exit(1) on error.
Rafael Espindola [Mon, 20 Jul 2015 03:23:55 +0000 (03:23 +0000)]
llvm-readobj: call exit(1) on error.

llvm-readobj exists for testing llvm. We can safely stop the program
the first time we know the input in corrupted.

This is in preparation for making it handle a few more broken files.

llvm-svn: 242656

9 years agoRefactor duplicated code. NFC.
Rafael Espindola [Mon, 20 Jul 2015 03:01:49 +0000 (03:01 +0000)]
Refactor duplicated code. NFC.

llvm-svn: 242655

9 years agoInitial version of clang-tidy check to find and fix unused parameters.
Daniel Jasper [Mon, 20 Jul 2015 01:06:44 +0000 (01:06 +0000)]
Initial version of clang-tidy check to find and fix unused parameters.

Also see: llvm.org/PR24180.

llvm-svn: 242654

9 years ago[modules] Add (already passing) test for template default argument merging when the...
Richard Smith [Sun, 19 Jul 2015 23:44:27 +0000 (23:44 +0000)]
[modules] Add (already passing) test for template default argument merging when the template is declared in a namespace.

llvm-svn: 242653

9 years ago[Sema] Make an assertion stricter.
Davide Italiano [Sun, 19 Jul 2015 22:07:14 +0000 (22:07 +0000)]
[Sema] Make an assertion stricter.

We now check for the exact range of IdealIndex.

llvm-svn: 242652

9 years agoasan: fix a test
Dmitry Vyukov [Sun, 19 Jul 2015 21:44:49 +0000 (21:44 +0000)]
asan: fix a test

Page size is not necessary 4096.
Use sysconf to obtain page size.

llvm-svn: 242651

9 years ago[modules] Don't save uninteresting identifiers, and don't consider identifiers
Richard Smith [Sun, 19 Jul 2015 21:41:12 +0000 (21:41 +0000)]
[modules] Don't save uninteresting identifiers, and don't consider identifiers
to be interesting just because they are the name of a builtin. Reduces the size
of an empty module by over 80% (~100KB).

llvm-svn: 242650

9 years agoRemove two unused includes, part 2...
Nico Weber [Sun, 19 Jul 2015 20:44:11 +0000 (20:44 +0000)]
Remove two unused includes, part 2...

llvm-svn: 242649

9 years agoRemove two unused includes.
Nico Weber [Sun, 19 Jul 2015 20:42:48 +0000 (20:42 +0000)]
Remove two unused includes.

llvm-svn: 242648

9 years ago[sanitizer] De-flake one test.
Evgeniy Stepanov [Sun, 19 Jul 2015 19:57:13 +0000 (19:57 +0000)]
[sanitizer] De-flake one test.

signal_segv_handler.cc occasionally fails due to a suspected kernel bug.
Increasing the mapped region size seems to make the test pass reliably.

llvm-svn: 242647

9 years agoRevert "MergeFuncs: Transfer the function parameter attributes to the call site"
Arnold Schwaighofer [Sun, 19 Jul 2015 19:30:43 +0000 (19:30 +0000)]
Revert "MergeFuncs: Transfer the function parameter attributes to the call site"

It is okay to not transfer parameter attributes.

This reverts commit r242558.

llvm-svn: 242646

9 years ago[X86][SSE] Tidied up vector CTLZ/CTTZ. NFCI.
Simon Pilgrim [Sun, 19 Jul 2015 17:09:43 +0000 (17:09 +0000)]
[X86][SSE] Tidied up vector CTLZ/CTTZ. NFCI.

llvm-svn: 242645

9 years agoNarrow Callee scope, suggestion from David Blaikie.
Yaron Keren [Sun, 19 Jul 2015 15:48:07 +0000 (15:48 +0000)]
Narrow Callee scope, suggestion from David Blaikie.

llvm-svn: 242644

9 years ago[X86][SSE] Reordered cast vectorization costs. NFCI.
Simon Pilgrim [Sun, 19 Jul 2015 15:36:12 +0000 (15:36 +0000)]
[X86][SSE] Reordered cast vectorization costs. NFCI.

Reordered the data tables at the top and placed the lookups after. The first stage in the yak shaving necessary to get more accurate costs for a variety of targets given the recent improvements to SINT_TO_FP/UINT_TO_FP/SIGN_EXTEND vector lowering.

llvm-svn: 242643

9 years agolibunwind: Introduce __libunwind_config.h.
Logan Chien [Sun, 19 Jul 2015 15:23:10 +0000 (15:23 +0000)]
libunwind: Introduce __libunwind_config.h.

Introduce __libunwind_config.h to avoid cross repository circular
dependency with libcxxabi.

llvm-svn: 242642

9 years agoDe-duplicate CS.getCalledFunction() expression.
Yaron Keren [Sun, 19 Jul 2015 11:52:02 +0000 (11:52 +0000)]
De-duplicate CS.getCalledFunction() expression.

Not sure if the optimizer will save the call as getCalledFunction()
is not a trivial access function but the code is clearer this way.

llvm-svn: 242641

9 years ago[DAGCombiner] Fixed minor typo that was missed in D9097.
Simon Pilgrim [Sun, 19 Jul 2015 11:31:40 +0000 (11:31 +0000)]
[DAGCombiner] Fixed minor typo that was missed in D9097.

We don't bitcast the UNDEFs - that is done in visitVECTOR_SHUFFLE, and the getValueType should come from the operand's SDValue not the SDNode.

llvm-svn: 242640

9 years ago[X86] Add support for tbyte memory operand size for Intel-syntax x86 assembly
Michael Kuperstein [Sun, 19 Jul 2015 11:03:08 +0000 (11:03 +0000)]
[X86] Add support for tbyte memory operand size for Intel-syntax x86 assembly

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

llvm-svn: 242639

9 years agoRemove TargetInstrInfo::canFoldMemoryOperand
Simon Pilgrim [Sun, 19 Jul 2015 10:50:53 +0000 (10:50 +0000)]
Remove TargetInstrInfo::canFoldMemoryOperand

canFoldMemoryOperand is not actually used anywhere in the codebase - all existing users instead call foldMemoryOperand directly when they wish to fold and can correctly deduce what they need from the return value.

This patch removes the canFoldMemoryOperand base function and the target implementations; only x86 had a real (bit-rotted) implementation, although AMDGPU had a preparatory stub that had never needed to be completed.

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

llvm-svn: 242638

9 years agoAVX-512: Floating point conversions for SKX - DAG Lowering.
Elena Demikhovsky [Sun, 19 Jul 2015 10:17:33 +0000 (10:17 +0000)]
AVX-512: Floating point conversions for SKX - DAG Lowering.
SKX supports conversion for all FP types. Integer types include doublewords and quardwords.
I added "Legal" status for these nodes and a bunch of tests.
I added "NoVLX" for AVX DAG selection to force VLX instructions selection when VLX is supported.

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

llvm-svn: 242637

9 years agoUse SDValue bool check. NFCI.
Simon Pilgrim [Sun, 19 Jul 2015 09:56:36 +0000 (09:56 +0000)]
Use SDValue bool check. NFCI.

llvm-svn: 242636

9 years ago[X86][AVX512BW] add clang intrinsics for pmulhrsw / pmulhuw / pmulhw
Asaf Badouh [Sun, 19 Jul 2015 08:47:31 +0000 (08:47 +0000)]
[X86][AVX512BW] add clang intrinsics for pmulhrsw / pmulhuw / pmulhw

also made minor fix in "test_mm512_maskz_permutex2var_epi16"

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

llvm-svn: 242635

9 years agoFix warnings in unordered_map
Eric Fiselier [Sun, 19 Jul 2015 03:16:47 +0000 (03:16 +0000)]
Fix warnings in unordered_map

llvm-svn: 242634

9 years agoFix warnings in forwardlist
Eric Fiselier [Sun, 19 Jul 2015 00:38:37 +0000 (00:38 +0000)]
Fix warnings in forwardlist

llvm-svn: 242633

9 years agoFix warnings in deque tests
Eric Fiselier [Sun, 19 Jul 2015 00:31:54 +0000 (00:31 +0000)]
Fix warnings in deque tests

llvm-svn: 242632

9 years ago[LIT] Allow for executeCommand to take the stdin input.
Eric Fiselier [Sun, 19 Jul 2015 00:28:14 +0000 (00:28 +0000)]
[LIT] Allow for executeCommand to take the stdin input.

Summary: This patch allows executeCommand to pass a string to the processes stdin.

Reviewers: ddunbar, jroelofs

Subscribers: llvm-commits

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

llvm-svn: 242631

9 years agoCommit file missing from r242629
Eric Fiselier [Sun, 19 Jul 2015 00:11:50 +0000 (00:11 +0000)]
Commit file missing from r242629

llvm-svn: 242630

9 years agoFix warnings in array and assoc containers
Eric Fiselier [Sat, 18 Jul 2015 23:56:04 +0000 (23:56 +0000)]
Fix warnings in array and assoc containers

llvm-svn: 242629

9 years agoRemove unused typedefs in random and regex
Eric Fiselier [Sat, 18 Jul 2015 22:57:14 +0000 (22:57 +0000)]
Remove unused typedefs in random and regex

llvm-svn: 242628

9 years agoCleanup warnings in test/std/depr
Eric Fiselier [Sat, 18 Jul 2015 22:51:51 +0000 (22:51 +0000)]
Cleanup warnings in test/std/depr

llvm-svn: 242627

9 years agoFix warnings in test/std/algorithms
Eric Fiselier [Sat, 18 Jul 2015 21:53:16 +0000 (21:53 +0000)]
Fix warnings in test/std/algorithms

llvm-svn: 242626

9 years agoFix unused variable warnings in atomic tests
Eric Fiselier [Sat, 18 Jul 2015 21:40:37 +0000 (21:40 +0000)]
Fix unused variable warnings in atomic tests

llvm-svn: 242625

9 years agoFix warnings in test/std/language.support
Eric Fiselier [Sat, 18 Jul 2015 21:17:16 +0000 (21:17 +0000)]
Fix warnings in test/std/language.support

llvm-svn: 242624

9 years agoEnable and fix warnings during the build.
Eric Fiselier [Sat, 18 Jul 2015 20:40:46 +0000 (20:40 +0000)]
Enable and fix warnings during the build.

Although CMake adds warning flags, they are ignored in the libc++ headers
because the headers '#pragma system header' themselves.

This patch disables the system header pragma when building libc++ and fixes
the warnings that arose.

The warnings fixed were:
1. <memory> - anonymous structs are a GNU extension
2. <functional> - anonymous structs are a GNU extension.
3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
4. <string> - Definition is missing noexcept from declaration.
5. <__std_stream> - Unused variable.

llvm-svn: 242623

9 years ago[CodeGen] Don't dereference vector::end if the vector can be empty
Benjamin Kramer [Sat, 18 Jul 2015 20:30:11 +0000 (20:30 +0000)]
[CodeGen] Don't dereference vector::end if the vector can be empty

MSVC complains about this in debug mode. NFC.

llvm-svn: 242622

9 years ago[X86][SSE] Updated SHL/LSHR i64 vectorization costs.
Simon Pilgrim [Sat, 18 Jul 2015 20:06:30 +0000 (20:06 +0000)]
[X86][SSE] Updated SHL/LSHR i64 vectorization costs.

This was missed in D8416.

llvm-svn: 242621

9 years ago[AggressiveAntiDepBreaker] Use range loops for multimap access.
Benjamin Kramer [Sat, 18 Jul 2015 20:05:10 +0000 (20:05 +0000)]
[AggressiveAntiDepBreaker] Use range loops for multimap access.

No functionality change intended.

llvm-svn: 242620

9 years agoRangify for loops in GlobalDCE, NFC.
Yaron Keren [Sat, 18 Jul 2015 19:57:34 +0000 (19:57 +0000)]
Rangify for loops in GlobalDCE, NFC.

llvm-svn: 242619

9 years agoFix up typos in a couple of tests; due to agressive short-circuiting, they never...
Marshall Clow [Sat, 18 Jul 2015 18:24:15 +0000 (18:24 +0000)]
Fix up typos in a couple of tests; due to agressive short-circuiting, they never failed on clang or gcc, but MSVC whined. Patch by Andrew Parker.

llvm-svn: 242618

9 years agoAdd missing instrumentation in vector::insert - Patch from Anna Zaks
Eric Fiselier [Sat, 18 Jul 2015 18:22:12 +0000 (18:22 +0000)]
Add missing instrumentation in vector::insert - Patch from Anna Zaks

This patch was reviewed as D10859. http://reviews.llvm.org/D10859

llvm-svn: 242617

9 years ago[Hexagon] Use composition instead of inheritance from STL types
Benjamin Kramer [Sat, 18 Jul 2015 17:43:23 +0000 (17:43 +0000)]
[Hexagon] Use composition instead of inheritance from STL types

The standard containers are not designed to be inherited from, as
illustrated by the MSVC hacks for NodeOrdering. No functional change
intended.

llvm-svn: 242616

9 years ago[AST] Remove StmtRange in favor of an iterator_range.
Benjamin Kramer [Sat, 18 Jul 2015 17:09:36 +0000 (17:09 +0000)]
[AST] Remove StmtRange in favor of an iterator_range.

StmtRange was just a convenient wrapper for two StmtIterators before
we had real range support. This removes some of the implicit conversions
StmtRange had leading to slightly more verbose code but also should make
more obvious what's going on. No functional change intended.

llvm-svn: 242615

9 years ago[X86][SSE] Added additional fp/int tests.
Simon Pilgrim [Sat, 18 Jul 2015 17:05:39 +0000 (17:05 +0000)]
[X86][SSE] Added additional fp/int tests.

Demonstrates some shortfalls in subvector(cvt(x)) compared to cvt(subvector(x)) patterns - especially on AVX/AVX2 targets.

llvm-svn: 242614

9 years agoRefreshed tests.
Simon Pilgrim [Sat, 18 Jul 2015 16:53:51 +0000 (16:53 +0000)]
Refreshed tests.

llvm-svn: 242613

9 years ago[libcxx] Get is_*_destructible tests passing in C++03.
Eric Fiselier [Sat, 18 Jul 2015 16:43:58 +0000 (16:43 +0000)]
[libcxx] Get is_*_destructible tests passing in C++03.

Summary: This patch adds proper guards to the is_destructible tests depending on the standard version so that they pass in c++03.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 242612

9 years agoclang-format: Take nested lines into account when detection C++03
Daniel Jasper [Sat, 18 Jul 2015 16:35:30 +0000 (16:35 +0000)]
clang-format: Take nested lines into account when detection C++03
compatibility and variable alignment.

llvm-svn: 242611

9 years agoRefreshed tests and reordered in descending integer size.
Simon Pilgrim [Sat, 18 Jul 2015 16:14:56 +0000 (16:14 +0000)]
Refreshed tests and reordered in descending integer size.

llvm-svn: 242610

9 years agoTidyup shufflevector calls - don't repeat inputs if you can avoid it.
Simon Pilgrim [Sat, 18 Jul 2015 15:56:33 +0000 (15:56 +0000)]
Tidyup shufflevector calls - don't repeat inputs if you can avoid it.

llvm-svn: 242609

9 years ago[AST] Cleanup ExprIterator.
Benjamin Kramer [Sat, 18 Jul 2015 14:35:53 +0000 (14:35 +0000)]
[AST] Cleanup ExprIterator.

- Make it a proper random access iterator with a little help from iterator_adaptor_base
- Clean up users of magic dereferencing. The iterator should behave like an Expr **.
- Make it an implementation detail of Stmt. This allows inlining of the assertions.

llvm-svn: 242608

9 years ago[clang-modernize] Don't rely on iterator auto-dereferencing.
Benjamin Kramer [Sat, 18 Jul 2015 14:35:41 +0000 (14:35 +0000)]
[clang-modernize] Don't rely on iterator auto-dereferencing.

llvm-svn: 242607

9 years agoSilence the driver warnings, if we see "-w" on the Driver.
Filipe Cabecinhas [Sat, 18 Jul 2015 06:35:24 +0000 (06:35 +0000)]
Silence the driver warnings, if we see "-w" on the Driver.

Summary:
We can enable warnings after that -w, so the patch might not be 100%
correct.

The problem that triggered this is: we have some amount of tests that
expect 0 warnings (including unit tests for -w), but -w ends up not fully
silencing everything.

Reviewers: echristo, chandlerc

Subscribers: cfe-commits

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

llvm-svn: 242606

9 years ago[PM/AA] Remove the addEscapingUse update API that won't be easy to
Chandler Carruth [Sat, 18 Jul 2015 03:26:46 +0000 (03:26 +0000)]
[PM/AA] Remove the addEscapingUse update API that won't be easy to
directly model in the new PM.

This also was an incredibly brittle and expensive update API that was
never fully utilized by all the passes that claimed to preserve AA, nor
could it reasonably have been extended to all of them. Any number of
places add uses of values. If we ever wanted to reliably instrument
this, we would want a callback hook much like we have with ValueHandles,
but doing this for every use addition seems *extremely* expensive in
terms of compile time.

The only user of this update mechanism is GlobalsModRef. The idea of
using this to keep it up to date doesn't really work anyways as its
analysis requires a symmetric analysis of two different memory
locations. It would be very hard to make updates be sufficiently
rigorous to *guarantee* symmetric analysis in this way, and it pretty
certainly isn't true today.

However, folks have been using GMR with this update for a long time and
seem to not be hitting the issues. The reported issue that the update
hook fixes isn't even a problem any more as other changes to
GetUnderlyingObject worked around it, and that issue stemmed from *many*
years ago. As a consequence, a prior patch provided a flag to control
the unsafe behavior of GMR, and this patch removes the update mechanism
that has questionable compile-time tradeoffs and is causing problems
with moving to the new pass manager. Note the lack of test updates --
not one test in tree actually requires this update, even for a contrived
case.

All of this was extensively discussed on the dev list, this patch will
just enact what that discussion decides on. I'm sending it for review in
part to show what I'm planning, and in part to show the *amazing* amount
of work this avoids. Every call to the AA here is something like three
to six indirect function calls, which in the non-LTO pipeline never do
any work! =[

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

llvm-svn: 242605

9 years ago[cmake] Support enabling -Werror in the OpenMP runtime CMake build and
Chandler Carruth [Sat, 18 Jul 2015 03:14:02 +0000 (03:14 +0000)]
[cmake] Support enabling -Werror in the OpenMP runtime CMake build and
clean up the build.

This disables all of the Clang warnings that fire for me when building
libomp.so on Linux with a recent Clang binary. Lots of these should
probably be fixed, but I want to at least get the build warning-clean
and make it easy to keep that way.

I also switched a bunch of the warnings that are used both for C and C++
compiles to check the flag with C compilation test.

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

llvm-svn: 242604

9 years agoDriver/ToolChain/AMDGPU: Attempt to fix buildbots after r242601
Tom Stellard [Sat, 18 Jul 2015 02:11:07 +0000 (02:11 +0000)]
Driver/ToolChain/AMDGPU: Attempt to fix buildbots after r242601

llvm-svn: 242602

9 years agoDriver: Add AMDGPU toolchain
Tom Stellard [Sat, 18 Jul 2015 01:49:05 +0000 (01:49 +0000)]
Driver: Add AMDGPU toolchain

Summary:
This is a minimal toolchain, which sets the integrated assembler as default,
and uses lld for linking.

Reviewers: arsenm, mcrosier

Subscribers: cfe-commits

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

llvm-svn: 242601

9 years ago[Sema] Emit correct warning when copy-elision is not possible.
Davide Italiano [Sat, 18 Jul 2015 01:15:19 +0000 (01:15 +0000)]
[Sema] Emit correct warning when copy-elision is not possible.

If we're returning a function parameter, copy elision isn't possible,
so we now warn for redundant move.

PR: 23819
Differential Revision:  http://reviews.llvm.org/D11305

llvm-svn: 242600

9 years agoAdd evil hack to workaround the missing libdl.a in the Android toolchain.
Chaoren Lin [Sat, 18 Jul 2015 01:09:43 +0000 (01:09 +0000)]
Add evil hack to workaround the missing libdl.a in the Android toolchain.

Reviewers: vharron, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242599

9 years agoApply Android -pie switch to buildDefault as well.
Chaoren Lin [Sat, 18 Jul 2015 00:37:55 +0000 (00:37 +0000)]
Apply Android -pie switch to buildDefault as well.

Reviewers: ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242598

9 years ago[libFuzzer] require the files and directories passed to the fuzzer to exist
Kostya Serebryany [Sat, 18 Jul 2015 00:03:37 +0000 (00:03 +0000)]
[libFuzzer] require the files and directories passed to the fuzzer to exist

llvm-svn: 242596

9 years ago[asan] Fix shadow mapping on Android/AArch64.
Evgeniy Stepanov [Fri, 17 Jul 2015 23:51:18 +0000 (23:51 +0000)]
[asan] Fix shadow mapping on Android/AArch64.

Instrumentation and the runtime library were in disagreement about
ASan shadow offset on Android/AArch64.

This fixes a large number of existing tests on Android/AArch64.

llvm-svn: 242595

9 years ago[Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file.
Alexey Samsonov [Fri, 17 Jul 2015 23:50:08 +0000 (23:50 +0000)]
[Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file.

Summary:
This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=399
(sanitizers crash with empty suppression files).

Reviewers: kcc

Subscribers: llvm-commits

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

llvm-svn: 242594

9 years agoMore packet performance improvements.
Greg Clayton [Fri, 17 Jul 2015 23:42:28 +0000 (23:42 +0000)]
More packet performance improvements.

Changed the "jthreads" key/value in the stop reply packets to be "jstopinfo". This JSON only contains threads with valid stop reasons and allows us not to have to ask about other threads via qThreadStopInfo when we are stepping. The "jstopinfo" only gets sent if there are more than one thread since the stop reply packet contains all the info needed for a single thread.

Added a Process::WillPublicStop() in case process subclasses want to do any extra gathering for public stops. For ProcessGDBRemote, we end up sending a jThreadsInfo packet to gather all expedited registers, expedited memory and MacOSX queue information. We only do this for public stops to minimize the packets we send when we have multiple private stops. Multiple private stops happen when a source level single step, step into or step out run the process multiple times while implementing the stepping, and none of these private stops make it out to the UI via notifications because they are private stops.

llvm-svn: 242593

9 years ago[MS ABI] Explicit specialization of static data members are weak
David Majnemer [Fri, 17 Jul 2015 23:36:49 +0000 (23:36 +0000)]
[MS ABI] Explicit specialization of static data members are weak

Normally, explicit specializations are treated like strong external
definitions.  However, MSVC treats explicit specializations of static
data members as weak.  MSVC 2013's <regex> implementation has such an
explicit specialization which leads to clang emitting a strong
definition in each translation unit which includes it.  Tweak clang's
linkage calculation to give such entities GVA_StrongODR linkage instead.

This fixes PR24165.

llvm-svn: 242592

9 years agoInstrProf: Promote this assert to a report_fatal_error
Justin Bogner [Fri, 17 Jul 2015 23:31:21 +0000 (23:31 +0000)]
InstrProf: Promote this assert to a report_fatal_error

If this assert does fire, the no-asserts behaviour is an infinite
loop. It's better to crash in this case so we get a crash report and
stop wasting the user's cpu cycles.

llvm-svn: 242591

9 years agoadded test file
Naomi Musgrave [Fri, 17 Jul 2015 23:28:02 +0000 (23:28 +0000)]
added test file

llvm-svn: 242590