135568 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
262370bdcc [Hexagon] Use loop data prefetch on Hexagon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 14:22:43 +00:00
Reid Kleckner
12e1ff6f81 Use INT64_MAX instead of LLONG_MAX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 14:11:58 +00:00
Simon Pilgrim
370589a158 [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 (reapplied)
As reported on PR26235, we don't currently make use of the VBROADCASTF128/VBROADCASTI128 instructions (or the AVX512 equivalents) to load+splat a 128-bit vector to both lanes of a 256-bit vector.

This patch enables lowering from subvector insertion/concatenation patterns and auto-upgrades the llvm.x86.avx.vbroadcastf128.pd.256 / llvm.x86.avx.vbroadcastf128.ps.256 intrinsics to match.

We could possibly investigate using VBROADCASTF128/VBROADCASTI128 to load repeated constants as well (similar to how we already do for scalar broadcasts).

Reapplied with fix for PR28657 - removed intrinsic definitions (clang companion patch to be be submitted shortly).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276416 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 13:58:44 +00:00
Ahmed Bougacha
e01551dfca [FastISel] Ignore @llvm.assume.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 12:54:53 +00:00
Ying Yi
d6931b112a [llvm-cov] - Add the coverage of lines in the summary report.
The llvm-cov ‘report' command displays a summary of the coverage of a binary file.
The summary report currently only includes covered regions and covered functions.
This patch adds the coverage of lines in the summary report.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 12:46:13 +00:00
Benjamin Kramer
3d6f5139ec [llvm-profdata] Bring back reading profile data from STDIN.
This feature was lost in r276197.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276407 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 12:39:55 +00:00
Benjamin Kramer
964a86a1f7 Revert "[X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128"
It caused PR28657.

This reverts commit r276281.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 11:03:10 +00:00
Ying Yi
9b5c51d077 [llvm-cov] - Improve llvm-cov error message
Summary:

When giving the following command:
% llvm-cov report -instr-profile=default.profraw

llvm-cov will give the following error message:

>llvm-cov report: Not enough positional command line arguments specified!
>Must specify at least 1 positional arguments: See: orbis-llvm-cov report -help

This patch changes the error message from  '1 positional arguments'
to '1 positional argument'.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 10:52:21 +00:00
Ying Yi
bb5cae8ec9 test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276401 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 09:20:21 +00:00
Sjoerd Meijer
2a04c1ef57 This refactoring of ARM machine block size computation creates two utility
functions so that the size computation is available not only in ConstantIslands
but in other passes as well.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 08:39:12 +00:00
Hrvoje Varga
389773fbfb [mips][microMIPS] Implement SLT, SLTI, SLTIU, SLTU microMIPS32r6 instructions
Differential Revision: https://reviews.llvm.org/D19906


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 07:18:33 +00:00
Craig Topper
22cd3ed2a2 [AVX512] Add ExeDomain to vector extend and truncate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:46:44 +00:00
Craig Topper
f876acdcd8 [AVX512] Add initial support for the Execution Domain fixing pass to change some EVEX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:52 +00:00
Craig Topper
44eb5c2928 [AVX512] Fix the ExeDomain for some packed fp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:42 +00:00
Craig Topper
55cd727608 [AVX512] Add load folding for some AVX512VL logic and arithmetic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:39 +00:00
Craig Topper
71a0540303 [AVX512] Update X86InstrInfo::foldMemoryOperandCustom to handle the EVEX encoded instructions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:35 +00:00
David Majnemer
14834723b0 Don't remove side effecting instructions due to ConstantFoldInstruction
Just because we can constant fold the result of an instruction does not
imply that we can delete the instruction.  It may have side effects.

This fixes PR28655.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:54:44 +00:00
Xinliang David Li
9fb35fc1cc Sync up InstrProfData.inc with compiler-rt with fixes to references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:46:56 +00:00
Xinliang David Li
ffdd4801d1 Revert 276386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:31:26 +00:00
Xinliang David Li
4e19f6e23a Sync up InstrProfData.inc with compiler-rt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:18:17 +00:00
Pete Cooper
632eb5388b Fix r276380 for targets without REALPATH.
This was a mistake in the layout of the code from r276380.  I moved the appropriate lines out of the #ifdef to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 01:52:58 +00:00
Pete Cooper
59023bf389 Avoid dsymutil calls to getFileNameByIndex.
This change adds a hasFileAtIndex method. getChildDeclContext can first call this method, and if it returns true it knows it can then lookup the resolved path cache for the given file index. If we hit that cache then we don't even have to call getFileNameByIndex.

Running dsymutil against the swift executable built from github gives a 20% performance improvement without any change in the binary.

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

Reviewed by friss.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 01:41:32 +00:00
Vitaly Buka
cb5c574105 Fix detection of stack-use-after scope for char arrays.
Summary:
Clang inserts GetElementPtrInst so findAllocaForValue was not
able to find allocas.

PR27453

Reviewers: kcc, eugenis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:56:17 +00:00
Sanjoy Das
b00a4057b3 [IRCE] Don't misuse CHECK-LABEL; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:41:02 +00:00
Sanjoy Das
304682fc9c [IRCE] Add an option to skip profitability checks
If `-irce-skip-profitability-checks` is passed in, IRCE will kick in in
all cases where it is legal for it to kick in.  This flag is intended to
help diagnose and analyse performance issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:40:56 +00:00
Sebastian Pop
09d947ac61 GVN-hoist: move check before mutating the IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:07:01 +00:00
David Majnemer
a8d06bee41 [AArch64] Cleanup sign extend in genAlternativeCodeSequence
Use the machinery in MathExtras instead of rolling it by hand.

This fixes PR28624.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:46:56 +00:00
Sebastian Pop
96c53f4696 GVN-hoist: add missing check for all GEP operands available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:32:39 +00:00
Vedant Kumar
23553e9b24 [llvm-cov] Strengthen a test case
Check that stylesheets work when we're not using -output-dir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:31:26 +00:00
Douglas Katzman
4f9c571a90 [Sparc]: Fix bug in LowerSTORE due to r275592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:28:54 +00:00
Sanjay Patel
ff2ae48761 [InstCombine] break up foldICmpEqualityWithConstant(); NFCI
Almost all of these folds require changes to allow vector types. 
Splitting up the logic should make that easier to do incrementally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:27:36 +00:00
Vedant Kumar
6aa68be50e [llvm-cov] Use relative paths to the stylesheet (for html reports)
This makes it easy to swap out the default stylesheet for a custom one.
It also shaves ~6.62 MB out of the report directory for a full coverage
build of llvm+clang.

While we're at it, prune the CSS and add tests for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:26:15 +00:00
Sebastian Pop
0eeda09fc4 GVH-hoist: only clone GEPs (PR28606)
Do not clone stored values unless they are GEPs that are special cased to avoid
hoisting them without hoisting their associated ld/st.

Differential revision: https://reviews.llvm.org/D22652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:22:10 +00:00
Daniel Dunbar
fe1bb06072 [lit] Use full config path in diagnostics.
- This allows tools like emacs to automatically find the config file path when
   you step through errors.

 - Patch by Dave Abrahams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:20:41 +00:00
Xinliang David Li
5a06a46a4f [Profile] deprecate __llvm_profile_override_default_filename
This eliminates unncessary calls and init functions.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:19:10 +00:00
Daniel Dunbar
f593e4de93 [lit] Bump version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:17:44 +00:00
Wei Mi
3a4fa31d34 [PM] Port NaryReassociate to the new PM
Differential Revision: https://reviews.llvm.org/D22648


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:28:52 +00:00
Quentin Colombet
a2132baaff [MIRTesting] Abort when failing to parse a function.
When we failed to parse a function in the mir parser, we should abort
the whole compilation instead of continuing in a weird state. Indeed,
this was creating strange machine function passes failures that were
hard to understand, until we notice that the function actually did not
get parsed correctly!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:25:57 +00:00
Michael Kuperstein
39008ac365 [X86] Do not use AND8ri8 in AVX512 pattern
This variant is (as documented in the TD) for disassembler use only, and should
not be used in patterns - it is longer, and is broken on 64-bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:24:08 +00:00
Sanjay Patel
366a2caf93 [InstSimplify] don't crash handling a pointer or aggregate type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:56:00 +00:00
Akira Hatanaka
477502e694 [AArch64][Inline-Asm] Return the 32-bit floating point register class
when constraint "w" is used on a 32-bit operand.

This enables compiling the following code, which used to error out in
the backend:

void foo1(int a) {
  asm volatile ("sqxtn h0, %s0\n" : : "w"(a):);
}

Fixes PR28633.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:39:05 +00:00
Michael Gottesman
f517b9f699 [cmake] Move the including of utils/unittests under LLVM_INCLUDE_UTILS instead of LLVM_INCLUDE_TESTS.
This does not change anything by default since LLVM_INCLUDE_UTILS is already set
to TRUE by default. In addition, since LLVM_INCLUDE_TESTS => LLVM_INCLUDE_UTILS,
the only way that this can cause changes is in the case where LLVM_INCLUDE_UTILS
is set to TRUE, but LLVM_INCLUDE_TESTS is FALSE. In that case, building gtest is
not a huge cost.

The reason to do this is that without this change, one can not turn off
LLVM_INCLUDE_TESTS in downstream projects that also use gtest for unittests. It
also just in general makes more sense since LLVM_INCLUDE_UTILS gates FileCheck
and other utilities that are along the lines of gtest.

Additionally from talking with chandlerc, this was not done for any specific
reason, so there is no reason not to do it and lots of benefit to doing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276342 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:35:23 +00:00
Sanjay Patel
32995b5eb3 [InstSimplify] recognize trunc + icmp sgt/slt variants of select simplifications (PR28466)
rL245171 exposed a hole in InstSimplify that manifested in a strange way in PR28466:
https://llvm.org/bugs/show_bug.cgi?id=28466

It's possible to use trunc + icmp sgt/slt in place of an and + icmp eq/ne, so we need to
recognize that pattern to eliminate selects that are choosing between some value and some
bitmasked version of that value.

Note that there is significant room for improvement (refactoring) and enhancement (more
patterns, possibly in InstCombine rather than here).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:26:45 +00:00
Adam Nemet
4d4b609de8 [OptDiag,LDist] Convert remaining opt remarks to use the new API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:21:34 +00:00
Matthew Simpson
0414f48742 [LV] Move vector int induction update to end of latch
This patch moves the update instruction for vectorized integer induction phi
nodes to the end of the latch block. This ensures consistent placement of all
induction updates across all the kinds of int inductions we create (scalar,
splat vector, or vector phi).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:20:15 +00:00
Reid Kleckner
09577f3859 Fix the clang-cl self-host with VS 2013 headers
std::numeric_limits<int64_t>::max() is not constexpr in VC 2013 headers,
and Clang complains that it isn't. MSVC 2013 itself is emitting a
dynamic initializer for this thing. Instead, use an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:06:04 +00:00
George Burgess IV
d0a4a04032 Normalize file docs. NFC.
Having the added `\brief` made doxygen interpret it as the summary for
the `llvm` namespace (visible at:
http://llvm.org/doxygen/namespaces.html).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:52:35 +00:00
Rong Xu
8dbdfe6cb7 [PGO] Make needsComdatForCounter() available (NFC)
Move needsComdatForCounter() to lib/ProfileData/InstrProf.cpp from
lib/Transforms/Instrumentation/InstrProfiling.cpp to make is available for
other files.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:50:02 +00:00
Sanjay Patel
d1938d1914 add vector tests and a simpler version of the negative tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:11:08 +00:00
Renato Golin
568aa3276e [docs] Move GitHub to GitHubSubMod
Given that other proposals are making their way through, it's better if we
specify what GitHub proposal this is, in case there are others that also
involve GitHub, but not sub-modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 19:52:27 +00:00