132023 Commits

Author SHA1 Message Date
Vedant Kumar
515ee3e025 Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.

Changes since the initial commit:
- Address undefined-var-template warning.
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:49:39 +00:00
David Blaikie
119b9304a9 llvm-dwp: Streamline duplicate DWO ID diagnostic handling
Actually use the error return path rather than printing the duplicate
information then a separate error. But also just tidy up/deduplicate
some of the code for generating the diagnostic text.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:42:27 +00:00
Xinliang David Li
addf109ca6 sync up common profile header /nfc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:34:39 +00:00
Bryan Chan
82733bd860 [SystemZ] Support LRVH and STRVH opcodes
Summary: On Linux, /usr/include/bits/byteswap-16.h defines __byteswap_16(x) as an inlined LRVH (Load Reversed Half-word) instruction. The SystemZ back-end did not support this opcode and the inlined assembly would cause a fatal error.

Reviewers: bryanpkc, uweigand

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:32:22 +00:00
Chad Rosier
94bb740359 Remove extra whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 20:03:02 +00:00
Mehdi Amini
bfed1d58c7 ThinLTO: sort inputs and schedule by decreasing size
This is a compile time optimization: keeping a large file to process
at the end hurts parallelism.
The heurisitic used right now is the input buffer size, however we
may want to consider the number of functions to import or the
different number of files to load for importing as well.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 19:33:07 +00:00
Dan Gohman
594d70d5cc [WebAssembly] Mark COPY_LOCAL and TEE_LOCAL instructions has having no side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 19:16:32 +00:00
Mehdi Amini
4f2e861e65 ThinLTO caching: reload cached file with mmap and drop heap-allocated memory buffer
This is reducing pressure on the OS memory system, and is NFC
when not using a cache.
I measure a 10x memory consumption reduction when linking opt
with full debug info.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 19:11:59 +00:00
Dan Gohman
b57691df7a [WebAssembly] Use eqz to negate a branch conditions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 18:59:34 +00:00
Geoff Berry
4d2c6de03c [BasicAA] Update comments based on feedback from hfinkel. NFCI.
Original change Hal's comments were based on:
http://reviews.llvm.org/D19730

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269678 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 18:51:54 +00:00
Dan Gohman
b5e78617f3 [WebAssembly] Add a few optimization ideas to README.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 18:51:03 +00:00
Michael Kuperstein
ee1280d412 [X86] Remove transformVSELECTtoBlendVECTOR_SHUFFLE
The new X86 shuffle lowering can do just fine without transforming vselects
into vector_shuffles. It looks like the only thing this code does right now
is cause trouble - in particular, it can lead to combine/legalization infinite
loops.

Note that it's not completely NFC, since some of the shuffle masks get inverted,
which may cause slight differences further down the line. We may want to find
a way to invert those masks, but that's orthogonal to this commit.

This fixes the hang in PR27689.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 18:27:00 +00:00
Krzysztof Parzyszek
f6ed63a0fc [Hexagon] Make getCallerSavedRegs specific to a register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269674 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 18:02:28 +00:00
Matthew Simpson
12427adbc9 [LAA] Rename forwarding conflict detection option (NFC)
This patch renames the option enabling the store-to-load forwarding conflict
detection optimization. This change was requested in the review of D20241.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269668 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 17:00:56 +00:00
Adam Nemet
095bb7d545 [LAA] Comment couldPreventStoreLoadForward. NFC
Also s/Cycles/Iters/ in NumCyclesForStoreLoadThroughMemory to make it
clear that this is not about clock cycles but loop cycles/iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:57:47 +00:00
Adam Nemet
24331f2d7f [LAA] clang-format the function couldPreventStoreLoadForward. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:57:42 +00:00
Krzysztof Parzyszek
ec3abaa727 [Hexagon] Simplify HexagonInstrInfo::isPredicable
Remove all the checks for constant extenders from isPredicable. The users
of it should be the ones checking cost/profitability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:56:10 +00:00
Xinliang David Li
61ce277483 [PM] Port indirect call promotion pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269660 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 16:31:07 +00:00
Matthew Simpson
20ebcfc5d1 [LV] Ensure safe VF for loops with interleaved accesses
The selection of the vectorization factor currently doesn't consider
interleaved accesses. The vectorization factor is based on the maximum safe
dependence distance computed by LAA. However, for loops with interleaved
groups, we should instead base the vectorization factor on the maximum safe
dependence distance divided by the maximum interleave factor of all the
interleaved groups. Interleaved accesses not in a group will be scalarized.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 15:08:20 +00:00
Renato Golin
3b0d377ef8 [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h, and fixed an UB in the new change.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 14:28:02 +00:00
Matthew Simpson
5c1f23686d [LAA] Add option to disable conflict detection (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 14:14:49 +00:00
Chad Rosier
a31dc8ea0e Use proper capitalization and punctuation per coding standards. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 12:55:01 +00:00
Simon Pilgrim
b2f8226df3 Fixed unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269650 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 11:48:54 +00:00
Simon Pilgrim
cd0de76e80 [X86][SSSE3] Lower vector CTLZ with PSHUFB lookups
This patch uses PSHUFB to lower vector CTLZ and avoid (slower) scalarizations.

The leading zero count of each 4-bit nibble of the vector is determined by using a PSHUFB lookup. Pairs of results are then repeatedly combined up to the original element width.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 11:19:11 +00:00
NAKAMURA Takumi
5c6fd15179 macho2yaml.cpp: Fix "reserved" uninitialized.
FIXME: It should reflect actual field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 11:03:56 +00:00
Chris Dewhurst
1c11e8256b [Sparc][LEON] Add LEON-specific CASA instruction.
Differental Revision: http://reviews.llvm.org/D20098

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 11:02:00 +00:00
NAKAMURA Takumi
0d8f8a0309 Appease msc18 to move PassBuilder::crossRegisterProxies() in front of PassBuilder::parseModulePassPipeline().
I don't know why it crashed cl.exe but it works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269643 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 10:13:37 +00:00
Daniel Sanders
c0807f9864 [mips][ias] Fix R_MICROMIPS_GOT16 evaluation and eliminate symbol for R_MICROMIPS_(GOT|HI|LO)16
Summary:
The failure r269410 worked around turned out to be caused by an incorrect
evaluation of R_MICROMIPS_GOT16 which then caused the GOT entries to be
incorrect.

This patch fixes the evaluation and reverts r269410.

Reviewers: sdardis, vkalintiris, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 09:33:59 +00:00
Daniel Sanders
8c7f4d958b [mips][ias] EF_MIPS_MICROMIPS should iff microMIPS code was emitted.
Summary:
This fixes PR27682. Additionally, '.set micromips' by itself is not sufficient
to raise the EF_MIPS_MICROMIPS flag. It is also necessary to emit a microMIPS
instruction. This has also been fixed.

Reviewers: sdardis, vkalintiris, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 09:10:13 +00:00
Mehdi Amini
4087d8ab8f ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the
value id to recover some determinism during serialization.

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269638 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 09:04:55 +00:00
Mehdi Amini
78132b5695 Revert "ThinLTO: fix non-determinism in bitcode writing"
This reverts commit r269634, bots are broken.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 09:04:50 +00:00
Zoran Jovanovic
2365c029a9 [mips] Addition of a third operand to the instructions [d]div, [d]divu
Author: obucina
Reviewers: dsanders
Adds support for third operand for [D]DIV[U] instructions. Additional test for case when destination reg is zero register
Differential Revision: http://reviews.llvm.org/D16888


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 08:57:59 +00:00
Mehdi Amini
5975742a11 ThinLTO: fix another non-determinism in bitcode writing
GlobalVars Refs are initialized from a DenseSet. We can sort them
using the value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 08:50:27 +00:00
Mehdi Amini
1fece96084 ThinLTO: fix non-determinism in bitcode writing
Calls are initialized from a DenseMap. We can sort them using the
value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 08:50:23 +00:00
Mehdi Amini
efdbbbabac ThinLTO: fix non-determinism in bitcode writing
Refs are initialized from a DenseSet. We can sort them using the
value id to recover some determinism during serialization.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 04:50:47 +00:00
Davide Italiano
d125b8b5b6 [PM] RewriterStatepointForGC: add missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269624 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 02:29:53 +00:00
Craig Topper
ef1f2996c1 [AVX512] Fix mask argument type for insertf32x4/inserti32x4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 21:24:45 +00:00
Simon Pilgrim
ed44c7d8a8 [X86][SSE] Simplify zero'th index extract element matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269615 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:22:50 +00:00
Simon Pilgrim
1d3f9dbe43 [X86][SSE] Removed duplicate variables. NFCI.
Removed duplicate getOperand / getSimpleValueType calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269614 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:11:10 +00:00
Craig Topper
d175e89cb6 [AVX512] Change 512-bit insertf32x4/inserti32x4 builtin name to match gcc.
Clang doesn't currently use this builtin. Will fix that soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:09:34 +00:00
Xinliang David Li
e74197bd25 [profile] Header file cleanup /NFC
Remove runtime specific decls from the common header.
This change also syncs up InstrProfData.inc between
llvm and compiler_rt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 20:06:11 +00:00
Simon Pilgrim
12384d7415 [X86][SSE] Added constant index tests for 128-bit integer vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269604 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 19:27:28 +00:00
Simon Pilgrim
04c3ec9f8d [X86][SSE] Added variable index tests for 128-bit integer vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269603 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 19:12:39 +00:00
Simon Pilgrim
02d2d979c7 Fixed typo in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:50:22 +00:00
Sanjay Patel
f081becca9 add test to show missing optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269601 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:41:18 +00:00
Simon Pilgrim
ec8eda6695 [X86][SSE] Added extra extractelement tests
Added constant index tests for all 256-bit integer vector types (touching lower / upper 128-bits)

Added variable index tests for all 256-bit integer vector types

Added out-of-range index tests for all 256-bit integer vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269600 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:22:21 +00:00
Sanjay Patel
7f7fd2a1c8 regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269596 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:05:10 +00:00
Simon Pilgrim
b6e1e95468 [X86][SSE] Regenerate extractelement tests
Added SSE2/AVX2 target tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:02:39 +00:00
Simon Pilgrim
78ba7287ef [CostModel][X86] Added scalar bitreverse tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 17:40:48 +00:00
Benjamin Kramer
95ce0c789b Move helper classes into anonymous namespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 15:18:11 +00:00