OSDN Git Service

android-x86/external-llvm.git
7 years ago[AMDGPU] Fix some Clang-tidy modernize and Include What You Use warnings; other minor...
Eugene Zelenko [Fri, 20 Jan 2017 17:52:16 +0000 (17:52 +0000)]
[AMDGPU] 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@292623 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".
Wei Mi [Fri, 20 Jan 2017 17:38:54 +0000 (17:38 +0000)]
[RegisterCoalescing] Recommit the patch "Remove partial redundent copy".

The recommit fixes a bug related with live interval update after the partial
redundent copy is moved.

The original patch is to solve the performance problem described in PR27827.
Register coalescing sometimes cannot remove a copy because of interference.
But if we can find a reverse copy in one of the predecessor block of the copy,
the copy is partially redundent and we may remove the copy partially by moving
it to the predecessor block without the reverse copy.

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

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

7 years ago[InstCombine][SSE] Tests showing missed opportunities to handle muldq/muludq with...
Simon Pilgrim [Fri, 20 Jan 2017 17:06:38 +0000 (17:06 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to handle muldq/muludq with undef arguments

Fixed a typo in existing test names at the same time

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

7 years agoRevert "Recommit "[InlineCost] Use TTI to check if GEP is free." #2"
Haicheng Wu [Fri, 20 Jan 2017 16:52:22 +0000 (16:52 +0000)]
Revert "Recommit "[InlineCost] Use TTI to check if GEP is free." #2"

This reverts commit r292616 because the test case still has problem.

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

7 years agoRecommit "[InlineCost] Use TTI to check if GEP is free." #2
Haicheng Wu [Fri, 20 Jan 2017 16:36:34 +0000 (16:36 +0000)]
Recommit "[InlineCost] Use TTI to check if GEP is free." #2

This is the second attemp to recommit r292526.

The original summary:

Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

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

7 years agoRemove trailing whitespace. NFCI.
Simon Pilgrim [Fri, 20 Jan 2017 15:15:59 +0000 (15:15 +0000)]
Remove trailing whitespace. NFCI.

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

7 years ago[CostModel][X86] Removed unused cost. NFCI.
Simon Pilgrim [Fri, 20 Jan 2017 15:14:38 +0000 (15:14 +0000)]
[CostModel][X86] Removed unused cost. NFCI.

SHL v8i32 is already handled in the SSE41 cost table

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

7 years ago[InstCombine][SSE] Tests showing missed opportunities to constant fold packss/packus
Simon Pilgrim [Fri, 20 Jan 2017 13:21:30 +0000 (13:21 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to constant fold packss/packus

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

7 years ago[Thumb] Add support for tMUL in the compare instruction peephole optimizer.
Sjoerd Meijer [Fri, 20 Jan 2017 13:10:12 +0000 (13:10 +0000)]
[Thumb] Add support for tMUL in the compare instruction peephole optimizer.

We also want to optimise tests like this: return a*b == 0.  The MULS
instruction is flag setting, so we don't need the CMP instruction but can
instead branch on the result of the MULS. The generated instructions sequence
for this example was: MULS, MOVS, MOVS, CMP. The MOVS instruction load the
boolean values resulting from the select instruction, but these MOVS
instructions are flag setting and were thus preventing this optimisation. Now
we first reorder and move the MULS to before the CMP and generate sequence
MOVS, MOVS, MULS, CMP so that the optimisation could trigger. Reordering of the
MULS and MOVS is safe to do because the subsequent MOVS instructions just set
the CPSR register and don't use it, i.e. the CPSR is dead.

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

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

7 years ago[InstCombine][SSE] Tests showing missed opportunities to handle packss/packus with...
Simon Pilgrim [Fri, 20 Jan 2017 11:28:07 +0000 (11:28 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to handle packss/packus with undef arguments

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

7 years agoPacify -Wreorder.
Benjamin Kramer [Fri, 20 Jan 2017 10:37:53 +0000 (10:37 +0000)]
Pacify -Wreorder.

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

7 years agoAdd an assertion to PlaceholderQueue destructor, ensuring it has been flushed
Mehdi Amini [Fri, 20 Jan 2017 10:18:32 +0000 (10:18 +0000)]
Add an assertion to PlaceholderQueue destructor, ensuring it has been flushed

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

7 years ago[AMDGPU] Add subtarget features for SDWA/DPP
Sam Kolton [Fri, 20 Jan 2017 10:01:25 +0000 (10:01 +0000)]
[AMDGPU] Add subtarget features for SDWA/DPP

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

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

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

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

7 years ago[PM] Tidy up the spacing of this new, much nicer test file.
Chandler Carruth [Fri, 20 Jan 2017 09:30:03 +0000 (09:30 +0000)]
[PM] Tidy up the spacing of this new, much nicer test file.

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

7 years ago[InstCombine][SSE] Add DemandedElts support for PACKSS/PACKUS instructions
Simon Pilgrim [Fri, 20 Jan 2017 09:28:21 +0000 (09:28 +0000)]
[InstCombine][SSE] Add DemandedElts support for PACKSS/PACKUS instructions

Simplify a packss/packus truncation based on the elements of the mask that are actually demanded.

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

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

7 years ago[PM] Port LoopSink to the new pass manager.
Chandler Carruth [Fri, 20 Jan 2017 08:42:19 +0000 (08:42 +0000)]
[PM] Port LoopSink to the new pass manager.

Like several other loop passes (the vectorizer, etc) this pass doesn't
really fit the model of a loop pass. The critical distinction is that it
isn't intended to be pipelined together with other loop passes. I plan
to add some documentation to the loop pass manager to make this more
clear on that side.

LoopSink is also different because it doesn't really need a lot of the
infrastructure of our loop passes. For example, if there aren't loop
invariant instructions causing a preheader to exist, there is no need to
form a preheader. It also doesn't need LCSSA because this pass is
only involved in sinking invariant instructions from a preheader into
the loop, not reasoning about live-outs.

This allows some nice simplifications to the pass in the new PM where we
can directly walk the loops once without restructuring them.

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

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

7 years ago[LoopSink] Trivial comment cleanup.
Chandler Carruth [Fri, 20 Jan 2017 08:42:14 +0000 (08:42 +0000)]
[LoopSink] Trivial comment cleanup.

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

7 years ago[ARM] Use helpers for adding pred / CC operands. NFC
Diana Picus [Fri, 20 Jan 2017 08:15:24 +0000 (08:15 +0000)]
[ARM] Use helpers for adding pred / CC operands. NFC

Hunt down some of the places where we use bare addReg(0) or addImm(AL).addReg(0)
and replace with add(condCodeOp()) and add(predOps()). This should make it
easier to understand what those operands represent (without having to look at
the definition of the instruction that we're adding to).

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

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

7 years ago[AVX-512] Fix a couple test cases to not pass an undef mask to gather intrinsic....
Craig Topper [Fri, 20 Jan 2017 07:12:30 +0000 (07:12 +0000)]
[AVX-512] Fix a couple test cases to not pass an undef mask to gather intrinsic. This could break if any future optimizations taken advantage of the undef.

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

7 years ago[TargetLowering] Improve comment for setOperationAction().
Jonas Paulsson [Fri, 20 Jan 2017 06:48:47 +0000 (06:48 +0000)]
[TargetLowering] Improve comment for setOperationAction().

Add a sentence that says that the type argument can refer to
either the type of a result, or that of an operand.

Review: Eli Friedman.

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

7 years agoNewGVN: Fix PR 31682, an overactive assert.
Daniel Berlin [Fri, 20 Jan 2017 06:38:41 +0000 (06:38 +0000)]
NewGVN: Fix PR 31682, an overactive assert.
Part of the assert has been left active for further debugging.
The other part has been turned into a stat for tracking for the
moment.

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

7 years ago[SLP] Add a base test for jumbled store
Mohammad Shahid [Fri, 20 Jan 2017 06:05:33 +0000 (06:05 +0000)]
[SLP] Add a base test for jumbled store

Change-Id: I905ce08a02c76a6896dcfd9629547417c99adc4a

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

7 years agollvm-cxxfilt: add missing includes from previous change
Saleem Abdulrasool [Fri, 20 Jan 2017 05:33:22 +0000 (05:33 +0000)]
llvm-cxxfilt: add missing includes from previous change

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

7 years agollvm-cxxfilt: fix program description
Saleem Abdulrasool [Fri, 20 Jan 2017 05:27:09 +0000 (05:27 +0000)]
llvm-cxxfilt: fix program description

Fix a silly copy-paste error in the tool description.  Take the
opportunity to add crash stack printing which will hopefully never be
needed.

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

7 years agollvm-cxxfilt: support `-t` to demangle types
Saleem Abdulrasool [Fri, 20 Jan 2017 04:25:26 +0000 (04:25 +0000)]
llvm-cxxfilt: support `-t` to demangle types

By default c++filt demangles functions, though you can optionally pass
`-t` to have it decode types as well, behaving nearly identical to
`__cxa_demangle`.  Add support for this mode.

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

7 years agoBitVector: Fix undefined behaviour
Matthias Braun [Fri, 20 Jan 2017 04:23:08 +0000 (04:23 +0000)]
BitVector: Fix undefined behaviour

Calling reset() on an empty BitVector would call memset with a nullptr
argument which is undefined behaviour.

This should fix the sanitizer bot.

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

7 years agoRevert "LiveRegUnits: Add accumulateBackward() function"
Matthias Braun [Fri, 20 Jan 2017 03:58:42 +0000 (03:58 +0000)]
Revert "LiveRegUnits: Add accumulateBackward() function"

This seems to be breaking some bots.

This reverts commit r292543.

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

7 years agoRevert "Demangle: only demangle mangled symbols"
Saleem Abdulrasool [Fri, 20 Jan 2017 03:54:04 +0000 (03:54 +0000)]
Revert "Demangle: only demangle mangled symbols"

This reverts SVN r286795.  This was incorrect the demangler is expected
to be able to demangle types as well as functions.  This makes the
behaviour of itaniumDemangle similar to __cxa_demangle once more.

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

7 years agoRevert "Recommit "[InlineCost] Use TTI to check if GEP is free.""
Haicheng Wu [Fri, 20 Jan 2017 03:40:41 +0000 (03:40 +0000)]
Revert "Recommit "[InlineCost] Use TTI to check if GEP is free.""

This reverts commit r292570.  The test still has problem.

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

7 years agoRecommit "[InlineCost] Use TTI to check if GEP is free."
Haicheng Wu [Fri, 20 Jan 2017 03:09:11 +0000 (03:09 +0000)]
Recommit "[InlineCost] Use TTI to check if GEP is free."

This recommits r292526 which is reverted in r292529 after fixing the test case.

The original summary:

Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

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

7 years ago[LoopInfo] Add helper methods to compute two useful orderings of the
Chandler Carruth [Fri, 20 Jan 2017 02:41:20 +0000 (02:41 +0000)]
[LoopInfo] Add helper methods to compute two useful orderings of the
loops in a function.

These are relatively confusing to talk about and compute correctly so it
seems really good to write down their implementation in one place. I've
replaced one place we needed this in the loop PM infrastructure and
I have another place in a pending patch that wants it.

We can't quite use this for the core loop PM walk because there we're
sometimes working on a sub-forest.

I'll add the expected unittests before committing this but wanted to
make sure folks were happy with these names / comments.

Credit goes to Richard Smith for the idea for naming the order where siblings
are in reverse program order but the tree traversal remains preorder.

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

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

7 years ago[test] Remove a unwanted match for `XFAIL:`.
Greg Parker [Fri, 20 Jan 2017 02:01:04 +0000 (02:01 +0000)]
[test] Remove a unwanted match for `XFAIL:`.

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

7 years ago[AArch64][GlobalISel] Widen scalar int->fp conversions.
Ahmed Bougacha [Fri, 20 Jan 2017 01:37:24 +0000 (01:37 +0000)]
[AArch64][GlobalISel] Widen scalar int->fp conversions.

It's incorrect to ignore the higher bits of the integer source.
Teach the legalizer how to widen it.

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

7 years ago[PM] Attempt to pacify windows bots.
Michael Kuperstein [Fri, 20 Jan 2017 00:47:32 +0000 (00:47 +0000)]
[PM] Attempt to pacify windows bots.

Another difference in type pretty-printing, this one windows-specific.

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

7 years ago[AMDGPU] Prevent spills before exec mask is restored
Stanislav Mekhanoshin [Fri, 20 Jan 2017 00:44:31 +0000 (00:44 +0000)]
[AMDGPU] Prevent spills before exec mask is restored

Inline spiller can decide to move a spill as early as possible in the basic block.
It will skip phis and label, but we also need to make sure it skips instructions
in the basic block prologue which restore exec mask.

Added isPositionLike callback in TargetInstrInfo to detect instructions which
shall be skipped in addition to common phis, labels etc.

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

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

7 years agoGlobalISel: Add a note about how we're being a bit loose with memory operands
Justin Bogner [Fri, 20 Jan 2017 00:30:17 +0000 (00:30 +0000)]
GlobalISel: Add a note about how we're being a bit loose with memory operands

The logic in r292461 is conservatively correct, but we should revisit
this later. Add a TODO so we don't forget.

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

7 years ago[AArch64][GlobalISel] Split FP conversion legalizer tests. NFC.
Ahmed Bougacha [Fri, 20 Jan 2017 00:30:09 +0000 (00:30 +0000)]
[AArch64][GlobalISel] Split FP conversion legalizer tests. NFC.

Big functions with large vreg # are quite unwieldy to update.

Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable).

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

7 years ago[AArch64][GlobalISel] Split legalizer combine tests. NFC.
Ahmed Bougacha [Fri, 20 Jan 2017 00:30:06 +0000 (00:30 +0000)]
[AArch64][GlobalISel] Split legalizer combine tests. NFC.

Big functions with large vreg # are quite unwieldy to update.  This test
also relied on legal s8 operations which we're considering removing.

Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable), and use
100% legal operations throughout.

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

7 years ago[MIRParser] Allow generic register specification on operand.
Ahmed Bougacha [Fri, 20 Jan 2017 00:29:59 +0000 (00:29 +0000)]
[MIRParser] Allow generic register specification on operand.

This completes r292321 by adding support for generic registers, e.g.:

  %2:_(s32) = G_ADD %0, %1

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

7 years ago[lit] Limit parallelism of sanitizer tests on Darwin [llvm part, take 2]
Kuba Mracek [Fri, 20 Jan 2017 00:24:32 +0000 (00:24 +0000)]
[lit] Limit parallelism of sanitizer tests on Darwin [llvm part, take 2]

Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests.

This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests.

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

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

7 years agoGlobalISel: Only set FailedISel on dropped dbg intrinsics when using fallback
Justin Bogner [Fri, 20 Jan 2017 00:24:30 +0000 (00:24 +0000)]
GlobalISel: Only set FailedISel on dropped dbg intrinsics when using fallback

It's easier to test the non-fallback path if we just drop these
intrinsics for now, like we did before we added the fallback path.
We'll obviously need to fix this properly, but the fixme for that is
already here.

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

7 years ago[AliasAnalysis] Fences do not modify constant memory location
Anna Thomas [Fri, 20 Jan 2017 00:21:33 +0000 (00:21 +0000)]
[AliasAnalysis] Fences do not modify constant memory location

Summary:
Fence instructions are currently marked as `ModRef` for all memory locations.

We can improve this for constant memory locations (such as constant globals),
since fence instructions cannot modify these locations.

This helps us to forward constant loads across fences (added test case in GVN).
There were no changes in behaviour for similar test cases in early-cse and licm.

Reviewers: dberlin, sanjoy, reames

Subscribers: llvm-commits

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

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

7 years agoGlobalISel: Pass the MachineFunction in to reportSelectionError directly
Justin Bogner [Fri, 20 Jan 2017 00:16:19 +0000 (00:16 +0000)]
GlobalISel: Pass the MachineFunction in to reportSelectionError directly

Rather than trying to find MF based on the possibly-null MI we've
passed in here, just pass it in directly. It's already available at
all callers anyway.

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

7 years agoLiveRegUnits: Add accumulateBackward() function
Matthias Braun [Fri, 20 Jan 2017 00:16:17 +0000 (00:16 +0000)]
LiveRegUnits: Add accumulateBackward() function

This function can be used to accumulate the set of all read and modified
register in a sequence of instructions.

Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove
the concept.

- The AArch64A57LoadBalancing code is using a backwards analysis now
  which is irrespective of kill flags. This is the main motivation for
  this change.

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

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

7 years agoCodeGen: Add/Factor out LiveRegUnits class; NFCI
Matthias Braun [Fri, 20 Jan 2017 00:16:14 +0000 (00:16 +0000)]
CodeGen: Add/Factor out LiveRegUnits class; NFCI

This is a set of register units intended to track register liveness, it
is similar in spirit to LivePhysRegs.
You can also think of this as the liveness tracking parts of the
RegisterScavenger factored out into an own class.

This was proposed in http://llvm.org/PR27609

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

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

7 years agoAArch64: fall back to DAG ISel for inline assembly.
Tim Northover [Thu, 19 Jan 2017 23:59:35 +0000 (23:59 +0000)]
AArch64: fall back to DAG ISel for inline assembly.

We can't currently handle "calls" to inlineasm strings so it's better to let
the DAG handle it than generate rubbish.

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

7 years agoFix a few more build errors.
Zachary Turner [Thu, 19 Jan 2017 23:44:14 +0000 (23:44 +0000)]
Fix a few more build errors.

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

7 years agoFix incorrectly formed assert statement.
Zachary Turner [Thu, 19 Jan 2017 23:41:11 +0000 (23:41 +0000)]
Fix incorrectly formed assert statement.

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

7 years ago[PM] Make default pipeline test for the new PM strict
Michael Kuperstein [Thu, 19 Jan 2017 23:39:28 +0000 (23:39 +0000)]
[PM] Make default pipeline test for the new PM strict

Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.

The test is slightly less strict than we'd like because of differences
in type pretty-printing.

(Right now it does show some invalidations - all of those are intentional
and temporary.)

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

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

7 years ago[pdb] Add HashTable data structure.
Zachary Turner [Thu, 19 Jan 2017 23:31:24 +0000 (23:31 +0000)]
[pdb] Add HashTable data structure.

This was being parsed / serialized ad-hoc inside the code
for a specific PDB stream.  But this data structure is used
in multiple ways / places within the PDB format.  To be able
to re-use it we need to raise this code out and make it more
generic.  In doing so, a number of bugs are fixed in the
original implementation, and support is added for growing
the hash table and deleting items from the hash table,
which had either been omitted or incorrect implemented in
the initial version.

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

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

7 years agoRevert r292530 since it breaks buildbots.
Michael Kuperstein [Thu, 19 Jan 2017 23:22:55 +0000 (23:22 +0000)]
Revert r292530 since it breaks buildbots.

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

7 years agoclang-format SampleProfile.cpp (NFC)
Dehao Chen [Thu, 19 Jan 2017 23:20:31 +0000 (23:20 +0000)]
clang-format SampleProfile.cpp (NFC)

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

7 years agoLTO: Flush the resolution file after writing to it.
Peter Collingbourne [Thu, 19 Jan 2017 23:10:14 +0000 (23:10 +0000)]
LTO: Flush the resolution file after writing to it.

Without this the file could be truncated if the linker crashes.

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

7 years ago[SCCP] Teach the pass how to handle `div` with overdefined operands.
Davide Italiano [Thu, 19 Jan 2017 23:07:51 +0000 (23:07 +0000)]
[SCCP] Teach the pass how to handle `div` with overdefined operands.

This can prove that:

extern int f;
int g() {
    int x = 0;
    for (int i = 0; i < 365; ++i) {
        x /= f;
    }
    return x;
}

always returns zero. Thanks to Sanjoy for confirming this
transformation actually made sense (bugs are mine).

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

7 years ago[PM] Make default pipeline test for the new PM strict
Michael Kuperstein [Thu, 19 Jan 2017 22:55:46 +0000 (22:55 +0000)]
[PM] Make default pipeline test for the new PM strict

Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.

(Right now it does show some invalidations - all of those are intentional
and temporary.)

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

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

7 years agoRevert "[InlineCost] Use TTI to check if GEP is free."
Haicheng Wu [Thu, 19 Jan 2017 22:51:03 +0000 (22:51 +0000)]
Revert "[InlineCost] Use TTI to check if GEP is free."

This reverts commit r292526.  The test case has problem.

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

7 years ago[SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)
Simon Pilgrim [Thu, 19 Jan 2017 22:41:22 +0000 (22:41 +0000)]
[SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)

This patch improves the knownbits logic for unsigned integer min/max opcodes.

For UMIN we know that the result will have the maximum of the inputs' known leading zero bits in the result, similarly for UMAX the maximum of the inputs' leading one bits.

This is particularly useful for simplifying clamping patterns,. e.g. as SSE doesn't have a uitofp instruction we want to use sitofp instead where possible and for that we need to confirm that the top bit is not set.

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

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

7 years ago[InlineCost] Use TTI to check if GEP is free.
Haicheng Wu [Thu, 19 Jan 2017 22:28:34 +0000 (22:28 +0000)]
[InlineCost] Use TTI to check if GEP is free.

Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

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

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

7 years ago[AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse
Stanislav Mekhanoshin [Thu, 19 Jan 2017 21:26:22 +0000 (21:26 +0000)]
[AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse

This instruction is missing from LiveIntervals.
I'm not aware of any problems because of this though.

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

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

7 years ago[libFuzzer] ensure that entries in PersistentAutoDictionary are not empty
Kostya Serebryany [Thu, 19 Jan 2017 21:14:47 +0000 (21:14 +0000)]
[libFuzzer] ensure that entries in PersistentAutoDictionary are not empty

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

7 years ago[SCCP] Update comment in visitBinaryOp() after recent changes.
Davide Italiano [Thu, 19 Jan 2017 21:07:42 +0000 (21:07 +0000)]
[SCCP] Update comment in visitBinaryOp() after recent changes.

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

7 years ago[XRay][Arm] Repair XRay table emission on Arm32 and add tests to identify such proble...
Serge Rogatch [Thu, 19 Jan 2017 20:24:23 +0000 (20:24 +0000)]
[XRay][Arm] Repair XRay table emission on Arm32 and add tests to identify such problem earlier

Summary:
Emission of XRay table was occasionally disabled for Arm32, but this bug was not then detected because earlier (also by mistake) testing of XRay was occasionally disabled on 32-bit Arm targets. This patch should fix that problem and detect such problems in the future.
This patch is one of a series, see also
- https://reviews.llvm.org/D28623

Reviewers: rengolin, dberris

Reviewed By: dberris

Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown

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

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

7 years ago[Assembler] Improve error when unable to evaluate expression.
Chad Rosier [Thu, 19 Jan 2017 20:06:32 +0000 (20:06 +0000)]
[Assembler] Improve error when unable to evaluate expression.

Add a SMLoc to MCExpr. Most code does not generate or consume the SMLoc (yet).

Patch by Sanne Wouda <sanne.wouda@arm.com>!
Differential Revision: https://reviews.llvm.org/D28861

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

7 years agoFix aliases to thumbfunc-based exprs to be thumbfunc.
Evgeniy Stepanov [Thu, 19 Jan 2017 20:04:11 +0000 (20:04 +0000)]
Fix aliases to thumbfunc-based exprs to be thumbfunc.

If F is a Thumb function symbol, and G = F + const, and G is a
function symbol, then G is Thumb. Because what else could it be?

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

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

7 years ago[libFuzzer] improve -minimize_crash: honor -artifact_prefix= and don't special case...
Kostya Serebryany [Thu, 19 Jan 2017 19:38:12 +0000 (19:38 +0000)]
[libFuzzer] improve -minimize_crash: honor -artifact_prefix= and don't special case 2-byte inputs

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

7 years agoImprove what can be promoted in LICM.
Xin Tong [Thu, 19 Jan 2017 19:31:40 +0000 (19:31 +0000)]
Improve what can be promoted in LICM.

Summary:
In case of non-alloca pointers, we check for whether it is a pointer
from malloc-like calls and it is not captured. In such case, we can
promote the pointer, as the caller will have no way to access this pointer
even if there is unwinding in middle of the loop.

Reviewers: hfinkel, sanjoy, reames, eli.friedman

Subscribers: llvm-commits

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

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

7 years ago[libFuzzer] add two tests for experimenting with equivalence fuzzing
Kostya Serebryany [Thu, 19 Jan 2017 19:07:26 +0000 (19:07 +0000)]
[libFuzzer] add two tests for experimenting with equivalence fuzzing

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

7 years agoAdd an interface to scale the frequencies of a set of blocks.
Easwaran Raman [Thu, 19 Jan 2017 18:53:16 +0000 (18:53 +0000)]
Add an interface to scale the frequencies of a set of blocks.

The scaling is done with reference to the the new frequency of a reference block.

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

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

7 years ago[InstCombine] Simplify gep (gep p, a), (b-a)
Davide Italiano [Thu, 19 Jan 2017 18:51:56 +0000 (18:51 +0000)]
[InstCombine] Simplify gep (gep p, a), (b-a)

Patch by Andrea Canciani.

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

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

7 years ago[X86][SSE] Improve comments describing combineTruncatedArithmetic. NFCI.
Simon Pilgrim [Thu, 19 Jan 2017 18:18:32 +0000 (18:18 +0000)]
[X86][SSE] Improve comments describing combineTruncatedArithmetic. NFCI.

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

7 years agoRemove this test from the r292500 commit till Chris and I figure out
Kevin Enderby [Thu, 19 Jan 2017 18:07:22 +0000 (18:07 +0000)]
Remove this test from the r292500 commit till Chris and I figure out
why it is failing on a couple of build bots.

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

7 years agoAdd support for the new LC_NOTE load command.
Kevin Enderby [Thu, 19 Jan 2017 17:36:31 +0000 (17:36 +0000)]
Add support for the new LC_NOTE load command.

It describes a region of arbitrary data included in a Mach-O file.
Its initial use is to record extra data in MH_CORE files.

rdar://30001545
rdar://30001731

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

7 years ago[X86][SSE] Attempt to pre-truncate arithmetic operations that have already been extended
Simon Pilgrim [Thu, 19 Jan 2017 16:25:02 +0000 (16:25 +0000)]
[X86][SSE] Attempt to pre-truncate arithmetic operations that have already been extended

As discussed on D28219 - it is profitable to combine trunc(binop (s/zext(x), s/zext(y)) to binop(trunc(s/zext(x)), trunc(s/zext(y))) assuming the trunc(ext()) will simplify further

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

7 years ago[InstCombine] icmp Pred (shl nsw X, C1), C0 --> icmp Pred X, C0 >> C1
Sanjay Patel [Thu, 19 Jan 2017 16:12:10 +0000 (16:12 +0000)]
[InstCombine] icmp Pred (shl nsw X, C1), C0 --> icmp Pred X, C0 >> C1

Try harder to fold icmp with shl nsw as discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/108749.html

This is similar to the 'shl nuw' transforms that were added with D25913.

This may eventually help solve:
https://llvm.org/bugs/show_bug.cgi?id=30773

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

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

7 years ago[X86][SSE] Added tests for pre-truncating arithmetic operations that have already...
Simon Pilgrim [Thu, 19 Jan 2017 15:03:00 +0000 (15:03 +0000)]
[X86][SSE] Added tests for pre-truncating arithmetic operations that have already been extended

As discussed on D28219 - it is profitable to combine trunc(binop (s/zext(x), s/zext(y)) to binop(trunc(s/zext(x)), trunc(s/zext(y))) assuming the trunc(ext()) will simplify further

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

7 years ago[DAG] Don't increase SDNodeOrder for dbg.value/declare.
Mikael Holmen [Thu, 19 Jan 2017 13:55:55 +0000 (13:55 +0000)]
[DAG] Don't increase SDNodeOrder for dbg.value/declare.

Summary:
The SDNodeOrder is saved in the IROrder field in the SDNode, and this
field may affects scheduling. Thus, letting dbg.value/declare increase
the order numbers may in turn affect scheduling.

Because of this change we also need to update the code deciding when
dbg values should be output, in ScheduleDAGSDNodes.cpp/ProcessSDDbgValues.

Dbg values now have the same order as the SDNode they are connected to,
not the following orders.

Test cases provided by Florian Hahn.

Reviewers: bogner, aprantl, sunfish, atrick

Reviewed By: atrick

Subscribers: fhahn, probinson, andreadb, llvm-commits, MatzeB

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

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

7 years ago[docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing
Malcolm Parsons [Thu, 19 Jan 2017 13:37:42 +0000 (13:37 +0000)]
[docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing

Summary:
Docs for clang::Decl and clang::TemplateSpecializationType have
not been generated since LLVM_ALIGNAS was added to them.

Tell Doxygen to expand LLVM_ALIGNAS to nothing as described at
https://www.stack.nl/~dimitri/doxygen/manual/preprocessing.html

Reviewers: aaron.ballman, klimek, alexfh

Subscribers: ioeric, cfe-commits

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

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

7 years agoTest commit access, remove trailing whitespace
Mikael Holmen [Thu, 19 Jan 2017 13:35:13 +0000 (13:35 +0000)]
Test commit access, remove trailing whitespace

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

7 years ago[GlobalISel] Pointers are legal operands for G_SELECT on AArch64
Kristof Beyls [Thu, 19 Jan 2017 13:32:14 +0000 (13:32 +0000)]
[GlobalISel] Pointers are legal operands for G_SELECT on AArch64

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

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

7 years agoRecommiting unsigned saturation with a bugfix.
Elena Demikhovsky [Thu, 19 Jan 2017 12:08:21 +0000 (12:08 +0000)]
Recommiting unsigned saturation with a bugfix.
A test case that crached is added to avx512-trunc.ll.
(PR31589)

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

7 years agoRe-commit: [globalisel] Tablegen-erate current Register Bank Information
Daniel Sanders [Thu, 19 Jan 2017 11:15:55 +0000 (11:15 +0000)]
Re-commit: [globalisel] Tablegen-erate current Register Bank Information

Summary:
Adds a RegisterBank tablegen class that can be used to declare the register
banks and an associated tablegen pass to generate the necessary code.

Changes since first commit attempt:
* Added missing guards
* Added more missing guards
* Found and fixed a use-after-free bug involving Twine locals

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

Reviewed By: qcolombet

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

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

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

7 years agoGlobalISel: Implement widening for shifts
Justin Bogner [Thu, 19 Jan 2017 07:51:17 +0000 (07:51 +0000)]
GlobalISel: Implement widening for shifts

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

7 years ago[AVX-512] Add test cases that show where we are using two subvector inserts to broadc...
Craig Topper [Thu, 19 Jan 2017 07:37:45 +0000 (07:37 +0000)]
[AVX-512] Add test cases that show where we are using two subvector inserts to broadcast a 128-bit subvector into a 512-bit vector. We'd be better off using something like SHUFF32X4.

If the subvector comes from a load, we convert to SUBV_BROADCAST and use a broadcast instruction. But if there is no load we keep the inserts. I think we should create the SUBV_BROADCAST even without the load and let isel use the fallback patterns that are used if the load can't be folded. This will use the SHUFF32X4 or similar instruction for the 128-bit into 512-bit case and a single insert for 128 into 256 or 256 into 512.

This should be fixed so subvector broadcast intrinsics can be replaced with native IR since some of those currently lower directly to SHUFF32X4.

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

7 years ago[AVX-512] Support ADD/SUB/MUL of mask vectors
Craig Topper [Thu, 19 Jan 2017 07:12:35 +0000 (07:12 +0000)]
[AVX-512] Support ADD/SUB/MUL of mask vectors

Summary:
Currently we expand and scalarize these operations, but I think we should be able to implement ADD/SUB with KXOR and MUL with KAND.

We already do this for scalar i1 operations so I just extended it to vectors of i1.

Reviewers: zvi, delena

Reviewed By: delena

Subscribers: guyblank, llvm-commits

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

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

7 years agoAMDGPU: Disable some fneg combines unless nsz
Matt Arsenault [Thu, 19 Jan 2017 06:35:27 +0000 (06:35 +0000)]
AMDGPU: Disable some fneg combines unless nsz

For -(x + y) -> (-x) + (-y), if x == -y, this would
change the result from -0.0 to 0.0. Since the fma/fmad
combine is an extension of this problem it also
applies there.

fmul should be fine, and I don't think any of the unary
operators or conversions should be a problem either.

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

7 years agoAMDGPU: Remove modifiers from v_div_scale_*
Matt Arsenault [Thu, 19 Jan 2017 06:04:12 +0000 (06:04 +0000)]
AMDGPU: Remove modifiers from v_div_scale_*

They seem to produce nonsense results when used.

This should be applied to the release branch.

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

7 years ago[X86] Merge LowerADD and LowerSUB into a single LowerADD_SUB since they are identical.
Craig Topper [Thu, 19 Jan 2017 03:49:29 +0000 (03:49 +0000)]
[X86] Merge LowerADD and LowerSUB into a single LowerADD_SUB since they are identical.

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

7 years ago[sancov] applying blacklist to covered points too
Mike Aizatsky [Thu, 19 Jan 2017 03:49:18 +0000 (03:49 +0000)]
[sancov] applying blacklist to covered points too

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

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

7 years agollvm-cxxfilt: filter out invalid manglings
Saleem Abdulrasool [Thu, 19 Jan 2017 02:58:46 +0000 (02:58 +0000)]
llvm-cxxfilt: filter out invalid manglings

c++filt does not attempt to demangle symbols which do not match its
expected format.  This means that the symbol must start with _Z or ___Z
(block invocation function extension).  Any other symbols are returned
as is.  Note that this is different from the behaviour of __cxa_demangle
which will demangle fragments.

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

7 years ago[AVX-512] Use VSHUF instructions instead of two inserts as fallback for subvector...
Craig Topper [Thu, 19 Jan 2017 02:34:29 +0000 (02:34 +0000)]
[AVX-512] Use VSHUF instructions instead of two inserts as fallback for subvector broadcasts that can't fold the load.

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

7 years ago[AVX-512] Add additional test cases for broadcast intrinsics that demonstates that...
Craig Topper [Thu, 19 Jan 2017 02:34:25 +0000 (02:34 +0000)]
[AVX-512] Add additional test cases for broadcast intrinsics that demonstates that we don't fold the loads to use a broadcast instruction.

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

7 years ago[PM] Add LoopVectorize to the default module pipeline
Michael Kuperstein [Thu, 19 Jan 2017 02:21:54 +0000 (02:21 +0000)]
[PM] Add LoopVectorize to the default module pipeline

LV no longer "requires" LCSSA and LoopSimplify, and instead forms
them internally as required. So, there's nothing preventing it from
being enabled.

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

7 years agoLowerTypeTests: Implement exporting of type identifiers.
Peter Collingbourne [Thu, 19 Jan 2017 01:20:11 +0000 (01:20 +0000)]
LowerTypeTests: Implement exporting of type identifiers.

Type identifiers are exported by:
- Adding coarse-grained information about how to test the type
  identifier to the summary.
- Creating symbols in the object file (aliases and absolute symbols)
  containing fine-grained information about the type identifier.

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

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

7 years agoGlobalISel: Implement narrowing for G_LOAD
Justin Bogner [Thu, 19 Jan 2017 01:05:48 +0000 (01:05 +0000)]
GlobalISel: Implement narrowing for G_LOAD

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

7 years agoGlobalISel: Fix text wrapping in a comment. NFC
Justin Bogner [Thu, 19 Jan 2017 01:04:46 +0000 (01:04 +0000)]
GlobalISel: Fix text wrapping in a comment. NFC

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

7 years agoUse an actual valid register in test
Matthias Braun [Thu, 19 Jan 2017 01:04:08 +0000 (01:04 +0000)]
Use an actual valid register in test

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

7 years agoAdd -debug-info-for-profiling to emit more debug info for sample pgo profile collection
Dehao Chen [Thu, 19 Jan 2017 00:44:11 +0000 (00:44 +0000)]
Add -debug-info-for-profiling to emit more debug info for sample pgo profile collection

Summary:
SamplePGO binaries built with -gmlt to collect profile. The current -gmlt debug info is limited, and we need some additional info:

* start line of all subprograms
* linkage name of all subprograms
* standalone subprograms (functions that has neither inlined nor been inlined)

This patch adds these information to the -gmlt binary. The impact on speccpu2006 binary size (size increase comparing with -g0 binary, also includes data for -g binary, which does not change with this patch):

               -gmlt(orig) -gmlt(patched) -g
433.milc       4.68%       5.40%          19.73%
444.namd       8.45%       8.93%          45.99%
447.dealII     97.43%      115.21%        374.89%
450.soplex     27.75%      31.88%         126.04%
453.povray     21.81%      26.16%         92.03%
470.lbm        0.60%       0.67%          1.96%
482.sphinx3    5.77%       6.47%          26.17%
400.perlbench  17.81%      19.43%         73.08%
401.bzip2      3.73%       3.92%          12.18%
403.gcc        31.75%      34.48%         122.75%
429.mcf        0.78%       0.88%          3.89%
445.gobmk      6.08%       7.92%          42.27%
456.hmmer      10.36%      11.25%         35.23%
458.sjeng      5.08%       5.42%          14.36%
462.libquantum 1.71%       1.96%          6.36%
464.h264ref    15.61%      16.56%         43.92%
471.omnetpp    11.93%      15.84%         60.09%
473.astar      3.11%       3.69%          14.18%
483.xalancbmk  56.29%      81.63%         353.22%
geomean        15.60%      18.30%         57.81%

Debug info size change for -gmlt binary with this patch:

433.milc       13.46%
444.namd       5.35%
447.dealII     18.21%
450.soplex     14.68%
453.povray     19.65%
470.lbm        6.03%
482.sphinx3    11.21%
400.perlbench  8.91%
401.bzip2      4.41%
403.gcc        8.56%
429.mcf        8.24%
445.gobmk      29.47%
456.hmmer      8.19%
458.sjeng      6.05%
462.libquantum 11.23%
464.h264ref    5.93%
471.omnetpp    31.89%
473.astar      16.20%
483.xalancbmk  44.62%
geomean        16.83%

Reviewers: davidxl, echristo, dblaikie

Reviewed By: echristo, dblaikie

Subscribers: aprantl, probinson, llvm-commits, mehdi_amini

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

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

7 years ago[LV] Run loop-simplify and LCSSA explicitly instead of "requiring" them
Michael Kuperstein [Thu, 19 Jan 2017 00:42:28 +0000 (00:42 +0000)]
[LV] Run loop-simplify and LCSSA explicitly instead of "requiring" them

This changes the vectorizer to explicitly use the loopsimplify and lcssa utils,
instead of "requiring" the transformations as if they were analyses.

This is not NFC, since it changes the LCSSA behavior - we no longer run LCSSA
for all loops, but rather only for the loops we expect to modify.

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

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

7 years agoLiveIntervalAnalysis: Cleanup; NFC
Matthias Braun [Thu, 19 Jan 2017 00:32:13 +0000 (00:32 +0000)]
LiveIntervalAnalysis: Cleanup; NFC

- Fix doxygen comments: Do not repeat name, remove duplicated doxygen
  comment (on declaration + implementation), etc.
- Use more range based for

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

7 years ago[NVPTX] Fix lowering of fp16 ISD::FNEG.
Artem Belevich [Thu, 19 Jan 2017 00:14:45 +0000 (00:14 +0000)]
[NVPTX] Fix lowering of fp16 ISD::FNEG.

There's no neg.f16 instruction, so negation has to
be done via subtraction from zero.

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

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