OSDN Git Service

android-x86/external-llvm.git
7 years ago[PM] Edit comments in PassManager.h.
Justin Lebar [Thu, 5 Jan 2017 00:12:51 +0000 (00:12 +0000)]
[PM] Edit comments in PassManager.h.

Summary:
This covers most of PassManager.h, up to the introduction of inner/outer
analysis proxies.

If there's a theme to these changes, it's simplifying the language.  For
example:

  * PreservedAnalyses is a "set of analyses", not an "abstract set".
    "Abstract" doesn't have any particular meaning here.

  * "Build types for the concept types" becomes "define the concept types".

  * Instead of "data structures optimized for pointer-like types using
    the alignment-provided low bits", say "data structures that use the
    low bits of pointers."

  * "Clear the map pointing into the results list" becomes
    "Delete the map entries that point into the results list."

This patch also fixes a few places where we referred to "function" and
"module" pass/analysis managers, instead of the more abstract "IRUnitT"
PM/AMs we have now.

Subscribers: mehdi_amini

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

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

7 years agoPatch gtest to move GTEST_IS_THREADSAFE out of unrelated GTEST_HAS_SEH ifdef
Reid Kleckner [Thu, 5 Jan 2017 00:00:05 +0000 (00:00 +0000)]
Patch gtest to move GTEST_IS_THREADSAFE out of unrelated GTEST_HAS_SEH ifdef

Fixes the sanitizer Windows build, which happens to set
-DGTEST_HAS_SEH=0.

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

7 years ago[DWARF] Null out the debug locs of load instructions that have been moved by GVN
Wolfgang Pieb [Wed, 4 Jan 2017 23:58:26 +0000 (23:58 +0000)]
[DWARF] Null out the debug locs of load instructions that have been moved by GVN
performing partial redundancy elimination (PRE). Not doing so can cause jumpy line
tables and confusing (though correct) source attributions.

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

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

7 years ago[gtest] Fix the way we disable a warning for unittests.
Chandler Carruth [Wed, 4 Jan 2017 23:40:06 +0000 (23:40 +0000)]
[gtest] Fix the way we disable a warning for unittests.

I somehow wrote this fix and then lost it prior to commit. Really sorry
about the noise. This should fix some issues with hacking add_definition
to do things with warning flags.

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

7 years ago[gtest] Upgrade googletest to version 1.8.0, minimizing local changes.
Chandler Carruth [Wed, 4 Jan 2017 23:06:03 +0000 (23:06 +0000)]
[gtest] Upgrade googletest to version 1.8.0, minimizing local changes.

This required re-working the streaming support and lit's support for
'--gtest_list_tests' but otherwise seems to be a clean upgrade.

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

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

7 years agoUse lazy-loading of Metadata in MetadataLoader when importing is enabled (NFC)
Mehdi Amini [Wed, 4 Jan 2017 22:54:33 +0000 (22:54 +0000)]
Use lazy-loading of Metadata in MetadataLoader when importing is enabled (NFC)

Summary:
This is a relatively simple scheme: we use the index emitted in the
bitcode to avoid loading all the global metadata. Instead we load
the index with their position in the bitcode so that we can load each
of them individually. Materializing the global metadata block in this
condition only triggers loading the named metadata, and the ones
referenced from there (transitively). When materializing a function,
metadata from the global block are loaded lazily as they are
referenced.

Two main current limitations are:

1) Global values other than functions are not materialized on demand,
so we need to eagerly load METADATA_GLOBAL_DECL_ATTACHMENT records
(and their transitive dependencies).
2) When we load a single metadata, we don't recurse on the operands,
instead we use a placeholder or a temporary metadata. Unfortunately
tepmorary nodes are very expensive. This is why we don't have it
always enabled and only for importing.

These two limitations can be lifted in a subsequent improvement if
needed.

With this change, the total link time of opt with ThinLTO and Debug
Info enabled is going down from 282s to 224s (~20%).

Reviewers: pcc, tejohnson, dexonsmith

Subscribers: llvm-commits

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

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

7 years agoChange BitstreamCursor::skipRecord to return the record code (NFC)
Mehdi Amini [Wed, 4 Jan 2017 22:54:14 +0000 (22:54 +0000)]
Change BitstreamCursor::skipRecord to return the record code (NFC)

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

7 years agoAMDGPU: Remove unneccessary intermediate vector
Matt Arsenault [Wed, 4 Jan 2017 22:54:10 +0000 (22:54 +0000)]
AMDGPU: Remove unneccessary intermediate vector

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

7 years agoFixup some header includes from recent IntrusiveRefCntPtr cleanup.
David Blaikie [Wed, 4 Jan 2017 22:52:00 +0000 (22:52 +0000)]
Fixup some header includes from recent IntrusiveRefCntPtr cleanup.

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

7 years ago[ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.
Justin Lebar [Wed, 4 Jan 2017 22:49:55 +0000 (22:49 +0000)]
[ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.

Our copy constructor doesn't explicitly invoke the base class's
constructor, and GCC is (rightly) concerned.

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

7 years agoInstCombine: Fold cos(-x) -> cos(x)
Matt Arsenault [Wed, 4 Jan 2017 22:49:03 +0000 (22:49 +0000)]
InstCombine: Fold cos(-x) -> cos(x)

Also cos(fabs(x)) -> cos(x)

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

7 years agoReapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than Intrusive...
David Blaikie [Wed, 4 Jan 2017 22:36:33 +0000 (22:36 +0000)]
Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr""

If this is a problem for anyone (shared_ptr is two pointers in size,
whereas IntrusiveRefCntPtr is 1 - and the ref count control block that
make_shared adds is probably larger than the one int in RefCountedBase)
I'd prefer to address this by adding a lower-overhead version of
shared_ptr (possibly refactoring IntrusiveRefCntPtr into such a thing)
to avoid the intrusiveness - this allows memory ownership to remain
orthogonal to types and at least to me, seems to make code easier to
understand (since no implicit ownership acquisition can happen).

This recommits 291006, reverted in r291007.

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

7 years ago[Legalizer] Fix fp-to-uint to fp-tosint promotion assertion.
Tim Shen [Wed, 4 Jan 2017 22:11:42 +0000 (22:11 +0000)]
[Legalizer] Fix fp-to-uint to fp-tosint promotion assertion.

Summary:
When promoting fp-to-uint16 to fp-to-sint32, the result is actually zero
extended. For example, given double 65534.0, without legalization:

  fp-to-uint16: 65534.0 -> 0xfffe

With the legalization:

  fp-to-sint32: 65534.0 -> 0x0000fffe

Without this patch, legalization wrongly emits a signed extend assertion,
which is consumed by later icmp instruction, and cause miscompile.

Note that the floating point value must be in [0, 65535), otherwise the
behavior is undefined.

This patch reverts r279223 behavior and adds more tests and
documentations.

In PR29041's context, James Molloy mentioned that:

  We don't need to mask because conversion from float->uint8_t is
  undefined if the integer part of the float value is not representable in
  uint8_t. Therefore we can assume this doesn't happen!

which is totally true and good, because fptoui is documented clearly to
have undefined behavior when overflow/underflow happens. We should take
the advantage of this behavior so that we can save unnecessary mask
instructions.

Reviewers: jmolloy, nadav, echristo, kbarton

Subscribers: mehdi_amini, nemanjai, llvm-commits

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

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

7 years agoFix some buildbot issues with const objects with default ctors
David Blaikie [Wed, 4 Jan 2017 21:59:22 +0000 (21:59 +0000)]
Fix some buildbot issues with const objects with default ctors

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

7 years agoThe patch fixes (base, index, offset) match.
Evgeny Stupachenko [Wed, 4 Jan 2017 21:43:39 +0000 (21:43 +0000)]
The patch fixes (base, index, offset) match.

Summary:
Instead of matching:
  (a + i) + 1 -> (a + i, undef, 1)
Now it matches:
  (a + i) + 1 -> (a, i, 1)

Reviewers: rengolin

Differential Revision: http://reviews.llvm.org/D26367

From: Evgeny Stupachenko <evstupac@gmail.com>

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

7 years ago[AArch64] Update the feature set for Qualcomm's Falkor CPU.
Chad Rosier [Wed, 4 Jan 2017 21:26:23 +0000 (21:26 +0000)]
[AArch64] Update the feature set for Qualcomm's Falkor CPU.

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

7 years agoAdd positive test for sqrt "partial inlining". NFC.
Michael Kuperstein [Wed, 4 Jan 2017 21:24:56 +0000 (21:24 +0000)]
Add positive test for sqrt "partial inlining". NFC.

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

7 years ago[AArch64] Fix over-eager early-exit in load-store combiner
Nirav Dave [Wed, 4 Jan 2017 21:21:46 +0000 (21:21 +0000)]
[AArch64] Fix over-eager early-exit in load-store combiner

Fix early-exit analysis for memory operation pairing when operations are
not emitted in ascending order.

Reviewers: mcrosier, t.p.northover

Subscribers: aemerson, rengolin, llvm-commits

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

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

7 years agoRevert "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveR...
David Blaikie [Wed, 4 Jan 2017 21:19:28 +0000 (21:19 +0000)]
Revert "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"

Breaks Clang's use of bitcode. Reverting until I have a fix to go with
it there.

This reverts commit r291006.

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

7 years agoMake BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr
David Blaikie [Wed, 4 Jan 2017 21:13:35 +0000 (21:13 +0000)]
Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr

If this is a problem for anyone (shared_ptr is two pointers in size,
whereas IntrusiveRefCntPtr is 1 - and the ref count control block that
make_shared adds is probably larger than the one int in RefCountedBase)
I'd prefer to address this by adding a lower-overhead version of
shared_ptr (possibly refactoring IntrusiveRefCntPtr into such a thing)
to avoid the intrusiveness - this allows memory ownership to remain
orthogonal to types and at least to me, seems to make code easier to
understand (since no implicit ownership acquisition can happen).

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

7 years agoRemove unnecessary intrusive ref counting in favor of std::shared_ptr/make_shared
David Blaikie [Wed, 4 Jan 2017 21:13:28 +0000 (21:13 +0000)]
Remove unnecessary intrusive ref counting in favor of std::shared_ptr/make_shared

The intrusive nature of the reference counting is not required/used
here, so simplify the ownership model to make the code easier to
understand.

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

7 years agoRemove accidentally target-dependent test and pacify bots.
Michael Kuperstein [Wed, 4 Jan 2017 21:08:53 +0000 (21:08 +0000)]
Remove accidentally target-dependent test and pacify bots.

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

7 years ago[PowerPC] Fix logic dealing with nop after calls (and tail-call eligibility)
Hal Finkel [Wed, 4 Jan 2017 21:05:13 +0000 (21:05 +0000)]
[PowerPC] Fix logic dealing with nop after calls (and tail-call eligibility)

This change aims to unify and correct our logic for when we need to allow for
the possibility of the linker adding a TOC restoration instruction after a
call. This comes up in two contexts:

 1. When determining tail-call eligibility. If we make a tail call (i.e.
    directly branch to a function) then there is no place for the linker to add
    a TOC restoration.
 2. When determining when we need to add a nop instruction after a call.
    Likewise, if there is a possibility that the linker might need to add a
    TOC restoration after a call, then we need to put a nop after the call
    (the bl instruction).

First problem: We were using similar, but different, logic to decide (1) and
(2). This is just wrong. Both the resideInSameModule function (used when
determining tail-call eligibility) and the isLocalCall function (used when
deciding if the post-call nop is needed) were supposed to be determining the
same underlying fact (i.e. might a TOC restoration be needed after the call).
The same logic should be used in both places.

Second problem: The logic in both places was wrong. We only know that two
functions will share the same TOC when both functions come from the same
section of the same object. Otherwise the linker might cause the functions to
use different TOC base addresses (unless the multi-TOC linker option is
disabled, in which case only shared-library boundaries are relevant). There are
a number of factors that can cause functions to be placed in different sections
or come from different objects (-ffunction-sections, explicitly-specified
section names, COMDAT, weak linkage, etc.). All of these need to be checked.
The existing logic only checked properties of the callee, but the properties of
the caller must also be checked (for example, calling from a function in a
COMDAT section means calling between sections).

There was a conceptual error in the resideInSameModule function in that it
allowed tail calls to functions with weak linkage and protected/hidden
visibility. While protected/hidden visibility does prevent the function
implementation from being replaced at runtime (via interposition), it does not
prevent the linker from using an alternate implementation at link time (i.e.
using some strong definition to replace the provided weak one during linking).
If this happens, then we're still potentially looking at a required TOC
restoration upon return.

Otherwise, in general, the post-call nop is needed wherever ELF interposition
needs to be supported. We don't currently support ELF interposition at the IR
level (see http://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html
for more information), and I don't think we should try to make it appear to
work in the backend in spite of that fact. Unfortunately, because of the way
that the ABI works, we need to generate code as if we supported interposition
whenever the linker might insert stubs for the purpose of supporting it.

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

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

7 years agoNewGVN: Track the maximum number of iterations GVN takes on any function, so we can...
Daniel Berlin [Wed, 4 Jan 2017 21:01:02 +0000 (21:01 +0000)]
NewGVN: Track the maximum number of iterations GVN takes on any function, so we can pinpoint performance issues.

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

7 years agoAdd positive test for sqrt "partial inlining". NFC.
Michael Kuperstein [Wed, 4 Jan 2017 20:48:30 +0000 (20:48 +0000)]
Add positive test for sqrt "partial inlining". NFC.

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

7 years ago[lib/LTO] Simplify logic removing set but unused variable. NFCI.
Davide Italiano [Wed, 4 Jan 2017 20:37:57 +0000 (20:37 +0000)]
[lib/LTO] Simplify logic removing set but unused variable. NFCI.

Reported by David Binderman and ack'ed by Teresa on IRC.
PR: 31527

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

7 years agoYAML: Remove Input::MapHNode::isValidKey(), use llvm::is_contained() instead. NFC.
Peter Collingbourne [Wed, 4 Jan 2017 20:10:43 +0000 (20:10 +0000)]
YAML: Remove Input::MapHNode::isValidKey(), use llvm::is_contained() instead. NFC.

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

7 years agoRemove dead and unused variable NumSentinelElements.
Eric Christopher [Wed, 4 Jan 2017 20:05:18 +0000 (20:05 +0000)]
Remove dead and unused variable NumSentinelElements.

Fixes PR31529.

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

7 years agoRemove dead variable Len.
Eric Christopher [Wed, 4 Jan 2017 19:47:10 +0000 (19:47 +0000)]
Remove dead variable Len.

Fixes PR31528

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

7 years agoAdd missing CHECK: line to test case added in 29097
Tobias Grosser [Wed, 4 Jan 2017 19:35:38 +0000 (19:35 +0000)]
Add missing CHECK: line to test case added in 29097

Without this CHECK line, we may not detect incorrectly detected additional
regions at the end of the region tree.

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

7 years agoADT: IntrusiveRefCntPtr: Broaden the definition of correct usage of RefCountedBase
David Blaikie [Wed, 4 Jan 2017 18:57:31 +0000 (18:57 +0000)]
ADT: IntrusiveRefCntPtr: Broaden the definition of correct usage of RefCountedBase

This roughly matches the semantics of std::enable_shared_from_this - that it
does not dictate the ownership model of all users, but constrains those users
taking advantage of the intrusive nature to do so only when there's a guarantee
that that's the ownership model being used for the object being passed.

Reviewers: jlebar

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

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

7 years agofix comment formatting; NFC
Sanjay Patel [Wed, 4 Jan 2017 18:16:43 +0000 (18:16 +0000)]
fix comment formatting; NFC

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

7 years agoAMDGPU/SI: Implement sendmsghalt intrinsic
Jan Vesely [Wed, 4 Jan 2017 18:06:55 +0000 (18:06 +0000)]
AMDGPU/SI: Implement sendmsghalt intrinsic

v2: expose using amdgcn prefix

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

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

7 years agoRegionInfo: add new test case
Tobias Grosser [Wed, 4 Jan 2017 17:50:15 +0000 (17:50 +0000)]
RegionInfo: add new test case

This test case has been reduced from test/Analysis/RegionInfo/mix_1.ll and
provides us with a minimal example of a test case which caused problems while
working on an improved version of the RegionInfo analysis. We upstream this
test case, as it certainly can be helpful in future debugging and optimization
tests.

Test case reduced by Pratik Bhatu <cs12b1010@iith.ac.in>

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

7 years agoReapply "[SimplifyCFG] In sinkLastInstruction correctly set debugloc of common inst"
Robert Lougher [Wed, 4 Jan 2017 17:40:32 +0000 (17:40 +0000)]
Reapply "[SimplifyCFG] In sinkLastInstruction correctly set debugloc of common inst"

This reapplies r289828 (reverted in r289833 as it broke the address sanitizer).  The
debugloc is now only set when the instruction is not a call, as this causes the
verifier to assert (the inliner requires an inlinable callsite to have a debug loc
if the caller and callee have debug info).

Original commit message:

Simplify CFG will try to sink the last instruction in a series of basic blocks,
creating a "common" instruction in the successor block (sinkLastInstruction).
When it does this, the debug location of the single instruction should be the
merged debug locations of the commoned instructions.

Original review: https://reviews.llvm.org/D27590

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

7 years agoRevert r290970 [SLPVectorizer] Regenerate test.
Simon Pilgrim [Wed, 4 Jan 2017 16:12:07 +0000 (16:12 +0000)]
Revert r290970 [SLPVectorizer] Regenerate test.

The check script will use var names before they are declared, which filecheck doesn't like.

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

7 years ago[SLPVectorizer] Regenerate test.
Simon Pilgrim [Wed, 4 Jan 2017 16:01:55 +0000 (16:01 +0000)]
[SLPVectorizer] Regenerate test.

Missed var name

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

7 years agoRegenerate test.
Simon Pilgrim [Wed, 4 Jan 2017 15:52:41 +0000 (15:52 +0000)]
Regenerate test.

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

7 years agoFix x86 gold tests on non-x86 targets.
Asiri Rathnayake [Wed, 4 Jan 2017 14:43:51 +0000 (14:43 +0000)]
Fix x86 gold tests on non-x86 targets.

These tests are missing a target triple and the -m elf_x86_64 gold option,
which makes them fail on non-x86 targets.

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

Reviewers: tejohnson

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

7 years ago[ThinLTO] Rework llvm-link to use the FunctionImporter
Teresa Johnson [Wed, 4 Jan 2017 14:27:31 +0000 (14:27 +0000)]
[ThinLTO] Rework llvm-link to use the FunctionImporter

Summary:
Change llvm-link to use the FunctionImporter handling, instead of
manually invoking the Linker. We still need to load the module
in llvm-link to do the desired testing for invalid import requests
(weak functions), and to get the GUID (in case the function is local).

Also change the drop-debug-info test to use llvm-link so that importing
is forced (in order to test debug info handling) and independent of
import logic changes.

Reviewers: mehdi_amini

Subscribers: mgorny, llvm-commits, aprantl

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

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

7 years ago[SPARC] Fix test so that it checks the correct label.
Davide Italiano [Wed, 4 Jan 2017 14:01:58 +0000 (14:01 +0000)]
[SPARC] Fix test so that it checks the correct label.

Before it wasn't checking anything.

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

7 years ago[CostModel][X86] Updated vXi8 and vXi16 Reverse/Alternate shuffle costs
Simon Pilgrim [Wed, 4 Jan 2017 14:01:33 +0000 (14:01 +0000)]
[CostModel][X86] Updated vXi8 and vXi16 Reverse/Alternate shuffle costs

Actual codegen is much better than the extract+insert patterns that was assumed.

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

7 years ago[PowerPC] Add identification for POWER8NVL
Nemanja Ivanovic [Wed, 4 Jan 2017 13:58:09 +0000 (13:58 +0000)]
[PowerPC] Add identification for POWER8NVL

This CPU type was not previously recognized by LLVM which led to emitting
poor (and sometimes incorrect) code in some JIT workloads on such a machine.

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

7 years ago[MC/COFF] Fix a test to actually check the relocation.
Davide Italiano [Wed, 4 Jan 2017 13:12:00 +0000 (13:12 +0000)]
[MC/COFF] Fix a test to actually check the relocation.

Inspired by r290953 + grep -R 'CHCEK'.

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

7 years ago[X86] Merged Reverse/Alternate shuffle cost tables. NFCI.
Simon Pilgrim [Wed, 4 Jan 2017 12:08:41 +0000 (12:08 +0000)]
[X86] Merged Reverse/Alternate shuffle cost tables. NFCI.

As discussed on D27811, merged the shuffle cost LUTs and use the shuffle kind to perform the lookup instead of the ISD opcode.

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

7 years ago[framelowering] Skip dbg values when getting next/previous instruction.
Florian Hahn [Wed, 4 Jan 2017 12:08:35 +0000 (12:08 +0000)]
[framelowering] Skip dbg values when getting next/previous instruction.

Summary:
In mergeSPUpdates, debug values need to be ignored when getting the
previous element, otherwise debug data could have an impact on codegen.

In eliminateCallFramePseudoInstr, debug values after the erased element
could have an impact on codegen and should be skipped.

Closes PR31319 (https://llvm.org/bugs/show_bug.cgi?id=31319)

Reviewers: aprantl, MatzeB, mkuper

Subscribers: gbedwell, llvm-commits

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

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

7 years ago[ADT] Speculative attempt to fix build bot issues with r290952.
Chandler Carruth [Wed, 4 Jan 2017 11:40:18 +0000 (11:40 +0000)]
[ADT] Speculative attempt to fix build bot issues with r290952.

This just removes the usage of llvm::reverse and llvm::seq. That makes
it harder to handle the empty case correctly and so I've also added
a test there.

This is just a shot in the dark at what might be behind the buildbot
failures. I can't reproduce any issues locally including with ASan...
I feel like I'm missing something...

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

7 years ago[Inliner] Fix a test where I typo'ed 'CHECK' as 'CHCEK' when converting
Chandler Carruth [Wed, 4 Jan 2017 11:15:01 +0000 (11:15 +0000)]
[Inliner] Fix a test where I typo'ed 'CHECK' as 'CHCEK' when converting
to FileCheck.

Fortunately, it passes. =]

Spotted in review by Bob Wilson!

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

7 years ago[ADT] Enhance the PriorityWorklist to support bulk insertion.
Chandler Carruth [Wed, 4 Jan 2017 11:13:11 +0000 (11:13 +0000)]
[ADT] Enhance the PriorityWorklist to support bulk insertion.

This is both convenient and more efficient as we can skip any
intermediate reallocation of the vector.

This usage pattern came up in a subsequent patch on the pass manager,
but it seems generically useful so I factored it out and added unittests
here.

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

7 years agoFix for InlineSpiller accessing not updated dom tree base information.
Bjorn Pettersson [Wed, 4 Jan 2017 09:41:56 +0000 (09:41 +0000)]
Fix for InlineSpiller accessing not updated dom tree base information.

Summary:
The InlineSpiller was accessing the DominatorTreeBase directly
through the public data member DT in the MachineDominatorTree.
This is not a good idea as the "cached" information in
SplitCriticalEdges is not applied before the access.
The DominatorTreeBase must be accessed through the member
function getBase() in MachineDominatorTree.

The fault was introduced in r266162.

I think the public data member DT in the MachineDominatorTree
should have been made private in the original code (r215576)
that introduced the concept of lazily updating the
MachineDominatorTree information from
MachineBasicBlock::SplitCriticalEdge().

Patch by Karl-Johan Karlsson <karl-johan.karlsson@ericsson.com>

Reviewers: wmi, qcolombet

Subscribers: llvm-commits, bjope, uabelho

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

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

7 years ago[LLC][MIPS] Fix crash after enabling LLVM_ENABLE_EXPENSIVE_CHECKS
Nitesh Jain [Wed, 4 Jan 2017 09:34:37 +0000 (09:34 +0000)]
[LLC][MIPS] Fix crash after enabling LLVM_ENABLE_EXPENSIVE_CHECKS

Reviewers: sdardis, vkalintiris

Subscribers: jaydeep, slthakur, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D27841

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

7 years ago[X86][AVX512] Passing the appropriate memory operand class to INT_{U}COMIS{S|D} instr...
Ayman Musa [Wed, 4 Jan 2017 08:21:54 +0000 (08:21 +0000)]
[X86][AVX512] Passing the appropriate memory operand class to INT_{U}COMIS{S|D} instructions

Replacing the memory operand in the intrinsic versions of the comis/ucomis instrucions from f128mem to ssmem/sdmem accordingly.

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

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

7 years ago[X86] Attempt to pre-truncate arithmetic operations if useful
Simon Pilgrim [Wed, 4 Jan 2017 08:05:42 +0000 (08:05 +0000)]
[X86] Attempt to pre-truncate arithmetic operations if useful

In some cases its more efficient to combine TRUNC( BINOP( X, Y ) ) --> BINOP( TRUNC( X ), TRUNC( Y ) ) if the binop is legal for the truncated types.

This is true for vector integer multiplication (especially vXi64), as well as ADD/AND/XOR/OR in cases where we only need to truncate one of the inputs at runtime (e.g. a duplicated input or an one use constant we can fold).

Further work could be done here - scalar cases (especially i64) could often benefit (if we avoid partial registers etc.), other opcodes, and better analysis of when truncating the inputs reduces costs.

I have considered implementing this for all targets within the DAGCombiner but wasn't sure we could devise a suitable cost model system that would give us the range we need.

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

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

7 years ago[AVX-512] Add support for detecting 512-bit shuffles that contain a 128-bit subvector...
Craig Topper [Wed, 4 Jan 2017 07:32:03 +0000 (07:32 +0000)]
[AVX-512] Add support for detecting 512-bit shuffles that contain a 128-bit subvector insertion from the lowest subvector of one of the sources.

These are best handled with a vinsert32x4 or vinsert64x2 instruction.

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

7 years ago[AVX-512] Add more test cases for shuffles that should be handled with subvector...
Craig Topper [Wed, 4 Jan 2017 07:31:59 +0000 (07:31 +0000)]
[AVX-512] Add more test cases for shuffles that should be handled with subvector insert instructions.

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

7 years ago[AVX-512] Fix a typo in a couple case names to match their behavior.
Craig Topper [Wed, 4 Jan 2017 07:31:57 +0000 (07:31 +0000)]
[AVX-512] Fix a typo in a couple case names to match their behavior.

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

7 years ago[AVX-512] Add avx512dq to the vector-shuffle-512-v16.ll test command lines in prepara...
Craig Topper [Wed, 4 Jan 2017 07:31:54 +0000 (07:31 +0000)]
[AVX-512] Add avx512dq to the vector-shuffle-512-v16.ll test command lines in preparation for a future change that needs these features.

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

7 years ago[AVX-512] Simplify code for creating 512-bit SHUF128 operations.
Craig Topper [Wed, 4 Jan 2017 07:31:51 +0000 (07:31 +0000)]
[AVX-512] Simplify code for creating 512-bit SHUF128 operations.

We don't need two loops and we can safely assume assume and hardcode the size of the widened mask.

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

7 years agoSupport: Add YAML I/O support for custom mappings.
Peter Collingbourne [Wed, 4 Jan 2017 03:51:36 +0000 (03:51 +0000)]
Support: Add YAML I/O support for custom mappings.

This will be used to YAMLify parts of the module summary.

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

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

7 years agoOn a 64-bit system, the DWARFDebugLine::Row struct is 32 bytes. Each field has the...
Eric Christopher [Wed, 4 Jan 2017 02:34:29 +0000 (02:34 +0000)]
On a 64-bit system, the DWARFDebugLine::Row struct is 32 bytes. Each field has the following byte offsets:

0-7: Address
8-11: Line
12-13: Column
14-15: File
16-19: Isa
20-23: Discriminator
24+: bit fields

The packing is fine until the "Isa" field, which is an 8-bit int that occupies 4 bytes. We can instead move Discriminator into the 16-19 slot, and pack Isa into the 20-23 range along with the bit fields:

0-7: Address
8-11: Line
12-13: Column
14-15: File
16-19: Discriminator
20-23: Isa + bit fields

This layout is only 24 bytes. This 25% reduction in size may seem small but a large binary can have line tables with thousands of rows stored in a vector.

Patch by Simon Que!

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

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

7 years ago[InstCombine] Add a test for r290733
David Majnemer [Wed, 4 Jan 2017 02:21:37 +0000 (02:21 +0000)]
[InstCombine] Add a test for r290733

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

7 years ago[InstCombine] Move casts around shift operations
David Majnemer [Wed, 4 Jan 2017 02:21:34 +0000 (02:21 +0000)]
[InstCombine] Move casts around shift operations

It is possible to perform a left shift before zero extending if the
shift would only shift out zeros.

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

7 years ago[InstCombine] Combine adds across a zext
David Majnemer [Wed, 4 Jan 2017 02:21:31 +0000 (02:21 +0000)]
[InstCombine] Combine adds across a zext

We can perform the following:
(add (zext (add nuw X, C1)), C2) -> (zext (add nuw X, C1+C2))

This is only possible if C2 is negative and C2 is greater than or equal to negative C1.

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

7 years ago[Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings...
Eugene Zelenko [Wed, 4 Jan 2017 02:02:05 +0000 (02:02 +0000)]
[Hexagon, TableGen] 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@290925 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCorrect the parent testing to avoid the special case where a DIE has a depth of 1
Greg Clayton [Wed, 4 Jan 2017 00:10:50 +0000 (00:10 +0000)]
Correct the parent testing to avoid the special case where a DIE has a depth of 1

This test was testing that we could correctly find the parent of a DIE, but it was actually just testing the special case where a DIE's depth was 1. This corrects that error by adding an extra level into the the DWARF to ensure that we correctly get the parent by looking for the parent with a depth that is 1 less than the current depth.

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

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

7 years ago[ThinLTO] Import type as decl only when non-null Identifier
Teresa Johnson [Tue, 3 Jan 2017 23:19:29 +0000 (23:19 +0000)]
[ThinLTO] Import type as decl only when non-null Identifier

As per post-commit review for r289993 (D27775), we can only safely
import a type as a decl if it has an Identifier, as the Name alone
is not enough to be unique across modules.

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

7 years agoFix the MSVC version check.
Zachary Turner [Tue, 3 Jan 2017 23:12:36 +0000 (23:12 +0000)]
Fix the MSVC version check.

I'm not sure what determines the minor version, but it appears
that it's possible for a fully updated, release version of
VS2015 with Update 3 can go (at least) as low as 19.00.24213.1.
Updating the compiler version check to account for this so we
don't generate superfluous warnings.

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

7 years agoInstCombine: Fold fabs on select of constants
Matt Arsenault [Tue, 3 Jan 2017 22:40:34 +0000 (22:40 +0000)]
InstCombine: Fold fabs on select of constants

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

7 years ago[InstCombine] use 'match' to reduce code bloat; NFCI
Sanjay Patel [Tue, 3 Jan 2017 22:25:31 +0000 (22:25 +0000)]
[InstCombine] use 'match' to reduce code bloat; NFCI

I wrote this patch before seeing the comment in:
https://reviews.llvm.org/D27114
...that suggests we should actually be canonicalizing the other way.

So just in case we decide this is the right way, we might as well
have a cleaner implementation.

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

7 years ago[CodeGen] Further simplify returned call operand logic. NFC.
Ahmed Bougacha [Tue, 3 Jan 2017 21:42:43 +0000 (21:42 +0000)]
[CodeGen] Further simplify returned call operand logic. NFC.

As Pete points out in r290905, CallSite lets us avoid duplicating this!

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

7 years ago[ExecutionEngine] Fix compile errors in OProfileJITEventListener.
Lang Hames [Tue, 3 Jan 2017 21:39:43 +0000 (21:39 +0000)]
[ExecutionEngine] Fix compile errors in OProfileJITEventListener.

Allows LLVM to build with LLVM_USE_OPROFILE=True.

Patch by Mark Dewing. Thanks Mark!

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

7 years ago[CodeGen] Simplify logic that looks for returned call operands. NFC-ish.
Ahmed Bougacha [Tue, 3 Jan 2017 20:33:22 +0000 (20:33 +0000)]
[CodeGen] Simplify logic that looks for returned call operands. NFC-ish.

Use getReturnedArgOperand() instead of rolling our own.  Note that it's
equivalent because there can only be one 'returned' operand.

The existing code was also incorrect: there already was awkward logic to
ignore callee/EH blocks, but operands can now also be operand bundles,
in which case we'll look for non-existent parameter attributes.

Unfortunately, this isn't observable in-tree, as it only crashes when
exercising the regular call lowering logic with operand bundles.
Still, this is a nice small cleanup anyway.

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

7 years ago[InstCombine] tighten checks for tests of assume -> metadata transform; NFC
Sanjay Patel [Tue, 3 Jan 2017 19:32:11 +0000 (19:32 +0000)]
[InstCombine] tighten checks for tests of assume -> metadata transform; NFC

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

7 years ago[X86][SSE] Add extra truncated arithmetic tests for D28219
Simon Pilgrim [Tue, 3 Jan 2017 19:18:07 +0000 (19:18 +0000)]
[X86][SSE] Add extra truncated arithmetic tests for D28219

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

7 years agoAdd llvm-bcanalyzer support for new metadata node types.
Adrian Prantl [Tue, 3 Jan 2017 19:17:49 +0000 (19:17 +0000)]
Add llvm-bcanalyzer support for new metadata node types.
Also sort the existing list by value.

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

7 years agoEnable disabled loopidiom test. Apparently we handle it now
Xin Tong [Tue, 3 Jan 2017 19:08:05 +0000 (19:08 +0000)]
Enable disabled loopidiom test. Apparently we handle it now

Summary:
Enable disabled loopidiom test. Apparently we handle it now.
Maybe due to improvements to AA.

Reviewers: atrick, danielcdh, hfinkel

Subscribers: llvm-commits

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

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

7 years ago[libFuzzer] disable -print_pcs by default (was enabled by mistake)
Kostya Serebryany [Tue, 3 Jan 2017 18:51:28 +0000 (18:51 +0000)]
[libFuzzer] disable -print_pcs by default (was enabled by mistake)

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

7 years ago[ADT] APFloatBase: Prevent collapsing semPPCDoubleDouble and semBogus
Michal Gorny [Tue, 3 Jan 2017 16:33:50 +0000 (16:33 +0000)]
[ADT] APFloatBase: Prevent collapsing semPPCDoubleDouble and semBogus

Provide a distinct contents for semBogus and semPPCDoubleDouble in order
to prevent compilers from collapsing them to a single memory address,
while we heavily rely on every semantic having distinct address.

This happens if insecure optimization collapsing identical values is
enabled. As a result, APFloats of semBogus are indistinguishable from
semPPCDoubleDouble -- and whenever the move constructor is used, the old
value beings being incorrectly recognized as a semPPCDoubleDouble.

Since the values in semPPCDoubleDouble are not used anywhere,
we can easily solve this issue via altering the value of one of the
fields and therefore ensuring that the collapse can not occur.

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

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

7 years ago[X86] Move 128-bit shuffle mask widening check into lowerV2X128VectorShuffle to reduc...
Craig Topper [Tue, 3 Jan 2017 07:36:41 +0000 (07:36 +0000)]
[X86] Move 128-bit shuffle mask widening check into lowerV2X128VectorShuffle to reduce code duplication. Use the now available widened mask to simplify some code inside lowerV2X128VectorShuffle.

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

7 years ago[AVX-512] Simplify the code added in r290870 to recognized 256-bit subvector inserts...
Craig Topper [Tue, 3 Jan 2017 07:36:39 +0000 (07:36 +0000)]
[AVX-512] Simplify the code added in r290870 to recognized 256-bit subvector inserts and avoid calling isShuffleEquivalent on a widened mask.

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

7 years ago[AVX-512] Teach shuffle lowering to use vinsert instructions for shuffles correspondi...
Craig Topper [Tue, 3 Jan 2017 07:00:40 +0000 (07:00 +0000)]
[AVX-512] Teach shuffle lowering to use vinsert instructions for shuffles corresponding to 256-bit subvector inserts.

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

7 years ago[AVX-512] Teach EVEX to VEX conversion pass to handle VINSERT and VEXTRACT instructions.
Craig Topper [Tue, 3 Jan 2017 05:46:18 +0000 (05:46 +0000)]
[AVX-512] Teach EVEX to VEX conversion pass to handle VINSERT and VEXTRACT instructions.

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

7 years ago[AVX-512] Re-generate tests that were updated for r290663 without using update_llc_te...
Craig Topper [Tue, 3 Jan 2017 05:46:10 +0000 (05:46 +0000)]
[AVX-512] Re-generate tests that were updated for r290663 without using update_llc_test_checks.py so duplicate check lines weren't merged.

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

7 years ago[X86] Remove trailing whitespace and an unnecessary line wrap. NFC
Craig Topper [Tue, 3 Jan 2017 05:46:06 +0000 (05:46 +0000)]
[X86] Remove trailing whitespace and an unnecessary line wrap. NFC

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

7 years ago[X86] Fix header comment. NFC
Craig Topper [Tue, 3 Jan 2017 05:46:05 +0000 (05:46 +0000)]
[X86] Fix header comment. NFC

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

7 years ago[AVX-512] Add support for pushing bitcasts through INSERT_SUBVEC in order to select...
Craig Topper [Tue, 3 Jan 2017 05:46:02 +0000 (05:46 +0000)]
[AVX-512] Add support for pushing bitcasts through INSERT_SUBVEC in order to select a masked operation.

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

7 years ago[AVX-512] Remove vinsert intrinsics and autoupgrade to native shufflevectors. There...
Craig Topper [Tue, 3 Jan 2017 05:45:57 +0000 (05:45 +0000)]
[AVX-512] Remove vinsert intrinsics and autoupgrade to native shufflevectors. There are some codegen problems here that I'll try to fix in future commits.

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

7 years ago[AVX-512] Remove vextract intrinsics and autoupgrade to native shufflevectors. This...
Craig Topper [Tue, 3 Jan 2017 05:45:46 +0000 (05:45 +0000)]
[AVX-512] Remove vextract intrinsics and autoupgrade to native shufflevectors. This unfortunately generates some really terrible code without VLX support due to v2i1 and v4i1 not being legal.

Hopefully we can improve that in future patches.

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

7 years agoInstCombine: Add fma with constant transforms
Matt Arsenault [Tue, 3 Jan 2017 04:32:35 +0000 (04:32 +0000)]
InstCombine: Add fma with constant transforms

DAGCombine already does these.

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

7 years agoInstCombine: Add fma + fabs/fneg transforms
Matt Arsenault [Tue, 3 Jan 2017 04:32:31 +0000 (04:32 +0000)]
InstCombine: Add fma + fabs/fneg transforms

fma (fneg x), (fneg y), z -> fma x, y, z
fma (fabs x), (fabs x), z -> fma x, x, z

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

7 years ago[XRay] Merge instrumentation point table emission code into AsmPrinter.
Dean Michael Berris [Tue, 3 Jan 2017 04:30:21 +0000 (04:30 +0000)]
[XRay] Merge instrumentation point table emission code into AsmPrinter.

Summary:
No need to have this per-architecture.  While there, unify 32-bit ARM's
behaviour with what changed elsewhere and start function names lowercase
as per the coding standards.  Individual entry emission code goes to the
entry's own class.

Fully tested on amd64, cross-builds on both ARMs and PowerPC.

Reviewers: dberris

Subscribers: aemerson, llvm-commits

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

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

7 years ago[EarlyCSE] less else, more auto; NFC
Sanjay Patel [Tue, 3 Jan 2017 00:16:24 +0000 (00:16 +0000)]
[EarlyCSE] less else, more auto; NFC

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

7 years ago[InstCombine] use combineMetadataForCSE instead of copying it; NFCI
Sanjay Patel [Mon, 2 Jan 2017 23:25:28 +0000 (23:25 +0000)]
[InstCombine] use combineMetadataForCSE instead of copying it; NFCI

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

7 years ago[CMake] Set HAVE_${runtime} before including any subdirectories
Chris Bieneman [Mon, 2 Jan 2017 20:33:33 +0000 (20:33 +0000)]
[CMake] Set HAVE_${runtime} before including any subdirectories

This should allow us to avoid most order dependence in the runtime library configurations.

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

7 years agoMake sure total loop body weight is preserved in loop peeling
Xin Tong [Mon, 2 Jan 2017 20:27:23 +0000 (20:27 +0000)]
Make sure total loop body weight is preserved in loop peeling

Summary:
Regardless how the loop body weight is distributed, we should preserve
total loop body weight. i.e. we should have same weight reaching the body of the loop
or its duplicates in peeled and unpeeled case.

Reviewers: mkuper, davidxl, anemet

Subscribers: llvm-commits

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

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

7 years ago[cmake] Normalize LLVM_ENABLE_DIA_SDK to fix Windows tests
Michal Gorny [Mon, 2 Jan 2017 20:22:45 +0000 (20:22 +0000)]
[cmake] Normalize LLVM_ENABLE_DIA_SDK to fix Windows tests

Attempts to fix Windows build breakage caused by r290818.

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

7 years agoNewGVN: Add a test case for equivalent phis.
Daniel Berlin [Mon, 2 Jan 2017 19:55:13 +0000 (19:55 +0000)]
NewGVN: Add a test case for equivalent phis.

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

7 years agoNewGVN: Add forgotten testcase for PR 31483
Daniel Berlin [Mon, 2 Jan 2017 19:49:20 +0000 (19:49 +0000)]
NewGVN: Add forgotten testcase for PR 31483

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

7 years agoNewGVN: Clean up after removing possibility of null expressions.
Daniel Berlin [Mon, 2 Jan 2017 19:49:17 +0000 (19:49 +0000)]
NewGVN: Clean up after removing possibility of null expressions.

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

7 years agofix typo; NFC
Sanjay Patel [Mon, 2 Jan 2017 19:05:11 +0000 (19:05 +0000)]
fix typo; NFC

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