OSDN Git Service

android-x86/external-llvm.git
6 years agoDebugInfo: Update flag description that'd been copypasted from another
David Blaikie [Tue, 1 Aug 2017 14:50:50 +0000 (14:50 +0000)]
DebugInfo: Update flag description that'd been copypasted from another

Post-commit review feedback from Paul Robinson on r309630. Thanks Paul!

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

6 years ago[PostDom] document the current handling of infinite loops and unreachables
Tobias Grosser [Tue, 1 Aug 2017 14:40:55 +0000 (14:40 +0000)]
[PostDom] document the current handling of infinite loops and unreachables

Summary:
As we are in the process of changing the behavior of how the post-dominator tree
is computed, make sure we have some more test coverage in this area.

Current inconsistencies:

  - Newly unreachable nodes are not added as new roots, in case the PDT is updated
    but not rebuilt.

  - Newly unreachable loops are not added to the CFG at all (neither when
    building from scratch nor when updating the CFG). This is inconsistent with
    the fact that unreachables are added to the PDT, but unreachable loops not.
    On the other side, PDT relationships are not loosened at the moment in
    cases where new unreachable loops are built.

This commit is providing additional test coverage for
https://reviews.llvm.org/D35851

Reviewers: dberlin, kuhar

Reviewed By: kuhar

Subscribers: llvm-commits

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

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

6 years ago[DebugInfo] Use shrink_to_fit to simplify code. NFCI.
Benjamin Kramer [Tue, 1 Aug 2017 14:38:08 +0000 (14:38 +0000)]
[DebugInfo] Use shrink_to_fit to simplify code. NFCI.

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

6 years ago[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.
Nirav Dave [Tue, 1 Aug 2017 13:45:35 +0000 (13:45 +0000)]
[DAG] Extend visitSCALAR_TO_VECTOR optimization to truncated vector.

Summary:
Allow SCALAR_TO_VECTOR of EXTRACT_VECTOR_ELT to reduce to
EXTRACT_SUBVECTOR of vector shuffle when output is smaller. Marginally
improves vector shuffle computations.

Reviewers: efriedma, RKSimon, spatel

Subscribers: javed.absar, llvm-commits

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

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

6 years ago[Mips] Fix for BBIT octeon instruction
Strahinja Petrovic [Tue, 1 Aug 2017 13:42:45 +0000 (13:42 +0000)]
[Mips] Fix for BBIT octeon instruction

This patch enables control flow optimization for
variations of BBIT instruction. In this case
optimization removes unnecessary branch after
BBIT instruction.

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

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

6 years ago[Hexagon] Convert HVX vector constants of i1 to i8
Krzysztof Parzyszek [Tue, 1 Aug 2017 13:12:53 +0000 (13:12 +0000)]
[Hexagon] Convert HVX vector constants of i1 to i8

Certain operations require vector of i1 values. However, for Hexagon
architecture compatibility, they need to be represented as vector of i8.

Patch by Suyog Sarda.

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

6 years ago[X86] Regenerate big structure return test and check on x86_64 as well.
Simon Pilgrim [Tue, 1 Aug 2017 13:12:15 +0000 (13:12 +0000)]
[X86] Regenerate big structure return test and check on x86_64 as well.

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

6 years agoAMDGPU/GlobalISel: Add support for amdgpu_vs calling convention
Tom Stellard [Tue, 1 Aug 2017 12:38:33 +0000 (12:38 +0000)]
AMDGPU/GlobalISel: Add support for amdgpu_vs calling convention

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

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

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

6 years ago[PostDom] Fix typo in comment [NFC]
Tobias Grosser [Tue, 1 Aug 2017 11:01:28 +0000 (11:01 +0000)]
[PostDom] Fix typo in comment [NFC]

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

6 years ago[NFC] Remove obsolete profiling data from eq_ne test
Max Kazantsev [Tue, 1 Aug 2017 10:13:29 +0000 (10:13 +0000)]
[NFC] Remove obsolete profiling data from eq_ne test

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

6 years agoSupport itineraries in TargetSubtargetInfo::getSchedInfoStr - Now if the given instr...
Andrew V. Tischenko [Tue, 1 Aug 2017 09:15:43 +0000 (09:15 +0000)]
Support itineraries in TargetSubtargetInfo::getSchedInfoStr - Now if the given instr does not have sched model then we try to calculate the latecy/throughput with help of itineraries.
Differential Revision https://reviews.llvm.org/D35997

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

6 years ago[IRCE][NFC] Add another assert that AddRecExpr's step is not zero
Max Kazantsev [Tue, 1 Aug 2017 06:49:29 +0000 (06:49 +0000)]
[IRCE][NFC] Add another assert that AddRecExpr's step is not zero

One more assertion of this kind. It is a preparation step for generalizing
to the case of stride not equal to +1/-1.

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

6 years ago[PM] Add a comment clarifying what a particular predicate is doing.
Chandler Carruth [Tue, 1 Aug 2017 06:40:11 +0000 (06:40 +0000)]
[PM] Add a comment clarifying what a particular predicate is doing.

This came up as a point of confusion while working on a fundamental
problem with the combination of CGSCC iteration and the inliner.

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

6 years ago[IRCE][NFC] Add assert that AddRecExpr's step is not zero
Max Kazantsev [Tue, 1 Aug 2017 06:27:51 +0000 (06:27 +0000)]
[IRCE][NFC] Add assert that AddRecExpr's step is not zero

We should never return zero steps, ensure this fact by adding
a sanity check when we are analyzing the induction variable.

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

6 years agoRevert "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"
Petr Hosek [Tue, 1 Aug 2017 05:31:50 +0000 (05:31 +0000)]
Revert "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"

The change seems to be failing on bots which are using gcc and bfd.ld
as a host compiler and linker.

This reverts commit r309658.

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

6 years agoRevert r309415: "[LVI] Constant-propagate a zero extension of the switch condition...
Daniel Jasper [Tue, 1 Aug 2017 05:30:49 +0000 (05:30 +0000)]
Revert r309415: "[LVI] Constant-propagate a zero extension of the switch condition value through case edges"

This causes assertion failures in (a somewhat old version of) SpiderMonkey.
I have already forwarded reproduction instructions to the patch author.

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

6 years ago[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy
Petr Hosek [Tue, 1 Aug 2017 05:18:30 +0000 (05:18 +0000)]
[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy

This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.

Patch by Jake Ehrlich

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

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

6 years ago[MetaRenamer] Leave `@main` alone.
Davide Italiano [Tue, 1 Aug 2017 05:14:45 +0000 (05:14 +0000)]
[MetaRenamer] Leave `@main` alone.

To the best of my knowledge -metarenamer is used in two cases:
1) obfuscate names, when e.g. they contain informations that
can't be shared.
2) Improve clarity of the textual IR for testcases.

One of the usecases if getting the output of `opt` and passing it
to the lli interpreter to run the test. If metarenamer renames
@main, lli can't find an entry point.

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

6 years ago[MathExtras] Remove unnecessary cast of a constant 1 in a subtract.
Craig Topper [Tue, 1 Aug 2017 04:18:34 +0000 (04:18 +0000)]
[MathExtras] Remove unnecessary cast of a constant 1 in a subtract.

Pretty sure this will automatically promoted to match the type of the other operand of the subtract. There's plenty of other similar code around here without this cast.

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

6 years ago[StackColoring] Update AliasAnalysis information in stack coloring pass
Hiroshi Inoue [Tue, 1 Aug 2017 03:32:15 +0000 (03:32 +0000)]
[StackColoring] Update AliasAnalysis information in stack coloring pass

Stack coloring pass need to maintain AliasAnalysis information when merging stack slots of different types.
Actually, there is a FIXME comment in StackColoring.cpp

// FIXME: In order to enable the use of TBAA when using AA in CodeGen,
// we'll also need to update the TBAA nodes in MMOs with values
// derived from the merged allocas.

But, TBAA has been already enabled in CodeGen without fixing this pass.
The incorrect TBAA metadata results in recent failures in bootstrap test on ppc64le (PR33928) by allowing unsafe instruction scheduling.
Although we observed the problem on ppc64le, this is a platform neutral issue.

This patch makes the stack coloring pass maintains AliasAnalysis information when merging multiple stack slots.

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

6 years ago[libFuzzer] implement more correct way of computing feature index for Inline8bitCounters
Kostya Serebryany [Tue, 1 Aug 2017 01:16:26 +0000 (01:16 +0000)]
[libFuzzer] implement more correct way of computing feature index for Inline8bitCounters

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

6 years ago[libFuzzer] enable -fsanitize-coverage=pc-table for all tests
Kostya Serebryany [Tue, 1 Aug 2017 00:48:44 +0000 (00:48 +0000)]
[libFuzzer] enable -fsanitize-coverage=pc-table for all tests

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

6 years agoDefault MemoryLocation passed to getModRefInfo should be None (D35441)
Alina Sbirlea [Tue, 1 Aug 2017 00:47:17 +0000 (00:47 +0000)]
Default MemoryLocation passed to getModRefInfo should be None (D35441)

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

6 years ago[sanitizer-coverage] relax an assertion
Kostya Serebryany [Tue, 1 Aug 2017 00:44:05 +0000 (00:44 +0000)]
[sanitizer-coverage] relax an assertion

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

6 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Tue, 1 Aug 2017 00:33:58 +0000 (00:33 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

6 years ago[ScheduleDAG] Don't schedule node with physical register interference
Eli Friedman [Tue, 1 Aug 2017 00:28:40 +0000 (00:28 +0000)]
[ScheduleDAG] Don't schedule node with physical register interference

https://reviews.llvm.org/D31536 didn't really solve the problem it was
trying to solve; it got rid of the assertion failure, but we were still
scheduling the DAG incorrectly (mixing together instructions from
different calls), leading to a MachineVerifier failure.

In order to schedule the DAG correctly, we have to make sure we don't
schedule a node which should be blocked by an interference. Fix
ScheduleDAGRRList::PickNodeToScheduleBottomUp so it doesn't pick a node
like that.

The added call to FindAvailableNode() is the key change here; this makes
sure we don't try to schedule a call while we're in the middle of
scheduling a different call. I'm not sure this is the right approach; in
particular, I'm not sure how to prove we don't end up with an infinite
loop of repeatedly backtracking.

This also reverts the code change from D31536. It doesn't do anything
useful: we should never schedule an ADJCALLSTACKDOWN unless we've
already scheduled the corresponding ADJCALLSTACKUP.

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

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

6 years agoAllow None as a MemoryLocation to getModRefInfo
Alina Sbirlea [Tue, 1 Aug 2017 00:28:29 +0000 (00:28 +0000)]
Allow None as a MemoryLocation to getModRefInfo

Summary:
Adding part of the changes in D30369 (needed to make progress):
Current patch updates AliasAnalysis and MemoryLocation, but does _not_ clean up MemorySSA.

Original summary from D30369, by dberlin:
Currently, we have instructions which affect memory but have no memory
location. If you call, for example, MemoryLocation::get on a fence,
it asserts. This means things specifically have to avoid that. It
also means we end up with a copy of each API, one taking a memory
location, one not.

This starts to fix that.

We add MemoryLocation::getOrNone as a new call, and reimplement the
old asserting version in terms of it.

We make MemoryLocation optional in the (Instruction, MemoryLocation)
version of getModRefInfo, and kill the old one argument version in
favor of passing None (it had one caller). Now both can handle fences
because you can just use MemoryLocation::getOrNone on an instruction
and it will return a correct answer.

We use all this to clean up part of MemorySSA that had to handle this difference.

Note that literally every actual getModRefInfo interface we have could be made private and replaced with:

getModRefInfo(Instruction, Optional<MemoryLocation>)
and
getModRefInfo(Instruction, Optional<MemoryLocation>, Instruction, Optional<MemoryLocation>)

and delegating to the right ones, if we wanted to.

I have not attempted to do this yet.

Reviewers: dberlin, davide, dblaikie

Subscribers: sanjoy, hfinkel, chandlerc, llvm-commits

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

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

6 years ago[AVX-512] Add unmasked subvector inserts and extract to the execution domain tables.
Craig Topper [Mon, 31 Jul 2017 22:07:29 +0000 (22:07 +0000)]
[AVX-512] Add unmasked subvector inserts and extract to the execution domain tables.

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

6 years agoDebugInfo: Put range base specifier entry functionality behind a flag
David Blaikie [Mon, 31 Jul 2017 21:48:42 +0000 (21:48 +0000)]
DebugInfo: Put range base specifier entry functionality behind a flag

Chromium's gold build seems to have trouble with this (gold produces
errors) - not sure if it's gold that's not coping with the valid
representation, or a bug in the implementation in LLVM, etc.

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

6 years ago[AVX512] Add a common prefix to avx512-insert-extract.ll so we can reduce the number...
Craig Topper [Mon, 31 Jul 2017 21:20:06 +0000 (21:20 +0000)]
[AVX512] Add a common prefix to avx512-insert-extract.ll so we can reduce the number of check lines on some test cases.

This was pointed out during the review for D313804.

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

6 years ago[codeview] Ignore DBG_VALUEs when choosing a BB start source loc
Reid Kleckner [Mon, 31 Jul 2017 21:03:08 +0000 (21:03 +0000)]
[codeview] Ignore DBG_VALUEs when choosing a BB start source loc

When the first instruction of a basic block has no location (consider a
LEA materializing the address of an alloca for a call), we want to start
the line table for the block with the first valid source location in the
block.  We need to ignore DBG_VALUE instructions during this scan to get
decent line tables.

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

6 years ago[InstCombine] allow mask hoisting transform for vector types
Sanjay Patel [Mon, 31 Jul 2017 21:01:53 +0000 (21:01 +0000)]
[InstCombine] allow mask hoisting transform for vector types

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

6 years ago[AVX-512] Use AVX512 as test check prefix instead of AVX3. NFC
Craig Topper [Mon, 31 Jul 2017 20:58:06 +0000 (20:58 +0000)]
[AVX-512] Use AVX512 as test check prefix instead of AVX3. NFC

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

6 years agoDebug Info: Also check the DWARF output in assembler-only test cases
Adrian Prantl [Mon, 31 Jul 2017 20:48:52 +0000 (20:48 +0000)]
Debug Info: Also check the DWARF output in assembler-only test cases

This will prevent me from introducing a regression in my next commit.

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

6 years agoUpdate phi nodes in LowerTypeTests control flow simplification
Peter Collingbourne [Mon, 31 Jul 2017 20:43:07 +0000 (20:43 +0000)]
Update phi nodes in LowerTypeTests control flow simplification

D33925 added a control flow simplification for -O2 --lto-O0 builds that
manually splits blocks and reassigns conditional branches but does not
correctly update phi nodes. If the else case being branched to had
incoming phi nodes the control-flow simplification would leave phi nodes
in that BB with an unhandled predecessor.

Patch by Vlad Tsyrklevich!

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

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

6 years ago[libFuzzer] implement __sanitizer_cov_pcs_init and add pc-table to build flags for...
Kostya Serebryany [Mon, 31 Jul 2017 20:20:59 +0000 (20:20 +0000)]
[libFuzzer] implement __sanitizer_cov_pcs_init and add pc-table to build flags for one test (for now)

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

6 years ago[X86][MMX] Added custom lowering action for MMX SELECT (PR30418)
Konstantin Belochapka [Mon, 31 Jul 2017 20:11:49 +0000 (20:11 +0000)]
[X86][MMX] Added custom lowering action for MMX SELECT (PR30418)
Fix for pr30418 - error in backend: Cannot select: t17: x86mmx = select_cc t2, Constant:i64<0>, t7, t8, seteq:ch
Differential Revision: https://reviews.llvm.org/D34661

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

6 years ago[InstCombine] add tests for mask hoisting; NFC
Sanjay Patel [Mon, 31 Jul 2017 20:02:04 +0000 (20:02 +0000)]
[InstCombine] add tests for mask hoisting; NFC

The scalar transforms exist with no test coverage. The vector equivalents are missing.

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

6 years ago[sanitizer-coverage] don't instrument available_externally functions
Kostya Serebryany [Mon, 31 Jul 2017 20:00:22 +0000 (20:00 +0000)]
[sanitizer-coverage] don't instrument available_externally functions

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

6 years ago[sanitizer-coverage] ensure minimal alignment for coverage counters and guards
Kostya Serebryany [Mon, 31 Jul 2017 19:49:45 +0000 (19:49 +0000)]
[sanitizer-coverage] ensure minimal alignment for coverage counters and guards

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

6 years ago[lld/pdb] Add an empty globals stream.
Zachary Turner [Mon, 31 Jul 2017 19:36:08 +0000 (19:36 +0000)]
[lld/pdb] Add an empty globals stream.

We don't write any actual symbols to this stream yet, but for
now we just create the stream and hook it up to the appropriate
places and give it a valid header.

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

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

6 years ago[SLPVectorizer] Unbreak the build with -Werror.
Davide Italiano [Mon, 31 Jul 2017 19:14:19 +0000 (19:14 +0000)]
[SLPVectorizer] Unbreak the build with -Werror.

GCC was complaining about `&&` within `||` without explicit
parentheses. NFCI.

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

6 years ago[X86][InstCombine] Add some simplifications for BZHI intrinsics
Craig Topper [Mon, 31 Jul 2017 18:52:15 +0000 (18:52 +0000)]
[X86][InstCombine] Add some simplifications for BZHI intrinsics

This intrinsic clears the upper bits starting at a specified index. If the index is a constant we can do some simplifications.

This could be in InstSimplify, but we don't handle any target specific intrinsics there today.

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

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

6 years ago[X86][InstCombine] Add basic simplification support for BEXTR/BEXTRI intrinsics.
Craig Topper [Mon, 31 Jul 2017 18:52:13 +0000 (18:52 +0000)]
[X86][InstCombine] Add basic simplification support for BEXTR/BEXTRI intrinsics.

This patch adds simplification support for the BEXTR/BEXTRI intrinsics to match gcc. This only supports cases that fold to 0 or can be fully constant folded. Theoretically we could support converting to AND if the shift part is unused or to only a shift if the mask doesn't modify any bits after an equivalent shl. gcc doesn't do these transformations either.

I put this in InstCombine, but it could be done in InstSimplify. It would be the first target specific intrinsic in InstSimplify.

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

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

6 years ago[lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs
Reid Kleckner [Mon, 31 Jul 2017 18:45:44 +0000 (18:45 +0000)]
[lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs

Summary:
This is an alternative solution to running the lit test suite on bots
without polluting the source directory. Each input test suite gets an
auto-generated site config in the build directory that points back to
the test input source directory.

This adds some cmake comlexity, but now we don't need to remove and
re-copy the test input directory before every test.

Reviewers: delcypher, modocache

Subscribers: mgorny, llvm-commits

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

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

6 years ago[llc][NFC] Update message in assert.
Quentin Colombet [Mon, 31 Jul 2017 18:31:04 +0000 (18:31 +0000)]
[llc][NFC] Update message in assert.

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

6 years ago[TargetPassConfig] Feature generic options to setup start/stop-after/before
Quentin Colombet [Mon, 31 Jul 2017 18:24:07 +0000 (18:24 +0000)]
[TargetPassConfig] Feature generic options to setup start/stop-after/before

This patch refactors the code used in llc such that all the users of the
addPassesToEmitFile API have access to a homogeneous way of handling
start/stop-after/before options right out of the box.

In particular, just invoking addPassesToEmitFile will set the proper
pipeline without additional effort (modulo parsing a .mir file if the
start-before/after options are used.

NFC.

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

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

6 years ago[CGP] use subtract or subtract-of-cmps for result of memcmp expansion
Sanjay Patel [Mon, 31 Jul 2017 18:08:24 +0000 (18:08 +0000)]
[CGP] use subtract or subtract-of-cmps for result of memcmp expansion

As noted in the code comment, transforming this in the other direction might require
a separate transform here in CGP given the block-at-a-time DAG constraint.

Besides that theoretical motivation, there are 2 practical motivations for the
subtract-of-cmps form:

1. The codegen for both x86 and PPC is better for this IR (though PPC could be better still).
   There is discussion about canonicalizing IR to the select form
   ( http://lists.llvm.org/pipermail/llvm-dev/2017-July/114885.html ),
   so we probably need to add DAG transforms for those patterns anyway, but this improves the
   memcmp output without waiting for that step.

2. If we allow vector-sized chunks for the load and compare, x86 is better prepared to convert
   that to optimal code when using subtract-of-cmps, so another prerequisite patch is avoided
   if we choose to enable that.

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

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

6 years ago[DWARF] Added verification check for tags in accelerator tables. This patch verifies...
Spyridoula Gravani [Mon, 31 Jul 2017 18:01:16 +0000 (18:01 +0000)]
[DWARF] Added verification check for tags in accelerator tables. This patch verifies that the atom tag is actually the same with the tag of the DIE that we retrieve from the table.

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

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

6 years ago[IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer
David Majnemer [Mon, 31 Jul 2017 17:47:07 +0000 (17:47 +0000)]
[IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer

We are not allowed to reason about an initializer value without first
consulting hasDefinitiveInitializer.

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

6 years ago[AVX-512] Remove patterns that select vmovdqu8/16 for unmasked loads. Prefer vmovdqa6...
Craig Topper [Mon, 31 Jul 2017 17:35:44 +0000 (17:35 +0000)]
[AVX-512] Remove patterns that select vmovdqu8/16 for unmasked loads. Prefer vmovdqa64/vmovdqu64 instead.

These were taking priority over the aligned load instructions since there is no vmovda8/16. I don't think there is really a difference between aligned and unaligned on newer cpus so I don't think it matters which instructions we use.

But with this change we reduce the size of the isel table a little and we allow the aligned information to pass through to the evex->vec pass and produce the same output has avx/avx2 in some cases.

I also generally dislike patterns rooted in a bitcast which these were.

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

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

6 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Mon, 31 Jul 2017 17:09:27 +0000 (17:09 +0000)]
Strip trailing whitespace. NFCI.

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

6 years agoFix typo in comment.
Simon Pilgrim [Mon, 31 Jul 2017 17:06:55 +0000 (17:06 +0000)]
Fix typo in comment.

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

6 years ago[GISel]: Support Widening G_ICMP's destination operand.
Aditya Nandakumar [Mon, 31 Jul 2017 17:00:16 +0000 (17:00 +0000)]
[GISel]: Support Widening G_ICMP's destination operand.

Updated AArch64 to widen destination to s32.
https://reviews.llvm.org/D35737

Reviewed by Tim

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

6 years agoDo not recombine FMA when that is not needed.
Amaury Sechet [Mon, 31 Jul 2017 16:56:25 +0000 (16:56 +0000)]
Do not recombine FMA when that is not needed.

Summary: As per title. This creates useless recombines.

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

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

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

6 years agoExclude more unused functions from release build.
Florian Hahn [Mon, 31 Jul 2017 16:44:28 +0000 (16:44 +0000)]
Exclude more unused functions from release build.

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

6 years agoExtend ifndef to printDebugLoc.
Florian Hahn [Mon, 31 Jul 2017 16:29:00 +0000 (16:29 +0000)]
Extend ifndef to printDebugLoc.

GCC7 did not warn about that, but Clang does.

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

6 years agoExtend ifdefs to more unused helper functions.
Florian Hahn [Mon, 31 Jul 2017 16:11:43 +0000 (16:11 +0000)]
Extend ifdefs to more unused helper functions.

This fixes a buildbot failure with -Werror introduced by r309553

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

6 years ago[DebugInfo] Don't overwrite DWARFUnit fields if the CU DIE doesn't have them.
Benjamin Kramer [Mon, 31 Jul 2017 15:32:39 +0000 (15:32 +0000)]
[DebugInfo] Don't overwrite DWARFUnit fields if the CU DIE doesn't have them.

DIEs are lazily deserialized so it's possible that the DWO CU is created
before the DIE is parsed. DWO shares .debug_addr and .debug_ranges with the
object file so overwriting the offset with 0 will make the CU unusable.

No test case because I couldn't get clang to emit a non-zero range base.

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

6 years ago[docker] Fix unmatched quote problem in here-document on older versions of bash
Don Hinton [Mon, 31 Jul 2017 15:18:57 +0000 (15:18 +0000)]
[docker] Fix unmatched quote problem in here-document on older versions of bash

Summary:
When outputing usage, emit here-document directly instead of
saving in a variable first -- avoids problem with bash 3.2.57 where an
unmatched ' in the here-document results in the following error:

./build_docker_image.sh: line 135: unexpected EOF while looking for matching `''

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)

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

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

6 years ago[SLP] Initial rework for min/max horizontal reduction vectorization, NFC.
Alexey Bataev [Mon, 31 Jul 2017 14:36:05 +0000 (14:36 +0000)]
[SLP] Initial rework for min/max horizontal reduction vectorization, NFC.

Summary: All getReductionCost() functions are renamed to getArithmeticReductionCost() + added basic infrastructure to handle non-binary reduction operations.

Reviewers: spatel, mzolotukhin, Ayal, mkuper, gilr, hfinkel

Subscribers: RKSimon, llvm-commits

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

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

6 years ago[X86] Extending a test cases for LEA factorization.
Simon Pilgrim [Mon, 31 Jul 2017 14:23:28 +0000 (14:23 +0000)]
[X86] Extending a test cases for LEA factorization.

Submitted on the behalf of Jatin Bhateja

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

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

6 years ago[Cost] Rename getReductionCost() to getArithmeticReductionCost(), NFC.
Alexey Bataev [Mon, 31 Jul 2017 14:19:32 +0000 (14:19 +0000)]
[Cost] Rename getReductionCost() to getArithmeticReductionCost(), NFC.

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

6 years ago[SelectionDAG][mips] Fix PR33883
Simon Dardis [Mon, 31 Jul 2017 14:06:58 +0000 (14:06 +0000)]
[SelectionDAG][mips] Fix PR33883

PR33883 shows that calls to intrinsic functions should not have their vector
arguments or returns subject to ABI changes required by the target.

This resolves PR33883.

Thanks to Alex Crichton for reporting the issue!

Reviewers: zoran.jovanovic, atanasyan

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

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

6 years ago[LV] Avoid redundant operations manipulating masks
Ayal Zaks [Mon, 31 Jul 2017 13:21:42 +0000 (13:21 +0000)]
[LV] Avoid redundant operations manipulating masks

The Loop Vectorizer generates redundant operations when manipulating masks:
AND with true, OR with false, compare equal to true. Instead of relying on
a subsequent pass to clean them up, this patch avoids generating them.

Use null (no-mask) to represent all-one full masks, instead of a constant
all-one vector, following the convention of masked gathers and scatters.

Preparing for a follow-up VPlan patch in which these mask manipulating
operations are modeled using recipes.

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

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

6 years ago[llvm-dlltool] Write correct weak externals
Martin Storsjo [Mon, 31 Jul 2017 11:18:41 +0000 (11:18 +0000)]
[llvm-dlltool] Write correct weak externals

Previously, the created object files for the import library were broken.
Write the symbol table before the string table. Simplify the code by
using a separate variable Prefix instead of duplicating a few lines.

Also update the coff-weak-exports to actually check that the generated
weak symbols can be found as intended.

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

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

6 years agoGuard print() functions only used by dump() functions.
Florian Hahn [Mon, 31 Jul 2017 10:07:49 +0000 (10:07 +0000)]
Guard print() functions only used by dump() functions.

Summary:
Since  r293359, most dump() function are only defined when
`!defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` holds. print() functions
only used by dump() functions are now unused in release builds,
generating lots of warnings. This patch only defines some print()
functions if they are used.

Reviewers: MatzeB

Reviewed By: MatzeB

Subscribers: arsenm, mzolotukhin, nhaehnle, llvm-commits

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

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

6 years ago[Modules] llvm-config: Exclude CMAKE_CFG_INTDIR. It isn't used in headers.
NAKAMURA Takumi [Mon, 31 Jul 2017 10:07:13 +0000 (10:07 +0000)]
[Modules] llvm-config: Exclude CMAKE_CFG_INTDIR. It isn't used in headers.

This is part of https://reviews.llvm.org/D35559

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

6 years ago[Support/GlobPattern] - Do not crash when pattern has characters with int value < 0.
George Rimar [Mon, 31 Jul 2017 09:26:50 +0000 (09:26 +0000)]
[Support/GlobPattern] - Do not crash when pattern has characters with int value < 0.

Found it during work on LLD, it would crash on following
linker script:

SECTIONS { .foo : { *("*®") } }
That happens because ® has int value -82. And chars are used as
array index in code, and are signed by default.

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

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

6 years ago[LoopInterchange] Do not interchange loops with function calls.
Florian Hahn [Mon, 31 Jul 2017 09:00:52 +0000 (09:00 +0000)]
[LoopInterchange] Do not interchange loops with function calls.

Summary:
Without any information about the called function, we cannot be sure
that it is safe to interchange loops which contain function calls. For
example there could be dependences that prevent interchanging between
accesses in the called function and the loops. Even functions without any
parameters could cause problems, as they could access memory using
global pointers.

For now, I think it is only safe to interchange loops with calls marked
as readnone.

With this patch, the LLVM test suite passes with `-O3 -mllvm
-enable-loopinterchange` and LoopInterchangeProfitability::isProfitable
returning true for all loops. check-llvm and check-clang also pass when
bootstrapped in a similar fashion, although only 3 loops got
interchanged.

Reviewers: karthikthecool, blitz.opensource, hfinkel, mcrosier, mkuper

Reviewed By: mcrosier

Subscribers: mzolotukhin, llvm-commits

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

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

6 years ago[X86][AVX512] Add masked MOVS[S|D] patterns
Guy Blank [Mon, 31 Jul 2017 08:26:14 +0000 (08:26 +0000)]
[X86][AVX512] Add masked MOVS[S|D] patterns

Added patterns to recognize AND 1 on the mask of a scalar masked
move is not needed since only the lower bit is relevant for the
instruction.

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

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

6 years ago[SLP]: Add test to resurrect the jumbled load patch. This test has multiple uses
Mohammad Shahid [Mon, 31 Jul 2017 07:40:54 +0000 (07:40 +0000)]
[SLP]: Add test to resurrect the jumbled load patch. This test has multiple uses
of memory loads by different user

Change-Id: I40b5ba8b810265440f3e55efca77c4b41ca98fa4

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

6 years ago[PowerPC] Change method names; NFC
Hiroshi Inoue [Mon, 31 Jul 2017 06:27:09 +0000 (06:27 +0000)]
[PowerPC] Change method names; NFC

Changed method names based on the discussion in https://reviews.llvm.org/D34986:
getInt64 -> selectI64Imm,
getInt64Count -> selectI64ImmInstrCount.

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

6 years ago[X86] Add pattern to use bzhi for 64-bit 'and' with a mask when there is a load involved.
Craig Topper [Mon, 31 Jul 2017 05:55:54 +0000 (05:55 +0000)]
[X86] Add pattern to use bzhi for 64-bit 'and' with a mask when there is a load involved.

We already had a pattern without load, but with a load we were falling back to a regular 'and' due to pattern complexity priority.

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

6 years agogold/CMakeLists.txt: Prune (-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64).
NAKAMURA Takumi [Mon, 31 Jul 2017 00:39:22 +0000 (00:39 +0000)]
gold/CMakeLists.txt: Prune (-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64).

They are handled in HandleLLVMOptions.cmake for -m32.
They are not required for -m64.

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

6 years agoPrune trailing linefeed at eof.
NAKAMURA Takumi [Mon, 31 Jul 2017 00:39:19 +0000 (00:39 +0000)]
Prune trailing linefeed at eof.

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

6 years agoDebugInfo: Fix r309526, ensure resetting base address selection entries are used
David Blaikie [Mon, 31 Jul 2017 00:18:24 +0000 (00:18 +0000)]
DebugInfo: Fix r309526, ensure resetting base address selection entries are used

Missed the resetting base address selections when going from a base
address version to zero base address for non-base-addressed entries.

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

6 years agoDebugInfo: Use base address selection entries in debug_ranges to reduce relocations
David Blaikie [Sun, 30 Jul 2017 22:10:00 +0000 (22:10 +0000)]
DebugInfo: Use base address selection entries in debug_ranges to reduce relocations

(from comments in the test)
Group ranges in a range list that apply to the same section and use a base
address selection entry to reduce the number of relocations to one reloc per
section per range list. DWARF5 debug_rnglist will be more efficient than this
in terms of relocations, but it's still better than one reloc per entry in a
range list.

This is an object/executable size tradeoff - shrinking objects, but growing
the linked executable. In one large binary tested, total object size (not just
debug info) shrank by 16%, entirely relocation entries. Linked executable
grew by 4%. This was with compressed debug info in the objects, uncompressed
in the linked executable. Without compression in the objects, the win would be
smaller (the growth of debug_ranges itself would be more significant).

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

6 years agotest: add an additional cfi_return_column test
Saleem Abdulrasool [Sun, 30 Jul 2017 21:30:54 +0000 (21:30 +0000)]
test: add an additional cfi_return_column test

Ensure that we still coalesce identical CIEs across FDEs even with
cfi_return_column alterations.

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

6 years agotest: make the test clearer (NFC)
Saleem Abdulrasool [Sun, 30 Jul 2017 21:30:53 +0000 (21:30 +0000)]
test: make the test clearer (NFC)

Use `llvm-objdump -dwarf=frames` to dump the .eh_frame to validate the
output textually rather than compare the binary output.  This makes it
easier to see what is being checked.  NFC.

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

6 years agoNFC: spell correction.
Lama Saba [Sun, 30 Jul 2017 20:12:17 +0000 (20:12 +0000)]
NFC: spell correction.

On behalf of jbhateja

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

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

6 years agoFix typo in comment
Tobias Grosser [Sun, 30 Jul 2017 18:01:16 +0000 (18:01 +0000)]
Fix typo in comment

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

6 years agollvm-symbolizer/print_context.c test: Make debug info path independent
David Blaikie [Sun, 30 Jul 2017 17:26:34 +0000 (17:26 +0000)]
llvm-symbolizer/print_context.c test: Make debug info path independent

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

6 years agollvm-symbolizer: Make test portable using an explicit object file rather than the...
David Blaikie [Sun, 30 Jul 2017 17:16:32 +0000 (17:16 +0000)]
llvm-symbolizer: Make test portable using an explicit object file rather than the host compiler

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

6 years agoMake test robust to changes in prefix/avoid hardcoded line numbers
David Blaikie [Sun, 30 Jul 2017 16:05:26 +0000 (16:05 +0000)]
Make test robust to changes in prefix/avoid hardcoded line numbers

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

6 years agoRevert "[AVR] Mark a failing symbolizer test as XFAIL"
Dylan McKay [Sun, 30 Jul 2017 15:38:07 +0000 (15:38 +0000)]
Revert "[AVR] Mark a failing symbolizer test as XFAIL"

This reverts commit 83a0e876349adb646ba858eb177b22b0b4bfc59a.

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

6 years agoDebugInfo: Fix for CU index usage in 309507
David Blaikie [Sun, 30 Jul 2017 15:15:58 +0000 (15:15 +0000)]
DebugInfo: Fix for CU index usage in 309507

Not sure quite how I failed so clearly to test this, but anyway.

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

6 years ago[AVR] Mark a failing symbolizer test as XFAIL
Dylan McKay [Sun, 30 Jul 2017 14:55:11 +0000 (14:55 +0000)]
[AVR] Mark a failing symbolizer test as XFAIL

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

6 years agoExpanding the test case for vf8 for stride 4 interleaved.
Michael Zuckerman [Sun, 30 Jul 2017 11:54:57 +0000 (11:54 +0000)]
Expanding the test case for vf8 for stride 4 interleaved.

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

6 years ago[x86][inline-asm][ms-compat] legalize the use of "jc/jz short <op>"
Coby Tayree [Sun, 30 Jul 2017 11:12:47 +0000 (11:12 +0000)]
[x86][inline-asm][ms-compat] legalize the use of "jc/jz short <op>"

MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same.
Test: D35893

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

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

6 years agoDebugInfo: Use DWP cu_index to speed up symbolizing (as intended)
David Blaikie [Sun, 30 Jul 2017 08:12:07 +0000 (08:12 +0000)]
DebugInfo: Use DWP cu_index to speed up symbolizing (as intended)

I was a bit lazy when I first implemented this & skipped the index
lookup - obviously for large files this becomes pretty crucial, so here
we go, do the index lookup. Speeds up large DWP symbolizing by... lots.
(20m -> 20s, actually, maybe more in a release build (that was a release
build without index lookup, compared to a debug/non-release build with
the index usage))

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

6 years agoDebugInfo: Group member variable along with the rest
David Blaikie [Sun, 30 Jul 2017 08:12:05 +0000 (08:12 +0000)]
DebugInfo: Group member variable along with the rest

Committed in r309498 I didn't spot where the rest of the private members
were in DWARFContext at the time - group them up again.

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

6 years ago[X86] Add addsub intrinsics to the intrinsic lowering table so we have a single set...
Craig Topper [Sun, 30 Jul 2017 06:02:59 +0000 (06:02 +0000)]
[X86] Add addsub intrinsics to the intrinsic lowering table so we have a single set of isel patterns.

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

6 years agoRefactor the build{Module|Function}SimplificationPipeline to expose optimization...
Dehao Chen [Sun, 30 Jul 2017 04:55:39 +0000 (04:55 +0000)]
Refactor the build{Module|Function}SimplificationPipeline to expose optimization phase.

Summary: This is in preparation of https://reviews.llvm.org/D36052

Reviewers: chandlerc, davidxl, tejohnson

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits

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

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

6 years agoDebugInfo: Provide option for explicitly specifying the name of the DWP file
David Blaikie [Sun, 30 Jul 2017 01:34:08 +0000 (01:34 +0000)]
DebugInfo: Provide option for explicitly specifying the name of the DWP file

If you've archived the DWP file somewhere it's probably useful to be
able to just tell llvm-symbolizer where it is when you're symbolizing
stack traces from the binary.

This only provides a mechanism for specifying a single DWP file, good if
you're symbolizing a program with a single DWP file, but it's likely if
the program is dynamically linked that you might have a DWP for each
dynamic library - in which case this feature won't help (at least as
it's surfaced in llvm-symbolizer for now) - in theory it could be
extended to specify a collection of DWP files that could all be
consulted for split CU hash resolution.

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

6 years agoMigrate PGOMemOptSizeOpt to use new OptimizationRemarkEmitter Pass
Sam Elliott [Sun, 30 Jul 2017 00:35:33 +0000 (00:35 +0000)]
Migrate PGOMemOptSizeOpt to use new OptimizationRemarkEmitter Pass

Summary:
Fixes PR33790.

This patch still needs a yaml-style test, which I shall write tomorrow

Reviewers: anemet

Reviewed By: anemet

Subscribers: anemet, llvm-commits

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

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

6 years ago[AArch64] Tie source and destination operands for AESMC/AESIMC.
Florian Hahn [Sat, 29 Jul 2017 20:35:28 +0000 (20:35 +0000)]
[AArch64] Tie source and destination operands for AESMC/AESIMC.

Summary:
Most CPUs implementing AES fusion require instruction pairs of the form
    AESE Vn, _
    AESMC Vn, Vn
and
    AESD Vn, _
    AESIMC Vn, Vn

The constraint is added to AES(I)MC instructions which use the result of
an AES(E|D) instruction by using AES(I)MCTrr pseudo instructions, which
constraint source and destination registers to be the same.

A nice side effect of this change is that now all possible pairs are
scheduled back-to-back on the exynos-m1 for the misched-fusion-aes.ll
test case.

I had to update aes_load_store. The version I added initially was very
reduced and with the new constraint, AESE/AESMC could not be scheduled
back-to-back. I updated the test to be more realistic and still expose
the same scheduling problem as the initial test case.

Reviewers: t.p.northover, rengolin, evandro, kristof.beyls, silviu.baranga

Reviewed By: t.p.northover, evandro

Subscribers: aemerson, javed.absar, llvm-commits

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

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

6 years ago[AArch64] Use 8 bytes as preferred function alignment on Cortex-A53.
Florian Hahn [Sat, 29 Jul 2017 20:04:54 +0000 (20:04 +0000)]
[AArch64] Use 8 bytes as preferred function alignment on Cortex-A53.

Summary:
This change gives a 0.25% speedup on execution time, a 0.82% improvement
in benchmark scores and a 0.20% increase in binary size on a Cortex-A53.
These numbers are the geomean results on a wide range of benchmarks from
the test-suite and a range of proprietary suites.

Reviewers: t.p.northover, aadg, silviu.baranga, mcrosier, rengolin

Reviewed By: rengolin

Subscribers: grimar, davide, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits

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

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

6 years agoMC: simplify internal function call parameter
Saleem Abdulrasool [Sat, 29 Jul 2017 20:03:02 +0000 (20:03 +0000)]
MC: simplify internal function call parameter

Rather than passing along most of the parameters, pass a reference to
the MCDWARFrameInfo instead.  This makes it easier to pass additional
information about the frame to the checks.  We need to keep the extra
constructor for the Key around to allow the construction of the null and
tombstone keys.  NFC.

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

6 years agoMC: account for the return column in the CIE key
Saleem Abdulrasool [Sat, 29 Jul 2017 20:03:00 +0000 (20:03 +0000)]
MC: account for the return column in the CIE key

If the return column is different, we cannot coalesce the CIE across the
FDEs.  Add that to the key calculation.  This ensures that we emit a
separate CIE.

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