136247 Commits

Author SHA1 Message Date
Tim Northover
5b8a0c5c72 GlobalISel: refuse to halve size of 1-byte & odd-sized LLTs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:54:05 +00:00
Matt Arsenault
ca17b84bf9 GVNHoist: Don't hoist convergent calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:52:57 +00:00
Lang Hames
6429bcfeba [ExecutionEngine] Refactor - Roll JITSymbolFlags functionality into JITSymbol.h
and remove the JITSymbolFlags header.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:32:37 +00:00
David Majnemer
5964d136e5 [coroutines] Part 4[ab]: Coroutine Devirtualization: Lower coro.resume and coro.destroy.
This is the forth patch in the coroutine series. CoroEaly pass now lowers coro.resume
and coro.destroy intrinsics by replacing them with an indirect call to an address
returned by coro.subfn.addr intrinsic. This is done so that CGPassManager recognizes
devirtualization when CoroElide replaces a call to coro.subfn.addr with an appropriate
function address.

Patch by Gor Nishanov!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:30:07 +00:00
Sanjay Patel
0d2bdafffd [InstCombine] use m_APInt to allow icmp eq (and X, C1), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 20:05:02 +00:00
Yaxun Liu
77990e6e79 [OpenCL] Add missing tests for getOCLTypeName
Adding missing tests for OCL type names for half, float, double, char, short, long, and unknown.

Patch by Aaron En Ye Shi.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:45:00 +00:00
Zachary Turner
92cd0ecb7f [CodeView] Use llvm::Error instead of std::error_code.
This eliminates the remnants of std::error_code from the
DebugInfo libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:39:55 +00:00
Tim Northover
837c7975f4 AArch64: don't assume all i128s are BUILD_PAIRs
It leads to a crash when they're not. I'm *sure* I've made this mistake before,
at least once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:32:28 +00:00
Chris Bieneman
8acfa94475 [macho2yaml] String table can contain null strings
Since the string table being read from the MachO is a properly bounded StringRef including null strings is safe and reasonable.

This occurs frequently with stripped binaries where the string table has been modified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277753 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:19:25 +00:00
Sanjay Patel
8c8f13e353 [InstCombine] use m_APInt to allow icmp eq (or X, C1), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 19:12:12 +00:00
Tim Northover
75fec5d2d9 GlobalISel: also add G_TRUNC to IRTranslator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:35:17 +00:00
Tim Northover
143570a5a5 GlobalISel: add code to widen scalar G_ADD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:35:11 +00:00
Sanjay Patel
5c3c157c52 remove FIXME comments (fixed with r277738)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:14:02 +00:00
Derek Schuff
1d5ec70571 [WebAssembly] Check return value of getRegForValue in FastISel
Previously, FastISel for WebAssembly wasn't checking the return value of
`getRegForValue` in certain cases, which would generate instructions
referencing NoReg. This patch fixes this behavior.

Patch by Dominic Chen

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:01:52 +00:00
Vedant Kumar
df48bd9ec3 [llvm-cov] Add some documentation for the -tab-size option
Also, un-hide the cl::opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 18:00:42 +00:00
Krzysztof Parzyszek
24c0d9d17f [Hexagon] Validate register class when doing bit simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:56:19 +00:00
Sanjay Patel
47b6d6791b [InstCombine] use m_APInt to allow icmp eq (op X, Y), C folds for splat constant vectors
I'm removing a misplaced pair of more specific folds from InstCombine in this patch as well,
so we know where those folds are happening in InstSimplify.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277738 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:48:04 +00:00
Simon Pilgrim
dbed1dc732 [X86][SSE] Rename target shuffle unary permute matching function. NFCI.
In preparation for adding a binary permute matching function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 17:16:50 +00:00
Sanjay Patel
2c8de85448 add tests for missing vector folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 16:48:30 +00:00
Alina Sbirlea
4ebfadfe76 LoadStoreVectorizer: Remove TargetBaseAlign. Keep alignment for stack adjustments.
Summary:
TargetBaseAlign is no longer required since LSV checks if target allows misaligned accesses.
A constant defining a base alignment is still needed for stack accesses where alignment can be adjusted.

Previous patch (D22936) was reverted because tests were failing. This patch also fixes the cause of those failures:
- x86 failing tests either did not have the right target, or the right alignment.
- NVPTX failing tests did not have the right alignment.
- AMDGPU failing test (merge-stores) should allow vectorization with the given alignment but the target info
  considers <3xi32> a non-standard type and gives up early. This patch removes the condition and only checks
  for a maximum size allowed and relies on the next condition checking for %4 for correctness.
  This should be revisited to include 3xi32 as a MVT type (on arsenm's non-immediate todo list).

Note that checking the sizeInBits for a MVT is undefined (leads to an assertion failure),
so we need to create an EVT, hence the interface change in allowsMisaligned to include the Context.

Reviewers: arsenm, jlebar, tstellarAMD

Subscribers: jholewinski, arsenm, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 16:38:44 +00:00
Adrian Prantl
230bca5db7 Shamelessly add myself to CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277734 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 16:28:22 +00:00
Daniel Sanders
25db202730 [mips] Set Personality and LSDA encoding for FreeBSD
Reviewers: seanbruno, sdardis

Subscribers: tberghammer, danalbert, srhines, dsanders, sdardis, llvm-commits, seanbruno

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 15:36:03 +00:00
Sanjay Patel
bd9e8a1faf [InstCombine] use m_APInt to allow icmp eq (sub C1, X), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 15:19:25 +00:00
Simon Pilgrim
7c37f8e1f6 [X86][SSE] Split off shuffle mask canonicalization from lowerVectorShuffle. NFCI.
The new function now returns true if the shuffle should be commuted.

This will allow target shuffle combines to share the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 14:21:32 +00:00
Krzysztof Parzyszek
14ae142500 [Hexagon] Clear kill flags from modified registers in peephole optimizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 14:17:16 +00:00
Nikolai Bozhenov
17c4ba4fe4 [X86] Heuristic to selectively build Newton-Raphson SQRT estimation
On modern Intel processors hardware SQRT in many cases is faster than RSQRT
followed by Newton-Raphson refinement. The patch introduces a simple heuristic
to choose between hardware SQRT instruction and Newton-Raphson software
estimation.

The patch treats scalars and vectors differently. The heuristic is that for
scalars the compiler should optimize for latency while for vectors it should
optimize for throughput. It is based on the assumption that throughput bound
code is likely to be vectorized.

Basically, the patch disables scalar NR for big cores and disables NR completely
for Skylake. Firstly, scalar SQRT has shorter latency than NR code in big cores.
Secondly, vector SQRT has been greatly improved in Skylake and has better
throughput compared to NR.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 12:47:28 +00:00
Hrvoje Varga
d2c97748ac [mips][microMIPS] Implement CFC1, CFC2, CTC1 and CTC2 instructions
Differential Revision: https://reviews.llvm.org/D22347


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 11:22:52 +00:00
Simon Pilgrim
2bdfdf95e6 [X86] Dropped XOP ctbits checks - they match the AVX checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277718 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 11:04:13 +00:00
Simon Pilgrim
d81c2d5aa5 [X86][SSE] Add initial costs for vector CTTZ/CTLZ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277716 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 10:51:41 +00:00
Ying Yi
65787e2459 [LLVM-COV]Replace tabs to the space indentations in the HTML coverage report.
When using orbis-llvm-cov.exe to generate the HTML report, the HTML report 
can look quite different to the source file if it includes tabs.The default
tab size is 2 spaces instead of 8 spaces. A command line switch is
be added to set the tab size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 10:39:43 +00:00
Jonas Hahnfeld
1d5ec2171f Remove LLVM_ENABLE_LIBCXXABI
libc++.so is now a linker script that includes -lc++abi if necessary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277714 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 10:24:48 +00:00
Simon Pilgrim
3808648e3a [X86][SSE] Don't decide when to scalarize CTTZ/CTLZ for performance at lowering - this is what cost models are for
Improved CTTZ/CTLZ costings will be added shortly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 10:14:39 +00:00
Simon Dardis
4a2734b5c9 [mips] Enable tail calls by default
Enable tail calls by default for (micro)MIPS(64).

microMIPS is slightly more tricky than doing it for MIPS(R6) or microMIPSR6.
microMIPS has two instruction encodings: 16bit and 32bit along with some
restrictions on the size of the instruction that can fill the delay slot.
For safe tail calls for microMIPS, the delay slot filler attempts to find
a correct size instruction for the delay slot of TAILCALL pseudos.

Reviewers: dsanders, vkalintris

Subscribers: jfb, dsanders, sdardis, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 09:17:07 +00:00
Diana Picus
de3bef53a2 Typo fix in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277704 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 08:25:08 +00:00
Dean Michael Berris
499b5cd05a [XRay] Align entry and return sleds to 2 byte boundaries
This should ensure that we can atomically write two bytes (on top of the
retq and the one past it) and have those two bytes not straddle cache
lines.

We also move the label past the alignment instruction so that we can refer
to the actual first instruction, as opposed to potential padding before the
aligned instruction.

Update the tests to allow us to reflect the new order of assembly.

Reviewers: rSerge, echristo, majnemer

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 07:37:28 +00:00
Matt Arsenault
579ced7d96 AMDGPU: Fix a slow test by using basic regalloc
This just tests that the register limit isn't exceeded,
so the regisetr allocation doesn't need to be great.'

The critically slow part is all in greedy RA, so
switch to basic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 07:04:54 +00:00
Amaury Sechet
7f30223541 Fix intrinsics.ll test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277695 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 05:35:25 +00:00
Amaury Sechet
e56e9e73a2 Add popcount(n) == bitsize(n) -> n == -1 transformation.
Summary: As per title.

Reviewers: majnemer, spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 05:27:20 +00:00
David Majnemer
ad1fd74c16 Forgot the dyn_cast_or_null intended for r277691.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 04:47:18 +00:00
David Majnemer
8da786cb44 Reinstate "[CloneFunction] Don't remove side effecting calls"
This reinstates r277611 + r277614 and reverts r277642.  A cast_or_null
should have been a dyn_cast_or_null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 04:24:02 +00:00
Bruno Cardoso Lopes
b290294cc9 Revert "GVN-hoist: enable by default" & "Make GVN Hoisting obey optnone/bisect."
This reverts commits r277685 & r277688. r277685 broke compiler-rt
compilation http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/23335
and r277685 is a followup from it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 04:16:24 +00:00
Chandler Carruth
411e616ba3 [PM] Change the name of the repeating utility to something less
overloaded (and simpler).

Sean rightly pointed out in code review that we've started using
"wrapper pass" as a specific part of the old pass manager, and in fact
it is more applicable there. Here, we really have a pass *template* to
build a repeated pass, so call it that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 03:52:53 +00:00
Sebastian Pop
00b08e78da Make GVN Hoisting obey optnone/bisect.
Differential Revision: https://reviews.llvm.org/D23136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 02:05:08 +00:00
Sebastian Pop
e718640897 GVN-hoist: enable by default
As we addressed all compilation time problems with GVN-hoist
https://llvm.org/bugs/show_bug.cgi?id=28670
this patch turns GVN-hoist back by default.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04 01:59:42 +00:00
Rui Ueyama
f935d6f0e3 pdbdump: Add a test to verify the result of PDB -> YAML -> PDB conversions.
Currently not all information can be restored from YAML.
This test verifies only the PDB header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 23:54:39 +00:00
Rui Ueyama
6775a0d29b pdbdump: Fix crash bug.
pdbdump calls DbiStreamBuilder::commit through PDBFileBuilder::commit
without calling DbiStreamBuilder::finalize. Because `finalize` initializes
`Header` member, `Header` remained nullptr which caused a crash bug.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 23:43:23 +00:00
Justin Bogner
e1dd154bf6 llvm-profdata: Clarify the top level help
It wasn't very obvious that you're supposed to call help on the
subcommands. This should help.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277678 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 23:10:51 +00:00
Matthias Braun
8669eef6f1 RenameIndependentSubregs: Fix liveness query in rewriteOperands()
rewriteOperands() always performed liveness queries at the base index
rather than the RegSlot/Base as apropriate for the machine operand. This
could lead to illegal rewriting in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 22:37:47 +00:00
Sanjay Patel
f29318e873 [InstCombine] use m_APInt to allow icmp eq (add X, C1), C2 folds for splat constant vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 22:08:44 +00:00
Kevin Enderby
b48816b9fc Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<>
changing them to Expected<> to allow them to pass through llvm Errors.
No functional change.

This commit by itself will break the next lld builds.  I’ll be committing the
matching change for lld immediately next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277656 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03 21:57:47 +00:00