OSDN Git Service

android-x86/external-llvm.git
7 years ago[LCG] Teach the ref edge removal to handle a ref edge that is trivial
Chandler Carruth [Wed, 28 Dec 2016 02:24:58 +0000 (02:24 +0000)]
[LCG] Teach the ref edge removal to handle a ref edge that is trivial
due to a call cycle.

This actually crashed the ref removal before.

I've added a unittest that covers this kind of interesting graph
structure and mutation.

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

7 years ago[PM] Disable the loop vectorizer from the new PM's pipeline as it
Chandler Carruth [Wed, 28 Dec 2016 02:24:55 +0000 (02:24 +0000)]
[PM] Disable the loop vectorizer from the new PM's pipeline as it
currenty relies on the old PM's dependency system forming LCSSA.

The new PM will require a different design for this, and for now this is
causing most of the issues I'm currently seeing in testing. I'd like to
get to a testable baseline and then work on re-enabling things one at
a time.

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

7 years ago[InstCombine] Canonicalize insert splat sequences into an insert + shuffle
Michael Kuperstein [Wed, 28 Dec 2016 00:18:08 +0000 (00:18 +0000)]
[InstCombine] Canonicalize insert splat sequences into an insert + shuffle

This adds a combine that canonicalizes a chain of inserts which broadcasts
a value into a single insert + a splat shufflevector.

This fixes PR31286.

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

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

7 years ago[libFuzzer] add an experimental flag -experimental_len_control=1 that sets max_len...
Kostya Serebryany [Tue, 27 Dec 2016 23:24:55 +0000 (23:24 +0000)]
[libFuzzer] add an experimental flag -experimental_len_control=1 that sets max_len to 1M and tries to increases the actual max sizes of mutations very gradually (second attempt)

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

7 years agoMark comparator call operator as const
Eric Fiselier [Tue, 27 Dec 2016 23:15:58 +0000 (23:15 +0000)]
Mark comparator call operator as const

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

7 years ago[libFuzzer] don't create large random mutations when given an empty seed
Kostya Serebryany [Tue, 27 Dec 2016 22:15:04 +0000 (22:15 +0000)]
[libFuzzer] don't create large random mutations when given an empty seed

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

7 years ago[sanitizer-coverage] sort the switch cases
Kostya Serebryany [Tue, 27 Dec 2016 21:20:06 +0000 (21:20 +0000)]
[sanitizer-coverage] sort the switch cases

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

7 years agollvm-readobj: ELF: Make DT tags machine aware
Hemant Kulkarni [Tue, 27 Dec 2016 19:59:29 +0000 (19:59 +0000)]
llvm-readobj: ELF: Make DT tags machine aware

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

7 years ago[libFuzzer] fix UB and simplify the computation of the RNG seed (https://llvm.org...
Kostya Serebryany [Tue, 27 Dec 2016 19:51:34 +0000 (19:51 +0000)]
[libFuzzer] fix UB and simplify the computation of the RNG seed (https://llvm.org/bugs/show_bug.cgi?id=31456)

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

7 years ago[PM] Teach MemDep to invalidate its result object when its cached
Chandler Carruth [Tue, 27 Dec 2016 19:33:04 +0000 (19:33 +0000)]
[PM] Teach MemDep to invalidate its result object when its cached
analysis handles become invalid.

Add a test case for its invalidation logic.

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

7 years agoDebugInfo: add explicit casts for -Wqual-cast
Saleem Abdulrasool [Tue, 27 Dec 2016 18:35:24 +0000 (18:35 +0000)]
DebugInfo: add explicit casts for -Wqual-cast

Fix a warning detected by gcc 6:
  warning: cast from type 'const void*' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual]

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

7 years agoASMParser: use range-based for loops (NFC)
Saleem Abdulrasool [Tue, 27 Dec 2016 18:35:22 +0000 (18:35 +0000)]
ASMParser: use range-based for loops (NFC)

Convert the verify method to use a few more range based for loops,
converting to const iterators in the process.

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

7 years agotest: modernise ARM CodeGen tests
Saleem Abdulrasool [Tue, 27 Dec 2016 18:35:19 +0000 (18:35 +0000)]
test: modernise ARM CodeGen tests

Replace the use of grep with FileCheck.  Tidy up some of the tests.  A
few of the tests have been left as weak as previously, though some have
been made more stringent.

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

7 years ago[NewGVN] Simplify a bit removing else after return. NFCI.
Davide Italiano [Tue, 27 Dec 2016 18:15:39 +0000 (18:15 +0000)]
[NewGVN] Simplify a bit removing else after return. NFCI.

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

7 years ago[PM] Remove a pointless optimization.
Chandler Carruth [Tue, 27 Dec 2016 18:04:11 +0000 (18:04 +0000)]
[PM] Remove a pointless optimization.

There is no need to do this within an analysis. That method shouldn't
even be reached if this predicate holds as the actual useful
optimization is in the analysis manager itself.

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

7 years agoAttempt to make the Windows bots green after r290609.
Chad Rosier [Tue, 27 Dec 2016 18:02:27 +0000 (18:02 +0000)]
Attempt to make the Windows bots green after r290609.

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

7 years ago[PM] Add more dedicated testing to cover the invalidation logic added to
Chandler Carruth [Tue, 27 Dec 2016 17:59:22 +0000 (17:59 +0000)]
[PM] Add more dedicated testing to cover the invalidation logic added to
BasicAA in r290603.

I've kept the basic testing in the new PM test file as that also covers
the AAManager invalidation logic. If/when there is a good place for
broader AA testing it could move there.

This test is somewhat unsatisfying as I can't get it to fail even with
ASan outside of explicit checks of the invalidation. Apparently we don't
yet have any test coverage of the BasicAA code paths using either the
domtree or loopinfo -- I made both of them always be null and check-llvm
passed.

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

7 years ago[MemCpyOpt] Don't sink LoadInst below possible clobber.
Bryant Wong [Tue, 27 Dec 2016 17:58:12 +0000 (17:58 +0000)]
[MemCpyOpt] Don't sink LoadInst below possible clobber.

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

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

7 years ago[ThinLTO] Fix "||" vs "|" mixup.
Teresa Johnson [Tue, 27 Dec 2016 17:45:09 +0000 (17:45 +0000)]
[ThinLTO] Fix "||" vs "|" mixup.

The effect of the bug was that we would incorrectly create summaries
for global and weak values defined in module asm (since we were
essentially testing for bit 1 which is SF_Undefined, and the
RecordStreamer ignores local undefined references). This would have
resulted in conservatively disabling importing of anything referencing
globals and weaks defined in module asm. Added these cases to the test
which now fails without this bug fix.

Fixes PR31459.

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

7 years ago[AArch64][AsmParser] Add support for parsing shift/extend operands with symbols.
Chad Rosier [Tue, 27 Dec 2016 16:58:09 +0000 (16:58 +0000)]
[AArch64][AsmParser] Add support for parsing shift/extend operands with symbols.

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

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

7 years ago[AMDGPU][llvm-mc] Predefined symbols to access register counts (.kernel.{v|s}gpr_count)
Artem Tamazov [Tue, 27 Dec 2016 16:00:11 +0000 (16:00 +0000)]
[AMDGPU][llvm-mc] Predefined symbols to access register counts (.kernel.{v|s}gpr_count)

The feature allows for conditional assembly, filling the entries
of .amd_kernel_code_t etc.

Symbols are defined with value 0 at the beginning of each kernel scope.
After each register usage, the respective symbol is set to:
value = max( value, ( register index + 1 ) )
Thus, at the end of scope the value represents a count of used registers.

Kernel scopes begin at .amdgpu_hsa_kernel directive, end at the
next .amdgpu_hsa_kernel (or EOF, whichever comes first). There is also
dummy scope that lies from the beginning of source file til the
first .amdgpu_hsa_kernel.

Test added.

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

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

7 years ago[MemDep] Operand visited twice bugfix
Piotr Padlewski [Tue, 27 Dec 2016 15:06:07 +0000 (15:06 +0000)]
[MemDep] Operand visited twice bugfix

Because operand was not marked as seen it was visited twice.
It doesn't change behavior of optimization, it just saves redudant
visit, so no test changes.

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

7 years agoRuntimeDyldELF: refactor AArch64 relocations. NFC.
Eugene Leviant [Tue, 27 Dec 2016 13:33:32 +0000 (13:33 +0000)]
RuntimeDyldELF: refactor AArch64 relocations. NFC.

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

7 years agoFix unit test in NDEBUG build
Eugene Leviant [Tue, 27 Dec 2016 11:07:53 +0000 (11:07 +0000)]
Fix unit test in NDEBUG build

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

7 years ago[PM] Teach BasicAA how to invalidate its result object.
Chandler Carruth [Tue, 27 Dec 2016 10:30:45 +0000 (10:30 +0000)]
[PM] Teach BasicAA how to invalidate its result object.

This requires custom handling because BasicAA caches handles to other
analyses and so it needs to trigger indirect invalidation.

This fixes one of the common crashes when using the new PM in real
pipelines. I've also tweaked a regression test to check that we are at
least handling the most immediate case.

I'm going to work at re-structuring this test some to both scale better
(rather than all being in one file) and check more invalidation paths in
a follow-up commit, but I wanted to get the basic bug fix in place.

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

7 years agoAttempt to fix build bot after r290597
Eugene Leviant [Tue, 27 Dec 2016 10:24:58 +0000 (10:24 +0000)]
Attempt to fix build bot after r290597

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

7 years ago[PM] Disable more of the loop passes -- LCSSA and LoopSimplify are also
Chandler Carruth [Tue, 27 Dec 2016 10:16:46 +0000 (10:16 +0000)]
[PM] Disable more of the loop passes -- LCSSA and LoopSimplify are also
not really wired into the loop pass manager in a way that will let us
productively use these passes yet.

This lets the new PM get farther in basic testing which is useful for
establishing a good baseline of "doesn't explode". There are still
plenty of crashers in basic testing though, this just gets rid of some
noise that is well understood and not representing a specific or narrow
bug.

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

7 years ago[AMDGPU] Assembler: support SDWA and DPP for VOP2b instructions
Sam Kolton [Tue, 27 Dec 2016 10:06:42 +0000 (10:06 +0000)]
[AMDGPU] Assembler: support SDWA and DPP for VOP2b instructions

Reviewers: nhaustov, artem.tamazov, vpykhtin, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

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

7 years agoRuntimeDyldELF: add R_AARCH64_ADD_ABS_LO12_NC reloc
Eugene Leviant [Tue, 27 Dec 2016 09:51:38 +0000 (09:51 +0000)]
RuntimeDyldELF: add R_AARCH64_ADD_ABS_LO12_NC reloc

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

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

7 years agoAllow setting multiple debug types
Eugene Leviant [Tue, 27 Dec 2016 09:31:20 +0000 (09:31 +0000)]
Allow setting multiple debug types

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

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

7 years agoChange a std::vector to SmallVector in NewGVN
Daniel Berlin [Tue, 27 Dec 2016 09:20:36 +0000 (09:20 +0000)]
Change a std::vector to SmallVector in NewGVN

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

7 years ago[PM] Teach the AAManager and AAResults layer (the worst offender for
Chandler Carruth [Tue, 27 Dec 2016 08:44:39 +0000 (08:44 +0000)]
[PM] Teach the AAManager and AAResults layer (the worst offender for
inter-analysis dependencies) to use the new invalidation infrastructure.

This teaches it to invalidate itself when any of the peer function
AA results that it uses become invalid. We do this by just tracking the
originating IDs. I've kept it in a somewhat clunky API since some users
of AAResults are outside the new PM right now. We can clean this API up
if/when those users go away.

Secondly, it uses the registration on the outer analysis manager proxy
to trigger deferred invalidation when a module analysis result becomes
invalid.

I've included test cases that specifically try to trigger use-after-free
in both of these cases and they would crash or hang pretty horribly for
me even without ASan. Now they work nicely.

The `InvalidateAnalysis` utility pass required some tweaking to be
useful in this context and it still is pretty garbage. I'd like to
switch it back to the previous implementation and teach the explicit
invalidate method on the AnalysisManager to take care of correctly
triggering indirect invalidation, but I wanted to go ahead and send this
out so folks could see how all of this stuff works together in practice.
And, you know, that it does actually work. =]

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

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

7 years ago[PM] Introduce the facilities for registering cross-IR-unit dependencies
Chandler Carruth [Tue, 27 Dec 2016 08:40:39 +0000 (08:40 +0000)]
[PM] Introduce the facilities for registering cross-IR-unit dependencies
that require deferred invalidation.

This handles the other real-world invalidation scenario that we have
cases of: a function analysis which caches references to a module
analysis. We currently do this in the AA aggregation layer and might
well do this in other places as well.

Since this is relative rare, the technique is somewhat more cumbersome.
Analyses need to register themselves when accessing the outer analysis
manager's proxy. This proxy is already necessarily present to allow
access to the outer IR unit's analyses. By registering here we can track
and trigger invalidation when that outer analysis goes away.

To make this work we need to enhance the PreservedAnalyses
infrastructure to support a (slightly) more explicit model for "sets" of
analyses, and allow abandoning a single specific analyses even when
a set covering that analysis is preserved. That allows us to describe
the scenario of preserving all Function analyses *except* for the one
where deferred invalidation has triggered.

We also need to teach the invalidator API to support direct ID calls
instead of always going through a template to dispatch so that we can
just record the ID mapping.

I've introduced testing of all of this both for simple module<->function
cases as well as for more complex cases involving a CGSCC layer.

Much like the previous patch I've not tried to fully update the loop
pass management layer because that layer is due to be heavily reworked
to use similar techniques to the CGSCC to handle updates. As that
happens, we'll have a better testing basis for adding support like this.

Many thanks to both Justin and Sean for the extensive reviews on this to
help bring the API design and documentation into a better state.

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

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

7 years ago[PM] Turn on the new PM's inliner in addition to the current one for
Chandler Carruth [Tue, 27 Dec 2016 07:18:43 +0000 (07:18 +0000)]
[PM] Turn on the new PM's inliner in addition to the current one for
most of the inliner test cases.

The inliner involves a bunch of interesting code and tends to be where
most of the issues I've seen experimenting with the new PM lie. All of
these test cases pass, but I'd like to keep some more thorough coverage
here so doing a fairly blanket enabling.

There are a handful of interesting tests I've not enabled yet because
they're focused on the always inliner, or on functionality that doesn't
(yet) exist in the inliner.

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

7 years ago[AVX-512] Add all forms of VPALIGNR, VALIGND, and VALIGNQ to the load folding tables.
Craig Topper [Tue, 27 Dec 2016 06:51:09 +0000 (06:51 +0000)]
[AVX-512] Add all forms of VPALIGNR, VALIGND, and VALIGNQ to the load folding tables.

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

7 years ago[PM] Add one of the features left out of the initial inliner patch:
Chandler Carruth [Tue, 27 Dec 2016 06:46:20 +0000 (06:46 +0000)]
[PM] Add one of the features left out of the initial inliner patch:
skipping indirectly recursive inline chains.

To do this, we implicitly build an inline stack for each callsite and
check prior to inlining that doing so would not form a cycle. This uses
the exact same technique and even shares some code with the legacy PM
inliner.

This solution remains deeply unsatisfying to me because it means we
cannot actually iterate the inliner externally. Doing so would not be
able to easily detect and avoid such cycles. Some day I would very much
like to have a solution that works without this internal state to detect
cycles, but this is not that day.

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

7 years ago[PM] Wire up another test to the new pass manager.
Chandler Carruth [Tue, 27 Dec 2016 06:46:16 +0000 (06:46 +0000)]
[PM] Wire up another test to the new pass manager.

Nothing really interesting here, but I had to improve the test to use
variables rather than hard coding value names as we happen to end up
with different value names in the new PM.

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

7 years ago[Analysis] Ignore `nobuiltin` on `allocsize` function calls.
George Burgess IV [Tue, 27 Dec 2016 06:32:14 +0000 (06:32 +0000)]
[Analysis] Ignore `nobuiltin` on `allocsize` function calls.

We currently ignore the `allocsize` attribute on functions calls with
the `nobuiltin` attribute when trying to lower `@llvm.objectsize`. We
shouldn't care about `nobuiltin` here: `allocsize` is explicitly added
by the user, not inferred based on a function's symbol.

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

7 years ago[Analysis] Refactor as promised in r290397.
George Burgess IV [Tue, 27 Dec 2016 06:10:50 +0000 (06:10 +0000)]
[Analysis] Refactor as promised in r290397.

This also makes us no longer check for `allocsize` on intrinsic calls.
This shouldn't matter, since intrinsics should provide the information
we get from `allocsize` on their own.

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

7 years ago[AVX-512] Remove masked pmuldq and pmuludq intrinsics and autoupgrade them to unmaske...
Craig Topper [Tue, 27 Dec 2016 05:30:14 +0000 (05:30 +0000)]
[AVX-512] Remove masked pmuldq and pmuludq intrinsics and autoupgrade them to unmasked intrinsics plus a select.

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

7 years ago[InstCombine][X86] Add DemandedElts support for 512-bit PMULDQ/PMULUDQ instructions
Craig Topper [Tue, 27 Dec 2016 05:30:09 +0000 (05:30 +0000)]
[InstCombine][X86] Add DemandedElts support for 512-bit PMULDQ/PMULUDQ instructions

PMULDQ/PMULUDQ vXi64 instructions only use the even numbered v2Xi32 input elements which SimplifyDemandedVectorElts should try and use.

This builds on r290554 which added supported for 128 and 256-bit.

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

7 years ago[LCG] Teach the LazyCallGraph to handle visiting the blockaddress
Chandler Carruth [Tue, 27 Dec 2016 05:00:45 +0000 (05:00 +0000)]
[LCG] Teach the LazyCallGraph to handle visiting the blockaddress
constant expression and to correctly form function reference edges
through them without crashing because one of the operands (the
`BasicBlock` isn't actually a constant despite being an operand of
a constant).

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

7 years ago[AVX-512] Add 512-bit unmasked intrinsics for pmuldq and pmuludq so we can add them...
Craig Topper [Tue, 27 Dec 2016 03:46:05 +0000 (03:46 +0000)]
[AVX-512] Add 512-bit unmasked intrinsics for pmuldq and pmuludq so we can add them to InstCombine with the 128 and 256 bit versions.

The 128 and 256 bit masked intrinsics are currently unused by clang. The sse and avx2 unmasked intrinsics are used instead. The new 512-bit intrinsic will be used to do the same. Then all masked versions will removed and autoupgraded.

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

7 years ago[PM] Teach the inliner in the new PM to merge attributes after inlining.
Chandler Carruth [Tue, 27 Dec 2016 03:39:54 +0000 (03:39 +0000)]
[PM] Teach the inliner in the new PM to merge attributes after inlining.

Also enable the new PM in the attributes test case which caught this
issue.

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

7 years ago[Inliner] Modernize all of the inliner tests that were using grep.
Chandler Carruth [Tue, 27 Dec 2016 02:47:37 +0000 (02:47 +0000)]
[Inliner] Modernize all of the inliner tests that were using grep.

This mostly involved converting from grep to FileCheck and tidying up
the IR used.

In one case (invoke_test-3.ll) the test had become completely pointless
as we use 'resume' rather than 'unwind' now, and even then it did not
occur at the end of the line.

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

7 years ago[AVX-512][InstCombine] Teach InstCombine to turn masked scalar add/sub/mul/div with...
Craig Topper [Tue, 27 Dec 2016 01:56:30 +0000 (01:56 +0000)]
[AVX-512][InstCombine] Teach InstCombine to turn masked scalar add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION.

An earlier commit added support for unmasked scalar operations. At that time isel wouldn't generate an optimal sequence for masked operations, but that has now been fixed.

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

7 years ago[InstCombine][AVX-512] Add masked scalar add/sub/mul/div intrinsic test cases that...
Craig Topper [Tue, 27 Dec 2016 01:56:27 +0000 (01:56 +0000)]
[InstCombine][AVX-512] Add masked scalar add/sub/mul/div intrinsic test cases that don't have a CUR_DIRECTION rounding mode.

The CUR_DIRECTION case will be optimized in a future commit so this provides coverage for the other cases.

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

7 years ago[AVX-512] Add isel patterns to turn native masked scalar add/sub/mul/div into masked...
Craig Topper [Tue, 27 Dec 2016 01:56:24 +0000 (01:56 +0000)]
[AVX-512] Add isel patterns to turn native masked scalar add/sub/mul/div into masked instructions.

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

7 years ago[AVX-512] Add tests to show missed opportunities for combining masking with scalar...
Craig Topper [Tue, 27 Dec 2016 01:56:22 +0000 (01:56 +0000)]
[AVX-512] Add tests to show missed opportunities for combining masking with scalar arithmetic operations.

These particular sequences will be generated after a future change to teach InstCombine to turn masked scalar arithmetic intrinsics into native IR.

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

7 years ago[PM] Move the collection of call sites to a more appropriate place
Chandler Carruth [Tue, 27 Dec 2016 01:24:50 +0000 (01:24 +0000)]
[PM] Move the collection of call sites to a more appropriate place
inside of `InlineFunction`. Prior to this, call instructions are
specifically being rewritten and replaced within the inlined region,
invalidating some of the call sites.

Several of these regions are using the same technique to walk the
inlined region so this seems clearly safe up to this point.

I've also added a short circuit to the scan for call sites based on what
other code is doing.

With this, the most common crash I've found in the new inliner code is
fixed. I've turned it on for another test case that covers this
scenario.

I'll make my way through most of the other inliner test cases
just to get some easy coverage next.

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

7 years ago[AVX-512][InstCombine] Teach InstCombine to turn packed add/sub/mul/div with rounding...
Craig Topper [Tue, 27 Dec 2016 00:23:16 +0000 (00:23 +0000)]
[AVX-512][InstCombine] Teach InstCombine to turn packed add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION.

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

7 years ago[PM] Teach the always inliner in the new pass manager to support
Chandler Carruth [Mon, 26 Dec 2016 23:43:27 +0000 (23:43 +0000)]
[PM] Teach the always inliner in the new pass manager to support
removing fully-dead comdats without removing dead entries in comdats
with live members.

This factors the core logic out of the current inliner's internals to
a reusable utility and leverages that in both places. The factored out
code should also be (minorly) more efficient in cases where we have very
few dead functions or dead comdats to consider.

I've added a test case to cover this behavior of the always inliner.
This is the last significant bug in the new PM's always inliner I've
found (so far).

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

7 years ago[doc] Add mention of the difference in optimization level between Release and RelWith...
Mehdi Amini [Mon, 26 Dec 2016 23:42:12 +0000 (23:42 +0000)]
[doc] Add mention of the difference in optimization level between Release and RelWithDebInfo in Cmake.rst

This is surprising to many people.

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

7 years ago[ADT] Add an llvm::erase_if utility to make the standard erase+remove_if
Chandler Carruth [Mon, 26 Dec 2016 23:30:44 +0000 (23:30 +0000)]
[ADT] Add an llvm::erase_if utility to make the standard erase+remove_if
pattern easier to write.

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

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

7 years ago[InstCombine][X86] Add DemandedElts support for PMULDQ/PMULUDQ instructions
Simon Pilgrim [Mon, 26 Dec 2016 23:28:17 +0000 (23:28 +0000)]
[InstCombine][X86] Add DemandedElts support for PMULDQ/PMULUDQ instructions

PMULDQ/PMULUDQ vXi64 instructions only use the even numbered v2Xi32 input elements which SimplifyDemandedVectorElts should try and use.

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

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

7 years ago[ADT] Add a boring std::partition wrapper similar to our std::remove_if
Chandler Carruth [Mon, 26 Dec 2016 23:10:40 +0000 (23:10 +0000)]
[ADT] Add a boring std::partition wrapper similar to our std::remove_if
wrapper.

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

7 years agoclang-format NewGVN files
Daniel Berlin [Mon, 26 Dec 2016 20:06:58 +0000 (20:06 +0000)]
clang-format NewGVN files

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

7 years agoMisc cleanups and simplifications for NewGVN.
Daniel Berlin [Mon, 26 Dec 2016 19:57:25 +0000 (19:57 +0000)]
Misc cleanups and simplifications for NewGVN.
Mostly use a bit more idiomatic C++ where we can,
so we can combine some things later.

Reviewers: davide

Subscribers: llvm-commits

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

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

7 years agoDon't use our own incorrect version of isTriviallyDeadInstruction in NewGVN. Fixes...
Daniel Berlin [Mon, 26 Dec 2016 18:44:36 +0000 (18:44 +0000)]
Don't use our own incorrect version of isTriviallyDeadInstruction in NewGVN. Fixes PR/31472

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

7 years ago[NewGVN] Add a flag to enable the pass via `-mllvm`.
Davide Italiano [Mon, 26 Dec 2016 18:26:19 +0000 (18:26 +0000)]
[NewGVN] Add a flag to enable the pass via `-mllvm`.

NewGVN can be tested passing `-mllvm -enable-newgvn` to clang.

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

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

7 years ago[NewGVN] Change test to reflect difference between GVN and NewGVN.
Davide Italiano [Mon, 26 Dec 2016 18:10:09 +0000 (18:10 +0000)]
[NewGVN] Change test to reflect difference between GVN and NewGVN.

The current GVN algorithm folds unconditional branches to, it claims,
expose more PRE oportunities. The folding, if really needed,
(which is not sure, as it's not really proved it improves analysis)
can be done by an earlier cleanup pass instead of GVN itself.
Ack'ed/SGTM'd by Daniel Berlin.

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

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

7 years agoWdocumentation fix
Simon Pilgrim [Mon, 26 Dec 2016 17:48:19 +0000 (17:48 +0000)]
Wdocumentation fix

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

7 years ago[X86][AVX512] Added v64i8 reverse shuffle test (PR31470)
Simon Pilgrim [Mon, 26 Dec 2016 17:38:58 +0000 (17:38 +0000)]
[X86][AVX512] Added v64i8 reverse shuffle test (PR31470)

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

7 years ago[NewGVN] Fold lookupOperandLeader() when there's only one use. NFCI.
Davide Italiano [Mon, 26 Dec 2016 16:19:34 +0000 (16:19 +0000)]
[NewGVN] Fold lookupOperandLeader() when there's only one use. NFCI.

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

7 years ago[InstCombiner] Simplify lib calls to `round{,f}`
Bryant Wong [Mon, 26 Dec 2016 14:29:29 +0000 (14:29 +0000)]
[InstCombiner] Simplify lib calls to `round{,f}`

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

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

7 years agoTest the different scenarios of GlobalDCE and comdats more
Chandler Carruth [Mon, 26 Dec 2016 08:54:01 +0000 (08:54 +0000)]
Test the different scenarios of GlobalDCE and comdats more
systematically and document in the test what all is going on.

This replaces the PR-named test that was the only coverage for GlobalDCE
and comdats previously. I wrote this because I wasn't certain how
comdat DCE was supposed to work and wanted to step through what
GlobalDCE did to fully understand it. After talking to folks and reading
the code and really staring at things it all makes sense but it seemed
good to help write down some of this in a more explicit and fully
covering test case.

For example, it seemed like a bug that GlobalDCE didn't consider comdat
participation of ifuncs. Specifically it seemed like an accident because
testing didn't really cover that case. But in fact, ifuncs specifically
cannot participate in a comdat despite having that API. The new test
case covers this and explicitly documents that DCE gets to fire here
even though there are comdats involved.

Also, we didn't have any positive tests for the challenging cases such
as usage cycles between comdat participants that might make them seem
alive except that there is no external edge into the cycle.

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

7 years ago[AVX-512] Fix some patterns to use extended register classes.
Craig Topper [Mon, 26 Dec 2016 07:26:07 +0000 (07:26 +0000)]
[AVX-512] Fix some patterns to use extended register classes.

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

7 years ago[AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with rounding...
Craig Topper [Mon, 26 Dec 2016 06:33:19 +0000 (06:33 +0000)]
[AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION.

Summary:
I only do this for unmasked cases for now because isel is failing to fold the mask. I'll try to fix that soon.

I'll do the same thing for packed add/sub/mul/div in a future patch.

Reviewers: delena, RKSimon, zvi, craig.topper

Subscribers: llvm-commits

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

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

7 years ago[AVX-512] Don't assume that the rounding mode argument to intrinsics is a constant...
Craig Topper [Mon, 26 Dec 2016 01:40:17 +0000 (01:40 +0000)]
[AVX-512] Don't assume that the rounding mode argument to intrinsics is a constant. While clang will guarantee this, nothing in the backend will.

A non-constant value will now result in an isel error instead of just asserting or crashing due to a bad cast during lowering.

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

7 years agoFix some bad indentation that I or another introduced somehow.
Chandler Carruth [Mon, 26 Dec 2016 01:20:59 +0000 (01:20 +0000)]
Fix some bad indentation that I or another introduced somehow.

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

7 years ago[AVX-512][InstCombine] Teach InstCombine to converted masked vpermv intrinsics into...
Craig Topper [Sun, 25 Dec 2016 23:58:57 +0000 (23:58 +0000)]
[AVX-512][InstCombine] Teach InstCombine to converted masked vpermv intrinsics into shufflevector instructions

Summary:
This patch adds support for converting the masked vpermv intrinsics into shufflevector instructions if the indices are constants.

We also need to wrap a select instruction around the shuffle to take care of the masking part. InstCombine will take care of optimizing the select if the mask is constant so I didn't bother checking for that.

Reviewers: zvi, delena, spatel, RKSimon

Subscribers: llvm-commits

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

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

7 years agoFix `update_test_checks.py` bug that incorrectly truncates IR body.
Bryant Wong [Sun, 25 Dec 2016 23:46:55 +0000 (23:46 +0000)]
Fix `update_test_checks.py` bug that incorrectly truncates IR body.

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

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

7 years ago[ADT] Add a generic concatenating iterator and range (take 2).
Chandler Carruth [Sun, 25 Dec 2016 23:41:14 +0000 (23:41 +0000)]
[ADT] Add a generic concatenating iterator and range (take 2).

This recommits r290512 that was reverted when MSVC failed to compile it. Since
then I've played with various approaches using rextester.com (where I was able
to reproduce the failure) and think that I have a solution thanks in part to
the help of Dave Blaikie! It seems MSVC just has a defective `decltype` in this
version. Manually writing out the type seems to do the trick, even though it is
.... quite complicated.

Original commit message:
This allows both defining convenience iterator/range accessors on types
which walk across N different independent ranges within the object, and
more direct and simple usages with range based for loops such as shown
in the unittest. The same facilities are used for both. They end up
quite small and simple as it happens.

I've also switched an iterator on `Module` to use this. I would like to
add another convenience iterator that includes even more sequences as
part of it and seeing this one already present motivated me to actually
abstract it away and introduce a general utility.

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

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

7 years ago[MemorySSA] Define a restricted upward AccessList splice.
Bryant Wong [Sun, 25 Dec 2016 23:34:07 +0000 (23:34 +0000)]
[MemorySSA] Define a restricted upward AccessList splice.

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

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

7 years ago[AliasAnalysis] Teach BasicAA about memcpy.
Bryant Wong [Sun, 25 Dec 2016 22:42:27 +0000 (22:42 +0000)]
[AliasAnalysis] Teach BasicAA about memcpy.

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

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

7 years agoValue number stores and memory states so we can detect when memory states are equival...
Daniel Berlin [Sun, 25 Dec 2016 22:23:49 +0000 (22:23 +0000)]
Value number stores and memory states so we can detect when memory states are equivalent (IE store of same value to memory).

Reviewers: davide

Subscribers: llvm-commits

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

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

7 years agoRename GVNExpression *ops_ members to *op_* to match conventions in the rest of LLVM
Daniel Berlin [Sun, 25 Dec 2016 22:10:37 +0000 (22:10 +0000)]
Rename GVNExpression *ops_ members to *op_* to match conventions in the rest of LLVM

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

7 years ago[Orc][RPC] Add a ParallelCallGroup utility for dispatching and waiting on
Lang Hames [Sun, 25 Dec 2016 21:55:05 +0000 (21:55 +0000)]
[Orc][RPC] Add a ParallelCallGroup utility for dispatching and waiting on
multiple asynchronous RPC calls.

ParallelCallGroup allows multiple asynchronous calls to be dispatched,
and provides a wait method that blocks until all asynchronous calls have
been executed on the remote and all return value handlers run on the
local machine.

This will allow, for example, the JIT client to issue memory allocation calls
for all sections in parallel, then block until all memory has been allocated
on the remote and the allocated addresses registered with the client, at which
point the JIT client can proceed to applying relocations.

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

7 years ago[Orc][RPC] Clang-format RPCUtils header.
Lang Hames [Sun, 25 Dec 2016 19:55:59 +0000 (19:55 +0000)]
[Orc][RPC] Clang-format RPCUtils header.

Some of the recent RPC call type-checking changes weren't formatted prior to
commit.

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

7 years agoAdd newline to end of file to quiet warnings.
Greg Clayton [Sun, 25 Dec 2016 18:41:47 +0000 (18:41 +0000)]
Add newline to end of file to quiet warnings.

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

7 years agorevert commit 290516
Michael Zuckerman [Sun, 25 Dec 2016 12:45:18 +0000 (12:45 +0000)]
revert commit 290516

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

7 years agoCommit try added new empty line
Michael Zuckerman [Sun, 25 Dec 2016 12:01:34 +0000 (12:01 +0000)]
Commit try added new empty line

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

7 years ago[DebugInfo] Added support for Checksum debug info feature.
Amjad Aboud [Sun, 25 Dec 2016 10:12:09 +0000 (10:12 +0000)]
[DebugInfo] Added support for Checksum debug info feature.

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

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

7 years agoRevert r290512: [ADT] Add a generic concatenating iterator and range.
Chandler Carruth [Sun, 25 Dec 2016 09:36:24 +0000 (09:36 +0000)]
Revert r290512: [ADT] Add a generic concatenating iterator and range.

This code doesn't work on MSVC for reasons that elude me and I've not
yet covinced a workaround to compile cleanly so reverting for now while
I play with it.

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

7 years ago[ADT] Add a generic concatenating iterator and range.
Chandler Carruth [Sun, 25 Dec 2016 08:22:50 +0000 (08:22 +0000)]
[ADT] Add a generic concatenating iterator and range.

This allows both defining convenience iterator/range accessors on types
which walk across N different independent ranges within the object, and
more direct and simple usages with range based for loops such as shown
in the unittest. The same facilities are used for both. They end up
quite small and simple as it happens.

I've also switched an iterator on `Module` to use this. I would like to
add another convenience iterator that includes even more sequences as
part of it and seeing this one already present motivated me to actually
abstract it away and introduce a general utility.

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

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

7 years agoMetadataLoader: replace the tracking of ForwardReferences and UnresolvedNodes with...
Mehdi Amini [Sun, 25 Dec 2016 04:22:54 +0000 (04:22 +0000)]
MetadataLoader: replace the tracking of ForwardReferences and UnresolvedNodes with a set-based solution (NFC)

This makes it explicit what is the exact list to handle, and it
looks much more easy to manipulate and understand that the
previous custom tracking of min/max to express the range where
to look for.

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

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

7 years agoMetadataLoader: add an extra assertion in Placeholders flush (NFC)
Mehdi Amini [Sun, 25 Dec 2016 03:55:53 +0000 (03:55 +0000)]
MetadataLoader: add an extra assertion in Placeholders flush (NFC)

We don't expect any forward reference at this point.

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

7 years agoAdd range iterator for blocks in MemoryPhi
Daniel Berlin [Sat, 24 Dec 2016 21:52:10 +0000 (21:52 +0000)]
Add range iterator for blocks in MemoryPhi

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

7 years ago[InstCombine][X86] Add tests showing missed opportunities to simplify PMULUDQ/PMULDQ...
Simon Pilgrim [Sat, 24 Dec 2016 17:30:19 +0000 (17:30 +0000)]
[InstCombine][X86] Add tests showing missed opportunities to simplify PMULUDQ/PMULDQ inputs.

PMULUDQ/PMULDQ - only the even elements (0, 2, 4, 6) of the vXi32 inputs are required.

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

7 years agoTest commit.
Bryant Wong [Sat, 24 Dec 2016 17:26:38 +0000 (17:26 +0000)]
Test commit.

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

7 years ago[NewGVN] Prefer `auto` to explicit type when the latter is obvious.
Davide Italiano [Sat, 24 Dec 2016 17:17:21 +0000 (17:17 +0000)]
[NewGVN] Prefer `auto` to explicit type when the latter is obvious.

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

7 years ago[NewGVN] Simplify several equals() member functions. NFCI.
Davide Italiano [Sat, 24 Dec 2016 17:14:19 +0000 (17:14 +0000)]
[NewGVN] Simplify several equals() member functions. NFCI.

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

7 years ago[PM] Remove vestiges of NoAA. NFCI.
Davide Italiano [Sat, 24 Dec 2016 16:14:05 +0000 (16:14 +0000)]
[PM] Remove vestiges of NoAA. NFCI.

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

7 years agollvm-objdump: sort phdr type strings in advance of adding new ones
Ed Maste [Sat, 24 Dec 2016 14:53:45 +0000 (14:53 +0000)]
llvm-objdump: sort phdr type strings in advance of adding new ones

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

7 years ago[SelectionDAG] Early out from computeKnownBits when we know we will have no common...
Simon Pilgrim [Sat, 24 Dec 2016 12:59:35 +0000 (12:59 +0000)]
[SelectionDAG] Early out from computeKnownBits when we know we will have no common bits.

Avoid extra (recursive) calls to computeKnownBits if we already know that there are no common known bits.

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

7 years ago[PM] Try to improve the comments here to make what's going on more
Chandler Carruth [Sat, 24 Dec 2016 05:11:17 +0000 (05:11 +0000)]
[PM] Try to improve the comments here to make what's going on more
clear.

Based on post-commit review suggestion from Sean. (Thanks!)

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

7 years agoMark isOnlyReachableViaThisEdge as const
Daniel Berlin [Sat, 24 Dec 2016 00:04:07 +0000 (00:04 +0000)]
Mark isOnlyReachableViaThisEdge as const

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

7 years agoAdd an assertion for cl::opt names: they can't start with '-'
Mehdi Amini [Fri, 23 Dec 2016 23:55:26 +0000 (23:55 +0000)]
Add an assertion for cl::opt names: they can't start with '-'

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

7 years agollvm-size: remove leading dash in '-radix' option
Mehdi Amini [Fri, 23 Dec 2016 23:55:08 +0000 (23:55 +0000)]
llvm-size: remove leading dash in '-radix' option

cl::opt does not accept such option

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

7 years agollvm-readobj: remove leading dash in '-a' option (ARMAttributesShort)
Mehdi Amini [Fri, 23 Dec 2016 23:54:52 +0000 (23:54 +0000)]
llvm-readobj: remove leading dash in '-a' option (ARMAttributesShort)

cl::opt does not accept such option

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