OSDN Git Service

android-x86/external-llvm.git
7 years agoRevert r283824 and r283823: Define DbiStreamBuilder::addDbgStream to add stream.
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

7 years agoFix a bug in DbiStreamBuilder::addDbgStream.
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

7 years agoDefine DbiStreamBuilder::addDbgStream to add stream.
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

7 years agoFix issue which cases lit installed with setup.py to not resolve main
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

7 years agoFix llvm-lit.in corresponding to r283710.
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

7 years agoRevert r283690, "MC: Remove unused entities."
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

7 years ago[x86] auto-generate checks
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

7 years ago[x86] auto-generate checks
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

7 years agoGlobalISel: select G_GLOBAL_VALUE uses on AArch64.
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

7 years agoGlobalISel: allow G_GLOBAL_VALUEs in AArch64 legalization.
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

7 years agoGlobalISel: support selecting G_GEP instructions.
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

7 years agoGlobalISel: support selecting constants on AArch64.
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

7 years agoRename isHotFunction/isColdFunction to isFunctionEntryHot/isFunctionEntryCold. (NFC)
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

7 years agoRevert "Disallow ArrayRef assignment from temporaries."
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

7 years agoRename llvm::apply -> llvm::apply_tuple.
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

7 years agoDisallow ArrayRef assignment from temporaries.
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

7 years ago[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
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

7 years ago[ADT] Use () instead of {} in an attempt to work around MSVC 2012 ICEs.
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

7 years ago[ADT] Don't use make_pointee_iterator in IteratorTest.
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

7 years agoUse StringRef in TableGen generated Intrinsics.gen file (NFC)
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

7 years ago[ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015.
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

7 years agoTeach llvm::StripDebugInfo() about global variable !dbg attachments.
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

7 years ago[ADT] Attempt to fix MSVC 2015 ICE via judicious addition of std::decay to make_point...
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

7 years agoUpdate documentation after r283671 ("Turn cl::values() (for enum) from a vararg funct...
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

7 years agoAdd llvm::apply to STLExtras.
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

7 years agoUse unique_ptr in LLVMContextImpl's constant maps.
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

7 years ago[ADT] Add make_pointe{e,r}_iterator.
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

7 years ago[ADT] Let MapVector handle non-copyable values.
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

7 years ago[ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON
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

7 years agoAdd return type for checkForValidSection parsing function. NFC Intended.
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

7 years ago[X86] Prefer rotate by 1 over rotate by imm
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

7 years ago[SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests
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

7 years ago[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests
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

7 years ago[SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests
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

7 years agoFixed windows stdout/stderr redirection in inline asm constraint tests
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

7 years ago[Object/ELF] - Do not crash on invalid Header->e_shoff value.
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

7 years agoThis pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruct...
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

7 years agoFix WebAssembly build after r283702.
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

7 years ago[AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit...
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

7 years ago[AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the...
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

7 years ago[AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll...
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

7 years ago[x86][inline-asm][llvm] accept 'v' constraint
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

7 years ago[AVR] Enable generation of the TableGen assembly writer tables
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

7 years ago[lit] Remove (or allow specific) unused imports
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

7 years ago[lit] Remove unused TestingProgressDisplay attr
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

7 years ago[lit] Fix undefined symbol ArgumentError
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

7 years ago[lit] Remove semicolons in Python code
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

7 years ago[lit] Remove unused variable in googletest format
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

7 years ago[lit] Remove Python 2.6 and below exec workaround
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

7 years ago[AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE...
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

7 years ago[X86] Remove redundant patterns. The same pattern appears a few lines up.
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

7 years agoMove the global variables representing each Target behind accessor function
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

7 years ago[CMake] Correct configuration order of the sub-projects based on ther dependancies
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

7 years ago[llvm-link] Fix description of -disable-lazy-loading option
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

7 years ago[X86] Adding the 'nounwind' attribute to test functions for cleaner generated code
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

7 years ago[X86] Improve the rotate ISel test
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

7 years agoDAG: Setting Masked-Expand-Load as a variant of Masked-Load node
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

7 years ago[AVX-512] Fix execution domain for EVEX encoded VINSERTPS.
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

7 years agoMC: Remove unused entities.
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

7 years agoTarget: Remove unused entities.
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

7 years ago[AVX-512] Add subvector insert and extract to load/store folding tables.
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

7 years ago[AVX-512] Add avx512dq to the fp stack folding test.
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

7 years ago[AVX-512] Add the vector down convert instructions to the store folding tables.
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

7 years ago[libFuzzer] make a test less flaky
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

7 years ago[libFuzzer] when shrinking the corpus, delete evicted files previously created by...
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

7 years agoThinLTO: Fix Gold test after caching fix in r283655
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

7 years ago[libFuzzer] control the reload interval by a flag, make it 10 seconds by default
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

7 years ago[libFuzzer] fix use-after-free in libFuzzer found by ... fuzzing.
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

7 years ago[X86][SSE] Regenerate select tests
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

7 years agoRevert "[X86] Apply the Update LLC Test Checks tool on the rotate tests."
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

7 years ago[X86][SSE] Regenerate and add 32-bit tests to widening tests
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

7 years agoTurn cl::values() (for enum) from a vararg function to using C++ variadic template
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

7 years agoFix comment typos - full update script path in assertions note
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

7 years ago[AVX-512] Add test case for PR30430 that I should have added in r281959.
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

7 years ago[AVX-512] Fix a bug in getLargestLegalSuperClass where we inflated to VR128X/VR256X...
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

7 years ago[X86] Apply the Update LLC Test Checks tool on the rotate tests.
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

7 years ago[X86][AVX2] Regenerate and add 32-bit tests to core tests
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

7 years ago[Hexagon] Adding change of flow max 1 (cofMax1) TS flag for marking this restriction...
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

7 years ago[ThinLTO] Record calls to aliases
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

7 years ago[AArch64] Avoid generating indexed vector instructions for Exynos
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

7 years ago[OptRemarks] Remove non-printable chars from function name
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

7 years agoThinLTO: don't perform incremental LTO on module without a hash
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

7 years agoThinLTO: handles modules with empty summaries
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

7 years agoRequires the AVR backend for running test/CodeGen/AVR
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

7 years agoRevert "Codegen: Tail-duplicate during placement."
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

7 years ago[AVR] Add backend dependencies to MCTargetDesc/LLVMBuild.txt
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

7 years ago[pdb] Dump Module Symbols to Yaml.
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

7 years agoFix incorrect assertion in AVRFrameLowering.cpp
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

7 years ago[AVR] Don't worry about call frame size when initializing frame pointer
Dylan McKay [Sat, 8 Oct 2016 01:10:31 +0000 (01:10 +0000)]
[AVR] Don't worry about call frame size when initializing frame pointer

We previously only used the frame pointer if the frame pointer was too
big. This was to work around a bug (described in this old commit)

https://sourceforge.net/p/avr-llvm/code/204/tree//llvm/trunk/AVR/AVRFrameLowering.cpp?diff=50d64d912718465cb887d17a:203

I mistakenly invered the condition assuming it was a typo. I am now
removing it because it doesn't seem to be a problem anymore (plus it's a
dirty hack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283639 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Don't shadow container while iterating in range-based loop
Dylan McKay [Sat, 8 Oct 2016 01:09:06 +0000 (01:09 +0000)]
[AVR] Don't shadow container while iterating in range-based loop

This works on clang, but fails on GCC 4.6

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283638 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Use references rather than pointers in AVRISelLowering
Dylan McKay [Sat, 8 Oct 2016 01:06:21 +0000 (01:06 +0000)]
[AVR] Use references rather than pointers in AVRISelLowering

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283636 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAllow a maximum of 64 bits to be returned in registers
Dylan McKay [Sat, 8 Oct 2016 01:05:09 +0000 (01:05 +0000)]
Allow a maximum of 64 bits to be returned in registers

The rest spills to the stack

Authored by Jake Goulding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283635 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Expand MULHS for all types
Dylan McKay [Sat, 8 Oct 2016 01:01:49 +0000 (01:01 +0000)]
[AVR] Expand MULHS for all types

Once MULHS was expanded, this exposed an issue where the condition
register was thought to be 16-bit. This caused an attempt to copy a
16-bit register to an 8-bit register.

Authored by Jake Goulding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283634 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the 'SoftFail' field to all instruction formats
Dylan McKay [Sat, 8 Oct 2016 00:55:46 +0000 (00:55 +0000)]
[AVR] Add the 'SoftFail' field to all instruction formats

This will be used in the future for disassembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283630 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Set up the instruction printer and the assembly backend
Dylan McKay [Sat, 8 Oct 2016 00:50:11 +0000 (00:50 +0000)]
[AVR] Set up the instruction printer and the assembly backend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283629 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add dependencies to AVR libraries in AVRCodeGen
Dylan McKay [Sat, 8 Oct 2016 00:45:24 +0000 (00:45 +0000)]
[AVR] Add dependencies to AVR libraries in AVRCodeGen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283628 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add missing subdirectories to LLVMBuild
Dylan McKay [Sat, 8 Oct 2016 00:42:58 +0000 (00:42 +0000)]
[AVR] Add missing subdirectories to LLVMBuild

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283627 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-opt-report] Don't leave space for opts that never happen
Hal Finkel [Sat, 8 Oct 2016 00:26:54 +0000 (00:26 +0000)]
[llvm-opt-report] Don't leave space for opts that never happen

Because screen space is precious, if an optimization (vectorization, for
example) never happens, don't leave empty space for the associated markers on
every line of the output. This makes the output much more compact, and allows
for the later inclusion of markers for more (although perhaps rare)
optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283626 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[coroutines] Store an address of destroy OR cleanup part in the coroutine frame.
Gor Nishanov [Sat, 8 Oct 2016 00:22:50 +0000 (00:22 +0000)]
[coroutines] Store an address of destroy OR cleanup part in the coroutine frame.

Summary:
If heap allocation of a coroutine is elided, we need to make sure that we will update an address stored in the coroutine frame from f.destroy to f.cleanup.
Before this change, CoroSplit synthesized these stores after coro.begin:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    store void (%f.Frame*)* @f.destroy, void (%f.Frame*)** %destroy.addr

```

In those cases where we did heap elision, but were not able to devirtualize all indirect calls, destroy call will attempt to "free" the coroutine frame stored on the stack. Oops.

Now we use select to put an appropriate coroutine subfunction in the destroy slot. As bellow:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    %0 = select i1 %need.alloc, void (%f.Frame*)* @f.destroy, void (%f.Frame*)* @f.cleanup
    store void (%f.Frame*)* %0, void (%f.Frame*)** %destroy.addr
```

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283625 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[docs] Fix indentation bug in LangRef.
Lang Hames [Sat, 8 Oct 2016 00:20:42 +0000 (00:20 +0000)]
[docs] Fix indentation bug in LangRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283624 91177308-0d34-0410-b5e6-96231b3b80d8