OSDN Git Service

android-x86/external-llvm.git
7 years agoMove GVNHoist to the right position in the new pass manager pipeline.
Davide Italiano [Thu, 1 Jun 2017 23:08:14 +0000 (23:08 +0000)]
Move GVNHoist to the right position in the new pass manager pipeline.

GVNHoist was moved as part of simplification passes for the current
pass manager (but not for the new), so they're out-of-sync.

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

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

7 years agoFix compiler_rt buildbot failure
Xinliang David Li [Thu, 1 Jun 2017 23:05:11 +0000 (23:05 +0000)]
Fix compiler_rt buildbot failure

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

7 years agoReapply "[Cloning] Take another pass at properly cloning debug info"
Keno Fischer [Thu, 1 Jun 2017 23:02:12 +0000 (23:02 +0000)]
Reapply "[Cloning] Take another pass at properly cloning debug info"

This was rL304226, reverted in 304228 due to a clang assertion failure
on the build bots. That problem should have been addressed by clang
commit rL304470.

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

7 years agoFix -Wreorder warnings.
Zachary Turner [Thu, 1 Jun 2017 22:03:17 +0000 (22:03 +0000)]
Fix -Wreorder warnings.

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

7 years ago[CodeView] Properly align symbol records on read/write.
Zachary Turner [Thu, 1 Jun 2017 21:52:41 +0000 (21:52 +0000)]
[CodeView] Properly align symbol records on read/write.

Object files have symbol records not aligned to any particular
boundary (e.g. 1-byte aligned), while PDB files have symbol
records padded to 4-byte aligned boundaries.  Since they share
the same reading / writing code, we have to provide an option to
specify the alignment and propagate it up to the producer or
consumer who knows what the alignment is supposed to be for the
given container type.

Added a test for this by modifying the existing PDB -> YAML -> PDB
round-tripping code to round trip symbol records as well as types.

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

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

7 years ago[AMDGPU] Fix kernel arg segment size for amdgizcl
Yaxun Liu [Thu, 1 Jun 2017 21:31:53 +0000 (21:31 +0000)]
[AMDGPU] Fix kernel arg segment size for amdgizcl

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

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

7 years agoAdd opt-bisect support for region passes.
Eli Friedman [Thu, 1 Jun 2017 21:22:26 +0000 (21:22 +0000)]
Add opt-bisect support for region passes.

This is necessary to get opt-bisect working with polly.

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

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

7 years ago[InstSimplify][ConstantFolding] Add test demonstrating failure to simplify (icmp...
Craig Topper [Thu, 1 Jun 2017 21:20:07 +0000 (21:20 +0000)]
[InstSimplify][ConstantFolding] Add test demonstrating failure to simplify (icmp eq null, inttoptr x) when the null is on the left hand side. NFC

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

7 years agoDbgValueHistoryCalculator: Ignore call instructions that claim to clobber SP.
Adrian Prantl [Thu, 1 Jun 2017 21:14:58 +0000 (21:14 +0000)]
DbgValueHistoryCalculator: Ignore call instructions that claim to clobber SP.

The AArch64 backend marks calls that involve aggregate function
arguments as having an implicit def of SP. We already have the same
workaround in LiveDebugValues and in DbgValueHistoryCalculator for SP
clobbers in register masks. This adds register defs to the list.

Fixes rdar://problem/30361929 and Swift SR-3851.

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

7 years ago[PGO] Adjust indirect call promotion threshold
Teresa Johnson [Thu, 1 Jun 2017 21:10:10 +0000 (21:10 +0000)]
[PGO] Adjust indirect call promotion threshold

Summary:
Reduce min percent required for indirect call promotion from 33% to 30%,
which matches gcc's threshold and catches the same hot opportunities.

Reviewers: davidxl

Subscribers: llvm-commits

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

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

7 years ago[llvm-config] Don't use PATH_MAX
Keno Fischer [Thu, 1 Jun 2017 20:51:55 +0000 (20:51 +0000)]
[llvm-config] Don't use PATH_MAX

It doesn't exist on Windows. The number we use here doesn't really matter,
the storage will expand automatically but 256 seems like a reasonable default.
Should fix windows buildbots that complained about rL304458.

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

7 years ago[DIBuilder] Add a more fine-grained finalization method
Keno Fischer [Thu, 1 Jun 2017 20:42:44 +0000 (20:42 +0000)]
[DIBuilder] Add a more fine-grained finalization method

Summary:
Clang wants to clone a function before it is done building the entire
compilation unit. As of now, there is no good way to do that, because
CloneFunction doesn't like dealing with temporary metadata. However,
as long as clang doesn't want to add any variables to this SP, it
should be fine to just prematurely finalize it. Add an API to allow this.

This is done in preparation of a clang commit to fix the assertion that
necessitated the revert of D33655.

Reviewers: aprantl, dblaikie

Subscribers: llvm-commits

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

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

7 years ago(NFC) Track global summary liveness in GVFlags.
Evgeniy Stepanov [Thu, 1 Jun 2017 20:30:06 +0000 (20:30 +0000)]
(NFC) Track global summary liveness in GVFlags.

Replace GVFlags::LiveRoot with GVFlags::Live and use that instead of
all the DeadSymbols sets. This is refactoring in order to make
liveness information available in the RegularLTO pipeline.

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

7 years ago[SDAG] Fix CombineTo ordering in visitZERO_EXTEND and visitSIGN_EXTEND
Nirav Dave [Thu, 1 Jun 2017 19:33:50 +0000 (19:33 +0000)]
[SDAG] Fix CombineTo ordering in visitZERO_EXTEND and visitSIGN_EXTEND

Reorder CombineTo Calls to prevent references to stale/deleted SDNodes which caused undue assertions.

Reviewers: dbabokin

Subscribers: aemerson, rengolin, llvm-commits

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

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

7 years ago[llvm-config] Report --bindir based on LLVM_TOOLS_INSTALL_DIR
Keno Fischer [Thu, 1 Jun 2017 19:20:33 +0000 (19:20 +0000)]
[llvm-config] Report --bindir based on LLVM_TOOLS_INSTALL_DIR

Summary:
`LLVM_TOOLS_INSTALL_DIR` was introduced in r272200 in order to override the directory
name into which to install LLVM's executable. However, `llvm-config --bindir` still reported
`$PREFIX/bin` independent of what LLVM_TOOLS_INSTALL_DIR was set to.

This fixes the out-of-tree clang standalone build for me.

Reviewers: beanz, tstellar

Reviewed By: tstellar

Subscribers: chapuni, tstellar, llvm-commits

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

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

7 years agoPrefer static namespace-scoped variables over anon namespacing per style guide
David Blaikie [Thu, 1 Jun 2017 19:20:26 +0000 (19:20 +0000)]
Prefer static namespace-scoped variables over anon namespacing per style guide

Also for consistency with the immediately preceeding variable
definition.

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

7 years ago[InlineCost] Add a test case for GEP cost
Haicheng Wu [Thu, 1 Jun 2017 19:06:07 +0000 (19:06 +0000)]
[InlineCost] Add a test case for GEP cost

The added test case is to check whether the simplified value is passed to
getGEPCost().

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

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

7 years ago[Profile] Fix builtin_expect lowering bug
Xinliang David Li [Thu, 1 Jun 2017 19:05:55 +0000 (19:05 +0000)]
[Profile] Fix builtin_expect lowering bug

The lowerer wrongly assumes the ICMP instruction
 1) always has a constant operand;
 2) the operand has value 0.

It also assumes the expected value can only be one, thus
other values other than one will be considered 'zero'.

This leads to wrong profile annotation when other integer values
are used other than 0, 1 in the comparison or in the expect intrinsic.

Also missing is handling of equal predicate.

This patch fixes all the above problems.

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

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

7 years ago[PartialInlining] Emit branch info and profile data as remarks
Xinliang David Li [Thu, 1 Jun 2017 18:58:50 +0000 (18:58 +0000)]
[PartialInlining] Emit branch info and profile data as remarks

This allows us to collect profile statistics to tune static
branch prediction.

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

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

7 years ago[PredicateInfo] Fix non-determinism in codegen uncovered by reverse iterating SmallPtrSet
Mandeep Singh Grang [Thu, 1 Jun 2017 18:36:24 +0000 (18:36 +0000)]
[PredicateInfo] Fix non-determinism in codegen uncovered by reverse iterating SmallPtrSet

Summary:
Sort OpsToRename before iterating to make iteration order deterministic.

Thanks to Daniel Berlin for the sorting logic.

Reviewers: dberlin, RKSimon, efriedma, davide

Reviewed By: dberlin, davide

Subscribers: sanjoy, davide, llvm-commits

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

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

7 years ago[DWARF] Introduce Dump Options
Adrian Prantl [Thu, 1 Jun 2017 18:18:23 +0000 (18:18 +0000)]
[DWARF] Introduce Dump Options

This commit introduces a structure that holds all the flags that
control the pretty printing of dwarf output.

Patch by Spyridoula Gravani!

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

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

7 years ago[Hexagon] Fix dependence check in the packetizer
Krzysztof Parzyszek [Thu, 1 Jun 2017 18:02:40 +0000 (18:02 +0000)]
[Hexagon] Fix dependence check in the packetizer

An incorrect check in the packetizer lead to an attempt to convert
an unconditional branch to a .new (conditional) form.

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

7 years ago[Hexagon] Handle long-running simplification loop in idiom recognition
Krzysztof Parzyszek [Thu, 1 Jun 2017 18:00:47 +0000 (18:00 +0000)]
[Hexagon] Handle long-running simplification loop in idiom recognition

The initial assumption was that the simplification would converge to a
fixed point relatvely quickly. Turns out that there are legitimate situa-
tions where the complexity of the code causes it to take a large number
of iterations.

Two main changes:
- Instead of aborting upon hitting the limit, simply return nullptr.
- Reduce the limit to 10,000 from 100,000.

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

7 years agoRemove ADDC, ADDE, SUBC, SUBE and SETCCE support from the X86 backend, use the CARRY...
Amaury Sechet [Thu, 1 Jun 2017 16:33:08 +0000 (16:33 +0000)]
Remove ADDC, ADDE, SUBC, SUBE and SETCCE support from the X86 backend, use the CARRY ops instead.

Summary:
As per title. This cleanup some technical debt.

Depends on D33374

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

Subscribers: llvm-commits

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

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

7 years agoAMDGPU: Remove error on call in AsmPrinter
Matt Arsenault [Thu, 1 Jun 2017 15:05:15 +0000 (15:05 +0000)]
AMDGPU: Remove error on call in AsmPrinter

Partial revert of r301938 which is making it harder
to split patches up.

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

7 years agoDAG: Remove pointless type check
Matt Arsenault [Thu, 1 Jun 2017 14:49:46 +0000 (14:49 +0000)]
DAG: Remove pointless type check

These are only integer operations.

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

7 years agoAMDGPU: Set high getCSRFirstUseCost
Matt Arsenault [Thu, 1 Jun 2017 14:38:02 +0000 (14:38 +0000)]
AMDGPU: Set high getCSRFirstUseCost

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

7 years agoFix addcarry-crash.ll
Amaury Sechet [Thu, 1 Jun 2017 14:24:31 +0000 (14:24 +0000)]
Fix addcarry-crash.ll

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

7 years agoAdd regression test for the addcarry crash. See D33770 for context.
Amaury Sechet [Thu, 1 Jun 2017 14:09:56 +0000 (14:09 +0000)]
Add regression test for the addcarry crash. See D33770 for context.

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

7 years ago[ARM] Create relocations for Thumb functions calling ARM fns in ELF.
Florian Hahn [Thu, 1 Jun 2017 13:50:57 +0000 (13:50 +0000)]
[ARM] Create relocations for Thumb functions calling ARM fns in ELF.

Summary:
Without using a fixup in this case, BL will be used instead of BLX to
call internal ARM functions from Thumb functions.

Reviewers: rafael, t.p.northover, peter.smith, kristof.beyls

Reviewed By: peter.smith

Subscribers: srhines, echristo, aemerson, rengolin, javed.absar, llvm-commits

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

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

7 years ago[Solaris] Fix PR33228 - llvm::sys::fs::is_local_impl done right
Kamil Rytarowski [Thu, 1 Jun 2017 12:57:00 +0000 (12:57 +0000)]
[Solaris] Fix PR33228 - llvm::sys::fs::is_local_impl done right

Summary:
Solaris-specific implementation for llvm::sys::fs::is_local_impl.
FStype pattern matching might be a bit unreliable, but at least it fixes the build failure.

Reviewers: mgorny, nlopes, llvm-commits, krytarowski

Reviewed By: krytarowski

Subscribers: voskresensky.vladimir, krytarowski

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

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

7 years agoOnly generate addcarry node when it is legal.
Amaury Sechet [Thu, 1 Jun 2017 12:03:16 +0000 (12:03 +0000)]
Only generate addcarry node when it is legal.

Summary:
This is a problem uncovered by stage2 testing. ADDCARRY end up being generated on target that do not support it.

The patch that introduced the problem has other patches layed on top of it, so we want to fix the issue rather than revert it to avoid creating a lor of churn.

A regression test will be added shortly, but this is committed as this in order to get the build back to green promptly.

Subscribers: llvm-commits

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

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

7 years ago[PM/ThinLTO] Port the ThinLTO pipeline (both components) to the new PM.
Chandler Carruth [Thu, 1 Jun 2017 11:39:39 +0000 (11:39 +0000)]
[PM/ThinLTO] Port the ThinLTO pipeline (both components) to the new PM.

Based on the original patch by Davide, but I've adjusted the API exposed
to just be different entry points rather than exposing more state
parameters. I've factored all the common logic out so that we don't have
any duplicate pipelines, we just stitch them together in different ways.
I think this makes the build easier to reason about and understand.

This adds a direct method for getting the module simplification pipeline
as well as a method to get the optimization pipeline. While not my
express goal, this seems nice and gives a good place comment about the
restrictions that are imposed on them.

I did make some minor changes to the way the pipelines are structured
here, but hopefully not ones that are significant or controversial:

1) I sunk the PGO indirect call promotion to only be run when we have
   PGO enabled (or as part of the special ThinLTO pipeline).

2) I made the extra GlobalOpt run in ThinLTO just happen all the time
   and at a slightly more powerful place (before we remove available
   externaly functions). This seems like general goodness and not a big
   compile time sink, so it didn't make sense to *only* use it in
   ThinLTO. Fewer differences in the pipeline makes everything simpler
   IMO.

3) I hoisted the ThinLTO stop point pre-link above the the RPO function
   attr inference. The RPO inference won't infer anything terribly
   meaningful pre-link (recursiveness?) so it didn't make a lot of
   sense. But if the placement of RPO inference starts to matter, we
   should move it to the canonicalization phase anyways which seems like
   a better place for it (and there is a FIXME to this effect!). But
   that seemed a bridge too far for this patch.

If we ever need to parameterize these pipelines more heavily, we can
always sink the logic to helper functions with parameters to keep those
parameters out of the public API. But the changes above seemed minor
that we could possible get away without the parameters entirely.

I added support for parsing 'thinlto' and 'thinlto-pre-link' names in
pass pipelines to make it easy to test these routines and play with them
in larger pipelines. I also added a really basic manifest of passes test
that will show exactly how the pipelines behave and work as well as
making updates to them clear.

Lastly, this factoring does introduce a nesting layer of module pass
managers in the default pipeline. I don't think this is a big deal and
the flexibility of decoupling the pipelines seems easily worth it.

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

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

7 years ago[X86] Match bitcast of vxi1 to pmovmsk
Zvi Rackover [Thu, 1 Jun 2017 11:27:57 +0000 (11:27 +0000)]
[X86] Match bitcast of vxi1 to pmovmsk

Summary:
Add an early combine to match patterns such as:
  (i16 bitcast (v16i1 x))
  ->
  (i16 movmsk (v16i8 sext (v16i1 x)))

This combine needs to happen early enough before
type-legalization scalarizes the result of the setcc.

Reviewers: igorb, craig.topper, RKSimon

Subscribers: delena, llvm-commits

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

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

7 years agoDo not legalize large setcc with setcce, introduce setcccarry and do it with usubo...
Amaury Sechet [Thu, 1 Jun 2017 11:14:17 +0000 (11:14 +0000)]
Do not legalize large setcc with setcce, introduce setcccarry and do it with usubo/setcccarry.

Summary:
This is a continuation of the work started in D29872 . Passing the carry down as a value rather than as a glue allows for further optimizations. Introducing setcccarry makes the use of addc/subc unecessary and we can start the removal process.

This patch only introduce the optimization strictly required to get the same level of optimization as was available before nothing more.

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

Subscribers: llvm-commits

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

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

7 years agoRemove ISD::SETCC match from combineX86ADD. It's done improperly and doesn't work.
Amaury Sechet [Thu, 1 Jun 2017 11:13:10 +0000 (11:13 +0000)]
Remove ISD::SETCC match from combineX86ADD. It's done improperly and doesn't work.

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

7 years ago[DAGCombine] Refactor common addcarry pattern.
Amaury Sechet [Thu, 1 Jun 2017 10:48:04 +0000 (10:48 +0000)]
[DAGCombine] Refactor common addcarry pattern.

Summary: This pattern is no very useful per se, but it exposes optimization for toehr patterns that wouldn't kick in otherwize. It's very common and worth optimizing for.

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

Subscribers: llvm-commits

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

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

7 years ago[DAGCombine] (add/uaddo X, Carry) -> (addcarry X, 0, Carry)
Amaury Sechet [Thu, 1 Jun 2017 10:42:39 +0000 (10:42 +0000)]
[DAGCombine] (add/uaddo X, Carry) -> (addcarry X, 0, Carry)

Summary:
This enables further transforms.

Depends on D32916

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

Subscribers: llvm-commits

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

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

7 years agoMake mcpu=generic the default for armv7-a and armv8-a.
Kristof Beyls [Thu, 1 Jun 2017 07:31:43 +0000 (07:31 +0000)]
Make mcpu=generic the default for armv7-a and armv8-a.

As discussed in
http://lists.llvm.org/pipermail/llvm-dev/2017-May/113525.html

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

7 years ago[TableGen] Remove RecordVal constructor that takes a StringRef and Record::setName...
Craig Topper [Thu, 1 Jun 2017 06:56:16 +0000 (06:56 +0000)]
[TableGen] Remove RecordVal constructor that takes a StringRef and Record::setName(StringRef). Leave just the versions that take an Init.

They weren't used often enough to justify having two different interfaces. Push the responsiblity of creating a StringInit up to the caller.

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

7 years ago[TableGen] Remove code for renaming anonymous register classes as it can never execute.
Craig Topper [Thu, 1 Jun 2017 06:56:13 +0000 (06:56 +0000)]
[TableGen] Remove code for renaming anonymous register classes as it can never execute.

It tried to detect 9 letters (the length of anonymous) followed by a period. But anonymous classes start with "anonymous_" rather than "anonymous." these days.

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

7 years ago[TableGen] Use StringRef to capture getValueAsString in a couple more places. NFC
Craig Topper [Thu, 1 Jun 2017 06:56:11 +0000 (06:56 +0000)]
[TableGen] Use StringRef to capture getValueAsString in a couple more places. NFC

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

7 years ago[ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.
Tim Shen [Thu, 1 Jun 2017 01:02:12 +0000 (01:02 +0000)]
[ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

Summary: Also see D33429 for other ThinLTO + New PM related changes.

Reviewers: davide, chandlerc, tejohnson

Subscribers: mehdi_amini, Prazek, cfe-commits, inglorion, llvm-commits, eraman

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

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

7 years ago[PartialInlining] Reduce outlining overhead by removing unneeded live-out(s)
Xinliang David Li [Thu, 1 Jun 2017 00:12:41 +0000 (00:12 +0000)]
[PartialInlining] Reduce outlining overhead by removing unneeded live-out(s)

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

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

7 years agoAdd LiveRangeShrink pass to shrink live range within BB.
Dehao Chen [Wed, 31 May 2017 23:25:25 +0000 (23:25 +0000)]
Add LiveRangeShrink pass to shrink live range within BB.

Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.

Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb

Reviewed By: MatzeB, andreadb

Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits

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

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

7 years ago[docs] Update name of vectorization interleave flag.
Eli Friedman [Wed, 31 May 2017 23:02:55 +0000 (23:02 +0000)]
[docs] Update name of vectorization interleave flag.

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

7 years ago[EH] Recognize __(gxx|gcc)_personality_seh0 as the GNU EH personalities
Reid Kleckner [Wed, 31 May 2017 22:35:52 +0000 (22:35 +0000)]
[EH] Recognize __(gxx|gcc)_personality_seh0 as the GNU EH personalities

These are no-ops when there are no invokes. We don't need to emit LSDAs
for them.

Fixes PR33220.

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

7 years agoImplicitNullChecks: Clear kill/dead flags when moving instructions around
Matthias Braun [Wed, 31 May 2017 22:23:08 +0000 (22:23 +0000)]
ImplicitNullChecks: Clear kill/dead flags when moving instructions around

The values are marked as livein in the successor blocks so marking them
as killed or dead was wrong.

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

7 years agoCheck hasPersonalityFn before calling getPersonalityFn
Reid Kleckner [Wed, 31 May 2017 22:21:20 +0000 (22:21 +0000)]
Check hasPersonalityFn before calling getPersonalityFn

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

7 years ago[EH] Fix the LSDA that we emit for unknown EH personalities
Reid Kleckner [Wed, 31 May 2017 22:18:49 +0000 (22:18 +0000)]
[EH] Fix the LSDA that we emit for unknown EH personalities

We should have a single call site entry with no landing pad. This
indicates that no EH action should be taken and the unwinder should
unwind to the next frame.

We currently don't recognize __gxx_personality_seh0 as a known
personality, so we forcibly emit a table, and that table was wrong. This
was filed as PR33220. Now we emit a correct table for that personality.
The next step is to recognize that we can completely skip the table for
this personality.

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

7 years ago[MachOObject] Fix bind opcode parser error on valid opcode sequence
Steven Wu [Wed, 31 May 2017 22:17:43 +0000 (22:17 +0000)]
[MachOObject] Fix bind opcode parser error on valid opcode sequence

BIND_OPCODE_SET_DYLIB_SPECIAL_IMM(0) is a valid way to setp library
ordinal. MachOObject should set LibraryOrdinalSet even when IMM is zero.

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 22:16:24 +0000 (22:16 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 22:09:46 +0000 (22:09 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 22:02:05 +0000 (22:02 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 21:50:45 +0000 (21:50 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years agoAvoid a UB pointer overflow in the ArrayRef unit test
Vedant Kumar [Wed, 31 May 2017 21:47:52 +0000 (21:47 +0000)]
Avoid a UB pointer overflow in the ArrayRef unit test

The intent of the test is to check that array lengths greater than
UINT_MAX work properly. Change the test to stress that scenario, without
triggering pointer overflow UB.

Caught by a WIP pointer overflow checker in clang.

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

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

7 years agoRevert rL304050. It may break sanitizer bootstrap. Revert it for now while investigating.
Wei Mi [Wed, 31 May 2017 21:29:33 +0000 (21:29 +0000)]
Revert rL304050. It may break sanitizer bootstrap. Revert it for now while investigating.

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

7 years agoTry to fix buildbots
Matthias Braun [Wed, 31 May 2017 21:25:03 +0000 (21:25 +0000)]
Try to fix buildbots

It seems not all of our bots have a std::vector::erase() taking a
const_iterator (even though that seems to be part of C++11) attempt to
workaround.

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

7 years ago[TableGen] Adapt more places to getValueAsString now returning a StringRef instead...
Craig Topper [Wed, 31 May 2017 21:12:46 +0000 (21:12 +0000)]
[TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string.

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

7 years agoX86FloatingPoint: Fix livein lists
Matthias Braun [Wed, 31 May 2017 20:30:22 +0000 (20:30 +0000)]
X86FloatingPoint: Fix livein lists

After transforming FP to ST registers:
- Do not add the ST register to the livein lists, they are reserved so
  we do not need to track their liveness.
- Remove the FP registers from the livein lists, they don't have defs or
  uses anymore and so are not live.
- (The setKillFlags() call is moved to an earlier place as it relies on
   the FP registers still being present in the livein list.)

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

7 years agoX86FloatingPoint: Add some static assert, cleanup; NFC
Matthias Braun [Wed, 31 May 2017 20:30:17 +0000 (20:30 +0000)]
X86FloatingPoint: Add some static assert, cleanup; NFC

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

7 years agoAdded missing break; added LLVM_FALLTHROUGH to address warning: this statement may...
Galina Kistanova [Wed, 31 May 2017 20:25:13 +0000 (20:25 +0000)]
Added missing break; added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years ago[libFuzzer] fix a test to match the new sanitizer run-time
Kostya Serebryany [Wed, 31 May 2017 19:47:11 +0000 (19:47 +0000)]
[libFuzzer] fix a test to match the new sanitizer run-time

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 19:41:33 +0000 (19:41 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years ago[IR] Add additional addParamAttr/removeParamAttr to AttributeList API
Reid Kleckner [Wed, 31 May 2017 19:23:09 +0000 (19:23 +0000)]
[IR] Add additional addParamAttr/removeParamAttr to AttributeList API

Summary:
Fairly straightforward patch to fill in some of the holes in the
attributes API with respect to accessing parameter/argument attributes.
The patch aims to step further towards encapsulating the
idx+FirstArgIndex pattern to access these attributes to within the
AttributeList.

Patch by Daniel Neilson!

Reviewers: rnk, chandlerc, pete, javed.absar, reames

Subscribers: llvm-commits

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

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

7 years ago[TableGen] Make Record::getValueAsString and getValueAsListOfStrings return StringRef...
Craig Topper [Wed, 31 May 2017 19:01:11 +0000 (19:01 +0000)]
[TableGen] Make Record::getValueAsString and getValueAsListOfStrings return StringRefs instead of std::string

Internally both these methods just return the result of getValue on either a StringInit or a CodeInit object. In both cases this returns a StringRef pointing to a string allocated in the BumpPtrAllocator so its not going anywhere. So we can just pass that StringRef along.

This is a fairly naive patch that targets just the build failures caused by this change. There's additional work that can be done to avoid creating std::string at call sites that still think getValueAsString returns a std::string. I'll try to clean those up in future patches.

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

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

7 years ago[BPF] Correct the file name of the -gen-asm-matcher output file to not start with...
Craig Topper [Wed, 31 May 2017 19:01:05 +0000 (19:01 +0000)]
[BPF] Correct the file name of the -gen-asm-matcher output file to not start with X86.

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

7 years ago[ThinLTO] Reduce unnecessary map lookups during combined summary write
Teresa Johnson [Wed, 31 May 2017 18:58:11 +0000 (18:58 +0000)]
[ThinLTO] Reduce unnecessary map lookups during combined summary write

Summary:
Don't assign values to undefined references, simply don't emit those
reference edges as they are not useful (we were already not emitting
call edges to undefined refs).

Also, streamline the later lookup of value ids when writing the
summaries, by combining the check for value id existence with the access
of that value id.

Reviewers: pcc

Subscribers: Prazek, llvm-commits, inglorion

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

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

7 years ago[ScheduleDAG] Deal with already scheduled loads in ScheduleDAG.
Nirav Dave [Wed, 31 May 2017 18:43:17 +0000 (18:43 +0000)]
[ScheduleDAG] Deal with already scheduled loads in ScheduleDAG.

Summary:
If we attempt to unfold an SUnit in ScheduleDAG that results in
finding an already scheduled load, we must should abort the
unfold as it will not improve scheduling.

This fixes PR32610.

Reviewers: jmolloy, sunfish, bogner, spatel

Subscribers: llvm-commits, MatzeB

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

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

7 years agoTargetMachine: Indicate whether machine verifier passes.
Matthias Braun [Wed, 31 May 2017 18:41:23 +0000 (18:41 +0000)]
TargetMachine: Indicate whether machine verifier passes.

This adds a callback to the LLVMTargetMachine that lets target indicate
that they do not pass the machine verifier checks in all cases yet.

This is intended to be a temporary measure while the targets are fixed
allowing us to enable the machine verifier by default with
EXPENSIVE_CHECKS enabled!

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

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

7 years ago[sanitizer-coverage] remove stale code (old coverage); llvm part
Kostya Serebryany [Wed, 31 May 2017 18:27:33 +0000 (18:27 +0000)]
[sanitizer-coverage] remove stale code (old coverage); llvm  part

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

7 years ago[PowerPC] Correctly specify the cache line size for Power 7, 8 and 9.
Sean Fertile [Wed, 31 May 2017 18:20:17 +0000 (18:20 +0000)]
[PowerPC] Correctly specify the cache line size for Power 7, 8 and 9.

Fixes PPCTTIImpl::getCacheLineSize() returning the wrong cache line size for
newer ppc processors.

Commiting on behalf of Stefan Pintilie.
Differential Revision: https://reviews.llvm.org/D33656

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

7 years agoRevert "[Atomics][LoopIdiom] Recognize unordered atomic memcpy"
Anna Thomas [Wed, 31 May 2017 17:20:51 +0000 (17:20 +0000)]
Revert "[Atomics][LoopIdiom] Recognize unordered atomic memcpy"

This reverts commit r304310.

It caused build failures in polly and mingw
due to undefined reference to
llvm::RTLIB::getMEMCPY_ELEMENT_ATOMIC.

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

7 years ago[PPC] Inline expansion of memcmp
Zaara Syeda [Wed, 31 May 2017 17:12:38 +0000 (17:12 +0000)]
[PPC] Inline expansion of memcmp

This patch does an inline expansion of memcmp.
It changes the memcmp library call into an inline expansion when the size is
known at compile time and is under a target specified threshold.
This expansion is implemented in CodeGenPrepare and expands into straight line
code. The target specifies a maximum load size and the expansion works by using
this size to load the two sources, compare, and exit early if a difference is
found. It also has a special case when the memcmp result is used in a compare
to zero equality.

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

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 17:10:03 +0000 (17:10 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years ago[AMDGPU] Fix bugs in new waitcnt pass. Add test.
Mark Searles [Wed, 31 May 2017 16:44:23 +0000 (16:44 +0000)]
[AMDGPU] Fix bugs in new waitcnt pass. Add test.
- new waitcnt pass remains off by default; -enable-si-insert-waitcnts=1 to enable it
- fix handling of PERMUTE ops
- fix insertion of waitcnt instrs at function begin/end ( port of analogous code that was added to old waitcnt pass )
- add new test

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

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

7 years ago[Atomics][LoopIdiom] Recognize unordered atomic memcpy
Anna Thomas [Wed, 31 May 2017 16:39:52 +0000 (16:39 +0000)]
[Atomics][LoopIdiom] Recognize unordered atomic memcpy

Summary:
Expanding the loop idiom test for memcpy to also recognize unordered atomic memcpy.
The only difference for recognizing
an unordered atomic memcpy and instead of a normal memcpy is
that the loads and/or stores involved are unordered atomic operations.
Background:  http://lists.llvm.org/pipermail/llvm-dev/2017-May/112779.html

Patch by Daniel Neilson!

Reviewers: reames, anna, skatkov

Reviewed By: reames

Subscribers: llvm-commits, mzolotukhin

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

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

7 years ago[AMDGPU][MC] New syntax for ds_swizzle_b32 offset
Dmitry Preobrazhensky [Wed, 31 May 2017 16:26:47 +0000 (16:26 +0000)]
[AMDGPU][MC] New syntax for ds_swizzle_b32 offset

See Bug 28601: https://bugs.llvm.org//show_bug.cgi?id=28601

Reviewers: artem.tamazov, vpykhtin

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

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

7 years ago[AArch64] Enable FeatureFuseAES on Cortex-A53.
Florian Hahn [Wed, 31 May 2017 15:50:03 +0000 (15:50 +0000)]
[AArch64] Enable FeatureFuseAES on Cortex-A53.

It improves performance on Cortex-A53.

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

7 years ago[AArch64] Enable FeatureFuseAES on Cortex-A73.
Florian Hahn [Wed, 31 May 2017 15:25:25 +0000 (15:25 +0000)]
[AArch64] Enable FeatureFuseAES on Cortex-A73.

It improves performance on Cortex-A73.

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

7 years agoFix assertion when merging multiple empty AttributeLists
Reid Kleckner [Wed, 31 May 2017 14:24:06 +0000 (14:24 +0000)]
Fix assertion when merging multiple empty AttributeLists

Patch by Nicholas Wilson!

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

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

7 years ago[DAG] Avoid use of stale store.
Nirav Dave [Wed, 31 May 2017 13:36:17 +0000 (13:36 +0000)]
[DAG] Avoid use of stale store.

Correct references to alignment of store which may be deleted in a
previous iteration of merge. Instead use first store that would be
merged.

Corrects pr33172's use-after-poison caught by ASan.

Reviewers: spatel, hfinkel, RKSimon

Reviewed By: RKSimon

Subscribers: thegameg, javed.absar, llvm-commits

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

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

7 years ago[PowerPC] Fix a performance bug for PPC::XXPERMDI.
Tony Jiang [Wed, 31 May 2017 13:09:57 +0000 (13:09 +0000)]
[PowerPC] Fix a performance bug for PPC::XXPERMDI.

There are some VectorShuffle Nodes in SDAG which can be selected to XXPERMDI
Instruction, this patch recognizes them and does the selection to improve
the PPC performance.

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

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

7 years agoRegenerate xchg-nofold.ll expected results. NFC.
Amaury Sechet [Wed, 31 May 2017 09:44:08 +0000 (09:44 +0000)]
Regenerate xchg-nofold.ll expected results. NFC.

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

7 years ago[PowerPC] Eliminate integer compare instructions - vol. 3
Nemanja Ivanovic [Wed, 31 May 2017 08:04:07 +0000 (08:04 +0000)]
[PowerPC] Eliminate integer compare instructions - vol. 3

This patch builds upon https://reviews.llvm.org/rL302810 to add
handling for the 64-bit SETEQ patterns.

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

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

7 years ago[AVR] Fix a big in shift operator lowering; Authored by Dr. Gergo Erdi
Dylan McKay [Wed, 31 May 2017 06:27:46 +0000 (06:27 +0000)]
[AVR] Fix a big in shift operator lowering; Authored by Dr. Gergo Erdi

When generating code for a shift loop, check the shift
 amount against the literal value 0, not R0

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

7 years ago[AVR] CPIRdK can only work with r16..r31; Authored by Dr. Gergo Erdi
Dylan McKay [Wed, 31 May 2017 06:10:59 +0000 (06:10 +0000)]
[AVR] CPIRdK can only work with r16..r31; Authored by Dr. Gergo Erdi
(https://github.com/avr-rust/rust/issues/50)

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

7 years ago[PowerPC] Eliminate integer compare instructions - vol. 2
Nemanja Ivanovic [Wed, 31 May 2017 05:40:25 +0000 (05:40 +0000)]
[PowerPC] Eliminate integer compare instructions - vol. 2

This patch builds upon https://reviews.llvm.org/rL302810 to add
handling for bitwise logical operations in general purpose registers.
The idea is to keep the values in GPRs as long as possible - only
extracting them to a condition register bit when no further operations
are to be done.

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

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

7 years ago[TableGen] Implement non-const versions of Record::getValue by delegating to the...
Craig Topper [Wed, 31 May 2017 05:12:36 +0000 (05:12 +0000)]
[TableGen] Implement non-const versions of Record::getValue by delegating to the const versions to avoid duplicate code. NFC

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

7 years ago[TableGen] Make one of RecordVal's constructors delegate to the other to reduce dupli...
Craig Topper [Wed, 31 May 2017 05:12:33 +0000 (05:12 +0000)]
[TableGen] Make one of RecordVal's constructors delegate to the other to reduce duplicate code.

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

7 years ago[ObjectYAML] Split CodeViewYAML into 3 pieces.
Zachary Turner [Wed, 31 May 2017 04:17:13 +0000 (04:17 +0000)]
[ObjectYAML] Split CodeViewYAML into 3 pieces.

The code was a mess and disorganized due to the sheer amount
of it being in one file.  So I'm splitting this into three files.
One for CodeView types, one for CodeView symbols, and one for
CodeView debug subsections.  NFC.

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

7 years ago[coroutines] Call initializePass in coroutine pass constructors
Gor Nishanov [Wed, 31 May 2017 03:12:42 +0000 (03:12 +0000)]
[coroutines] Call initializePass in coroutine pass constructors

Summary:

Fixes: https://bugs.llvm.org/show_bug.cgi?id=33226

Reviewers: chandlerc, davide, majnemer, dblaikie

Reviewed By: chandlerc

Subscribers: EricWF, llvm-commits

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

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

7 years ago[CFLAA] Add missing break; note things are broken.
George Burgess IV [Wed, 31 May 2017 02:35:26 +0000 (02:35 +0000)]
[CFLAA] Add missing break; note things are broken.

Thanks to Galina Kistanova for finding the missing break!

When trying to make a test for this, I realized our logic for handling
extractvalue/insertvalue/... is somewhat broken. This makes constructing
a test-case for this missing break nontrivial.

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

7 years agoX86FrameLowering: No need to mark FP as live-in everywhere
Matthias Braun [Wed, 31 May 2017 02:11:10 +0000 (02:11 +0000)]
X86FrameLowering: No need to mark FP as live-in everywhere

The frame pointer (when used as frame pointer) is a reserved register.
We do not track liveness of reserved registers and hence do not need to
add them to the basic block livein lists.

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 01:54:18 +0000 (01:54 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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

7 years agoNewGVN: Fix PR 33185 by checking whether we need to recursively
Daniel Berlin [Wed, 31 May 2017 01:47:32 +0000 (01:47 +0000)]
NewGVN: Fix PR 33185 by checking whether we need to recursively
generate a phi of ops, which we don't currently support.

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

7 years agoFix test that wasn't update_test_check'd
Daniel Berlin [Wed, 31 May 2017 01:47:29 +0000 (01:47 +0000)]
Fix test that wasn't update_test_check'd

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

7 years agoInstructionSimplify: Remove now-redundant reachability tests, as dominates() already...
Daniel Berlin [Wed, 31 May 2017 01:47:24 +0000 (01:47 +0000)]
InstructionSimplify: Remove now-redundant reachability tests, as dominates() already does them

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

7 years agoMark a test as requiring a default triple
Vedant Kumar [Wed, 31 May 2017 01:42:55 +0000 (01:42 +0000)]
Mark a test as requiring a default triple

This test assumes that llc can infer a default triple. I'm not sure why
exactly, but the Verify MachineInstrs bot requires tests to be explicit
about this dependency.

This commit follows the lead from r248452 and adds in 'REQUIRES:
default_triple' to omit-empty.ll.

Bot URL: http://lab.llvm.org:8080/green/job/Verify-Machineinstrs_AArch64/7500

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

7 years agoAdded LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Galina Kistanova [Wed, 31 May 2017 01:33:39 +0000 (01:33 +0000)]
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

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