OSDN Git Service
Dehao Chen [Tue, 11 Oct 2016 05:19:00 +0000 (05:19 +0000)]
Tune isHotFunction/isColdFunction
Summary: This patch sets function as hot if function's entry count is hot/cold.
Reviewers: eraman, davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283852
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 11 Oct 2016 04:32:03 +0000 (04:32 +0000)]
Fix warning; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283851
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 11 Oct 2016 04:22:29 +0000 (04:22 +0000)]
MIRParser: generic register operands with types
This should fix the fallout of r283848.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283850
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 11 Oct 2016 03:13:01 +0000 (03:13 +0000)]
MIRParser: Rewrite register info initialization; mostly NFC
This changes MachineRegisterInfo to be initializes after parsing all
instructions. This is in preparation for upcoming commits that allow the
register class specification on the operand or deduce them from the
MCInstrDesc.
This commit removes the unused feature of having nonsequential register
numbers. This was confusing anyway as the vreg numbers would be
different after parsing when you had "holes" in your numbering.
This patch also introduces the concept of an incomplete virtual
register. An incomplete virtual register may be used during .mir parsing
to construct MachineOperands without knowing the exact register class
(or register bank) yet.
NFC except for some error messages.
Differential Revision: https://reviews.llvm.org/D22397
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283848
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 11 Oct 2016 01:20:33 +0000 (01:20 +0000)]
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
Issue from previous rollback fixed, and a new test was added for that
case as well. Issue was worklist/scheduling/taildup issue in layout.
Issue from 2nd rollback fixed, with 2 additional tests. Issue was
tail merging/loop info/tail-duplication causing issue with loops that share
a header block.
Issue with early tail-duplication of blocks that branch to a fallthrough
predecessor fixed with test case: tail-dup-branch-to-fallthrough.ll
Differential revision: https://reviews.llvm.org/D18226
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283842
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Oct 2016 01:14:41 +0000 (01:14 +0000)]
[libFuzzer] implement value profile for switch, increase the size of the PCs array, make sure we don't overflow it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283841
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 11 Oct 2016 01:13:32 +0000 (01:13 +0000)]
[libFuzzer] add switch tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283840
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Tue, 11 Oct 2016 01:04:36 +0000 (01:04 +0000)]
[RegAllocGreedy] Attempt to split unspillable live intervals
Summary:
Previously, when allocating unspillable live ranges, we would never
attempt to split. We would always bail out and try last ditch graph
recoloring.
This patch changes this by attempting to split all live intervals before
performing recoloring.
This fixes LLVM bug PR14879.
I can't add test cases for any backends other than AVR because none of
them have small enough register classes to trigger the bug.
Reviewers: qcolombet
Subscribers: MatzeB
Differential Revision: https://reviews.llvm.org/D25070
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283838
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 11 Oct 2016 01:00:45 +0000 (01:00 +0000)]
[InstCombine] Transform !range metadata to !nonnull when combining loads
When combining an integer load with !range metadata that does not include 0 to a pointer load, make sure emit !nonnull metadata on the newly-created pointer load. This prevents the !nonnull metadata from being dropped during a ptrtoint/inttoptr pair.
This fixes PR30597.
Patch by Ariel Ben-Yehuda!
Differential Revision: https://reviews.llvm.org/D25215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283836
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 11 Oct 2016 00:21:14 +0000 (00:21 +0000)]
[AArch64][InstructionSelector] Teach how to select FP load/store.
This patch allows to select 32 and 64-bit FP load and store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283832
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 11 Oct 2016 00:21:11 +0000 (00:21 +0000)]
[AArch64][InstructionSelector] Teach the selector how to handle vector OR.
This only adds the support for 64-bit vector OR. Adding more sizes is
not difficult, but it requires a bigger refactoring because ORs work on
any size, not necessarly the ones that match the width of the register
width. Right now, this is not expressed in the legalization, so don't
bother pushing the refactoring yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283831
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 11 Oct 2016 00:21:08 +0000 (00:21 +0000)]
[AArch64][MachineLegalizer] Mark v2s32 G_LOAD as legal.
Actually every 64-bit loads are legal, but right now the API does not
offer a simple way to express that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283829
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 11 Oct 2016 00:15:50 +0000 (00:15 +0000)]
Revert r283824 and r283823: Define DbiStreamBuilder::addDbgStream to add stream.
This reverts commit r283824 and r283823 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283828
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 10 Oct 2016 23:44:04 +0000 (23:44 +0000)]
Fix a bug in DbiStreamBuilder::addDbgStream.
This feature will be tested in LLD unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283824
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 10 Oct 2016 23:35:36 +0000 (23:35 +0000)]
Define DbiStreamBuilder::addDbgStream to add stream.
Previously, there is no way to create a stream other than pre-defined
special stream such as DBI or IPI. This patch adds a new method,
addDbgStream, to add a debug stream to a PDB file.
Differential Revision: https://reviews.llvm.org/D25356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283823
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Mon, 10 Oct 2016 23:22:11 +0000 (23:22 +0000)]
Fix issue which cases lit installed with setup.py to not resolve main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283818
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 10 Oct 2016 23:02:42 +0000 (23:02 +0000)]
Fix llvm-lit.in corresponding to r283710.
Traceback (most recent call last):
File "bin/llvm-lit", line 44, in <module>
lit.main(builtin_parameters)
AttributeError: 'module' object has no attribute 'main'
Suggested by Artem Belevich.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283816
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 10 Oct 2016 22:49:37 +0000 (22:49 +0000)]
Revert r283690, "MC: Remove unused entities."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283814
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 10 Oct 2016 22:04:12 +0000 (22:04 +0000)]
[x86] auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283812
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 10 Oct 2016 22:01:42 +0000 (22:01 +0000)]
[x86] auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283811
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Oct 2016 21:50:00 +0000 (21:50 +0000)]
GlobalISel: select G_GLOBAL_VALUE uses on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283809
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Oct 2016 21:49:53 +0000 (21:49 +0000)]
GlobalISel: allow G_GLOBAL_VALUEs in AArch64 legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283808
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Oct 2016 21:49:49 +0000 (21:49 +0000)]
GlobalISel: support selecting G_GEP instructions.
They're basically just an alias for G_ADD on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283807
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 10 Oct 2016 21:49:42 +0000 (21:49 +0000)]
GlobalISel: support selecting constants on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283806
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Mon, 10 Oct 2016 21:47:28 +0000 (21:47 +0000)]
Rename isHotFunction/isColdFunction to isFunctionEntryHot/isFunctionEntryCold. (NFC)
This is in preparation for https://reviews.llvm.org/D25048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283805
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Oct 2016 21:36:23 +0000 (21:36 +0000)]
Revert "Disallow ArrayRef assignment from temporaries."
This reverts commit r283798, as it causes static asserts on
MSVC 2015 with the following errors:
ArrayRefTest.cpp(38): error C2338: Assigning from single prvalue element
ArrayRefTest.cpp(41): error C2338: Assigning from single xvalue element
ArrayRefTest.cpp(47): error C2338: Assigning from an initializer list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283803
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Oct 2016 21:24:34 +0000 (21:24 +0000)]
Rename llvm::apply -> llvm::apply_tuple.
llvm::cl already has a function called llvm::apply() so this is
causing an ODR violation. The STLExtras version should win the
vote on which one gets to be called apply() since it is named
after the equivalent STL function, but since renaiming the cl
version is more difficult, let's do this for now to get the
bots green.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283800
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 10 Oct 2016 20:57:33 +0000 (20:57 +0000)]
Disallow ArrayRef assignment from temporaries.
Without this, the following statements will create ArrayRefs that
refer to temporary storage that goes out of scope by the end of the
line:
someArrayRef = getSingleElement();
someArrayRef = {elem1, elem2};
Note that the constructor still has this problem:
ArrayRef<Element> someArrayRef = getSingleElement();
ArrayRef<Element> someArrayRef = {elem1, elem2};
but that's a little harder to get rid of because we want to be able to
use this in calls:
takesArrayRef(getSingleElement());
takesArrayRef({elem1, elem2});
Part of rdar://problem/
16375365. Reviewed by Duncan Exon Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283798
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 10 Oct 2016 20:45:15 +0000 (20:45 +0000)]
[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
Add integer expansion for FLT_ROUNDS_ for targets where i32 is not a legal
type.
Patch by Edward Jones, thanks!
Differential Revision: https://reviews.llvm.org/D24459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283797
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 20:18:02 +0000 (20:18 +0000)]
[ADT] Use () instead of {} in an attempt to work around MSVC 2012 ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283796
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 19:56:52 +0000 (19:56 +0000)]
[ADT] Don't use make_pointee_iterator in IteratorTest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283794
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 10 Oct 2016 19:31:09 +0000 (19:31 +0000)]
Use StringRef in TableGen generated Intrinsics.gen file (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283792
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 19:29:37 +0000 (19:29 +0000)]
[ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283791
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 10 Oct 2016 17:53:33 +0000 (17:53 +0000)]
Teach llvm::StripDebugInfo() about global variable !dbg attachments.
This is a regression introduced by the global variable ownership
reversal performed in r281284.
rdar://problem/
28448075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283784
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 17:18:45 +0000 (17:18 +0000)]
[ADT] Attempt to fix MSVC 2015 ICE via judicious addition of std::decay to make_pointe{r,e}_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283783
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 10 Oct 2016 17:13:14 +0000 (17:13 +0000)]
Update documentation after r283671 ("Turn cl::values() (for enum) from a vararg function to using C++ variadic template")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283782
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 10 Oct 2016 16:44:09 +0000 (16:44 +0000)]
Add llvm::apply to STLExtras.
This is equivalent to the C++14 std::apply(). Since we are not
using C++14 yet, this allows us to still make use of apply anyway.
Differential revision: https://reviews.llvm.org/D25100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283779
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 16:26:13 +0000 (16:26 +0000)]
Use unique_ptr in LLVMContextImpl's constant maps.
Reviewers: timshen
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283767
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 16:26:03 +0000 (16:26 +0000)]
[ADT] Add make_pointe{e,r}_iterator.
Reviewers: timshen
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25418
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283765
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 10 Oct 2016 16:25:59 +0000 (16:25 +0000)]
[ADT] Let MapVector handle non-copyable values.
Summary: The keys must still be copyable, because we store two copies of them.
Reviewers: timshen
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25404
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283764
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Mon, 10 Oct 2016 16:01:54 +0000 (16:01 +0000)]
[ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON
The instructions VLDM/VSTM can only access word-aligned memory
locations and produce alignment fault if the condition is not met.
The compiler currently generates VLDM/VSTM for v2f64 load/store
regardless the alignment of the memory access. Instead, if a v2f64
load/store is not word-aligned, the compiler should generate
VLD1/VST1. For each non double-word-aligned VLD1/VST1, a VREV
instruction should be generated when targeting Big Endian.
Differential Revision: https://reviews.llvm.org/D25281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283763
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Mon, 10 Oct 2016 15:24:54 +0000 (15:24 +0000)]
Add return type for checkForValidSection parsing function. NFC Intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283761
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Mon, 10 Oct 2016 14:43:55 +0000 (14:43 +0000)]
[X86] Prefer rotate by 1 over rotate by imm
Summary:
Rotate by 1 is translated to 1 micro-op, while rotate with imm8 is translated to 2 micro-ops.
Fixes pr30644.
Reviewers: delena, igorb, craig.topper, spatel, RKSimon
Differential Revision: https://reviews.llvm.org/D25399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283758
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 10 Oct 2016 14:28:06 +0000 (14:28 +0000)]
[SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283756
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 10 Oct 2016 14:14:31 +0000 (14:14 +0000)]
[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283751
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 10 Oct 2016 14:10:41 +0000 (14:10 +0000)]
[SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests
Fixed copy+paste vector alignment to correct for per-element scalar loads
Increased to 512-bit data sizes in preparation of avx512 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283748
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 10 Oct 2016 11:11:27 +0000 (11:11 +0000)]
Fixed windows stdout/stderr redirection in inline asm constraint tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283741
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 10 Oct 2016 10:51:38 +0000 (10:51 +0000)]
[Object/ELF] - Do not crash on invalid Header->e_shoff value.
sections_begin() may return unalignment pointer when Header->e_shoff isinvalid.
That may result in a crash in clients, for example we have one in LLD:
assert((PtrWord & ~PointerBitMask) == 0 &&
"Pointer is not sufficiently aligned");
fails when trying to push_back Elf_Shdr* (unaligned) into TinyPtrVector.
Patch forces check for alignment of Header->e_shoff.
Differential revision: https://reviews.llvm.org/D25368
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Dewhurst [Mon, 10 Oct 2016 08:53:06 +0000 (08:53 +0000)]
This pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruction is not issued, but replaced by SDIVcc instead, which does not exhibit the error. Unit test included.
Differential Review: https://reviews.llvm.org/D24660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283727
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 10 Oct 2016 06:49:55 +0000 (06:49 +0000)]
Fix WebAssembly build after r283702.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283723
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 10 Oct 2016 06:25:48 +0000 (06:25 +0000)]
[AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit load as input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283720
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 10 Oct 2016 06:25:45 +0000 (06:25 +0000)]
[AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the sse41 and avx2 test cases. Code will be improved in future commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283719
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 10 Oct 2016 06:25:42 +0000 (06:25 +0000)]
[AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll. Also disable peephole so we really test pattern matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283718
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Mon, 10 Oct 2016 05:48:56 +0000 (05:48 +0000)]
[x86][inline-asm][llvm] accept 'v' constraint
Commit in the name of:Coby Tayree
1.'v' constraint for (x86) non-avx arch imitates the already implemented 'x' constraint, i.e. allows XMM{0-15} & YMM{0-15} depending on the apparent arch & mode (32/64).
2.for the avx512 arch it allows [X,Y,Z]MM{0-31} (mode dependent)
This patch applies the needed changes to clang
clang patch: https://reviews.llvm.org/D25004
Differential Revision: D25005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283717
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Mon, 10 Oct 2016 01:28:45 +0000 (01:28 +0000)]
[AVR] Enable generation of the TableGen assembly writer tables
This also changes the order of the statements in CMakeLists.txt to be
alphabetical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283711
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:22:06 +0000 (01:22 +0000)]
[lit] Remove (or allow specific) unused imports
Summary:
Using Python linter flake8 on the utils/lit reveals several linter
warnings designated "F401: Unused import". Fix or silence these
warnings.
Some of these unused imports are legitimate, while some are part of lit's API.
For example, users of lit expect to be able to access `lit.formats.ShTest` in
their `lit.cfg`, despite the module hierarchy for that symbol actually being
`lit.formats.shtest.ShTest`. To silence linter errors for these lines,
include a "noqa" directive.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D25407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283710
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:20:43 +0000 (01:20 +0000)]
[lit] Remove unused TestingProgressDisplay attr
Summary:
`TestingProgressDisplay` initializes its `current` attribute to `None`, but
never reads or writes the value again. Remove it.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25415
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283709
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:19:27 +0000 (01:19 +0000)]
[lit] Fix undefined symbol ArgumentError
Summary:
`ArgumentError` is not defined by the Python standard library.
Executing this line of code would throw a exception, but not the
intended one. It would throw a `NameError` exception, since `ArgumentError`
is undefined.
Use `ValueError` instead, which is defined by the Python standard
library.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25410
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283708
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:18:14 +0000 (01:18 +0000)]
[lit] Remove semicolons in Python code
Summary:
Semicolons aren't necessary as statement terminators in Python, and
each of these uses are superfluous as they appear at the end of a line.
The convention is to not use semicolons where not needed, so remove them.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283707
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:15:33 +0000 (01:15 +0000)]
[lit] Remove unused variable in googletest format
Summary: `prefix` is written to but never read.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25408
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283706
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 10 Oct 2016 01:11:52 +0000 (01:11 +0000)]
[lit] Remove Python 2.6 and below exec workaround
Summary:
The minimum version of Python required to run LLVM's test suite is 2.7.
Remove a workaround for older Python versions.
Reviewers: echristo, delcypher, beanz, ddunbar
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25400
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283705
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 23:08:39 +0000 (23:08 +0000)]
[AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE file. Also add a minimal set for 512-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283704
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 23:08:33 +0000 (23:08 +0000)]
[X86] Remove redundant patterns. The same pattern appears a few lines up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283703
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sun, 9 Oct 2016 23:00:34 +0000 (23:00 +0000)]
Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco"
Differential Revision: https://reviews.llvm.org/D25412
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283702
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sun, 9 Oct 2016 20:38:29 +0000 (20:38 +0000)]
[CMake] Correct configuration order of the sub-projects based on ther dependancies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283698
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 9 Oct 2016 17:15:04 +0000 (17:15 +0000)]
[llvm-link] Fix description of -disable-lazy-loading option
Patch by Will Dietz!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283697
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Sun, 9 Oct 2016 13:33:51 +0000 (13:33 +0000)]
[X86] Adding the 'nounwind' attribute to test functions for cleaner generated code
Thanks to RKSimon for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283696
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Sun, 9 Oct 2016 13:07:25 +0000 (13:07 +0000)]
[X86] Improve the rotate ISel test
Summary:
- Added 64-bit target testing.
- Added 64-bit operand test cases.
- Added cases that demonstrate pr30644
Reviewers: RKSimon, craig.topper, igorb
Differential Revision: https://reviews.llvm.org/D25401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283695
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 9 Oct 2016 10:48:52 +0000 (10:48 +0000)]
DAG: Setting Masked-Expand-Load as a variant of Masked-Load node
Masked-expand-load node represents load operation that loads a variable amount of elements from memory according to amount of "true" bits in the mask and expands the loaded elements according to their position in the mask vector.
Right now, the node is used in intrinsics for VEXPAND* instructions.
The work is done towards implementation of masked.expandload and masked.compressstore intrinsics.
Differential Revision: https://reviews.llvm.org/D25322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283694
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 06:41:47 +0000 (06:41 +0000)]
[AVX-512] Fix execution domain for EVEX encoded VINSERTPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283692
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 9 Oct 2016 04:39:13 +0000 (04:39 +0000)]
MC: Remove unused entities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283691
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 9 Oct 2016 04:38:57 +0000 (04:38 +0000)]
Target: Remove unused entities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283690
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 03:54:13 +0000 (03:54 +0000)]
[AVX-512] Add subvector insert and extract to load/store folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283689
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 03:54:09 +0000 (03:54 +0000)]
[AVX-512] Add avx512dq to the fp stack folding test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283688
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Oct 2016 03:54:05 +0000 (03:54 +0000)]
[AVX-512] Add the vector down convert instructions to the store folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283687
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sun, 9 Oct 2016 03:45:38 +0000 (03:45 +0000)]
[libFuzzer] make a test less flaky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283686
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 8 Oct 2016 23:24:45 +0000 (23:24 +0000)]
[libFuzzer] when shrinking the corpus, delete evicted files previously created by the current process
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283682
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 8 Oct 2016 22:49:28 +0000 (22:49 +0000)]
ThinLTO: Fix Gold test after caching fix in r283655
(I don't have Gold available, so this is speculative)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283681
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 8 Oct 2016 22:12:14 +0000 (22:12 +0000)]
[libFuzzer] control the reload interval by a flag, make it 10 seconds by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283676
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 8 Oct 2016 21:57:48 +0000 (21:57 +0000)]
[libFuzzer] fix use-after-free in libFuzzer found by ... fuzzing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283675
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Oct 2016 21:17:44 +0000 (21:17 +0000)]
[X86][SSE] Regenerate select tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283674
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Sat, 8 Oct 2016 20:54:20 +0000 (20:54 +0000)]
Revert "[X86] Apply the Update LLC Test Checks tool on the rotate tests."
This reverts commit 283667.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283673
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Oct 2016 19:54:28 +0000 (19:54 +0000)]
[X86][SSE] Regenerate and add 32-bit tests to widening tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283672
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 8 Oct 2016 19:41:06 +0000 (19:41 +0000)]
Turn cl::values() (for enum) from a vararg function to using C++ variadic template
The core of the change is supposed to be NFC, however it also fixes
what I believe was an undefined behavior when calling:
va_start(ValueArgs, Desc);
with Desc being a StringRef.
Differential Revision: https://reviews.llvm.org/D25342
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283671
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Oct 2016 18:51:55 +0000 (18:51 +0000)]
Fix comment typos - full update script path in assertions note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283670
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Oct 2016 18:50:00 +0000 (18:50 +0000)]
[AVX-512] Add test case for PR30430 that I should have added in r281959.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283669
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Oct 2016 18:49:57 +0000 (18:49 +0000)]
[AVX-512] Fix a bug in getLargestLegalSuperClass where we inflated to VR128X/VR256X even when VLX isn't supported.
This seems to have been responsible for the XMM16-31 spills observed in PR29112. With this fixed the test case has been modified to no longer have a spill of XMM16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283668
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Sat, 8 Oct 2016 18:44:47 +0000 (18:44 +0000)]
[X86] Apply the Update LLC Test Checks tool on the rotate tests.
Also added cases demonstrating pr30644.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283667
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 8 Oct 2016 18:36:57 +0000 (18:36 +0000)]
[X86][AVX2] Regenerate and add 32-bit tests to core tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283666
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Sat, 8 Oct 2016 17:18:51 +0000 (17:18 +0000)]
[Hexagon] Adding change of flow max 1 (cofMax1) TS flag for marking this restriction rather than implying it from TypeJR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283665
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Sat, 8 Oct 2016 16:11:42 +0000 (16:11 +0000)]
[ThinLTO] Record calls to aliases
Summary:
When there is a call to an alias in the same module, we were not
adding a call edge. So we could incorrectly think that the alias
was dead if it was inlined in that function, despite having a
reference imported elsewhere. This resulted in unsats at link time.
Add a call edge when the call is to an alias.
Reviewers: davide, mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283664
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Sat, 8 Oct 2016 12:30:07 +0000 (12:30 +0000)]
[AArch64] Avoid generating indexed vector instructions for Exynos
Avoid generating indexed vector instructions for Exynos. This is needed for
fmla/fmls/fmul/fmulx. For example, the instruction
fmla v0.4s, v1.4s, v2.s[1]
is less efficient than the instructions
dup v2.4s, v2.s[1]
fmla v0.4s, v1.4s, v2.4s
Patch written by Abderrazek Zaafrani.
Differential Revision: https://reviews.llvm.org/D21571
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283663
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Sat, 8 Oct 2016 04:47:20 +0000 (04:47 +0000)]
[OptRemarks] Remove non-printable chars from function name
Value names may be prefixed with a binary '1' to indicate that the
backend should not modify the symbols due to any platform naming
convention.
This should not show up in the YAML opt record file because it breaks
the YAML parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283656
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 8 Oct 2016 04:44:23 +0000 (04:44 +0000)]
ThinLTO: don't perform incremental LTO on module without a hash
Clang always emit a hash for ThinLTO, but as other frontend are
starting to use ThinLTO, this could be a serious bug.
Differential Revision: https://reviews.llvm.org/D25379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283655
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 8 Oct 2016 04:44:18 +0000 (04:44 +0000)]
ThinLTO: handles modules with empty summaries
We need to add an entry in the combined-index for modules that have
a hash but otherwise empty summary, this is needed so that we can
get the hash for the module.
Also, if no entry is present in the combined index for a module, we
need to skip it when trying to compute a cache entry.
Differential Revision: https://reviews.llvm.org/D25300
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283654
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 8 Oct 2016 04:39:34 +0000 (04:39 +0000)]
Requires the AVR backend for running test/CodeGen/AVR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283653
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Sat, 8 Oct 2016 01:47:05 +0000 (01:47 +0000)]
Revert "Codegen: Tail-duplicate during placement."
This reverts commit
71c312652c10f1855b28d06697c08d47e7a243e4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283647
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sat, 8 Oct 2016 01:14:23 +0000 (01:14 +0000)]
[AVR] Add backend dependencies to MCTargetDesc/LLVMBuild.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283642
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 8 Oct 2016 01:12:01 +0000 (01:12 +0000)]
[pdb] Dump Module Symbols to Yaml.
This is the first step towards round-tripping symbol information,
and thusly being able to write symbol information to a PDB.
This patch writes the symbol information for each compiland to
the Yaml when running in pdb2yaml mode. There's still some loose
ends, such as what to do about relocations (necessary in order to
print linkage names), how to print enums with friendly names, and
how to give the dumper access to the StringTable, but this is a
good first start.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Sat, 8 Oct 2016 01:10:36 +0000 (01:10 +0000)]
Fix incorrect assertion in AVRFrameLowering.cpp
This wasn't looking at the right instruction, and would always fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283640
91177308-0d34-0410-b5e6-
96231b3b80d8