platform/upstream/llvm.git
9 years agoAArch64: Add aditional Cyclone macroop fusion opportunities
Matthias Braun [Mon, 20 Jul 2015 22:34:47 +0000 (22:34 +0000)]
AArch64: Add aditional Cyclone macroop fusion opportunities

Related to rdar://19205407

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

llvm-svn: 242724

9 years agoMachineScheduler: Restrict macroop fusion to data-dependent instructions.
Matthias Braun [Mon, 20 Jul 2015 22:34:44 +0000 (22:34 +0000)]
MachineScheduler: Restrict macroop fusion to data-dependent instructions.

Before creating a schedule edge to encourage MacroOpFusion check that:
- The predecessor actually writes a register that the branch reads.
- The predecessor has no successors in the ScheduleDAG so we can
  schedule it in front of the branch.

This avoids skewing the scheduling heuristic in cases where macroop
fusion cannot happen.

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

llvm-svn: 242723

9 years agoAvoid early pipefail exits due to grep failures in stage comparisons.
Dimitry Andric [Mon, 20 Jul 2015 22:24:40 +0000 (22:24 +0000)]
Avoid early pipefail exits due to grep failures in stage comparisons.

If objects or executables did not contain any RPATH, grep would return
nonzero, and the whole stage comparison loop would unexpectedly exit.
Fix this by checking the grep result explicitly.

llvm-svn: 242722

9 years agoSince BSD cmp(1) does not support the --ignore-initial option, use the
Dimitry Andric [Mon, 20 Jul 2015 22:07:27 +0000 (22:07 +0000)]
Since BSD cmp(1) does not support the --ignore-initial option, use the
more portable 3rd and 4th arguments to skip the first 16 bytes during
the comparison of Phase2 and Phase3 objects.

llvm-svn: 242721

9 years agoAdd 'const' to a few more functions in MachineFrameInfo
Krzysztof Parzyszek [Mon, 20 Jul 2015 22:05:38 +0000 (22:05 +0000)]
Add 'const' to a few more functions in MachineFrameInfo

Reviewer: Eric Christopher
http://reviews.llvm.org/D11372

llvm-svn: 242720

9 years agoFix comment typo (test commit). NFC
Geoff Berry [Mon, 20 Jul 2015 22:03:52 +0000 (22:03 +0000)]
Fix comment typo (test commit). NFC

llvm-svn: 242719

9 years ago[CUDA] Moved device-side triple calculation to buildCudaActions().
Artem Belevich [Mon, 20 Jul 2015 21:59:31 +0000 (21:59 +0000)]
[CUDA] Moved device-side triple calculation to buildCudaActions().

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

llvm-svn: 242718

9 years agoFix whitespace in Android.cmake.
Chaoren Lin [Mon, 20 Jul 2015 21:46:23 +0000 (21:46 +0000)]
Fix whitespace in Android.cmake.

llvm-svn: 242717

9 years ago[Android] Only enable evil libdl.a hack when building statically.
Chaoren Lin [Mon, 20 Jul 2015 21:46:20 +0000 (21:46 +0000)]
[Android] Only enable evil libdl.a hack when building statically.

llvm-svn: 242716

9 years agoSimplify now that we can iterate backwards. NFC.
Rafael Espindola [Mon, 20 Jul 2015 21:45:56 +0000 (21:45 +0000)]
Simplify now that we can iterate backwards. NFC.

llvm-svn: 242715

9 years ago[ARM] Refactor the prologue/epilogue emission to be more robust.
Quentin Colombet [Mon, 20 Jul 2015 21:42:14 +0000 (21:42 +0000)]
[ARM] Refactor the prologue/epilogue emission to be more robust.

This is the first step toward supporting shrink-wrapping for this target.

The changes could be summarized by these items:
- Expand the tail-call return as part of the expand pseudo pass.
- Get rid of the assumptions that the epilogue is the exit block:
  * Do not assume which registers are free in the epilogue. (This indirectly
    improve the lowering of the code for the segmented stacks, see the test
    cases.)
  * Take into account that the basic block can be empty.

Related to <rdar://problem/20821730>

llvm-svn: 242714

9 years ago[NVPTX] make load on global readonly memory to use ldg
Jingyue Wu [Mon, 20 Jul 2015 21:28:54 +0000 (21:28 +0000)]
[NVPTX] make load on global readonly memory to use ldg

Summary:
[NVPTX] make load on global readonly memory to use ldg

Summary:
As describe in [1], ld.global.nc may be used to load memory by nvcc when
__restrict__ is used and compiler can detect whether read-only data cache
is safe to use.

This patch will try to check whether ldg is safe to use and use them to
replace ld.global when possible. This change can improve the performance
by 18~29% on affected kernels (ratt*_kernel and rwdot*_kernel) in
S3D benchmark of shoc [2].

Patched by Xuetian Weng.

[1] http://docs.nvidia.com/cuda/kepler-tuning-guide/#read-only-data-cache
[2] https://github.com/vetter/shoc

Test Plan: test/CodeGen/NVPTX/load-with-non-coherent-cache.ll

Reviewers: jholewinski, jingyue

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 242713

9 years agoSimplify iterating over the dynamic section and report broken ones.
Rafael Espindola [Mon, 20 Jul 2015 21:23:29 +0000 (21:23 +0000)]
Simplify iterating over the dynamic section and report broken ones.

llvm-svn: 242712

9 years ago[Hexagon] Generate MUX from conditional transfers when dot-new not possible
Krzysztof Parzyszek [Mon, 20 Jul 2015 21:23:25 +0000 (21:23 +0000)]
[Hexagon] Generate MUX from conditional transfers when dot-new not possible

llvm-svn: 242711

9 years agoFix code completion tests to use an explicit modules cache path
Reid Kleckner [Mon, 20 Jul 2015 21:22:46 +0000 (21:22 +0000)]
Fix code completion tests to use an explicit modules cache path

Otherwise the stale module cache data may cause the test to fail.  These
two tests are new and are the only instances of c-index-test with
-fmodules that doesn't have an explicit module cache path.

llvm-svn: 242710

9 years agoFix the yellow colorizing and fix some logic in the "A" packet dumper.
Greg Clayton [Mon, 20 Jul 2015 21:22:18 +0000 (21:22 +0000)]
Fix the yellow colorizing and fix some logic in the "A" packet dumper.

llvm-svn: 242709

9 years agoSuppress two warnings from MSVC 2015 that are triggered under /W4. Since we turn...
Aaron Ballman [Mon, 20 Jul 2015 21:14:14 +0000 (21:14 +0000)]
Suppress two warnings from MSVC 2015 that are triggered under /W4. Since we turn off exceptions in the code base, C4577 is moot. C4091 triggers on system headers and is a benign construct.

llvm-svn: 242708

9 years agoMIR Serialization: Initial serialization of machine constant pools.
Alex Lorenz [Mon, 20 Jul 2015 20:51:18 +0000 (20:51 +0000)]
MIR Serialization: Initial serialization of machine constant pools.

This commit implements the initial serialization of machine constant pools and
the constant pool index machine operands. The constant pool is serialized using
a YAML sequence of YAML mappings that represent the constant values.
The target-specific constant pool items aren't serialized by this commit.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242707

9 years agotest-release.sh: don't include /usr/local prefix in the tarball
Hans Wennborg [Mon, 20 Jul 2015 20:36:21 +0000 (20:36 +0000)]
test-release.sh: don't include /usr/local prefix in the tarball

llvm-svn: 242706

9 years ago[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that...
Chris Bieneman [Mon, 20 Jul 2015 20:36:06 +0000 (20:36 +0000)]
[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working.

Re-landing r242059 which re-landed r241621... I'm really bad at this.

Summary (r242059):
This change re-lands r241621, with an additional fix that was required to allow tool sources to live outside the llvm checkout. It also no longer renames LLVM_EXTERNAL_*_SOURCE_DIR. This change was reverted in r241663, because it renamed several variables of the format LLVM_EXTERNAL_*_* to LLVM_TOOL_*_*.

Summary (r241621):
The tools CMakeLists file already had implicit tool registration, but there were a few things off about it that needed to be altered to make it work. This change addresses all that. The changes in this patch are:

* factored out canonicalizing tool names from paths to CMake variables * removed the LLVM_IMPLICIT_PROJECT_IGNORE mechanism in favor of LLVM_EXTERNAL_${nameUPPER}_BUILD which I renamed to LLVM_TOOL_${nameUPPER}_BUILD because it applies to internal and external tools
* removed ignore_llvm_tool_subdirectory() in favor of just setting LLVM_TOOL_${nameUPPER}_BUILD to Off
* Added create_llvm_tool_options() to resolve a bug in add_llvm_external_project() - the old LLVM_EXTERNAL_${nameUPPER}_BUILD would not work on a clean CMake directory because the option could be created after it was set in code.
* Removed all but the minimum required calls to add_llvm_external_project from tools/CMakeLists.txt

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

llvm-svn: 242705

9 years agoFix a case where we forgot to make a static local variable comdat
Reid Kleckner [Mon, 20 Jul 2015 20:35:30 +0000 (20:35 +0000)]
Fix a case where we forgot to make a static local variable comdat

Sometimes we can provide an initializer for static locals, in which case
we sometimes might need to change the type. Changing the type requires
making a new LLVM GlobalVariable, and in this codepath we were
forgetting to transfer the comdat.

Fixes PR23838.

Patch by Ivan Garramona.

llvm-svn: 242704

9 years ago[ImplicitNullChecks] Work with implicit defs.
Sanjoy Das [Mon, 20 Jul 2015 20:31:39 +0000 (20:31 +0000)]
[ImplicitNullChecks] Work with implicit defs.

Summary:
This change generalizes the implicit null checks pass to work with
instructions that don't have any explicit register defs.  This lets us
use X86's `cmp` against memory as faulting load instructions.

Reviewers: reames, JosephTremoulet

Subscribers: llvm-commits

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

llvm-svn: 242703

9 years agoMIR Parser: Add support for quoted named global value operands.
Alex Lorenz [Mon, 20 Jul 2015 20:31:01 +0000 (20:31 +0000)]
MIR Parser: Add support for quoted named global value operands.

This commit extends the machine instruction lexer and implements support for
the quoted global value tokens. With this change the syntax for the global value
identifier tokens becomes identical to the syntax for the global identifier
tokens from the LLVM's assembly language.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242702

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