platform/upstream/llvm.git
8 years agoRevert rL275912.
Wei Mi [Mon, 18 Jul 2016 21:14:43 +0000 (21:14 +0000)]
Revert rL275912.

llvm-svn: 275915

8 years agoAdd missing headers after header cleanup in r275882.
Chaoren Lin [Mon, 18 Jul 2016 21:11:43 +0000 (21:11 +0000)]
Add missing headers after header cleanup in r275882.

llvm-svn: 275914

8 years ago[Coverage] Normalize '..' out of filename strings
Vedant Kumar [Mon, 18 Jul 2016 21:01:27 +0000 (21:01 +0000)]
[Coverage] Normalize '..' out of filename strings

This fixes the issue of having duplicate entries for the same file in a
coverage report s.t none of the entries actually displayed the correct
coverage information.

llvm-svn: 275913

8 years agoUse uniforms set to populate VecValuesToIgnore.
Wei Mi [Mon, 18 Jul 2016 20:59:53 +0000 (20:59 +0000)]
Use uniforms set to populate VecValuesToIgnore.

For instructions in uniform set, they will not have vector versions so
add them to VecValuesToIgnore.
For induction vars, those only used in uniform instructions or consecutive
ptrs instructions have already been added to VecValuesToIgnore above. For
those induction vars which are only used in uniform instructions or
non-consecutive/non-gather scatter ptr instructions, the related phi and
update will also be added into VecValuesToIgnore set.

The change will make the vector RegUsages estimation less conservative.

Differential Revision: https://reviews.llvm.org/D20474

llvm-svn: 275912

8 years agorefactor SimplifySelectInst; NFCI
Sanjay Patel [Mon, 18 Jul 2016 20:56:53 +0000 (20:56 +0000)]
refactor SimplifySelectInst; NFCI

llvm-svn: 275911

8 years agoWrite isUInt using template specializations to work around an incorrect MSVC warning.
Justin Lebar [Mon, 18 Jul 2016 20:40:35 +0000 (20:40 +0000)]
Write isUInt using template specializations to work around an incorrect MSVC warning.

Summary:
Per D22441, MSVC warns on our old implementation of isUInt<64>.  It sees
uint64_t(1) << 64 and doesn't realize that it's not going to be
executed.  Writing as a template specialization is ugly, but prevents
the warning.

Reviewers: RKSimon

Subscribers: majnemer, llvm-commits

Differential Revision: https://reviews.llvm.org/D22472

llvm-svn: 275909

8 years agoadd tests for missed sext transform
Sanjay Patel [Mon, 18 Jul 2016 20:37:51 +0000 (20:37 +0000)]
add tests for missed sext transform

llvm-svn: 275908

8 years ago[Sema] Create a separate group for incompatible function pointer warning
Bruno Cardoso Lopes [Mon, 18 Jul 2016 20:37:06 +0000 (20:37 +0000)]
[Sema] Create a separate group for incompatible function pointer warning

Give incompatible function pointer warning its own diagnostic group
but still leave it as a subgroup of incompatible-pointer-types. This is in
preparation to promote -Wincompatible-function-pointer-types to error on
darwin.

Differential Revision: https://reviews.llvm.org/D22248

rdar://problem/12907612

llvm-svn: 275907

8 years agoAdd missing header in ClangFuzzer (after r275882 cleanup)
Mehdi Amini [Mon, 18 Jul 2016 20:33:09 +0000 (20:33 +0000)]
Add missing header in ClangFuzzer (after r275882 cleanup)

llvm-svn: 275906

8 years agoAllow iOS and tvOS version numbers with 2-digit major version numbers.
Bob Wilson [Mon, 18 Jul 2016 20:29:14 +0000 (20:29 +0000)]
Allow iOS and tvOS version numbers with 2-digit major version numbers.

rdar://problem/26921601

llvm-svn: 275905

8 years agoBump version # to 4.0.0
Marshall Clow [Mon, 18 Jul 2016 20:27:19 +0000 (20:27 +0000)]
Bump version # to 4.0.0

llvm-svn: 275904

8 years agobuild_llvm_package.bat: update version to 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 20:26:46 +0000 (20:26 +0000)]
build_llvm_package.bat: update version to 4.0.0

llvm-svn: 275903

8 years ago[interception] Remove extra whitespace to appease linters (NFC)
Vedant Kumar [Mon, 18 Jul 2016 20:07:27 +0000 (20:07 +0000)]
[interception] Remove extra whitespace to appease linters (NFC)

Attempt to fix:

  http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/7774

llvm-svn: 275901

8 years agoauto-generate checks
Sanjay Patel [Mon, 18 Jul 2016 20:06:51 +0000 (20:06 +0000)]
auto-generate checks

llvm-svn: 275899

8 years agoRevert r273099 "If the revision number starts with r, drop it. It will get added...
Hans Wennborg [Mon, 18 Jul 2016 20:06:27 +0000 (20:06 +0000)]
Revert r273099 "If the revision number starts with r, drop it. It will get added back"

This doesn't seem to work with Bash:

$ /work/llvm/utils/release/merge.sh --proj llvm --rev r275870
/work/llvm/utils/release/merge.sh: line 34: ${$1#r}: bad substitution

I get the same error with and without a leading 'r'.

llvm-svn: 275898

8 years ago[Driver] Compute effective target triples once per job (NFCI)
Vedant Kumar [Mon, 18 Jul 2016 19:56:38 +0000 (19:56 +0000)]
[Driver] Compute effective target triples once per job (NFCI)

Compute an effective target triple exactly once in ConstructJob(), and
then simply pass around references to it. This eliminates wasteful
re-computation of effective triples (e.g in getARMFloatABI()).

Differential Revision: https://reviews.llvm.org/D22290

llvm-svn: 275895

8 years ago[Driver] Make Driver::DefaultTargetTriple private (NFCI)
Vedant Kumar [Mon, 18 Jul 2016 19:56:33 +0000 (19:56 +0000)]
[Driver] Make Driver::DefaultTargetTriple private (NFCI)

No in-tree targets access this `DefaultTargetTriple` directly, and usage
of default triples is generally discouraged. Make the field private.

This is part of en effort to make the clang driver use effective triples
more pervasively.

Differential Revision: https://reviews.llvm.org/D22289

llvm-svn: 275894

8 years ago[NVPTX] Force minimum alignment of 4 for byval arguments of device-side functions.
Artem Belevich [Mon, 18 Jul 2016 19:54:56 +0000 (19:54 +0000)]
[NVPTX] Force minimum alignment of 4 for byval arguments of device-side functions.

Taking address of a byval variable in PTX is legal, but currently runs
into miscompilation by ptxas on sm_50+ (NVIDIA issue 1789042).
Work around the issue by enforcing minimum alignment on byval arguments
of device functions.

The change is a no-op on SASS level for sm_3x where ptxas already aligns
local copy by at least 4.

Differential Revision: https://reviews.llvm.org/D22428

llvm-svn: 275893

8 years ago[compiler-rt] Fix incorrect handling of indirect load.
Etienne Bergeron [Mon, 18 Jul 2016 19:50:55 +0000 (19:50 +0000)]
[compiler-rt] Fix incorrect handling of indirect load.

Summary:
Indirect load are relative offset from RIP.

The current trampoline implementation is incorrectly
copying these instructions which make some unittests
crashing.

This patch is not fixing the unittests but it's fixing
the crashes. The functions are no longer hooked.

Patches will come soon to fix these unittests.

Reviewers: rnk

Subscribers: llvm-commits, wang0109, chrisha

Differential Revision: https://reviews.llvm.org/D22410

llvm-svn: 275892

8 years ago[LoopSimplify] Update LCSSA after separating nested loops.
Michael Zolotukhin [Mon, 18 Jul 2016 19:44:19 +0000 (19:44 +0000)]
[LoopSimplify] Update LCSSA after separating nested loops.

Summary:
Usually LCSSA survives this transformation, but in some cases (see
attached test) it doesn't: values from the original loop after
separating might be used from the outer loop. Before the transformation
it was the same loop, so LCSSA phis were not required.

This fixes PR28272.

Reviewers: sanjoy, hfinkel, chandlerc

Subscribers: llvm-commits

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

llvm-svn: 275891

8 years agoRevert "[ARM] Skip inline asm memory operands in DAGToDAGISel"
Vitaly Buka [Mon, 18 Jul 2016 19:44:01 +0000 (19:44 +0000)]
Revert "[ARM] Skip inline asm memory operands in DAGToDAGISel"

Breaks asan, see https://reviews.llvm.org/D22103

This reverts commit r275776.

llvm-svn: 275890

8 years agoRevert "[ARM] Update test to use CHECK-LABEL. NFCI."
Vitaly Buka [Mon, 18 Jul 2016 19:43:58 +0000 (19:43 +0000)]
Revert "[ARM] Update test to use CHECK-LABEL. NFCI."

Breaks asan, see https://reviews.llvm.org/D22103

This reverts commit r275777.

llvm-svn: 275889

8 years ago[MC] Separate non-parsing operations from conditional chains. NFC.
Nirav Dave [Mon, 18 Jul 2016 19:35:21 +0000 (19:35 +0000)]
[MC] Separate non-parsing operations from conditional chains. NFC.

llvm-svn: 275888

8 years ago[compiler-rt] Allow trampoline allocation further and 1 gig.
Etienne Bergeron [Mon, 18 Jul 2016 19:33:05 +0000 (19:33 +0000)]
[compiler-rt] Allow trampoline allocation further and 1 gig.

Summary:
The trampoline allocation limits the memory scanning to 1 gig.
There is an unittest that is allocating a large object which make
it impossible to the trampoline allocator to find a free spot.

see shadow_mapping_failures:
```
char bigchunk[1 << 30];
```

This patch is not fixing the unittest but it's fixing it's infinite
loop behavior.

Reviewers: rnk

Subscribers: llvm-commits, wang0109, chrisha

Differential Revision: https://reviews.llvm.org/D22471

llvm-svn: 275887

8 years agoUnbreak extra tools build post r275882.
Benjamin Kramer [Mon, 18 Jul 2016 19:21:22 +0000 (19:21 +0000)]
Unbreak extra tools build post r275882.

llvm-svn: 275886

8 years agomake macOS 'launch in terminal' bring terminal to the front during launch
Todd Fiala [Mon, 18 Jul 2016 19:15:38 +0000 (19:15 +0000)]
make macOS 'launch in terminal' bring terminal to the front during launch

rdar://25235812

llvm-svn: 275885

8 years ago[GVNHoist] Remove a home-grown version of replaceUsesOfWith
David Majnemer [Mon, 18 Jul 2016 19:14:14 +0000 (19:14 +0000)]
[GVNHoist] Remove a home-grown version of replaceUsesOfWith

replaceUsesOfWith will, on average, consider fewer values when trying
to do the replacement.

No functional change is intended.

llvm-svn: 275884

8 years ago[LCSSA] Post-process PHI-nodes created by SSAUpdate when constructing LCSSA form.
Michael Zolotukhin [Mon, 18 Jul 2016 19:05:08 +0000 (19:05 +0000)]
[LCSSA] Post-process PHI-nodes created by SSAUpdate when constructing LCSSA form.

Summary:
SSAUpdate might insert PHI-nodes inside loops, which can break LCSSA
form unless we fix it up.

This fixes PR28424.

Reviewers: sanjoy, chandlerc, hfinkel

Subscribers: uabelho, llvm-commits

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

llvm-svn: 275883

8 years ago[NFC] Header cleanup
Mehdi Amini [Mon, 18 Jul 2016 19:02:11 +0000 (19:02 +0000)]
[NFC] Header cleanup

Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

Differential Revision: https://reviews.llvm.org/D20100

llvm-svn: 275882

8 years agoAMDGPU: Remove pointless dyn_cast_or_null
Matt Arsenault [Mon, 18 Jul 2016 19:00:07 +0000 (19:00 +0000)]
AMDGPU: Remove pointless dyn_cast_or_null

This is already casted above so non-null

llvm-svn: 275881

8 years agoRevert "[analyzer] Add checker modeling potential C++ self-assignment"
Devin Coughlin [Mon, 18 Jul 2016 18:57:50 +0000 (18:57 +0000)]
Revert "[analyzer] Add checker modeling potential C++ self-assignment"

This reverts commit r275820. It is failing on the bots.

llvm-svn: 275880

8 years agoFix -Wmicrosoft-enum-value in GVNHoist.cpp
Reid Kleckner [Mon, 18 Jul 2016 18:53:50 +0000 (18:53 +0000)]
Fix -Wmicrosoft-enum-value in GVNHoist.cpp

llvm-svn: 275879

8 years ago[X86][SSE] Regenerate extraction from promotion test
Simon Pilgrim [Mon, 18 Jul 2016 18:53:15 +0000 (18:53 +0000)]
[X86][SSE] Regenerate extraction from promotion test

Added tests for SSE2 as well as SSE41

llvm-svn: 275878

8 years agoSupport -masm= flag for x86 assembly targets.
Yunzhong Gao [Mon, 18 Jul 2016 18:44:51 +0000 (18:44 +0000)]
Support -masm= flag for x86 assembly targets.

For assembly files without .intel_syntax or .att_syntax directives, allow the
-masm= flag to supply a default assembly dialect. For example,

C:\TMP> type intel.s
.text
mov al,0

C:\TMP> clang -masm=intel -c intel.s

Without this patch, one would need to pass an "-mllvm -x86-asm-syntax=" flag
directly to the backend.
C:\TMP> clang -mllvm --x86-asm-syntax=intel -c intel.s

Differentials Review: http://reviews.llvm.org/D22285

llvm-svn: 275877

8 years ago[X86][SSE] Regenerate extraction+store memop tests
Simon Pilgrim [Mon, 18 Jul 2016 18:44:01 +0000 (18:44 +0000)]
[X86][SSE] Regenerate extraction+store memop tests

Added tests for SSE2 as well as SSE41+AVX

llvm-svn: 275876

8 years ago[X86][SSE] Regenerate truncate+extension memop tests
Simon Pilgrim [Mon, 18 Jul 2016 18:42:33 +0000 (18:42 +0000)]
[X86][SSE] Regenerate truncate+extension memop tests

Added tests for SSE2 as well as SSE41

llvm-svn: 275875

8 years agoR600: Use new barrier intrinsic
Matt Arsenault [Mon, 18 Jul 2016 18:42:17 +0000 (18:42 +0000)]
R600: Use new barrier intrinsic

llvm-svn: 275874

8 years agoAMDGPU: Fix missing switch case warning
Matt Arsenault [Mon, 18 Jul 2016 18:40:51 +0000 (18:40 +0000)]
AMDGPU: Fix missing switch case warning

llvm-svn: 275873

8 years agoRegenerate test
Simon Pilgrim [Mon, 18 Jul 2016 18:38:51 +0000 (18:38 +0000)]
Regenerate test

llvm-svn: 275872

8 years agoAMDGPU: Add intrinsic for s_flbit_i32/v_ffbh_i32
Matt Arsenault [Mon, 18 Jul 2016 18:35:05 +0000 (18:35 +0000)]
AMDGPU: Add intrinsic for s_flbit_i32/v_ffbh_i32

llvm-svn: 275871

8 years agoAMDGPU/R600: Replace barrier intrinsics
Matt Arsenault [Mon, 18 Jul 2016 18:34:59 +0000 (18:34 +0000)]
AMDGPU/R600: Replace barrier intrinsics

llvm-svn: 275870

8 years agoAMDGPU: Remove dead check in AMDGPUPromoteAlloca
Matt Arsenault [Mon, 18 Jul 2016 18:34:53 +0000 (18:34 +0000)]
AMDGPU: Remove dead check in AMDGPUPromoteAlloca

This is currently only called with GEP users. A direct
alloca would only happen with current typed pointers
for arrays which are a perverse case.

Also fix crashes on 0 x and 1 x arrays.

llvm-svn: 275869

8 years agoAMDGPU: Remove dead code and redundant check
Matt Arsenault [Mon, 18 Jul 2016 18:34:48 +0000 (18:34 +0000)]
AMDGPU: Remove dead code and redundant check

Non intrinsic calls aren't really handled, and this
IntrinsicInst dyn_cast checks for the function for us.

llvm-svn: 275868

8 years ago[ThinLTO] Address review comments from PGO indirect call promotion (NFC)
Teresa Johnson [Mon, 18 Jul 2016 18:31:50 +0000 (18:31 +0000)]
[ThinLTO] Address review comments from PGO indirect call promotion (NFC)

Address a couple of post-commit review comments from r275707.

llvm-svn: 275867

8 years agoCodeGenPrep: use correct function to determine Global's alignment.
Tim Northover [Mon, 18 Jul 2016 18:28:52 +0000 (18:28 +0000)]
CodeGenPrep: use correct function to determine Global's alignment.

Elsewhere (particularly computeKnownBits) we assume that a global will be
aligned to the value returned by Value::getPointerAlignment. This is used to
boost the alignment on memcpy/memset, so any target-specific request can only
increase that value.

llvm-svn: 275866

8 years agoDelete dead code.
Rafael Espindola [Mon, 18 Jul 2016 18:24:41 +0000 (18:24 +0000)]
Delete dead code.

And make it easier to spot code going dead by using elf::.

llvm-svn: 275858

8 years agodocs/conf.py: update version to 4.0
Hans Wennborg [Mon, 18 Jul 2016 18:13:46 +0000 (18:13 +0000)]
docs/conf.py: update version to 4.0

llvm-svn: 275849

8 years agodocs/conf.py: update version to 4.0
Hans Wennborg [Mon, 18 Jul 2016 18:13:08 +0000 (18:13 +0000)]
docs/conf.py: update version to 4.0

llvm-svn: 275848

8 years agodocs/conf.py: update version to 4.0
Hans Wennborg [Mon, 18 Jul 2016 18:12:14 +0000 (18:12 +0000)]
docs/conf.py: update version to 4.0

llvm-svn: 275847

8 years agoTrunk release notes are now for 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 18:08:59 +0000 (18:08 +0000)]
Trunk release notes are now for 4.0.0

The 3.9 release are on the 3.9 branch.

llvm-svn: 275846

8 years agoTrunk release notes are now for 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 18:07:03 +0000 (18:07 +0000)]
Trunk release notes are now for 4.0.0

The 3.9 release are on the 3.9 branch.

llvm-svn: 275845

8 years agoTrunk release notes are now for 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 18:05:19 +0000 (18:05 +0000)]
Trunk release notes are now for 4.0.0

The 3.9 release are on the 3.9 branch.

llvm-svn: 275844

8 years ago[llvm-cov] Re-write a very opaque comment (NFC)
Vedant Kumar [Mon, 18 Jul 2016 18:02:54 +0000 (18:02 +0000)]
[llvm-cov] Re-write a very opaque comment (NFC)

llvm-svn: 275843

8 years agoTrunk release notes now refer to 4.0.0
Hans Wennborg [Mon, 18 Jul 2016 18:02:23 +0000 (18:02 +0000)]
Trunk release notes now refer to 4.0.0

llvm-svn: 275842

8 years ago[llvm-cov] Place anchors around line numbers in html reports
Vedant Kumar [Mon, 18 Jul 2016 17:53:16 +0000 (17:53 +0000)]
[llvm-cov] Place anchors around line numbers in html reports

Based on a suggestion by Harlan Haskins!

llvm-svn: 275840

8 years ago[llvm-cov] Clean up error reporting (NFC)
Vedant Kumar [Mon, 18 Jul 2016 17:53:12 +0000 (17:53 +0000)]
[llvm-cov] Clean up error reporting (NFC)

Use CodeCoverageTool::{error,warning} everywhere.

llvm-svn: 275837

8 years agoBump the trunk version to 4.0.0svn.
Hans Wennborg [Mon, 18 Jul 2016 17:51:04 +0000 (17:51 +0000)]
Bump the trunk version to 4.0.0svn.

Differential Revision: https://reviews.llvm.org/D21821

llvm-svn: 275827

8 years ago[clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate...
Reid Kleckner [Mon, 18 Jul 2016 17:49:40 +0000 (17:49 +0000)]
[clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate of /Zd

llvm-svn: 275826

8 years ago[Hexagon] Handle returning small structures by value
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:36:46 +0000 (17:36 +0000)]
[Hexagon] Handle returning small structures by value

This is not compliant with the official ABI, but allows experimentation
with calling conventions.

llvm-svn: 275825

8 years ago[Hexagon] Revert r275822: mistake in commit message
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:34:49 +0000 (17:34 +0000)]
[Hexagon] Revert r275822: mistake in commit message

llvm-svn: 275824

8 years ago[X86][AVX] Add target shuffle decode support for VBROADCAST
Simon Pilgrim [Mon, 18 Jul 2016 17:32:59 +0000 (17:32 +0000)]
[X86][AVX] Add target shuffle decode support for VBROADCAST

Currently we only decode broadcasts from a vector of the same size.

llvm-svn: 275823

8 years ago[Hexagon] Handle returning small structures by value
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:30:41 +0000 (17:30 +0000)]
[Hexagon] Handle returning small structures by value

This is compliant with the official ABI, but allows experimentation with
calling conventions.

llvm-svn: 275822

8 years agoSet up arcconfig for parallel-libs project
Jason Henline [Mon, 18 Jul 2016 17:26:26 +0000 (17:26 +0000)]
Set up arcconfig for parallel-libs project

llvm-svn: 275821

8 years ago[analyzer] Add checker modeling potential C++ self-assignment
Devin Coughlin [Mon, 18 Jul 2016 17:23:30 +0000 (17:23 +0000)]
[analyzer] Add checker modeling potential C++ self-assignment

This checker checks copy and move assignment operators whether they are
protected against self-assignment. Since C++ core guidelines discourages
explicit checking for `&rhs==this` in general we take a different approach: in
top-frame analysis we branch the exploded graph for two cases, where &rhs==this
and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the
work. It is important that we check all copy and move assignment operator in top
frame even if we checked them already since self-assignments may happen
undetected even in the same translation unit (e.g. using random indices for an
array what may or may not be the same).

A patch by Ádám Balogh!

Differential Revision: https://reviews.llvm.org/D19311

llvm-svn: 275820

8 years agoDon't use pthread initializers in constexpr constructors. Patch by elram. Reviewed...
Marshall Clow [Mon, 18 Jul 2016 17:23:06 +0000 (17:23 +0000)]
Don't use pthread initializers in constexpr constructors. Patch by elram. Reviewed at https://reviews.llvm.org/D21637.

llvm-svn: 275819

8 years ago[X86] Accept SELECT op code for x86-64 fp128 type
Chih-Hung Hsieh [Mon, 18 Jul 2016 17:20:09 +0000 (17:20 +0000)]
[X86] Accept SELECT op code for x86-64 fp128 type

DAGTypeLegalizer::CanSkipSoftenFloatOperand should allow
SELECT op code for x86_64 fp128 type for MME targets,
so SoftenFloatOperand does not abort on SELECT op code.

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

llvm-svn: 275818

8 years agoRelease note for 'nodebug' on variables
Paul Robinson [Mon, 18 Jul 2016 17:19:12 +0000 (17:19 +0000)]
Release note for 'nodebug' on variables

llvm-svn: 275817

8 years agorevert https://reviews.llvm.org/D22393
Etienne Bergeron [Mon, 18 Jul 2016 17:15:22 +0000 (17:15 +0000)]
revert https://reviews.llvm.org/D22393

It is breaking build 32-bit build bots.

llvm-svn: 275816

8 years ago[MathExtras] Fix UB in minIntN
David Majnemer [Mon, 18 Jul 2016 17:03:09 +0000 (17:03 +0000)]
[MathExtras] Fix UB in minIntN

We negated a value with a signed type which invited problems when that
value was the most negative signed number.  Use an unsigned type
for the value instead.  It will compute the same twos complement
result without the UB.

llvm-svn: 275815

8 years agoAdd streamexecutor directory
Jason Henline [Mon, 18 Jul 2016 16:44:25 +0000 (16:44 +0000)]
Add streamexecutor directory

llvm-svn: 275814

8 years agoReplace llvm.AMDGPU.ldexp with llvm.amdgcn.ldexp
Matt Arsenault [Mon, 18 Jul 2016 16:42:50 +0000 (16:42 +0000)]
Replace llvm.AMDGPU.ldexp with llvm.amdgcn.ldexp

It didn't really work on r600 to begin with, which should
get its own intrinsic.

llvm-svn: 275813

8 years ago[LoopDist] This test does not require ASSERTS
Adam Nemet [Mon, 18 Jul 2016 16:37:32 +0000 (16:37 +0000)]
[LoopDist] This test does not require ASSERTS

Only its counterpart, diagnostics-with-hotness-lazy-BFI.ll, which
invokes opt with -debug-only=.

llvm-svn: 275812

8 years ago[LoopDist] Port to new PM
Adam Nemet [Mon, 18 Jul 2016 16:29:27 +0000 (16:29 +0000)]
[LoopDist] Port to new PM

Summary:
The direct motivation for the port is to ensure that the OptRemarkEmitter
tests work with the new PM.

This remains a function pass because we not only create multiple loops
but could also version the original loop.

In the test I need to invoke opt
with -passes='require<aa>,loop-distribute'.  LoopDistribute does not
directly depend on AA however LAA does.  LAA uses getCachedResult so
I *think* we need manually pull in 'aa'.

Reviewers: davidxl, silvas

Subscribers: sanjoy, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D22437

llvm-svn: 275811

8 years ago[OptRemarkEmitter] Port to new PM
Adam Nemet [Mon, 18 Jul 2016 16:29:21 +0000 (16:29 +0000)]
[OptRemarkEmitter] Port to new PM

Summary:
The main goal is to able to start using the new OptRemarkEmitter
analysis from the LoopVectorizer.  Since the vectorizer was recently
converted to the new PM, it makes sense to convert this analysis as
well.

This pass is currently tested through the LoopDistribution pass, so I am
also porting LoopDistribution to get coverage for this analysis with the
new PM.

Reviewers: davidxl, silvas

Subscribers: llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D22436

llvm-svn: 275810

8 years agoSort include headers
Adam Nemet [Mon, 18 Jul 2016 16:29:17 +0000 (16:29 +0000)]
Sort include headers

llvm-svn: 275809

8 years ago[X86][AVX2] Added tests that demonstrate duplicate broadcasts
Simon Pilgrim [Mon, 18 Jul 2016 16:17:34 +0000 (16:17 +0000)]
[X86][AVX2] Added tests that demonstrate duplicate broadcasts

We don't yet decode broadcasts as a target shuffle

llvm-svn: 275808

8 years agoCode refactoring: extract path prefix handling code
Xinliang David Li [Mon, 18 Jul 2016 16:16:12 +0000 (16:16 +0000)]
Code refactoring: extract path prefix handling code

 .. into reusable interfaces. No functional change is expected.

llvm-svn: 275807

8 years ago[Hexagon] Misc changes to HexagonMachineScheduler, NFC
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:15:15 +0000 (16:15 +0000)]
[Hexagon] Misc changes to HexagonMachineScheduler, NFC

- Remove duplicated code.
- Convert loop to range-for.

llvm-svn: 275806

8 years ago[OpenMP] update test cases for -std=c++11 compile
Kelvin Li [Mon, 18 Jul 2016 16:09:53 +0000 (16:09 +0000)]
[OpenMP] update test cases for -std=c++11 compile

target_parallel_for_simd_collapse_messages.cpp and target_parallel_for_simd_ordered_messages.cpp give different diagnostic messages in compiling with -std=c++11. The test cases are updated to make it compatible.

Differential Revision: https://reviews.llvm.org/D22417

llvm-svn: 275805

8 years ago[Hexagon] Enable .cur formation in MISched for Hexagon V60
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:05:27 +0000 (16:05 +0000)]
[Hexagon] Enable .cur formation in MISched for Hexagon V60

Schedule a load and its use in the same packet in MISched. Previously,
isResourceAvailable was returning false for dependences in the same
packet, which prevented MISched from packetizing a load and its use in
the same packet for v60.

Patch by Ikhlas Ajbar.

llvm-svn: 275804

8 years agoPass section by reference. NFC.
Rafael Espindola [Mon, 18 Jul 2016 16:05:09 +0000 (16:05 +0000)]
Pass section by reference. NFC.

llvm-svn: 275803

8 years agoRevert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"
Alexander Kornienko [Mon, 18 Jul 2016 15:51:31 +0000 (15:51 +0000)]
Revert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"

Causes https://llvm.org/bugs/show_bug.cgi?id=28588

llvm-svn: 275801

8 years ago[Hexagon] Add verbose debugging mode to Hexagon MI Scheduler
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:47:25 +0000 (15:47 +0000)]
[Hexagon] Add verbose debugging mode to Hexagon MI Scheduler

Patch by Sergei Larin.

llvm-svn: 275799

8 years agoGPGPU: collect array references
Tobias Grosser [Mon, 18 Jul 2016 15:44:32 +0000 (15:44 +0000)]
GPGPU: collect array references

Initialize the list of references to a GPU array to ensure that the arrays that
need to be passed to kernel calls are computed correctly.  Furthermore, the very
same information is also necessary to compute synchronization correctly. As the
functionality to compute these references is already available, what is left for
us to do is only to connect the necessary functionality to compute array
reference information.

llvm-svn: 275798

8 years agoGPGPU: Pull implementation out of class definition
Tobias Grosser [Mon, 18 Jul 2016 15:44:25 +0000 (15:44 +0000)]
GPGPU: Pull implementation out of class definition

This will allow us to see the full class definition even after we add
non-trivial implementations of the different member functions.

llvm-svn: 275797

8 years ago[PowerPC] Remove redundant direct moves when extracting integers and converting to FP
Nemanja Ivanovic [Mon, 18 Jul 2016 15:30:00 +0000 (15:30 +0000)]
[PowerPC] Remove redundant direct moves when extracting integers and converting to FP

This patch corresponds to review:
https://reviews.llvm.org/D21354

We use direct moves for extracting integer elements from vectors. We also use
direct moves when converting integers to FP. When these operations are chained,
we get a direct move out of a VSR followed by a direct move back into a VSR.
These are redundant - all we need to do is line up the element and convert.

llvm-svn: 275796

8 years ago[MC] Cleanup Error Handling in AsmParser
Nirav Dave [Mon, 18 Jul 2016 15:24:03 +0000 (15:24 +0000)]
[MC] Cleanup Error Handling in AsmParser

Add parseToken and compatriot functions to stitch error checks in
straight linear code. As part of this fix some erronous handling of
directives where the EndOfStatement token either was not checked or
Lexed on termination.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

llvm-svn: 275795

8 years ago[Hexagon] Use timing class info as tie-breaker in machine scheduler
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:17:10 +0000 (15:17 +0000)]
[Hexagon] Use timing class info as tie-breaker in machine scheduler

Patch by Sirish Pande.

llvm-svn: 275794

8 years ago[Hexagon] HexagonMachineScheduler should account for resources
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:52:13 +0000 (14:52 +0000)]
[Hexagon] HexagonMachineScheduler should account for resources

The machine scheduler needs to account for available resources
more accurately in order to avoid scheduling an instruction that
forces a new packet to be created.

This occurs in two ways: First, an instruction without an available
resource may have a large priority due to other metrics and be
scheduled when there are other instructions with available resources.
Second, an instruction with a non-zero latency may become available
prematurely. In both these cases, we attempt change the priority
in order to allow a better instruction to be scheduled.

Patch by Brendon Cahoon.

llvm-svn: 275793

8 years ago[asan] Enable 48-bit VMA support on aarch64
Adhemerval Zanella [Mon, 18 Jul 2016 14:47:18 +0000 (14:47 +0000)]
[asan] Enable 48-bit VMA support on aarch64

This patch adds 48-bits VMA support for asan on aarch64. The current
47-bit mask is not suffice since on aarch64 kernel with 48-bit vma
(default on ubuntu 16.04) the process may use full VMA range as:

[...]
ffffa39a7000-ffffa39a8000 r--p 00000000 00:00 0 [vvar]
ffffa39a8000-ffffa39a9000 r-xp 00000000 00:00 0 [vdso]
ffffa39a9000-ffffa39aa000 r--p 0001c000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so
ffffa39aa000-ffffa39ac000 rw-p 0001d000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so
ffffc2227000-ffffc2248000 rw-p 00000000 00:00 0 [stack]

llvm-svn: 275792

8 years agoRevert "[test] Report error when inferior test processes exit with a non-zero code"
Pavel Labath [Mon, 18 Jul 2016 14:42:01 +0000 (14:42 +0000)]
Revert "[test] Report error when inferior test processes exit with a non-zero code"

This reverts r275782.

The problem with the commit is that it reports an additional "exit (1)" error for every file
containing a failing test, which is far more than I had intended to do. I'll need to come up with
a more fine-grained way of achieving the result.

llvm-svn: 275791

8 years ago[Hexagon] Fix zero latency instructions with multiple predecessors
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:23:10 +0000 (14:23 +0000)]
[Hexagon] Fix zero latency instructions with multiple predecessors

An instruction may have multiple predecessors that are candidates
for using .cur. However, only one of them can use .cur in the
packet. When this case occurs, we need to make sure that only
one of the dependences gets a 0 latency value.

Patch by Brendon Cahoon.

llvm-svn: 275790

8 years agoFixed errors in docs.
Alexander Kornienko [Mon, 18 Jul 2016 14:13:18 +0000 (14:13 +0000)]
Fixed errors in docs.

llvm-svn: 275789

8 years ago[SLPVectorizer][X86] Added sqrt vectorization tests
Simon Pilgrim [Mon, 18 Jul 2016 13:20:54 +0000 (13:20 +0000)]
[SLPVectorizer][X86] Added sqrt vectorization tests

llvm-svn: 275788

8 years agoChange a couple ifdefs from '#if __cplusplus >= 2011xxx' to '#ifndef _LIBCPP_CXX03_LA...
Marshall Clow [Mon, 18 Jul 2016 13:19:00 +0000 (13:19 +0000)]
Change a couple ifdefs from '#if __cplusplus >= 2011xxx' to '#ifndef _LIBCPP_CXX03_LANG'. No functionality change.

llvm-svn: 275787

8 years ago[inlineasm] Propagate operand constraints to the backend
Simon Dardis [Mon, 18 Jul 2016 13:17:31 +0000 (13:17 +0000)]
[inlineasm] Propagate operand constraints to the backend

When SelectionDAGISel transforms a node representing an inline asm
block, memory constraint information is not preserved. This can cause
constraints to be broken when a memory offset is of the form:

offset + frame index

when the frame is resolved.

By propagating the constraints all the way to the backend, targets can
enforce memory operands of inline assembly to conform to their constraints.

For MIPSR6, some instructions had their offsets reduced to 9 bits from
16 bits such as ll/sc. This becomes problematic when using inline assembly
to perform atomic operations, as an offset can generated that is too big to
encode in the instruction.

Reviewers: dsanders, vkalintris

Differential Review: https://reviews.llvm.org/D21615

llvm-svn: 275786

8 years ago[LLVM][MIPS] Revert support for FRE.
Nitesh Jain [Mon, 18 Jul 2016 12:37:44 +0000 (12:37 +0000)]
[LLVM][MIPS] Revert support for FRE.

Reviewers: jaydeep

Subscribers: bhushan, mohit.bhakkad, slthakur, llvm-commits
llvm-svn: 275785

8 years agotest: Add missing 'REQUIRES' line
Tobias Grosser [Mon, 18 Jul 2016 12:02:44 +0000 (12:02 +0000)]
test: Add missing 'REQUIRES' line

llvm-svn: 275784

8 years agoGPGPU: Create host control flow
Tobias Grosser [Mon, 18 Jul 2016 11:56:39 +0000 (11:56 +0000)]
GPGPU: Create host control flow

Create LLVM-IR for all host-side control flow of a given GPU AST. We implement
this by introducing a new GPUNodeBuilder class derived from IslNodeBuilder.  The
IslNodeBuilder will take care of generating all general-purpose ast nodes, but
we provide our own createUser implementation to handle the different GPU
specific user statements. For now, we just skip any user statement and only
generate a host-code sceleton, but in subsequent commits we will add handling of
normal ScopStmt's performing computations, kernel calls, as well as host-device
data transfers. We will also introduce run-time check generation and LICM in
subsequent commits.

llvm-svn: 275783

8 years ago[test] Report error when inferior test processes exit with a non-zero code
Pavel Labath [Mon, 18 Jul 2016 11:27:19 +0000 (11:27 +0000)]
[test] Report error when inferior test processes exit with a non-zero code

Summary:
We've run into this problem when the test errored out so early (because it could not connect to
the remote device), that the code in D20193 did not catch the error. This resulted in the test
suite reporting success with 0 tests being run.

This patch makes sure that any non-zero exit code from the inferior process gets reported as an
error. Basically I expand the concept of "exceptional exits", which was previously being used for
signals to cover these cases as well.

Reviewers: tfiala, zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D22404

llvm-svn: 275782