132004 Commits

Author SHA1 Message Date
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
Elena Demikhovsky
746e3cee24 Vector GEP - fixed a crash on InstSimplify Pass.
Vector GEP with mixed (vector and scalar) indices failed on the InstSimplify Pass when all indices are constants.

Differential revision http://reviews.llvm.org/D20149



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 12:30:25 +00:00
Davide Italiano
99d340ac17 [PM/SCCP] Fix pass dependencies.
TargetLibraryInfoWrapperPass is a dependency of
SCCP but it's not listed as such. Chandler pointed
out this is an easy mistake to make which only
surfaces in weird crashes with some flag combinations.
This code will go away anyway at some point in the
future, but as long as it's (still) exercised, try
to make it correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 08:04:28 +00:00
Mehdi Amini
27c044cbde ThinLTOCodeGenerator: fix race condition found using TSAN
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269588 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 05:49:47 +00:00
Xinliang David Li
17b42bdb89 Rename pass name to prepare to new PM porting /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 01:04:24 +00:00
Mehdi Amini
9b61d154fc Revert "Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex""
This reverts commit r269577.
Broke NetBSD, waiting for Kamil to investigate

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269584 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 23:44:21 +00:00
Davide Italiano
ba12203815 [PM] Add newline at the end of the file, for consistency. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269583 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 23:24:17 +00:00
Davide Italiano
d1aa4ea020 [PM] Refactor cross-registration of AM into an helper.
Requested by: Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 23:21:50 +00:00
Craig Topper
b776ae7788 [AVX512] Make the permd intrinsics take a 32-bit immediate to match the software spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 21:13:20 +00:00
Davide Italiano
4f31f3a2fd [SCCP] Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269578 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 20:59:09 +00:00
Mehdi Amini
e750cc1694 Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex"
This reverts commit r221331 and reinstate r220932 as discussed in D19271.
Original commit message was:

This patch adds an llvm_call_once which is a wrapper around
std::call_once on platforms where it is available and devoid
of bugs. The patch also migrates the ManagedStatic mutex to
be allocated using llvm_call_once.

These changes are philosophically equivalent to the changes
added in r219638, which were reverted due to a hang on Win32
which was the result of a bug in the Windows implementation
of std::call_once.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 20:55:52 +00:00
Saleem Abdulrasool
5ec105e613 ARM: support export directives for Windows
It seems that cl will emit the export directives for Windows ARM targets.  The
fact that it did this had originally been missed and this functionality was
never implemented.  This makes it possible to rely solely on the source code for
indicating what the exported interfaces are and brings us more compatibility
with cl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269574 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 18:58:34 +00:00
Chad Rosier
dfe70bb564 [AArch64] Update local variable names to conform to coding standard. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269573 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 18:56:28 +00:00
Elena Demikhovsky
fbe3ed3cb9 Fixed lowering of _comi_ intrinsics from all sets - SSE/SSE2/AVX/AVX-512
Differential revision http://reviews.llvm.org/D19261



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269569 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 15:06:09 +00:00
Renato Golin
7e38263edc Revert "[llc] New diagnostic handler"
This reverts commit r269563. Even though now it passes all LLDB bots
after a local fix, there's a new buildbot it fails with tests that we
hadn't seen locally:

http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15647

Adding those tests to the list to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:37:11 +00:00
NAKAMURA Takumi
92a36504fa Re-enable llvm/test/ThinLTO/X86/cache.ll.
This reverts;
  r269548, "XFAIL ThinLTO Caching test on Windows."
  r269561, "Rework r269548, "XFAIL ThinLTO Caching test on Windows.", not to use XFAIL, for now."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:28:17 +00:00
Renato Golin
495123c113 [Docs] Add some requirements to the Testing Guide
Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269566 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:27:40 +00:00
NAKAMURA Takumi
46303d8ce6 CachePruning.cpp: Don't use errno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:21:39 +00:00
Dima Stepanov
f9bb9034b0 Revert changes after test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 13:29:52 +00:00
Renato Golin
2c05d88b8d [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.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 13:15:22 +00:00