OSDN Git Service

android-x86/external-llvm.git
7 years agoUse printf instead of "echo -e" or "echo -n".
Rui Ueyama [Wed, 26 Oct 2016 01:07:26 +0000 (01:07 +0000)]
Use printf instead of "echo -e" or "echo -n".

Not all echo commands support "-e". On the other hand, printf
command is in POSIX, so it's more portable than "echo -e".

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

7 years ago[libFuzzer] simplify the code in TracePC::HandleTrace a bit more
Kostya Serebryany [Wed, 26 Oct 2016 00:42:52 +0000 (00:42 +0000)]
[libFuzzer] simplify the code in TracePC::HandleTrace a bit more

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

7 years ago[libFuzzer] simplify the code to print new PCs
Kostya Serebryany [Wed, 26 Oct 2016 00:20:51 +0000 (00:20 +0000)]
[libFuzzer] simplify the code to print new PCs

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

7 years agoUtility functions for appending to llvm.used/llvm.compiler.used.
Evgeniy Stepanov [Tue, 25 Oct 2016 23:53:31 +0000 (23:53 +0000)]
Utility functions for appending to llvm.used/llvm.compiler.used.

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

7 years ago[libFuzzer] simplify the code in TracePC::HandleTrace
Kostya Serebryany [Tue, 25 Oct 2016 23:52:25 +0000 (23:52 +0000)]
[libFuzzer] simplify the code in TracePC::HandleTrace

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

7 years ago[docs] Avoid repetition of 'considerable' in Error docs.
Lang Hames [Tue, 25 Oct 2016 23:08:32 +0000 (23:08 +0000)]
[docs] Avoid repetition of 'considerable' in Error docs.

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

7 years ago[docs] Use consistent style for "do more stuff" in Error docs examples.
Lang Hames [Tue, 25 Oct 2016 22:41:54 +0000 (22:41 +0000)]
[docs] Use consistent style for "do more stuff" in Error docs examples.

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

7 years ago[docs] Fix yet another Error docs formatting issue...
Lang Hames [Tue, 25 Oct 2016 22:38:50 +0000 (22:38 +0000)]
[docs] Fix yet another Error docs formatting issue...

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

7 years ago[docs] Fix a few more Error docs formatting issues.
Lang Hames [Tue, 25 Oct 2016 22:35:55 +0000 (22:35 +0000)]
[docs] Fix a few more Error docs formatting issues.

Thanks to Pete Cooper for the review.

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

7 years ago[libFuzzer] add StandaloneFuzzTargetMain.c and a test for it
Kostya Serebryany [Tue, 25 Oct 2016 22:30:34 +0000 (22:30 +0000)]
[libFuzzer] add StandaloneFuzzTargetMain.c and a test for it

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

7 years ago[docs] Fix a missing code-block in the new Error docs.
Lang Hames [Tue, 25 Oct 2016 22:25:07 +0000 (22:25 +0000)]
[docs] Fix a missing code-block in the new Error docs.

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

7 years ago[docs] Fix a couple of typos in the new Error docs.
Lang Hames [Tue, 25 Oct 2016 22:22:48 +0000 (22:22 +0000)]
[docs] Fix a couple of typos in the new Error docs.

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

7 years ago[Sparc] Don't overlap variable-sized allocas with other stack variables.
James Y Knight [Tue, 25 Oct 2016 22:13:28 +0000 (22:13 +0000)]
[Sparc] Don't overlap variable-sized allocas with other stack variables.

On SparcV8, it was previously the case that a variable-sized alloca
might overlap by 4-bytes the last fixed stack variable, effectively
because 92 (the number of bytes reserved for the register spill area) !=
96 (the offset added to SP for where to start a DYNAMIC_STACKALLOC).

It's not as simple as changing 96 to 92, because variables that should
be 8-byte aligned would then be misaligned.

For now, simply increase the allocation size by 8 bytes for each dynamic
allocation -- wastes space, but at least doesn't overlap. As the large
comment says, doing this more efficiently will require larger changes in
llvm.

Also adds some test cases showing that we continue to not support
dynamic stack allocation and over-alignment in the same function.

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

7 years ago[codeview] support emitting indirect virtual base class information
Bob Haarman [Tue, 25 Oct 2016 22:11:52 +0000 (22:11 +0000)]
[codeview] support emitting indirect virtual base class information

Summary:
Fixes PR28281.

MSVC lists indirect virtual base classes in the field list of a class,
using LF_IVBCLASS records. This change makes LLVM emit such records
when processing DW_TAG_inheritance tags with the DIFlagVirtual and
(newly introduced) DIFlagIndirect tags.

Reviewers: rnk, ruiu, zturner

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

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

7 years ago[DAGCombiner] Enable (urem x, (shl pow2, y)) -> (and x, (add (shl pow2, y), -1))...
Simon Pilgrim [Tue, 25 Oct 2016 22:01:09 +0000 (22:01 +0000)]
[DAGCombiner] Enable (urem x, (shl pow2, y)) -> (and x, (add (shl pow2, y), -1)) combine for splatted vectors

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

7 years ago[PGO] Fix select instruction annotation
Rong Xu [Tue, 25 Oct 2016 21:47:24 +0000 (21:47 +0000)]
[PGO] Fix select instruction annotation

Summary:
Select instruction annotation in IR PGO uses the edge count to infer the
branch count. It's currently placed in setInstrumentedCounts() where
no all the BB counts have been computed. This leads to wrong branch weights.
Move the annotation after all BB counts are populated.

Reviewers: davidxl

Subscribers: llvm-commits

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

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

7 years ago[X86][SSE] Regenerated known-bits test with srem->urem fix
Simon Pilgrim [Tue, 25 Oct 2016 21:24:33 +0000 (21:24 +0000)]
[X86][SSE] Regenerated known-bits test with srem->urem fix

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

7 years ago[DAGCombiner] Enable srem(x.y) -> urem(x,y) combine for vectors
Simon Pilgrim [Tue, 25 Oct 2016 21:20:18 +0000 (21:20 +0000)]
[DAGCombiner] Enable srem(x.y) -> urem(x,y) combine for vectors

SelectionDAG::SignBitIsZero (via SelectionDAG::computeKnownBits) has supported vectors since rL280927

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

7 years ago[docs] Add more Error documentation to the Programmer's Manual.
Lang Hames [Tue, 25 Oct 2016 21:19:30 +0000 (21:19 +0000)]
[docs] Add more Error documentation to the Programmer's Manual.

This patch updates some of the existing Error examples, expands on the
documentation for handleErrors, and includes new sections that cover
a number of helpful utilities and common error usage idioms.

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

7 years ago[X86][SSE] Added vector srem combine tests
Simon Pilgrim [Tue, 25 Oct 2016 21:14:11 +0000 (21:14 +0000)]
[X86][SSE] Added vector srem combine tests

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

7 years ago[X86][SSE] Added vector urem combine tests
Simon Pilgrim [Tue, 25 Oct 2016 21:10:12 +0000 (21:10 +0000)]
[X86][SSE] Added vector urem combine tests

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

7 years ago[DAGCombiner] Enable sdiv(x.y) -> udiv(x,y) combine for vectors
Simon Pilgrim [Tue, 25 Oct 2016 20:56:42 +0000 (20:56 +0000)]
[DAGCombiner] Enable sdiv(x.y) -> udiv(x,y) combine for vectors

SelectionDAG::SignBitIsZero (via SelectionDAG::computeKnownBits) has supported vectors since rL280927

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

7 years ago[InstCombine] Resubmit the combine of A->B->A BitCast and fix for pr27996
Guozhi Wei [Tue, 25 Oct 2016 20:43:42 +0000 (20:43 +0000)]
[InstCombine] Resubmit the combine of A->B->A BitCast and fix for pr27996

The original patch of the A->B->A BitCast optimization was reverted by r274094 because it may cause infinite loop inside compiler https://llvm.org/bugs/show_bug.cgi?id=27996.

The problem is with following code

xB = load (type B);
xA = load (type A);
+yA = (A)xB; B -> A
+zAn = PHI[yA, xA]; PHI
+zBn = (B)zAn; // A -> B
store zAn;
store zBn;

optimizeBitCastFromPhi generates

+zBn = (B)zAn; // A -> B

and expects it will be combined with the following store instruction to another

store zAn

Unfortunately before combineStoreToValueType is called on the store instruction, optimizeBitCastFromPhi is called on the new BitCast again, and this pattern repeats indefinitely.

optimizeBitCastFromPhi only generates BitCast for load/store instructions, only the BitCast before store can cause the reexecution of optimizeBitCastFromPhi, and BitCast before store can easily be handled by InstCombineLoadStoreAlloca.cpp. So the solution to the problem is if all users of a CI are store instructions, we should not do optimizeBitCastFromPhi on it. Then optimizeBitCastFromPhi will not be called on the new BitCast instructions.

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

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

7 years ago[X86][SSE] Added vector sdiv combine tests
Simon Pilgrim [Tue, 25 Oct 2016 20:25:47 +0000 (20:25 +0000)]
[X86][SSE] Added vector sdiv combine tests

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

7 years agorevert: "Remove debug location from common tail when tail-merging"
Robert Lougher [Tue, 25 Oct 2016 20:17:58 +0000 (20:17 +0000)]
revert: "Remove debug location from common tail when tail-merging"

This reverts r285093, as it caused unexpected buildbot failures on
clang-ppc64le-linux, clang-ppc64be-linux, clang-ppc64be-linux-multistage
and clang-ppc64be-linux-lnt.  Failing test ubsan/TestCases/TypeCheck/vptr.cpp.

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

7 years ago[libFuzzer] when mutating based on CMP traces also try adding +/- 1 to the desired...
Kostya Serebryany [Tue, 25 Oct 2016 20:15:15 +0000 (20:15 +0000)]
[libFuzzer] when mutating based on CMP traces also try adding +/- 1 to the desired bytes. Add another test for use_cmp

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

7 years ago[InstCombine] Ensure that truncated int types are legal.
Sanjay Patel [Tue, 25 Oct 2016 20:11:47 +0000 (20:11 +0000)]
[InstCombine] Ensure that truncated int types are legal.

Fixes the FIXMEs in D25952 and rL285075.

Patch by bryant!

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

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

7 years ago[AArch64] Adjust the cost model for Exynos M1.
Evandro Menezes [Tue, 25 Oct 2016 20:05:42 +0000 (20:05 +0000)]
[AArch64] Adjust the cost model for Exynos M1.

Modify the maximum jump table size.

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

7 years ago[APFloat] Make APFloat an interface class to the internal IEEEFloat. NFC.
Tim Shen [Tue, 25 Oct 2016 19:55:59 +0000 (19:55 +0000)]
[APFloat] Make APFloat an interface class to the internal IEEEFloat. NFC.

Summary:
The intention is to make APFloat an interface class, so that later I can add a second implementation class DoubleAPFloat to correctly implement PPCDoubleDouble semantic. The interface of IEEEFloat is not public, and can be simplified (currently it's exactly the same as the old APFloat), but that belongs to a separate patch.

DoubleAPFloat should look like:
class DoubleAPFloat {
  const fltSemantics *Semantics;
  std::unique_ptr<APFloat> APFloats;  // Two heap-allocated APFloats.
};

There is no functional change, nor public interface change.

Reviewers: hfinkel, chandlerc, iteratee, echristo, kbarton

Subscribers: llvm-commits, mehdi_amini

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

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

7 years agoAdd option to specify minimum number of entries for jump tables
Evandro Menezes [Tue, 25 Oct 2016 19:53:51 +0000 (19:53 +0000)]
Add option to specify minimum number of entries for jump tables

Add an option to allow easier experimentation by target maintainers with the
minimum number of entries to create jump tables.  Also clarify the name of
the other existing option governing the creation of jump tables.

Differential revision: https://reviews.llvm.org/D25883

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

7 years ago[llvm-cov] Don't use colored output until we know it's supported
Vedant Kumar [Tue, 25 Oct 2016 19:52:57 +0000 (19:52 +0000)]
[llvm-cov] Don't use colored output until we know it's supported

CodeCoverageTool::error() depends on CoverageViewOptions::Colors being
initialized. Should fix:

  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/56

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

7 years agoSwitch lowering: improve partitioning of jump tables
Evandro Menezes [Tue, 25 Oct 2016 19:11:43 +0000 (19:11 +0000)]
Switch lowering: improve partitioning of jump tables

When there's a tie between partitionings of jump tables, consider also cases
that result in no jump tables, but in one or a few cases.  The motivation is
that many contemporary processors typically perform case switches fairly
quickly.

Differential revision: https://reviews.llvm.org/D25212

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

7 years ago[LV] Sink scalar operands of predicated instructions
Matthew Simpson [Tue, 25 Oct 2016 18:59:45 +0000 (18:59 +0000)]
[LV] Sink scalar operands of predicated instructions

When we predicate an instruction (div, rem, store) we place the instruction in
its own basic block within the vectorized loop. If a predicated instruction has
scalar operands, it's possible to recursively sink these scalar expressions
into the predicated block so that they might avoid execution. This patch sinks
as much scalar computation as possible into predicated blocks. We previously
were able to sink such operands only if they were extractelement instructions.

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

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

7 years ago[InstCombine] add tests for missing icmp + shl nuw fold
Sanjay Patel [Tue, 25 Oct 2016 18:47:56 +0000 (18:47 +0000)]
[InstCombine] add tests for missing icmp + shl nuw fold

Patch by bryant!

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

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

7 years agoAdd -strip-nonlinetable-debuginfo capability
Michael Ilseman [Tue, 25 Oct 2016 18:44:13 +0000 (18:44 +0000)]
Add -strip-nonlinetable-debuginfo capability

This adds a new function to DebugInfo.cpp that takes an llvm::Module
as input and removes all debug info metadata that is not directly
needed for line tables, thus effectively stripping all type and
variable information from the module.

The primary motivation for this feature was the bitcode work flow
(cf. http://lists.llvm.org/pipermail/llvm-dev/2016-June/100643.html
for more background). This is not wired up yet, but will be in
subsequent patches.  For testing, the new functionality is exposed to
opt with a -strip-nonlinetable-debuginfo option.

The secondary use-case (and one that works right now!) is as a
reduction pass in bugpoint. I added two new bugpoint options
(-disable-strip-debuginfo and -disable-strip-debug-types) to control
the new features. By default it will first attempt to remove all debug
information, then only the type info, and then proceed to hack at any
remaining MDNodes.

Thanks to Adrian Prantl for stewarding this patch!

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

7 years agoRemove debug location from common tail when tail-merging
Robert Lougher [Tue, 25 Oct 2016 18:44:07 +0000 (18:44 +0000)]
Remove debug location from common tail when tail-merging

The branch folding pass tail merges blocks into a common-tail.  However, the
tail retains the debug information from one of the original inputs to the
merge (chosen randomly).  This is a problem for sampled-based PGO, as hits
on the common-tail will be attributed to whichever block was chosen,
irrespective of which path was actually taken to the common-tail.

This patch fixes the issue by nulling the debug location for the common-tail.

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

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

7 years agoFix 80-char violations. NFC.
Michael Kuperstein [Tue, 25 Oct 2016 18:31:23 +0000 (18:31 +0000)]
Fix 80-char violations. NFC.

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

7 years ago[unittests] STLExtrasTest: Remove an MSVC 2013 workaround, NFCI.
Vedant Kumar [Tue, 25 Oct 2016 18:11:17 +0000 (18:11 +0000)]
[unittests] STLExtrasTest: Remove an MSVC 2013 workaround, NFCI.

Let's see what the bots have to say about this...

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

7 years ago[unittests] Remove an MSVC 2013 workaround, NFCI.
Vedant Kumar [Tue, 25 Oct 2016 17:58:25 +0000 (17:58 +0000)]
[unittests] Remove an MSVC 2013 workaround, NFCI.

Let's see what the bots have to say about this...

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

7 years agoRevert 285087.
Nico Weber [Tue, 25 Oct 2016 17:46:29 +0000 (17:46 +0000)]
Revert 285087.

The sanitizer-windows bot turned red with:

FAILED: utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\cl.exe ... -c
    C:\...\llvm\utils\TableGen\IntrinsicEmitter.cpp
c:\...\llvm\utils\tablegen\intrinsicemitter.cpp(254) :
  fatal error C1001: An internal error has occurred in the compiler.
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/114/steps/build%20clang%20lld/logs/stdio

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

7 years ago[llvm-cov] Add support for loading coverage from multiple objects
Vedant Kumar [Tue, 25 Oct 2016 17:40:55 +0000 (17:40 +0000)]
[llvm-cov] Add support for loading coverage from multiple objects

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

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

7 years agoTry removing an MSVC2010 workaround.
Nico Weber [Tue, 25 Oct 2016 17:35:00 +0000 (17:35 +0000)]
Try removing an MSVC2010 workaround.

Things seem to build fine locally without this, so let's
see what the bots think.

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

7 years ago[WebAssembly] Add immediate fields to call_indirect and memory operators.
Dan Gohman [Tue, 25 Oct 2016 16:55:52 +0000 (16:55 +0000)]
[WebAssembly] Add immediate fields to call_indirect and memory operators.

call_indirect, grow_memory, and current_memory now have immediate
operands in the 0xd binary encoding.

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

7 years agoMove discriminator assignment to where it is used. (NFC)
Dehao Chen [Tue, 25 Oct 2016 16:50:27 +0000 (16:50 +0000)]
Move discriminator assignment to where it is used. (NFC)

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

7 years ago[IndVarSimplify][Dwarf] When widening the IV increment, correctly set the debug loc.
Andrea Di Biagio [Tue, 25 Oct 2016 16:45:17 +0000 (16:45 +0000)]
[IndVarSimplify][Dwarf] When widening the IV increment, correctly set the debug loc.

When indvars widened an induction variable, the debug location for the loop
increment computation was incorrectly set equal to the debug loc of the loop
latch terminator.

This patch fixes the issue by propagating the correct location from the
original loop increment instruction to the new widened increment.

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

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

7 years agoReplace TimeValue by TimePoint in LegacyPassManager. NFC.
Pavel Labath [Tue, 25 Oct 2016 16:20:07 +0000 (16:20 +0000)]
Replace TimeValue by TimePoint in LegacyPassManager. NFC.

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

7 years ago[EarlyCSE] Make MemorySSA memory dependency check more aggressive.
Geoff Berry [Tue, 25 Oct 2016 16:18:47 +0000 (16:18 +0000)]
[EarlyCSE] Make MemorySSA memory dependency check more aggressive.

Now that MemorySSA keeps track of whether MemoryUses are optimized, use
getClobberingMemoryAccess() to check MemoryUse memory dependencies since
it should no longer be so expensive.

This is a follow-up change to https://reviews.llvm.org/D25881

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

7 years agofix formatting; NFC
Sanjay Patel [Tue, 25 Oct 2016 16:12:31 +0000 (16:12 +0000)]
fix formatting; NFC

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

7 years ago[SystemZ] Do not use LOC(G) for volatile loads
Ulrich Weigand [Tue, 25 Oct 2016 15:39:15 +0000 (15:39 +0000)]
[SystemZ] Do not use LOC(G) for volatile loads

It is not safe to use LOAD ON CONDITION to implement access to a memory
location marked "volatile", since the architecture leaves it unspecified
whether or not an access happens if the condition is false.

The current code already appears to care about that:
  def LOC  : CondUnaryRSY<"loc",  0xEBF2, nonvolatile_load, GR32, 4>;

Unfortunately, that "nonvolatile_load" operator is simply ignored
by the CondUnaryRSY class, and there was no test to catch it.

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

7 years ago[InstCombine] add test and code comment to show potentially misguided icmp trunc...
Sanjay Patel [Tue, 25 Oct 2016 15:16:39 +0000 (15:16 +0000)]
[InstCombine] add test and code comment to show potentially misguided icmp trunc transform

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

7 years ago[X86][SSE] Add support for (V)PMOVSX* constant folding
Simon Pilgrim [Tue, 25 Oct 2016 14:29:25 +0000 (14:29 +0000)]
[X86][SSE] Add support for (V)PMOVSX* constant folding

We already have (V)PMOVZX* combining support, this is the beginning of handling (V)PMOVSX* similarly - other combines in combineVSZext can be generalized in future patches.

This unearthed an interesting bug in that we were generating illegal build vectors on 32-bit targets - it was proving difficult to create a test for it from PMOVZX, but it fired immediately with PMOVSX. I've created a more general form of the existing getConstVector to handle these cases - ideally this should be handled in non-target-specific code but I couldn't find an equivalent.

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

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

7 years ago[InstCombine] fix checks for previous commit (r285069)
Sanjay Patel [Tue, 25 Oct 2016 13:30:19 +0000 (13:30 +0000)]
[InstCombine] fix checks for previous commit (r285069)

Accidentally put in the hoped-for checks ahead of the transform!

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

7 years ago[InstCombine] add tests for bitcast interference with min/max (PR28001)
Sanjay Patel [Tue, 25 Oct 2016 13:27:56 +0000 (13:27 +0000)]
[InstCombine] add tests for bitcast interference with min/max (PR28001)

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

7 years agofix warning
Rafael Espindola [Tue, 25 Oct 2016 12:28:26 +0000 (12:28 +0000)]
fix warning

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

7 years ago[DAGCombine] Preserve shuffles when one of the vector operands is constant
Zvi Rackover [Tue, 25 Oct 2016 12:14:19 +0000 (12:14 +0000)]
[DAGCombine] Preserve shuffles when one of the vector operands is constant

Summary:
Do *not* perform combines such as:

    vector_shuffle<4,1,2,3>(build_vector(Ud, C0, C1 C2), scalar_to_vector(X))
    ->
    build_vector(X, C0, C1, C2)

Keeping the shuffle allows lowering the constant build_vector to a materialized
constant vector (such as a vector-load from the constant-pool or some other idiom).

Reviewers: delena, igorb, spatel, mkuper, andreadb, RKSimon

Subscribers: llvm-commits

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

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

7 years agoMake the LTO comdat api more symbol table friendly.
Rafael Espindola [Tue, 25 Oct 2016 12:02:03 +0000 (12:02 +0000)]
Make the LTO comdat api more symbol table friendly.

In an IR symbol table I would expect the comdats to be represented as:

- A table of strings, one for each comdat name.
- Each symbol has an optional index into that table.

The natural api for accessing that would be

InputFile:
ArrayRef<StringRef> getComdatTable() const;

Symbol:
int getComdatIndex() const;

This patch implements an API as close to that as possible.  The
implementation on top of the current IRObjectFile is a bit hackish,
but should map just fine over a symbol table and is very convenient to
use.

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

7 years agoFix an unused warning in WebAssemblyInstPrinter with NDEBUG.
Benjamin Kramer [Tue, 25 Oct 2016 09:08:50 +0000 (09:08 +0000)]
Fix an unused warning in WebAssemblyInstPrinter with NDEBUG.

Patch by Sam McCall!

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

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

7 years ago[AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_IN...
Craig Topper [Tue, 25 Oct 2016 04:00:29 +0000 (04:00 +0000)]
[AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_INREG for 512-bit vectors to support vpmovzxbq and vpmovsxbq.

Summary: The one tricky thing about this is that the sign/zero_extend_inreg uses v64i8 as an input type which isn't legal without BWI support. Though the vpmovsxbq and vpmovzxbq instructions themselves don't require BWI. To support this we need to add custom lowering for ZERO_EXTEND_VECTOR_INREG with v64i8 input. This can mostly reuse the existing sign extend code with a couple checks for sign extend vs zero extend added.

Reviewers: delena, RKSimon

Subscribers: llvm-commits

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

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

7 years agoGlobalDCE: Restore a statement accidentally removed in r285048.
Peter Collingbourne [Tue, 25 Oct 2016 02:57:27 +0000 (02:57 +0000)]
GlobalDCE: Restore a statement accidentally removed in r285048.

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

7 years agoMachineInstrBundle: Pass iterators to getBundle(Start|End); NFC
Matthias Braun [Tue, 25 Oct 2016 02:55:17 +0000 (02:55 +0000)]
MachineInstrBundle: Pass iterators to getBundle(Start|End); NFC

This is a function to go backwards in a block to find the first
instruction in a bundle, so iterator is a more natural choice for
parameter/return rather than a reference to a MachineInstruction.

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

7 years agoIR: Deduplicate getParent() functions on derived classes of GlobalValue into the...
Peter Collingbourne [Tue, 25 Oct 2016 02:54:08 +0000 (02:54 +0000)]
IR: Deduplicate getParent() functions on derived classes of GlobalValue into the base class. NFCI.

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

7 years ago[libFuzzer] simplify the code for use_cmp, also use the position hint when available...
Kostya Serebryany [Tue, 25 Oct 2016 02:04:43 +0000 (02:04 +0000)]
[libFuzzer] simplify the code for use_cmp, also use the position hint when available, add a test

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

7 years agoGlobalDCE: Deduplicate code. NFCI.
Peter Collingbourne [Tue, 25 Oct 2016 01:58:26 +0000 (01:58 +0000)]
GlobalDCE: Deduplicate code. NFCI.

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

7 years ago[InstCombine] auto-generate checks
Sanjay Patel [Tue, 25 Oct 2016 00:44:02 +0000 (00:44 +0000)]
[InstCombine] auto-generate checks

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

7 years ago[InstCombine] auto-generate checks
Sanjay Patel [Tue, 25 Oct 2016 00:41:00 +0000 (00:41 +0000)]
[InstCombine] auto-generate checks

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

7 years ago[WebAssembly] Reorder load/store operands to match binary encoding.
Dan Gohman [Tue, 25 Oct 2016 00:17:11 +0000 (00:17 +0000)]
[WebAssembly] Reorder load/store operands to match binary encoding.

The p2align operand of a load/store is encoded before the offset
operand; reorder the MachineInstr operands accordingly.

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

7 years ago[llvm-cov] Do not print out the filename of the object file
Vedant Kumar [Tue, 25 Oct 2016 00:08:33 +0000 (00:08 +0000)]
[llvm-cov] Do not print out the filename of the object file

When we load coverage data from multiple objects, we don't have a way to
attribute a source object to a function record. Printing out the object
filename next to the source filename is already not very useful: soon,
it'll actually become misleading. Stop printing out the filename now.

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

7 years ago[WebAssembly] Implement more WebAssembly binary encoding.
Dan Gohman [Mon, 24 Oct 2016 23:27:49 +0000 (23:27 +0000)]
[WebAssembly] Implement more WebAssembly binary encoding.

This changes locals from being declared by the emitLocal hook in
WebAssemblyTargetStreamer, rather than with an instruction. After exploring
the infastructure in LLVM more, this seems to make more sense since
declaring locals doesn't use an encoded opcode.

This also adds more 0xd opcodes, type encodings, and miscellaneous
binary encoding bits.

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

7 years agoCodeGen/Passes: Pass MachineFunction as functor arg; NFC
Matthias Braun [Mon, 24 Oct 2016 23:23:02 +0000 (23:23 +0000)]
CodeGen/Passes: Pass MachineFunction as functor arg; NFC

Passing a MachineFunction as argument is more natural and avoids an
unnecessary round-trip through the logic determining the correct
Subtarget because MachineFunction already has a reference anyway.

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

7 years ago[InstCombine] regenerate some checks
Sanjay Patel [Mon, 24 Oct 2016 22:50:26 +0000 (22:50 +0000)]
[InstCombine] regenerate some checks

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

7 years agocmake: Rename installhdrs to install-llvm-headers and fix the dependencies
Justin Bogner [Mon, 24 Oct 2016 21:58:58 +0000 (21:58 +0000)]
cmake: Rename installhdrs to install-llvm-headers and fix the dependencies

The installhdrs target was inconsistently named and would behave
differently depending on whether or not you ran a build first. This
renames it to install-llvm-headers to match other target names and
adds a dependency on intrinsics_gen so that it will always install the
same set of things.

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

7 years agoFix regression from my recent GlobalsAA fix.
Eli Friedman [Mon, 24 Oct 2016 21:47:44 +0000 (21:47 +0000)]
Fix regression from my recent GlobalsAA fix.

There are two fixes here: one, AnalyzeUsesOfPointer can't return
false until it has checked all the uses of the pointer. Two, if a
global uses another global, we have to assume the address of the
first global escapes.

Fixes https://llvm.org/bugs/show_bug.cgi?id=30707 .

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

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

7 years ago[SelectionDAG] Update ComputeNumSignBits SRA/SHL handlers to accept scalar or vector...
Simon Pilgrim [Mon, 24 Oct 2016 21:47:19 +0000 (21:47 +0000)]
[SelectionDAG] Update ComputeNumSignBits SRA/SHL handlers to accept scalar or vector splats

Use isConstOrConstSplat helper.

Also use APInt instead of getZExtValue directly to avoid out of range issues.

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

7 years agocmake: Make /usr/share/cmake installable with LLVM_DISTRIBUTION_COMPONENTS
Justin Bogner [Mon, 24 Oct 2016 21:40:15 +0000 (21:40 +0000)]
cmake: Make /usr/share/cmake installable with LLVM_DISTRIBUTION_COMPONENTS

Add a cmake-exports install component and appropriate targets for
LLVM_DISTRIBUTION_COMPONENTS to work with.

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

7 years agoUse MachineInstr::mop_iterator instead of MIOperands; NFC
Matthias Braun [Mon, 24 Oct 2016 21:36:43 +0000 (21:36 +0000)]
Use MachineInstr::mop_iterator instead of MIOperands; NFC

(Const)?MIOperands is equivalent to the C++ style
MachineInstr::mop_iterator. Use the latter for consistency except for a
few callers of MIOperands::analyzePhysReg().

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

7 years agonother additional error check for an invalid Mach-O file
Kevin Enderby [Mon, 24 Oct 2016 21:15:11 +0000 (21:15 +0000)]
nother additional error check for an invalid Mach-O file
when contained in a Mach-O universal file and the
cputypes in both headers don’t match.

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

7 years agoUse SDValue::getConstantOperandVal() helper. NFCI.
Simon Pilgrim [Mon, 24 Oct 2016 20:56:52 +0000 (20:56 +0000)]
Use SDValue::getConstantOperandVal() helper. NFCI.

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

7 years ago[pbqp] unique_ptr-ify (Vector|Matrix)::Data, NFC.
Vedant Kumar [Mon, 24 Oct 2016 20:51:46 +0000 (20:51 +0000)]
[pbqp] unique_ptr-ify (Vector|Matrix)::Data, NFC.

Suggested by David Blaikie.

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

7 years ago[pbqp] Delete some dead code, NFC.
Vedant Kumar [Mon, 24 Oct 2016 20:35:35 +0000 (20:35 +0000)]
[pbqp] Delete some dead code, NFC.

I took the opportunity to replace some copy|move constructors|assignment
operators with default implementations.

As a follow-up, I plan on threading unique_ptr<T []> through a few areas
per David Blaikie's advice.

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

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

7 years ago[WebAssembly] Fix a broken URL.
Dan Gohman [Mon, 24 Oct 2016 20:35:17 +0000 (20:35 +0000)]
[WebAssembly] Fix a broken URL.

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

7 years ago[WebAssembly] Define the `end` opcode value.
Dan Gohman [Mon, 24 Oct 2016 20:32:04 +0000 (20:32 +0000)]
[WebAssembly] Define the `end` opcode value.

CFGStackify differentiates between END_LOOP and END_BLOCK, but wasm
itself doesn't. For now, just use the same opcode for both.

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

7 years ago[WebAssembly] Update opcode values according to recent spec changes.
Dan Gohman [Mon, 24 Oct 2016 20:21:49 +0000 (20:21 +0000)]
[WebAssembly] Update opcode values according to recent spec changes.

This corresponds to the "0xd" opcode renumbering.

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

7 years ago[WebAssembly] Add an option to make get_local/set_local explicit.
Dan Gohman [Mon, 24 Oct 2016 19:49:43 +0000 (19:49 +0000)]
[WebAssembly] Add an option to make get_local/set_local explicit.

This patch adds a pass, controlled by an option and off by default for
now, for making implicit get_local/set_local explicit. This simplifies
emitting wasm with MC.

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

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

7 years agoMerge two if conditions into one. NFCI.
Davide Italiano [Mon, 24 Oct 2016 19:41:47 +0000 (19:41 +0000)]
Merge two if conditions into one. NFCI.

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

7 years agoTarget: Change various section classifiers in TargetLoweringObjectFile to take a...
Peter Collingbourne [Mon, 24 Oct 2016 19:23:39 +0000 (19:23 +0000)]
Target: Change various section classifiers in TargetLoweringObjectFile to take a GlobalObject.

These functions are about classifying a global which will actually be
emitted, so it does not make sense for them to take a GlobalValue which may
for example be an alias.

Change the Mach-O object writer and the Hexagon, Lanai and MIPS backends to
look through aliases before using TargetLoweringObjectFile interfaces. These
are functional changes but all appear to be bug fixes.

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

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

7 years ago[x86] add tests for {-1,0,1} select of constants
Sanjay Patel [Mon, 24 Oct 2016 19:13:29 +0000 (19:13 +0000)]
[x86] add tests for {-1,0,1} select of constants

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

7 years ago[llvm] Remove redundant --check-prefix=CHECK from tests
Mandeep Singh Grang [Mon, 24 Oct 2016 18:57:55 +0000 (18:57 +0000)]
[llvm] Remove redundant --check-prefix=CHECK from tests

Reviewers: MatzeB, mcrosier, rengolin

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

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

7 years agoCodeGen: Do not add a global's address space to the folding set profile.
Peter Collingbourne [Mon, 24 Oct 2016 18:56:09 +0000 (18:56 +0000)]
CodeGen: Do not add a global's address space to the folding set profile.

It is already part of the type (which is part of the global, which is already
being added), so there's no need to do it.

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

7 years agoadd-discriminators: Fix handling of lexical scopes.
Adrian Prantl [Mon, 24 Oct 2016 18:23:51 +0000 (18:23 +0000)]
add-discriminators: Fix handling of lexical scopes.

This fixes a bug in the handling of lexical scopes, when more than one
scope is defined on the same line or functions are inlined into call
sites that are on the same line as the function definition. This
situation can easily happen in macro expansions.

The problem is solved by introducing a SmallDenseMap<DIScope *,
DILexicalBlockFile *, 1> that keeps track of all the different lexical
scopes that share a line/file location.

Fixes PR30681.

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

7 years agoClarify that MSVC is not the issue here anymore.
Benjamin Kramer [Mon, 24 Oct 2016 18:11:05 +0000 (18:11 +0000)]
Clarify that MSVC is not the issue here anymore.

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

7 years agoRevert r284972 and remove other defaulted copy/move constructors/=
Krzysztof Parzyszek [Mon, 24 Oct 2016 17:40:46 +0000 (17:40 +0000)]
Revert r284972 and remove other defaulted copy/move constructors/=

David Blaikie pointed out that we get them for free without having to
write anything.

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

7 years ago[PPC] Generate positive FP zero using xor insn instead of loading from constant area
Ehsan Amiri [Mon, 24 Oct 2016 17:31:09 +0000 (17:31 +0000)]
[PPC] Generate positive FP zero using xor insn instead of loading from constant area

https://reviews.llvm.org/D23614

Currently we load +0.0 from constant area. That can change to be generated using
XOR instruction.

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

7 years agoReleaseNotes: mention new compiler requirements
Hans Wennborg [Mon, 24 Oct 2016 17:29:52 +0000 (17:29 +0000)]
ReleaseNotes: mention new compiler requirements

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

7 years agoRevert r284580+r284917. ("Synthesize TBB/TBH instructions")
Eli Friedman [Mon, 24 Oct 2016 17:20:50 +0000 (17:20 +0000)]
Revert r284580+r284917. ("Synthesize TBB/TBH instructions")

The optimization has correctness issues, so reverting for now to fix tests
on thumb1 targets.

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

7 years agoRemoved FIXME from include ordering comment
Simon Pilgrim [Mon, 24 Oct 2016 17:15:05 +0000 (17:15 +0000)]
Removed FIXME from include ordering comment

Nothing to fix, it's just the way it has to be.

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

7 years agoCheck the number of Args in LibCallsShrinkWrap.
Rong Xu [Mon, 24 Oct 2016 16:50:12 +0000 (16:50 +0000)]
Check the number of Args in LibCallsShrinkWrap.

Some library fucntions can have no argument.

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

7 years ago[AArch64] Optionally use the Newton series for reciprocal estimation
Evandro Menezes [Mon, 24 Oct 2016 16:14:58 +0000 (16:14 +0000)]
[AArch64] Optionally use the Newton series for reciprocal estimation

Add support for estimating the square root or its reciprocal and division or
reciprocal using the combiner generic Newton series.

Differential revision: https://reviews.llvm.org/D25291

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

7 years ago[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number...
Justin Lebar [Mon, 24 Oct 2016 16:06:53 +0000 (16:06 +0000)]
[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number of inline buckets.

Summary:
If you try to instantiate it with a non-power-of-two buckets, DenseMap
will assert at runtime (!) if we ever outgrow our inline storage.

I believe using a constexpr function inside of a static_assert is safe
now that we've unsupported MSVC 2013 and GCC < 4.8.

Reviewers: bkramer, qcolombet, escha

Subscribers: llvm-commits

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

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

7 years ago[EarlyCSE] Optimize MemoryPhis and reduce memory clobber queries w/ MemorySSA
Geoff Berry [Mon, 24 Oct 2016 15:54:00 +0000 (15:54 +0000)]
[EarlyCSE] Optimize MemoryPhis and reduce memory clobber queries w/ MemorySSA

Summary:
When using MemorySSA, re-optimize MemoryPhis when removing a store since
this may create MemoryPhis with all identical arguments.

Also, when using MemorySSA to check if two MemoryUses are reading from
the same version of the heap, use the defining access instead of calling
getClobberingAccess, since the latter can currently result in many more
AA calls.  Once the MemorySSA use optimization tracking changes are
done, we can remove this limitation, which should result in more loads
being CSE'd.

Reviewers: dberlin

Subscribers: mcrosier, llvm-commits

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

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

7 years ago[PPC] Better codegen for AND, ANY_EXT, SRL sequence
Ehsan Amiri [Mon, 24 Oct 2016 15:46:58 +0000 (15:46 +0000)]
[PPC] Better codegen for AND, ANY_EXT, SRL sequence

https://reviews.llvm.org/D24924

This improves the code generated for a sequence of AND, ANY_EXT, SRL instructions. This is a targetted fix for this special pattern. The pattern is generated by target independet dag combiner and so a more general fix may not be necessary. If we come across other similar cases, some ideas for handling it are discussed on the code review.

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