Simon Pilgrim [Sat, 31 Jan 2015 14:09:36 +0000 (14:09 +0000)]
[X86][SSE] Shuffle mask decode support for zero extend, scalar float/double moves and integer load instructions
This patch adds shuffle mask decodes for integer zero extends (pmovzx** and movq xmm,xmm) and scalar float/double loads/moves (movss/movsd).
Also adds shuffle mask decodes for integer loads (movd/movq).
Differential Revision: http://reviews.llvm.org/D7228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227688
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 31 Jan 2015 11:17:59 +0000 (11:17 +0000)]
[PM] Switch the TargetMachine interface from accepting a pass manager
base which it adds a single analysis pass to, to instead return the type
erased TargetTransformInfo object constructed for that TargetMachine.
This removes all of the pass variants for TTI. There is now a single TTI
*pass* in the Analysis layer. All of the Analysis <-> Target
communication is through the TTI's type erased interface itself. While
the diff is large here, it is nothing more that code motion to make
types available in a header file for use in a different source file
within each target.
I've tried to keep all the doxygen comments and file boilerplate in line
with this move, but let me know if I missed anything.
With this in place, the next step to making TTI work with the new pass
manager is to introduce a really simple new-style analysis that produces
a TTI object via a callback into this routine on the target machine.
Once we have that, we'll have the building blocks necessary to accept
a function argument as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227685
91177308-0d34-0410-b5e6-
96231b3b80d8
Kumar Sukhani [Sat, 31 Jan 2015 10:43:18 +0000 (10:43 +0000)]
[asan][mips] Fix MIPS64 Asan mapping
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227684
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 31 Jan 2015 09:13:36 +0000 (09:13 +0000)]
Replace another std::set in the core of CodeGenRegister, this time with sorted arrays.
The hot path through this region of code does lots of batch inserts into sets. By storing them as sorted arrays, we can defer the sorting to the end of the batch, which is dramatically more efficient. This reduces tblgen runtime by 25% on my worst-case target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227682
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 31 Jan 2015 07:49:41 +0000 (07:49 +0000)]
Change more of the guts of CodeGenRegister's RegUnit tracking to be based on bit vectors.
This is a continuation of my prior work to move some of the inner workings for CodeGenRegister to use bit vectors when computing about register units. This is highly beneficial to TableGen runtime on targets with large, dense register files. This patch represents a ~40% runtime reduction over and above my earlier improvement on a stress test of this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227678
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 31 Jan 2015 04:46:50 +0000 (04:46 +0000)]
llvm-readobj: add a test case for ARM_MOV32(T) base relocation
Add a trivial binary (int main() { return 0; }) built for Windows on ARM to
ensure that we can correctly identify ARM_MOV32(T) base relocations. Addresses
post-commit review comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227673
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 31 Jan 2015 04:12:06 +0000 (04:12 +0000)]
ARM: make a table more readable (NFC)
This adds some comments and splits the flag calculation on type boundaries to
make the table more readable. Addresses some post-commit review comments to SVN
r227603. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227670
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 31 Jan 2015 03:43:40 +0000 (03:43 +0000)]
[PM] Change the core design of the TTI analysis to use a polymorphic
type erased interface and a single analysis pass rather than an
extremely complex analysis group.
The end result is that the TTI analysis can contain a type erased
implementation that supports the polymorphic TTI interface. We can build
one from a target-specific implementation or from a dummy one in the IR.
I've also factored all of the code into "mix-in"-able base classes,
including CRTP base classes to facilitate calling back up to the most
specialized form when delegating horizontally across the surface. These
aren't as clean as I would like and I'm planning to work on cleaning
some of this up, but I wanted to start by putting into the right form.
There are a number of reasons for this change, and this particular
design. The first and foremost reason is that an analysis group is
complete overkill, and the chaining delegation strategy was so opaque,
confusing, and high overhead that TTI was suffering greatly for it.
Several of the TTI functions had failed to be implemented in all places
because of the chaining-based delegation making there be no checking of
this. A few other functions were implemented with incorrect delegation.
The message to me was very clear working on this -- the delegation and
analysis group structure was too confusing to be useful here.
The other reason of course is that this is *much* more natural fit for
the new pass manager. This will lay the ground work for a type-erased
per-function info object that can look up the correct subtarget and even
cache it.
Yet another benefit is that this will significantly simplify the
interaction of the pass managers and the TargetMachine. See the future
work below.
The downside of this change is that it is very, very verbose. I'm going
to work to improve that, but it is somewhat an implementation necessity
in C++ to do type erasure. =/ I discussed this design really extensively
with Eric and Hal prior to going down this path, and afterward showed
them the result. No one was really thrilled with it, but there doesn't
seem to be a substantially better alternative. Using a base class and
virtual method dispatch would make the code much shorter, but as
discussed in the update to the programmer's manual and elsewhere,
a polymorphic interface feels like the more principled approach even if
this is perhaps the least compelling example of it. ;]
Ultimately, there is still a lot more to be done here, but this was the
huge chunk that I couldn't really split things out of because this was
the interface change to TTI. I've tried to minimize all the other parts
of this. The follow up work should include at least:
1) Improving the TargetMachine interface by having it directly return
a TTI object. Because we have a non-pass object with value semantics
and an internal type erasure mechanism, we can narrow the interface
of the TargetMachine to *just* do what we need: build and return
a TTI object that we can then insert into the pass pipeline.
2) Make the TTI object be fully specialized for a particular function.
This will include splitting off a minimal form of it which is
sufficient for the inliner and the old pass manager.
3) Add a new pass manager analysis which produces TTI objects from the
target machine for each function. This may actually be done as part
of #2 in order to use the new analysis to implement #2.
4) Work on narrowing the API between TTI and the targets so that it is
easier to understand and less verbose to type erase.
5) Work on narrowing the API between TTI and its clients so that it is
easier to understand and less verbose to forward.
6) Try to improve the CRTP-based delegation. I feel like this code is
just a bit messy and exacerbating the complexity of implementing
the TTI in each target.
Many thanks to Eric and Hal for their help here. I ended up blocked on
this somewhat more abruptly than I expected, and so I appreciate getting
it sorted out very quickly.
Differential Revision: http://reviews.llvm.org/D7293
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227669
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 31 Jan 2015 02:26:37 +0000 (02:26 +0000)]
ARM: support stack probe size on Windows on ARM
Now that -mstack-probe-size is piped through to the backend via the function
attribute as on Windows x86, honour the value to permit handling of non-default
values for stack probes. This is needed /Gs with the clang-cl driver or
-mstack-probe-size with the clang driver when targeting Windows on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227667
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 31 Jan 2015 01:14:40 +0000 (01:14 +0000)]
[fuzzer] add flags to run fuzzer in multiple parallel processes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227664
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Sat, 31 Jan 2015 00:37:11 +0000 (00:37 +0000)]
Add the -section option to llvm-objdump used with -macho that takes the argument
segname,sectname to specify a Mach-O section to print. The printing is based on
the section type or section attributes.
The printing of the module initialization and termination section types is printed
with this change. Printing of other section types will be added next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227649
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 31 Jan 2015 00:21:17 +0000 (00:21 +0000)]
Remove the last vestiges of resetOperationActions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227648
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 31 Jan 2015 00:06:45 +0000 (00:06 +0000)]
Reuse a bunch of cached subtargets and remove getSubtarget calls
without a Function argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227647
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 30 Jan 2015 23:52:19 +0000 (23:52 +0000)]
Add PPC test for r227481, but XFAIL because this is actually more work than it appeared to be.
Same sort of bug as on ARM where the cmp+branch are lowered to br_cc
(choosing the branch's debugloc for the br_cc's debugloc) then expanded
out to a cmp and a br, but both using the debug loc of the br_cc, thus
losing fidelity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227645
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 23:46:43 +0000 (23:46 +0000)]
Reuse a bunch of cached subtargets and remove getSubtarget calls
without a Function argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227644
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 23:46:40 +0000 (23:46 +0000)]
Avoid using the cast and use the templated accessor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227643
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 30 Jan 2015 23:41:15 +0000 (23:41 +0000)]
[AArch64] Add a few more DUP testcases. NFC.
Also, don't lie about testing index 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227642
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 30 Jan 2015 23:28:05 +0000 (23:28 +0000)]
Factor out statepoint verification into separate function. (NFC)
Patch by: Igor Laevsky
"Simple refactoring. This is done in preparation to support verification of invokable statepoints."
Differential Revision: http://reviews.llvm.org/D7276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227640
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 30 Jan 2015 23:26:57 +0000 (23:26 +0000)]
[fuzzer] Add a gtest-style test
Summary: Add one gtest-style test.
Test Plan: run on bot
Reviewers: samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7287
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227639
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 23:24:40 +0000 (23:24 +0000)]
Reuse a bunch of cached subtargets and remove getSubtarget calls
without a Function argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227638
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 30 Jan 2015 23:18:42 +0000 (23:18 +0000)]
Fix statepoint verifier tests to actually test verifier.
Patch by: Igor Laevsky
"Statepoint verifier tests were using wrong names for the statepoint and gc.relocate intrinsics. This change renames them to use correct names and fixes all uncovered issues."
Differential Revision: http://reviews.llvm.org/D7266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227636
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 30 Jan 2015 23:13:57 +0000 (23:13 +0000)]
[AArch64] Robustize neon-scalar-copy.ll tests. NFC.
Some of those didn't even have run lines: they were removed
inadvertently during the Great Merge of 2014.
They used to check for DUPs, but now we go through W-regs?
Filed PR22418 for that potential regression.
For now, just make the tests explicit, so we now where we stand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227635
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 30 Jan 2015 23:04:39 +0000 (23:04 +0000)]
Add ARM test for r227489, but XFAIL because this is actually more work than it appeared to be.
Also revert r227489 since it didn't actually fix the thing I thought I
was fixing (since the test case was targeting the wrong architecture
initially). The change might be correct & demonstrated by other test
cases, but it's not a priority for me to find those test cases right
now.
Filed PR22417 for the failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227632
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 30 Jan 2015 22:28:49 +0000 (22:28 +0000)]
[PBQP] Fix transposed worst row/column check in handleAdd/RemoveNode in the PBQP
allocator.
Patch by Jonas Paulsson. Thanks Jonas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 30 Jan 2015 22:16:01 +0000 (22:16 +0000)]
NFC. Making printOptionValues an API on the parser class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227626
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 30 Jan 2015 22:07:05 +0000 (22:07 +0000)]
Fix memory leak in WinEHPrepare introduced in r227405.
This leak was detected by ASan bootstrap of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227625
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 22:02:36 +0000 (22:02 +0000)]
Remove unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227624
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 22:02:34 +0000 (22:02 +0000)]
Remove extraneous forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227623
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 22:02:31 +0000 (22:02 +0000)]
Use the cached subtargets and remove calls to getSubtarget/getSubtargetImpl
without a Function argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227622
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 22:02:19 +0000 (22:02 +0000)]
Add a similar templated cast for getSubtarget off of the MachineFunction
to save typing a lot of static_casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227621
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 30 Jan 2015 21:59:28 +0000 (21:59 +0000)]
Add one more vim swap file pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227620
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 21:58:46 +0000 (21:58 +0000)]
[Hexagon] Adding vector shift instructions and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227619
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 30 Jan 2015 21:51:51 +0000 (21:51 +0000)]
R600/SI: Handle SI_SPILL_V96_RESTORE in SIRegisterInfo::eliminateFrameIndex()
This fixes a crash in Unigine Heaven.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227618
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 30 Jan 2015 21:41:28 +0000 (21:41 +0000)]
[X86] Cleanup tabs in test vector-zext.ll. NFC.
Some tests have tabs, some don't.
In vector-[sz]ext.ll, space wins (well duh!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227615
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 30 Jan 2015 21:30:57 +0000 (21:30 +0000)]
Silence "not all paths return a value" warning in MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227614
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 21:24:06 +0000 (21:24 +0000)]
[Hexagon] Adding vector predicate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227613
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 21:14:00 +0000 (21:14 +0000)]
[Hexagon] Adding vector permutation instructions and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227612
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 30 Jan 2015 21:03:31 +0000 (21:03 +0000)]
Win64: Put a REX_W prefix on all TAILJMP* instructions
MSDN's x64 software conventions page says that this is one of the fixed
list of legal epilogues:
https://msdn.microsoft.com/en-us/library/tawsa7cb.aspx
Presumably this is how the unwinder distinguishes epilogue jumps from
in-function control flow.
Also normalize the way we place "## TAILCALL" comments on such jumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227611
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 20:56:54 +0000 (20:56 +0000)]
[Hexagon] Adding vector multiplies. Cleaning up tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227609
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Fri, 30 Jan 2015 20:51:09 +0000 (20:51 +0000)]
Remove the preverify pass from the documentation now that it has been removed
since r199487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227608
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 20:08:37 +0000 (20:08 +0000)]
[Hexagon] Adding XTYPE/COMPLEX instructions and cleaning up tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227607
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 30 Jan 2015 19:55:40 +0000 (19:55 +0000)]
[AArch64] Make AArch64A57FPLoadBalancing output stable.
Add tie breaker to colorChainSet() sort so that processing order doesn't
depend on std::set order, which depends on pointer order, which is
unstable from run to run.
No test case as this is nearly impossible to reproduce.
Phabricator Review: http://reviews.llvm.org/D7265
Patch by Geoff Berry <gberry@codeaurora.org>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227606
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 30 Jan 2015 19:42:59 +0000 (19:42 +0000)]
Remove a redundant dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227605
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 30 Jan 2015 19:37:48 +0000 (19:37 +0000)]
Inliner: Use replaceDbgDeclareForAlloca() instead of splicing the
instruction and generalize it to optionally dereference the variable.
Follow-up to r227544.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227604
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 30 Jan 2015 19:35:18 +0000 (19:35 +0000)]
ARM: further correct .fpu directive handling
If the original FPU specification involved a restricted VFP unit (d16), ensure
that we reset the functionality when we encounter a new FPU type. In
particular, if the user specified vfpv3-d16, but switched to a VFPv3 (which has
32 double precision registers), we would fail to reset the D16 feature, and
treat it as being equivalent to vfpv3-d16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227603
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 30 Jan 2015 19:25:23 +0000 (19:25 +0000)]
Revert "Add missing test from r227488"
This reverts commit r227489, since this is the real one failing the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227602
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 30 Jan 2015 19:25:20 +0000 (19:25 +0000)]
Revert "Revert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps.""
This reverts commit r227600, since that reverted the wrong comit. Sorry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227601
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 30 Jan 2015 19:18:58 +0000 (19:18 +0000)]
Revert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps."
This reverts commit r227488 as it was failing ARM bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227600
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 30 Jan 2015 19:14:04 +0000 (19:14 +0000)]
Fixup gold-plugin after r227576.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227599
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 19:13:26 +0000 (19:13 +0000)]
[Hexagon] Adding XTYPE/ALU vector instructions. Organizing test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227598
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 30 Jan 2015 18:42:10 +0000 (18:42 +0000)]
ARM: improve caret diagnostics for invalid FPU name
In the case of an invalid FPU name, place the caret at the name rather than FPU
directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227595
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 30 Jan 2015 18:42:03 +0000 (18:42 +0000)]
Fix lli after the DebugInfo move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227594
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Fri, 30 Jan 2015 18:13:50 +0000 (18:13 +0000)]
Check bit widths before trying to get a type.
Added a test case for it.
Also added run lines for the test case in r227566.
Bugs found with afl-fuzz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227589
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 30 Jan 2015 18:09:44 +0000 (18:09 +0000)]
[Hexagon] Adding a number of vector load variants and organizing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227588
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 30 Jan 2015 18:08:05 +0000 (18:08 +0000)]
Really really don't build llvm-pdbdump on MSVC < 2013.
I thought it was enough to just not add the tool subdirectory,
but apparently I need to explicitly mark it ignore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227587
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 30 Jan 2015 18:07:45 +0000 (18:07 +0000)]
Move DebugInfo to DebugInfo/DWARF.
In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.
This is purely a mechanical / build system change.
Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227586
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 30 Jan 2015 17:58:25 +0000 (17:58 +0000)]
ARM: correct handling of .fpu directive
The FPU directive permits the user to switch the target FPU, enabling
instructions that would be otherwise unavailable. However, when configuring the
new subtarget features, we would not enable the implied functions for newer
FPUs. This would result in invalid rejection of valid input. Ensure that we
inherit the implied FPU functionality when enabling newer versions of the FPU.
Fortunately, these are mostly hierarchical, unlike the CPUs.
Addresses PR22395.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227584
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 30 Jan 2015 16:58:58 +0000 (16:58 +0000)]
tidy up; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227582
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Jan 2015 13:33:42 +0000 (13:33 +0000)]
[PM] Sink the population of the pass manager with target-specific
analyses back into the LTO code generator.
The pass manager builder (and the transforms library in general)
shouldn't be referencing the target machine at all.
This makes the LTO population work like the others -- the data layout
and target transform info need to be pre-populated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227576
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Jan 2015 13:30:43 +0000 (13:30 +0000)]
Fix a warning introduced by r227557 due to a default label in a fully
covering switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227575
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 30 Jan 2015 13:01:19 +0000 (13:01 +0000)]
[Cygming] Seek also chkstk_ms, or JIT fails with DLL builds. It is fixup for r227519.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227574
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 30 Jan 2015 13:01:00 +0000 (13:01 +0000)]
Regenerate configure since r227090.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227573
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Fri, 30 Jan 2015 11:18:50 +0000 (11:18 +0000)]
[mips] Manually replace JAL pseudo-instructions with their JALR equivalent, instead of using InstAlias.
Summary:
This is needed by the .cprestore assembler directive.
This directive needs to be able to insert an LW instruction after every JALR replacement of a JAL pseudo-instruction
(and never after a JALR which has NOT been a result of a pseudo-instruction replacement).
The problem with using InstAlias for these is that after it replaces the pseudo-instruction, we can't find out if the resulting JALR instruction
was generated by an InstAlias or not, so we don't know whether or not to insert our LW instruction.
By replacing it manually, we know when the pseudo-instruction replacement happens and we can insert the LW instruction correctly.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: emaste, llvm-commits
Differential Revision: http://reviews.llvm.org/D5601
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227568
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Fri, 30 Jan 2015 10:57:58 +0000 (10:57 +0000)]
[bitcode reader] Fix an assert on invalid type tables
Bug found with afl-fuzz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227566
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 30 Jan 2015 10:09:26 +0000 (10:09 +0000)]
Introduce llvm/test/LTO/X86. LTO tests may be assumed as target-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227564
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 30 Jan 2015 09:53:37 +0000 (09:53 +0000)]
Introduce llvm/test/LTO/ARM for arm-specific LTO test(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227563
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 30 Jan 2015 09:05:49 +0000 (09:05 +0000)]
Change a very hot piece of code in TableGen's register unit computations to use bit vectors rather than arrays.
For target descriptions with very large and very dense register files, TableGen
can take an extremely long time to run. This change makes a dent in that (~15%
in my measurements) by accelerating the single hottest operation with better data
structures.
I believe there's still a lot of room to make this even faster with more global
changes that require replacing some of the existing datastructures in this area
with bit vectors, but that's a more involved change and I wanted to get this
simpler improvement in first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227562
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 30 Jan 2015 07:33:31 +0000 (07:33 +0000)]
Move the target specific test case arbitrary-induction-step.ll to test/Transforms/LoopVectorize/AArch64 folder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227561
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 30 Jan 2015 05:02:21 +0000 (05:02 +0000)]
[LoopVectorize] Induction variables: support arbitrary constant step.
Previously, only -1 and +1 step values are supported for induction variables. This patch extends LV to support
arbitrary constant steps.
Initial patch by Alexey Volkov. Some bug fixes are added in the following version.
Differential Revision: http://reviews.llvm.org/D6051 and http://reviews.llvm.org/D7193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227557
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 30 Jan 2015 02:13:53 +0000 (02:13 +0000)]
[AArch64]Fix PR21675, a bug about lowering llvm.ctpop.i32. We should noot use "DAG.getUNDEF(MVT::v8i8)" to get all zero vector.
Patch by Wei-cheng Wang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227550
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 02:11:26 +0000 (02:11 +0000)]
Use the cached subtarget in PPCFrameLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227548
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 02:11:24 +0000 (02:11 +0000)]
Migrate some of PPC away from the use of bare getSubtarget/getSubtargetImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227547
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 02:11:21 +0000 (02:11 +0000)]
Migrage PPCRegisterInfo to use the cached subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227546
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 30 Jan 2015 01:55:25 +0000 (01:55 +0000)]
Fix PR22386. The inliner moves static allocas to the entry basic block
so we need to move the dbg.declare intrinsics that describe them, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227544
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:50:09 +0000 (01:50 +0000)]
Migrate a bare getSubtarget call to query the MachineFunction
for the target dependent one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227542
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:50:07 +0000 (01:50 +0000)]
Migrate NVPTXISelLowering to take the subtarget that it's dependent
upon as an argument and store/use that in the entire function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227541
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:41:01 +0000 (01:41 +0000)]
Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227539
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:40:59 +0000 (01:40 +0000)]
Migrate NVPTXISelDAGToDAG's getSubtarget to a runOnMachineFunction
version. Update NVPTXInstrInfo accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227538
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:30:01 +0000 (01:30 +0000)]
Remove calls to bare getSubtarget and clean up the functions
accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227535
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 30 Jan 2015 01:16:24 +0000 (01:16 +0000)]
[LTO] Scan all per-function subtargets when collecting runtime library names.
accumulateAndSortLibcalls in LTOCodeGenerator.cpp collects names of runtime
library functions which are used to identify user-defined functions that should
be protected. Previously, this function would only scan the TargetLowering
object belonging to the "main" subtarget for the library function names. This
commit changes it to scan all per-function subtargets.
Differential Revision: http://reviews.llvm.org/D7275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227533
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 30 Jan 2015 01:14:28 +0000 (01:14 +0000)]
[llvm-lto] Add a line for setting LTOCodeGenerator's CPU string from command
line.
This is needed for a test case I plan to commit later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227532
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:10:26 +0000 (01:10 +0000)]
Remove a few getSubtarget calls in AArch64 pass manager initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227531
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:10:24 +0000 (01:10 +0000)]
Clean up some uses of getSubtarget in AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227530
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Jan 2015 01:10:18 +0000 (01:10 +0000)]
This only needs TargetInstrInfo, not the specialized one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227529
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Jan 2015 00:41:44 +0000 (00:41 +0000)]
[PM] Remove two very old and dead forward declarations for the prior
incarnation of target transform info.
This is in preparation for starting to redesign TTI to be amenable to
the new PM world.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227525
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 30 Jan 2015 00:10:47 +0000 (00:10 +0000)]
Updating iOS.cmake to work with the latest Xcode and iOS 8 SDK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227523
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 30 Jan 2015 00:10:43 +0000 (00:10 +0000)]
iOS doesn't have histedit.h available. We should gate use of libedit on whether or not this headers exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227522
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 30 Jan 2015 00:10:39 +0000 (00:10 +0000)]
iOS doesn't have crt_externs.h available, so we fall back to the posix method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227521
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 30 Jan 2015 00:05:39 +0000 (00:05 +0000)]
x86: Remove unused variables not caught by MSVC =P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227520
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 29 Jan 2015 23:58:04 +0000 (23:58 +0000)]
x86: Fix large model calls to __chkstk for dynamic allocas
In the large code model, we now put __chkstk in %r11 before calling it.
Refactor the code so that we only do this once. Simplify things by using
__chkstk_ms instead of __chkstk on cygming. We already use that symbol
in the prolog emission, and it simplifies our logic.
Second half of PR18582.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227519
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Jan 2015 23:46:42 +0000 (23:46 +0000)]
Remove unnecessary calls to getSubtarget/getSubtargetImpl from the
MSP430 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227517
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Jan 2015 23:46:39 +0000 (23:46 +0000)]
Remove unused header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227516
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 29 Jan 2015 23:35:04 +0000 (23:35 +0000)]
Change SmallVector param to the more general ArrayRef; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227514
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Jan 2015 23:27:45 +0000 (23:27 +0000)]
Get rid of a few calls through the subtarget to get the ABI
that's actually sitting on the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227513
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Jan 2015 23:27:36 +0000 (23:27 +0000)]
Remove most of the TargetMachine::getSubtarget/getSubtargetImpl
calls that don't take a Function argument from Mips. Notable
exceptions: the AsmPrinter and MipsTargetObjectFile. The
latter needs to be fixed, and the former will be fixed when the
general AsmPrinter changes happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227512
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 29 Jan 2015 23:26:37 +0000 (23:26 +0000)]
[LPM] Remove a PPC64 hack to try to work around a bad interaction
between the linker's TLS optimizations and Clang's TLS code generation.
For now, Clang has been changed to disable linker TLS optimizations
until it (and LLVM more generally) are emitting TLS code sequences
compatible with the old bugs found in the linkers. That's a better fix
to handle bootstrapping on that platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227511
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 29 Jan 2015 23:09:37 +0000 (23:09 +0000)]
x86: Remove the W64ALLOCA pseudo
This is just an alias for CALL64pcrel32, and we can just use that opcode
with explicit defs in the MI.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227508
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 29 Jan 2015 23:01:07 +0000 (23:01 +0000)]
[fuzzer] add -use_full_coverage_set=1 which solves FullCoverageSetTest. This does not scale very well yet, but might be a good start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227507
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 29 Jan 2015 22:57:37 +0000 (22:57 +0000)]
[AArch64] Add INITIALIZE_PASS macros to AArch64A57FPLoadBalancing.
These are needed so this pass will produce output when
e.g. -print-after-all is used.
Phabricator Review: http://reviews.llvm.org/D7264
Patch by Geoff Berry <gberry@codeaurora.org>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227506
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 29 Jan 2015 22:33:00 +0000 (22:33 +0000)]
Update comments to use unreachable instead of llvm.trap, as implemented now
win64: Call __chkstk through a register with the large code model
Fixes half of PR18582. True dynamic allocas will still have a
CALL64pcrel32 which will fail.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D7267
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227503
91177308-0d34-0410-b5e6-
96231b3b80d8