OSDN Git Service

android-x86/external-llvm.git
7 years ago[PM] Introduce an analysis set used to preserve all analyses over
Chandler Carruth [Sun, 15 Jan 2017 06:32:49 +0000 (06:32 +0000)]
[PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis passes to check for the CFG being preserved to remove the
fanout of all analyses being listed in all passes.

I've gone through and removed or cleaned up as many of the comments
reminding us to do this as I could.

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

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

7 years ago[AVX-512] Remove unnecessary duplicate broadcast patterns. NFC
Craig Topper [Sun, 15 Jan 2017 06:15:45 +0000 (06:15 +0000)]
[AVX-512] Remove unnecessary duplicate broadcast patterns. NFC

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

7 years ago[AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns...
Craig Topper [Sun, 15 Jan 2017 05:47:45 +0000 (05:47 +0000)]
[AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns when VLX is available.

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

7 years ago[X86] Remove untested MOVDDUP patterns.
Craig Topper [Sun, 15 Jan 2017 05:21:29 +0000 (05:21 +0000)]
[X86] Remove untested MOVDDUP patterns.

These all involve bitcasts around the memory operands. This isn't
something we normally do for isel patterns. I suspect DAG combine should
convert the load type making this unnecessary.

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

7 years agoAdd a LLVM_USE_LINKER that defines the linker to use when building LLVM
Mehdi Amini [Sun, 15 Jan 2017 03:21:30 +0000 (03:21 +0000)]
Add a LLVM_USE_LINKER that defines the linker to use when building LLVM

Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

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

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

7 years agoGive comparator const call operator
Eric Fiselier [Sun, 15 Jan 2017 02:06:44 +0000 (02:06 +0000)]
Give comparator const call operator

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

7 years agoPDB: Add a class to create the /names stream contents.
Rui Ueyama [Sun, 15 Jan 2017 00:36:02 +0000 (00:36 +0000)]
PDB: Add a class to create the /names stream contents.

This patch adds a new class NameHashTableBuilder which creates /names streams.
This patch contains a test to confirm that a stream created by
NameHashTableBuilder can be read by NameHashTable reader class.

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

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

7 years ago[PM] The assumption cache is fundamentally designed to be self-updating,
Chandler Carruth [Sun, 15 Jan 2017 00:26:18 +0000 (00:26 +0000)]
[PM] The assumption cache is fundamentally designed to be self-updating,
mark it as never invalidated in the new PM.

The old PM already required this to work, and after a discussion with
Hal this seems to really be the only sensible answer. The cache
gracefully degrades as the IR is mutated, and most things which do this
should already be incrementally updating the cache.

This gets rid of a bunch of logic preserving and testing the
invalidation of this analysis.

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

7 years ago[PM] Fix instcombine's analysis preservation in the new pass manager to
Chandler Carruth [Sat, 14 Jan 2017 23:25:22 +0000 (23:25 +0000)]
[PM] Fix instcombine's analysis preservation in the new pass manager to
cover domtree and alias analysis. These are the pretty clear analyses
that we would always want to survive this pass.

To make these survive, we also need to preserve the assumption cache.

Added a test that verifies the important bits of this preservation.

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

7 years ago[InstCombine] clean up visitAshr(); NFCI
Sanjay Patel [Sat, 14 Jan 2017 23:13:50 +0000 (23:13 +0000)]
[InstCombine] clean up visitAshr(); NFCI

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

7 years ago[InstCombine] add test to show missed vector fold; NFC
Sanjay Patel [Sat, 14 Jan 2017 23:12:29 +0000 (23:12 +0000)]
[InstCombine] add test to show missed vector fold; NFC

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

7 years agoAdding const overloads of operator* and operator-> for DenseSet iterators
David Majnemer [Sat, 14 Jan 2017 21:54:58 +0000 (21:54 +0000)]
Adding const overloads of operator* and operator-> for DenseSet iterators

This fixes some problems when building ClangDiagnostics.cpp on Visual Studio 2017 RC. As far as I understand, there was a change in the implementation of the constructor for std::vector with two iterator parameters, which in our case causes an attempt to dereference const Iterator objects. Since there was no overload for a const Iterator, the compile would fail.

Patch by Hugo Puhlmann!

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

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

7 years ago[NewGVN] Fix a warning from GCC.
Davide Italiano [Sat, 14 Jan 2017 20:44:08 +0000 (20:44 +0000)]
[NewGVN] Fix a warning from GCC.

Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

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

7 years ago[NewGVN] clang-format this file after recent changes.
Davide Italiano [Sat, 14 Jan 2017 20:15:04 +0000 (20:15 +0000)]
[NewGVN] clang-format this file after recent changes.

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

7 years ago[NewGVN] Try to be consistent wit the style used in this file. NFCI.
Davide Italiano [Sat, 14 Jan 2017 20:13:18 +0000 (20:13 +0000)]
[NewGVN] Try to be consistent wit the style used in this file. NFCI.

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

7 years ago[TargetLowering] Simplfiy a bit. NFCI.
Davide Italiano [Sat, 14 Jan 2017 20:09:29 +0000 (20:09 +0000)]
[TargetLowering] Simplfiy a bit. NFCI.

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

7 years ago[CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed
Simon Pilgrim [Sat, 14 Jan 2017 19:24:23 +0000 (19:24 +0000)]
[CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed

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

7 years ago[X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 18:52:13 +0000 (18:52 +0000)]
[X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns

VPMADCSWD act as VPADDD( VPMADDWD( x, y ), z ) - multiply+extend+hadd and add to v4i32 accumulator

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

7 years ago[X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 18:08:54 +0000 (18:08 +0000)]
[X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns

VPMACSDQH/VPMACSDQL act as VPADDQ( VPMULDQ( x, y ), z ) - multiply+extending either the odd/even 4i32 input elements and adding to v2i64 accumulator

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

7 years ago[X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 17:13:52 +0000 (17:13 +0000)]
[X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns

VPMACSWW/VPMACSDD act as add( mul( x, y ), z ) - ignoring any upper bits from both the multiply and add stages

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

7 years ago[X86][XOP] Add tests for integer fused multiply add
Simon Pilgrim [Sat, 14 Jan 2017 13:07:22 +0000 (13:07 +0000)]
[X86][XOP] Add tests for integer fused multiply add

Tests showing missed opportunities to use XOP's integer fma instructions

Some of these are pretty awkward to match as they often have implicit sext/trunc stages but many just ignore overflow bits which makes things pretty straightforward.

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

7 years agofix some typos in the doc
Sylvestre Ledru [Sat, 14 Jan 2017 11:37:01 +0000 (11:37 +0000)]
fix some typos in the doc

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

7 years ago[utils] Improve extraction of check prefixes from RUN lines
Nikolai Bozhenov [Sat, 14 Jan 2017 09:39:35 +0000 (09:39 +0000)]
[utils] Improve extraction of check prefixes from RUN lines

Correct handling of the following FileCheck options is implemented in
update_llc_test_checks.py and update_test_checks.py scripts:

1) -check-prefix (with a single dash)
2) -check-prefixes (with multiple prefixes)

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

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

7 years ago[AVX-512] Teach two address instruction pass to replace masked move instructions...
Craig Topper [Sat, 14 Jan 2017 07:50:52 +0000 (07:50 +0000)]
[AVX-512] Teach two address instruction pass to replace masked move instructions with blendm instructions when its beneficial.

Isel now selects masked move instructions for vselect instead of blendm. But sometimes it beneficial to register allocation to remove the tied register constraint by using blendm instructions.

This also picks up cases where the masked move was created due to a masked load intrinsic.

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

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

7 years ago[AVX-512] Replace V_SET0 in AVX-512 patterns with AVX512_128_SET0. Enhance AVX512_128...
Craig Topper [Sat, 14 Jan 2017 07:29:24 +0000 (07:29 +0000)]
[AVX-512] Replace V_SET0 in AVX-512 patterns with AVX512_128_SET0. Enhance AVX512_128_SET0 expansion to make this possible.

We'll now expand AVX512_128_SET0 to an EVEX VXORD if VLX available. Or if its not, but register allocation has selected a non-extended register we will use VEX VXORPS. And if its an extended register without VLX we'll use a 512-bit XOR. Do the same for AVX512_FsFLD0SS/SD.

This makes it possible for the register allocator to have all 32 registers available to work with.

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

7 years agoRemoving potentially error-prone fallthrough. NFC
Marcello Maggioni [Sat, 14 Jan 2017 07:28:47 +0000 (07:28 +0000)]
Removing potentially error-prone fallthrough. NFC

This fallthrough if other cases are added between fabs and default
could cause fabs to fall to the next case resulting in a bug.
Better getting rid of it immediately just to be sure.

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

7 years agoDelete duplicate word. NFC
Xin Tong [Sat, 14 Jan 2017 05:51:36 +0000 (05:51 +0000)]
Delete duplicate word. NFC

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

7 years ago[X86] Simplify the code that calculates a scaled blend mask. We don't need a second...
Craig Topper [Sat, 14 Jan 2017 04:29:15 +0000 (04:29 +0000)]
[X86] Simplify the code that calculates a scaled blend mask. We don't need a second loop.

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

7 years ago[AVX-512] Change blend mask in lowerVectorShuffleAsBlend to a 64-bit value. Also...
Craig Topper [Sat, 14 Jan 2017 04:19:35 +0000 (04:19 +0000)]
[AVX-512] Change blend mask in lowerVectorShuffleAsBlend to a 64-bit value. Also add 32-bit mode command lines to the test case that exercises this just to make sure we sanely handle the 64-bit immediate there.

This fixes a undefined sanitizer failure from r291888.

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

7 years agoFix modules buildbots broken in r291983.
Eugene Zelenko [Sat, 14 Jan 2017 01:07:05 +0000 (01:07 +0000)]
Fix modules buildbots broken in r291983.

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

7 years ago[Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use warnings...
Eugene Zelenko [Sat, 14 Jan 2017 00:32:38 +0000 (00:32 +0000)]
[Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoCompute summary before calling extractProfTotalWeight
Easwaran Raman [Sat, 14 Jan 2017 00:32:37 +0000 (00:32 +0000)]
Compute summary before calling extractProfTotalWeight

extractProfTotalWeight checks if the profile type is sample profile, but
before that we have to ensure that summary is available. Also expanded
the unittest to test the case where there is no summar

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

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

7 years agoNewGVN: Kill unneeded DFSDomMap, cleanup a few comments.
Daniel Berlin [Sat, 14 Jan 2017 00:24:23 +0000 (00:24 +0000)]
NewGVN: Kill unneeded DFSDomMap, cleanup a few comments.

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

7 years agoFix update_test_checks not to accidentally believe type names are variable names
Daniel Berlin [Fri, 13 Jan 2017 23:54:15 +0000 (23:54 +0000)]
Fix update_test_checks not to accidentally believe type names are variable names

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

7 years agoNewGVN: Fix PR31613 test regex naming
Daniel Berlin [Fri, 13 Jan 2017 23:54:10 +0000 (23:54 +0000)]
NewGVN: Fix PR31613 test regex naming

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

7 years agoGlobalISel: Abort in ResetMachineFunctionPass if fallback isn't enabled
Justin Bogner [Fri, 13 Jan 2017 23:46:11 +0000 (23:46 +0000)]
GlobalISel: Abort in ResetMachineFunctionPass if fallback isn't enabled

When GlobalISel is configured to abort rather than fallback the only
thing that resetting the machine function does is make things harder
to debug. If we ever get to this point in the abort configuration it
indicates that we've already hit a bug, so this changes the behaviour
to abort instead.

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

7 years ago[InstCombine] optimize unsigned icmp of increment
Sanjay Patel [Fri, 13 Jan 2017 23:25:46 +0000 (23:25 +0000)]
[InstCombine] optimize unsigned icmp of increment

Allows LLVM to optimize sequences like the following:

%add = add nuw i32 %x, 1
%cmp = icmp ugt i32 %add, %y

Into:

%cmp = icmp uge i32 %x, %y

Previously, only signed comparisons were being handled.

Decrements could also be handled, but 'sub nuw %x, 1' is currently canonicalized to
'add %x, -1' in InstCombineAddSub, losing the nuw flag. Removing that canonicalization
seems like it might have far-reaching ramifications so I kept this simple for now.

Patch by Matti Niemenmaa!

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

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

7 years ago[GlobalISel] track predecessor mapping during switch lowering.
Tim Northover [Fri, 13 Jan 2017 23:11:37 +0000 (23:11 +0000)]
[GlobalISel] track predecessor mapping during switch lowering.

Correctly populating Machine PHIs relies on knowing exactly how the IR level
CFG was lowered to MachineIR. This needs to be tracked by any translation
phases that meddle (currently only SwitchInst handling).

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

7 years ago[InstCombine] use m_APInt to allow lshr folds for vectors with splat constants
Sanjay Patel [Fri, 13 Jan 2017 23:04:10 +0000 (23:04 +0000)]
[InstCombine] use m_APInt to allow lshr folds for vectors with splat constants

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

7 years ago[InstCombine / InstSimplify] add and move tests for lshr transforms; NFC
Sanjay Patel [Fri, 13 Jan 2017 22:54:12 +0000 (22:54 +0000)]
[InstCombine / InstSimplify] add and move tests for lshr transforms; NFC

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

7 years agoNewGVN: Move leaders around properly to ensure we have a canonical dominating leader...
Daniel Berlin [Fri, 13 Jan 2017 22:40:01 +0000 (22:40 +0000)]
NewGVN: Move leaders around properly to ensure we have a canonical dominating leader. Fixes PR 31613.

Summary:
This is a testcase where phi node cycling happens, and because we do
not order the leaders by domination or anything similar, the leader
keeps changing.

Using std::set for the members is too expensive, and we actually don't
need them sorted all the time, only at leader changes.

We could keep both a set and a vector, and keep them mostly sorted and
resort as necessary, or use a set and a fibheap, but all of this seems
premature.

After running some statistics, we are able to avoid the vast majority
of sorting by keeping a "next leader" field.  Most congruence classes only have
leader changes once or twice during GVN.

Reviewers: davide

Subscribers: llvm-commits

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

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

7 years agoAdd a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes a llvm...
Greg Clayton [Fri, 13 Jan 2017 22:32:12 +0000 (22:32 +0000)]
Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes a llvm::ArrayRef<dwarf::Attribute>.

This allows us efficiently look for more than one attribute, something that is quite common in DWARF consumption.

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

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

7 years ago[LoopStrengthReduce] Don't bother rewriting PHIs in catchswitch blocks
David Majnemer [Fri, 13 Jan 2017 22:24:27 +0000 (22:24 +0000)]
[LoopStrengthReduce] Don't bother rewriting PHIs in catchswitch blocks

The catchswitch instruction cannot be split, don't bother trying to
rewrite it.

This fixes PR31627.

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

7 years ago[CodeGen] Simplify getRecipEstimateForFunc
David Majnemer [Fri, 13 Jan 2017 22:24:25 +0000 (22:24 +0000)]
[CodeGen] Simplify getRecipEstimateForFunc

It used two attribute lookups when only one was needed.

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

7 years agoCleanup how DWARFDie attributes are accessed and decoded.
Greg Clayton [Fri, 13 Jan 2017 21:08:18 +0000 (21:08 +0000)]
Cleanup how DWARFDie attributes are accessed and decoded.

Removed all DWARFDie::getAttributeValueAs*() calls.
Renamed:
  Optional<DWARFFormValue> DWARFDie::getAttributeValue(dwarf::Attribute);
To:
  Optional<DWARFFormValue> DWARFDie::find(dwarf::Attribute);
Added:
  Optional<DWARFFormValue> DWARFDie::findRecursively(dwarf::Attribute);

All decoding of Optional<DWARFFormValue> values are now done using the dwarf::to*() functions from DWARFFormValue.h:

Old code:

  auto DeclLine = DWARFDie.getAttributeValueAsSignedConstant(DW_AT_decl_line).getValueOr(0);

New code:

  auto DeclLine = toUnsigned(DWARFDie.find(DW_AT_decl_line), 0);

This composition helps us since we can now easily do:

  auto DeclLine = toUnsigned(DWARFDie.findRecursively(DW_AT_decl_line), 0);

This allows us to easily find attribute values in the current DIE only (the first new code above) or in any DW_AT_abstract_origin or DW_AT_specification Dies using the line above. Note that the code line length is shorter and more concise.

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

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

7 years ago"Use" lambda captures which are otherwise only used in asserts. NFC
David L. Jones [Fri, 13 Jan 2017 21:02:41 +0000 (21:02 +0000)]
"Use" lambda captures which are otherwise only used in asserts. NFC

Summary:
The LLVM coding standards recommend "using" values that are only
needed by asserts:
http://llvm.org/docs/CodingStandards.html#assert-liberally

Without this change, LLVM cannot bootstrap with -Werror as the second
stage fails with this new warning:
https://reviews.llvm.org/rL291905

See also the previous fixes:
https://reviews.llvm.org/rL291916
https://reviews.llvm.org/rL291939
https://reviews.llvm.org/rL291940
https://reviews.llvm.org/rL291941

Reviewers: rsmith

Subscribers: llvm-commits

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

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

7 years ago[NVPTX] Added support for half-precision floating point.
Artem Belevich [Fri, 13 Jan 2017 20:56:17 +0000 (20:56 +0000)]
[NVPTX] Added support for half-precision floating point.

Only scalar half-precision operations are supported at the moment.

- Adds general support for 'half' type in NVPTX.
- fp16 math operations are supported on sm_53+ GPUs only
  (can be disabled with --nvptx-no-f16-math).
- Type conversions to/from fp16 are supported on all GPU variants.
- On GPU variants that do not have full fp16 support (or if it's disabled),
  fp16 operations are promoted to fp32 and results are converted back
  to fp16 for storage.

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

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

7 years ago[AMDGPU] Implement f16 fcopysign and fcopysign(f32, f64)
Konstantin Zhuravlyov [Fri, 13 Jan 2017 19:49:25 +0000 (19:49 +0000)]
[AMDGPU] Implement f16 fcopysign and fcopysign(f32, f64)

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

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

7 years agoAdd a description how to checkout the LLD repository.
Rui Ueyama [Fri, 13 Jan 2017 19:27:18 +0000 (19:27 +0000)]
Add a description how to checkout the LLD repository.

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

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

7 years agoCheck for register clobbers when merging a vreg live range with a
James Y Knight [Fri, 13 Jan 2017 19:08:36 +0000 (19:08 +0000)]
Check for register clobbers when merging a vreg live range with a
reserved physreg in RegisterCoalescer.

Previously, we only checked for clobbers when merging into a READ of
the physreg, but not when merging from a WRITE to the physreg.

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

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

7 years ago[InstCombine] use 'match' and other clean-up; NFCI
Sanjay Patel [Fri, 13 Jan 2017 18:52:10 +0000 (18:52 +0000)]
[InstCombine] use 'match' and other clean-up; NFCI

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

7 years ago[NVPTX] Only lower sin/cos to approximate instructions if unsafe math is allowed.
Artem Belevich [Fri, 13 Jan 2017 18:48:13 +0000 (18:48 +0000)]
[NVPTX] Only lower sin/cos to approximate instructions if unsafe math is allowed.

Previously we'd always lower @llvm.{sin,cos}.f32 to {sin.cos}.approx.f32
instruction even when unsafe FP math was not allowed.

Clang-generated IR is not affected by this as it uses precise sin/cos
from CUDA's libdevice when unsafe math is disabled.

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

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

7 years ago[InstCombine] use m_APInt to allow shl folds for vectors with splat constants
Sanjay Patel [Fri, 13 Jan 2017 18:39:09 +0000 (18:39 +0000)]
[InstCombine] use m_APInt to allow shl folds for vectors with splat constants

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

7 years ago[SCEV] Limit recursion depth of constant evolving.
Michael Liao [Fri, 13 Jan 2017 18:28:30 +0000 (18:28 +0000)]
[SCEV] Limit recursion depth of constant evolving.

- For a loop body with VERY complicated exit condition evaluation, constant
  evolving may run out of stack on platforms such as Windows. Need to limit the
  recursion depth.

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

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

7 years ago[InstCombine] add tests to show missing transforms for vector shl; NFC
Sanjay Patel [Fri, 13 Jan 2017 18:27:23 +0000 (18:27 +0000)]
[InstCombine] add tests to show missing transforms for vector shl; NFC

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

7 years ago[X86][AVX] Bad v4f64/v4i64 '1z3z' shuffle test case
Simon Pilgrim [Fri, 13 Jan 2017 18:23:47 +0000 (18:23 +0000)]
[X86][AVX] Bad v4f64/v4i64 '1z3z' shuffle test case

This lowers to SHUFPD if the input is zeroinitializer but not with a demanded elts optimized build vector.

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

7 years ago[InstCombine] use Op0/Op1 local variables more consistently with shifts; NFC
Sanjay Patel [Fri, 13 Jan 2017 18:08:25 +0000 (18:08 +0000)]
[InstCombine] use Op0/Op1 local variables more consistently with shifts; NFC

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

7 years agoRegenerate test.
Simon Pilgrim [Fri, 13 Jan 2017 17:44:28 +0000 (17:44 +0000)]
Regenerate test.

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

7 years agoFix UBSan bots by blacklisting bits/stl_tree.h.
Ivan Krasin [Fri, 13 Jan 2017 17:30:10 +0000 (17:30 +0000)]
Fix UBSan bots by blacklisting bits/stl_tree.h.

Summary:
libstdc++ has some undefined behavior in bits/stl_tree.h that
has recently became excercised by some of the LLVM code.
Given that fixing libstdc++ will take years, adding the file
into a blacklist to fix bots seems like a necessity.

Reviewers: vitalybuka

Subscribers: llvm-commits, mgorny

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

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

7 years agoRemove unused lambda captures. NFC
Malcolm Parsons [Fri, 13 Jan 2017 17:12:16 +0000 (17:12 +0000)]
Remove unused lambda captures. NFC

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

7 years ago[InstCombine] if the condition of a select may be known via assumes, eliminate the...
Sanjay Patel [Fri, 13 Jan 2017 17:02:42 +0000 (17:02 +0000)]
[InstCombine] if the condition of a select may be known via assumes, eliminate the select

This is a limited solution for PR31512:
https://llvm.org/bugs/show_bug.cgi?id=31512

The motivation is that we will need to increase usage of llvm.assume and/or metadata to solve PR28430:
https://llvm.org/bugs/show_bug.cgi?id=28430

...and this kind of simplification is needed to take advantage of that extra information.

The 'not' test case would be handled by:
https://reviews.llvm.org/D28485

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

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

7 years agoRevert r291903 and r291898. Reason: they break check-lld on the bots.
Ivan Krasin [Fri, 13 Jan 2017 16:45:15 +0000 (16:45 +0000)]
Revert r291903 and r291898. Reason: they break check-lld on the bots.

Summary:
Revert [ARM] Fix ubig32_t read in ARMAttributeParser

Now using support functions to read data instead of trying to
perform casts.
===========================================================

Revert [ARM] Enable objdump to construct triple for ARM

Now that The ARMAttributeParser has been moved into the library,
it has been modified so that it can parse the attributes without
printing them and stores them in a map. ELFObjectFile now queries
the attributes to fill out the architecture details of a provided
triple for 'arm' and 'thumb' targets. llvm-objdump uses this new
functionality.

Subscribers: llvm-commits, samparker, aemerson, mgorny

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

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

7 years agoRegenerate test with update_llc_test_checks.py
Simon Pilgrim [Fri, 13 Jan 2017 16:37:38 +0000 (16:37 +0000)]
Regenerate test with update_llc_test_checks.py

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

7 years agoARM: match GCC's behaviour for builtins
Saleem Abdulrasool [Fri, 13 Jan 2017 16:25:33 +0000 (16:25 +0000)]
ARM: match GCC's behaviour for builtins

GCC changes the CC between the user-code and the builtins based on the
value of `-target` rather than `-mfloat-abi`.  When a HF target is used,
the VFP variant of the AAPCS CC is used.  Otherwise, the AAPCS variant
is used.  In all cases, the AEABI functions use the AAPCS CC.  Adjust
the calling convention based on the target.

Resolves PR30543!

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

7 years ago[llvm-dwp] - Reuse object::Decompressor class
George Rimar [Fri, 13 Jan 2017 15:58:55 +0000 (15:58 +0000)]
[llvm-dwp] - Reuse object::Decompressor class

One more place where Decompressor class can be reused.

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

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

7 years agoApply clang-tidy's performance-unnecessary-value-param to LLVM.
Benjamin Kramer [Fri, 13 Jan 2017 14:39:03 +0000 (14:39 +0000)]
Apply clang-tidy's performance-unnecessary-value-param to LLVM.

With some minor manual fixes for using function_ref instead of
std::function. No functional change intended.

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

7 years ago[ARM] Fix ubig32_t read in ARMAttributeParser
Sam Parker [Fri, 13 Jan 2017 14:36:09 +0000 (14:36 +0000)]
[ARM] Fix ubig32_t read in ARMAttributeParser

Now using support functions to read data instead of trying to
perform casts.

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

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

7 years ago[globalisel][aarch64] Make getCopyMapping() take register banks ID's rather than...
Daniel Sanders [Fri, 13 Jan 2017 14:16:33 +0000 (14:16 +0000)]
[globalisel][aarch64] Make getCopyMapping() take register banks ID's rather than IsGPR booleans

Summary:
This allows the function to handle architectures with more than two register banks.

Depends on D27978

Reviewers: ab, t.p.northover, rovka, qcolombet

Subscribers: aditya_nandakumar, kristof.beyls, aemerson, rengolin, vkalintiris, dberris, llvm-commits, rovka

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

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

7 years ago[X86][AVX512] Add support for variable ASHR v2i64/v4i64 support without VLX
Simon Pilgrim [Fri, 13 Jan 2017 13:16:19 +0000 (13:16 +0000)]
[X86][AVX512] Add support for variable ASHR v2i64/v4i64 support without VLX

Use v8i64 variable ASHR instructions if we don't have VLX.

This is a reduced version of D28537 that just adds support for variable shifts - I'll continue with that patch (for just constant/uniform shifts) once I've fixed the type legalization issue in avx512-cvt.ll.

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

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

7 years ago[aarch64][globalisel] Move getValueMapping/getCopyMapping to AArch64GenRegisterBankIn...
Daniel Sanders [Fri, 13 Jan 2017 11:50:34 +0000 (11:50 +0000)]
[aarch64][globalisel] Move getValueMapping/getCopyMapping to AArch64GenRegisterBankInfo. NFC.

Summary:
We did lose a little specificity in the assertion messages for the
PartialMappingIdx enumerators in this change but this was necessary to
avoid unnecessary use of 'public:' and we haven't lost anything that
can't be discovered easily in lldb. Once this is tablegen-erated we could
also safely remove the assertions.

Depends on D27976

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: aditya_nandakumar, aemerson, rengolin, vkalintiris, dberris, kristof.beyls, llvm-commits

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

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

7 years ago[aarch64][globalisel] Refactor getRegBankBaseIdxOffset() to remove the power-of-2...
Daniel Sanders [Fri, 13 Jan 2017 11:23:37 +0000 (11:23 +0000)]
[aarch64][globalisel] Refactor getRegBankBaseIdxOffset() to remove the power-of-2 assumption. NFC

Summary:
We don't exploit it yet though

Depends on D27976

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: aditya_nandakumar, aemerson, rengolin, vkalintiris, dberris, kristof.beyls, llvm-commits

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

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

7 years ago[ARM] Enable objdump to construct triple for ARM
Sam Parker [Fri, 13 Jan 2017 11:04:21 +0000 (11:04 +0000)]
[ARM] Enable objdump to construct triple for ARM

Now that The ARMAttributeParser has been moved into the library,
it has been modified so that it can parse the attributes without
printing them and stores them in a map. ELFObjectFile now queries
the attributes to fill out the architecture details of a provided
triple for 'arm' and 'thumb' targets. llvm-objdump uses this new
functionality.

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

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

7 years ago[aarch64][globalisel] Move data into <Target>GenRegisterBankInfo. NFC.
Daniel Sanders [Fri, 13 Jan 2017 10:53:57 +0000 (10:53 +0000)]
[aarch64][globalisel] Move data into <Target>GenRegisterBankInfo. NFC.

Summary: Depends on D27809

Reviewers: t.p.northover, rovka, qcolombet, ab

Subscribers: aditya_nandakumar, aemerson, rengolin, vkalintiris, dberris, kristof.beyls, llvm-commits

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

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

7 years ago[ARM] Moved ARMAttributeParser to Support
Sam Parker [Fri, 13 Jan 2017 10:50:01 +0000 (10:50 +0000)]
[ARM] Moved ARMAttributeParser to Support

Moved ARMAttributeParser out of llvm-readobj and into the support
library.

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

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

7 years ago[ARM] CodeGen: Replace AddDefaultT1CC and AddNoT1CC. NFC
Diana Picus [Fri, 13 Jan 2017 10:37:37 +0000 (10:37 +0000)]
[ARM] CodeGen: Replace AddDefaultT1CC and AddNoT1CC. NFC

For AddDefaultT1CC, we add a new helper t1CondCodeOp, which creates the
appropriate register operand. For AddNoT1CC, we use the existing condCodeOp
helper - we only had two uses of AddNoT1CC, so at this point it's probably not
worth having yet another helper just for them.

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

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

7 years ago[ARM] CodeGen: Remove AddDefaultCC. NFC.
Diana Picus [Fri, 13 Jan 2017 10:18:01 +0000 (10:18 +0000)]
[ARM] CodeGen: Remove AddDefaultCC. NFC.

Replace all uses of AddDefaultCC with add(condCodeOp()).
The transformation has been done automatically with a custom tool based on Clang
AST Matchers + RefactoringTool.

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

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

7 years ago[CodeGen] Rename MachineInstrBuilder::addOperand. NFC
Diana Picus [Fri, 13 Jan 2017 09:58:52 +0000 (09:58 +0000)]
[CodeGen] Rename MachineInstrBuilder::addOperand. NFC

Rename from addOperand to just add, to match the other method that has been
added to MachineInstrBuilder for adding more than just 1 operand.

See https://reviews.llvm.org/D28057 for the whole discussion.

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

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

7 years ago[ARM] CodeGen: Remove AddDefaultPred. NFC.
Diana Picus [Fri, 13 Jan 2017 09:37:56 +0000 (09:37 +0000)]
[ARM] CodeGen: Remove AddDefaultPred. NFC.

Replace all uses of AddDefaultPred with MachineInstrBuilder::add(predOps()).
This makes the code building MachineInstrs more readable, because it allows us
to write code like:

MIB.addSomeOperand(blah)
   .add(predOps())
   .addAnotherOperand(blahblah)

instead of

AddDefaultPred(MIB.addSomeOperand(blah))
    .addAnotherOperand(blahblah)

This commit also adds the predOps helper in the ARM backend, as well as the add
method taking a variable number of operands to the MachineInstrBuilder.

The transformation has been done mostly automatically with a custom tool based
on Clang AST Matchers + RefactoringTool.

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

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

7 years ago[X86][AVX512] Adding missing shuffle lowering to blend mask instructions
Michael Zuckerman [Fri, 13 Jan 2017 09:06:00 +0000 (09:06 +0000)]
[X86][AVX512] Adding missing shuffle lowering to blend mask instructions

Some shuffles can be lowered to blend mask instruction (VPBLENDMB/VPBLENDMW/VPBLENDMD/VPBLENDMQ) .
In this patch, I added new pattern match for this case.

Reviewers:
1. craig.topper
2. guyblank
3. RKSimon
4. igorb

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

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

7 years agoRegionPass: Set isExecuted flag correctly
Tobias Grosser [Fri, 13 Jan 2017 09:00:17 +0000 (09:00 +0000)]
RegionPass: Set isExecuted flag correctly

This was forgotten in r291882. Without this fix, the Polly build bots are
broken.

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

7 years agoDWARFDie.h: Move a class declaration out of the method description since r291861...
NAKAMURA Takumi [Fri, 13 Jan 2017 08:20:18 +0000 (08:20 +0000)]
DWARFDie.h: Move a class declaration out of the method description since r291861. [-Wdocumentation]

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

7 years ago[AVX-512] Remove unmasked BLENDM instructions from the wrong load folding table....
Craig Topper [Fri, 13 Jan 2017 07:28:56 +0000 (07:28 +0000)]
[AVX-512] Remove unmasked BLENDM instructions from the wrong load folding table. The unmasked versions read memory from operand 2, but were in the operand 3 table.

These aren't the most interesting set of blendm instructions as the unmasked version isn't useful. We were also missing the B and W forms. I'll add the masked versions of all sizes in a future patch.

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

7 years ago[X86] Move some entries in the load folding tables to move appropriate grouping. NFC
Craig Topper [Fri, 13 Jan 2017 07:28:53 +0000 (07:28 +0000)]
[X86] Move some entries in the load folding tables to move appropriate grouping. NFC

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

7 years ago[IR] Don't call assertModuleIsMaterialized in release builds
Craig Topper [Fri, 13 Jan 2017 06:26:18 +0000 (06:26 +0000)]
[IR] Don't call assertModuleIsMaterialized in release builds

Summary:
To fix a release vs debug build linking error, r259695 made the body of assertModuleIsMaterialized empty if Value.cpp gets compiled in a release build. This way any code compiled as a debug build can still link against a release version of the function.

This patch takes this a step farther and removes all calls to it from Value.h in any code that includes it in a relase build.

This shrinks the opt binary on my macbook build by 17240 bytes.

Reviewers: rafael

Subscribers: llvm-commits

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

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

7 years agoTrack validity of pass results
Serge Pavlov [Fri, 13 Jan 2017 06:09:54 +0000 (06:09 +0000)]
Track validity of pass results

Running tests with expensive checks enabled exhibits some problems with
verification of pass results.

First, the pass verification may require results of analysis that are not
available. For instance, verification of loop info requires results of dominator
tree analysis. A pass may be marked as conserving loop info but does not need to
be dependent on DominatorTreePass. When a pass manager tries to verify that loop
info is valid, it needs dominator tree, but corresponding analysis may be
already destroyed as no user of it remained.

Another case is a pass that is skipped. For instance, entities with linkage
available_externally do not need code generation and such passes are skipped for
them. In this case result verification must also be skipped.

To solve these problems this change introduces a special flag to the Pass
structure to mark passes that have valid results. If this flag is reset,
verifications dependent on the pass result are skipped.

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

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

7 years agoProfileSummaryInfo improvements.
Easwaran Raman [Fri, 13 Jan 2017 01:34:00 +0000 (01:34 +0000)]
ProfileSummaryInfo improvements.

* Add is{Hot|Cold}CallSite methods
* Fix a bug in isHotBB where it was looking for MD_prof on a return instruction
* Use MD_prof data only if sample profiling was used to collect profiles.
* Add an unit test to ProfileSummaryInfo

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

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

7 years agoRevert r291503, "Lift the 10-type limit for AlignedCharArrayUnion", and followings.
NAKAMURA Takumi [Fri, 13 Jan 2017 01:13:10 +0000 (01:13 +0000)]
Revert r291503, "Lift the 10-type limit for AlignedCharArrayUnion", and followings.

  r291503, "Lift the 10-type limit for AlignedCharArrayUnion"
  r291514, "Fix MSVC build of AlignedCharArrayUnion"
  r291515, "Revert the attempt to optimize the constexpr functions. MSVC does not handle this yet"
  r291519, "Try once again to fix the MSVC build of AlignedCharArrayUnion"

They has been failing on i686-linux.

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

7 years ago[PowerPC] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Fri, 13 Jan 2017 00:58:58 +0000 (00:58 +0000)]
[PowerPC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoFix buildbots.
Greg Clayton [Fri, 13 Jan 2017 00:23:59 +0000 (00:23 +0000)]
Fix buildbots.

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

7 years agoxray-account: Avoid std::errc::bad_message to appease mingw.
NAKAMURA Takumi [Fri, 13 Jan 2017 00:17:15 +0000 (00:17 +0000)]
xray-account: Avoid std::errc::bad_message to appease mingw.

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

7 years agoMove test of lazy BFI with ORE to a generic directory
Adam Nemet [Fri, 13 Jan 2017 00:16:23 +0000 (00:16 +0000)]
Move test of lazy BFI with ORE to a generic directory

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

7 years agoAdd the ability to iterate across all attributes in a DIE.
Greg Clayton [Fri, 13 Jan 2017 00:13:42 +0000 (00:13 +0000)]
Add the ability to iterate across all attributes in a DIE.

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

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

7 years ago[asan] Don't overalign global metadata.
Evgeniy Stepanov [Thu, 12 Jan 2017 23:26:20 +0000 (23:26 +0000)]
[asan] Don't overalign global metadata.

Other than on COFF with incremental linking, global metadata should
not need any extra alignment.

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

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

7 years ago[asan] Refactor instrumentation of globals.
Evgeniy Stepanov [Thu, 12 Jan 2017 23:03:03 +0000 (23:03 +0000)]
[asan] Refactor instrumentation of globals.

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

7 years ago[llvm-pdbdump] Add a compact dump mode.
Zachary Turner [Thu, 12 Jan 2017 22:28:15 +0000 (22:28 +0000)]
[llvm-pdbdump] Add a compact dump mode.

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

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

7 years ago[ThinLTO] Import static functions from the same module as caller
Teresa Johnson [Thu, 12 Jan 2017 22:04:45 +0000 (22:04 +0000)]
[ThinLTO] Import static functions from the same module as caller

Summary:
We can sometimes end up with multiple copies of a local function that
have the same GUID in the index. This happens when there are local
functions with the same name that are in different source files with the
same name (but in different directories), and they were compiled in
their own directory so had the same path at compile time.

In this case make sure we import the copy in the caller's module. While
it isn't a correctness problem (the renamed reference which is based on the
module IR hash will be unique since the module must have had an
externally visible function that was imported), importing the wrong copy
will result in lost performance opportunity since it won't be referenced
and inlined.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

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

7 years agoClear the release notes for 5.0.0
Hans Wennborg [Thu, 12 Jan 2017 21:50:22 +0000 (21:50 +0000)]
Clear the release notes for 5.0.0

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

7 years ago[ObjectYAML] Pull yaml2dwarf out of yaml2obj for reuse
Chris Bieneman [Thu, 12 Jan 2017 21:35:21 +0000 (21:35 +0000)]
[ObjectYAML] Pull yaml2dwarf out of yaml2obj for reuse

This patch pulls the yaml2dwarf code out of yaml2obj into a new set of DWARF emitter functions in the DWARFYAML namespace. This will enable the YAML->DWARF code to be used inside DWARF tests by populating the DWARFYAML structs and calling the Emitter functions.

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

7 years agoBump trunk version to 5.0.0svn
Hans Wennborg [Thu, 12 Jan 2017 21:22:36 +0000 (21:22 +0000)]
Bump trunk version to 5.0.0svn

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

7 years ago[DebugInfo] Remove redundant check in SimplifyCFG; NFC.
Robert Lougher [Thu, 12 Jan 2017 21:11:09 +0000 (21:11 +0000)]
[DebugInfo] Remove redundant check in SimplifyCFG; NFC.

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