Commit Graph

127080 Commits

Author SHA1 Message Date
Mitch Bodart
3da03f495a [X86] Test commit, fixed typos in comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 16:40:51 +00:00
Sanjoy Das
7b763c6151 [PlaceSafepoints] Minor test cleanup; NFC
There is no need to place quotes around some_call and
personality_function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 16:11:27 +00:00
Tom Stellard
814bd29cfe AMDGPU: Move subtarget specific code out of AMDGPUInstrInfo.cpp
Summary:
Also delete all the stub functions that are identical to the
implementations in TargetInstrInfo.cpp.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 16:04:37 +00:00
Sanjoy Das
191fe55fbd [LICM] Keep metadata on control equivalent hoists
Summary:
If the instruction we're hoisting out of a loop into its preheader is
guaranteed to have executed in the loop, then the metadata associated
with the instruction (e.g. !range or !dereferenceable) is valid in the
preheader.  This is because once we're in the preheader, we know we're
eventually going to reach the location the metadata was valid at.

This change makes LICM smarter around this, and helps it recognize cases
like these:

```
  do {
    int a = *ptr; !range !0
    ...
  } while (i++ < N);
```

to

```
  int a = *ptr; !range !0
  do {
    ...
  } while (i++ < N);
```

Earlier we'd drop the `!range` metadata after hoisting the load from
`ptr`.

Reviewers: igor-laevsky

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 15:51:58 +00:00
Chad Rosier
b328af8b73 [AArch64] Set MMOs on pre- and post-index instructions.
Without the MMOs the MI scheduler is unable to reason about the dependencies of
these instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 15:38:24 +00:00
Simon Pilgrim
21ba6d879b [x86] Merge multiple calls to DAG.getTargetLoweringInfo(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 15:29:11 +00:00
Teresa Johnson
7cfde51c4f Improve efficiency of handling unmapped subprogram metadata
The stripNullSubprograms function is very inefficient because
it walks all subprograms in all compile units in the dest module
any time a new module is linked in. For LTO in particular this will
get increasingly expensive as more modules are linked.

This patch improves the efficiency in several ways. The first is that
no scanning is necessary when there were no unneeded subprograms
identified in the first place. The second is that only the newly-linked
module's compile unit metadata should be examined.

Fixes PR26346.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 15:08:09 +00:00
Oliver Stannard
b95072ef89 Revert r259035, it introduces a cyclic library dependency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 13:19:47 +00:00
Igor Breger
39f8bee93d AVX512: Fix truncate v32i8 to v32i1 lowering implementation.
Enable truncate 128/256bit packed byte/word with AVX512BW but without AVX512VL, use 512bit instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 13:19:25 +00:00
Benjamin Kramer
1ce3df4548 Unbreak the wasm backend again after r259035.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 11:26:34 +00:00
Zoran Jovanovic
b735cc6751 [mips][microMIPS] Disable FastISel for microMIPS
Author: milena.vujosevic.janicic
Reviewers: dsanders

FastIsel is not supported for microMIPS, thus it needs to be disabled. 
Test micromips-zero-mat-uses.ll is deleted since the tested sequence of instructions is not generated for microMIPS without FastISel.
Differential Revision: http://reviews.llvm.org/D15892


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 11:08:03 +00:00
Oliver Stannard
ef19a274ad Add backend dignostic printer for unsupported features
Re-commit of r258951 after fixing layering violation.

The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 10:07:27 +00:00
Simon Pilgrim
e9abc8ca75 [X86][SSE] Move setTargetShuffleZeroElements closer to getTargetShuffleMask. NFCI.
Keep target shuffle mask helper functions closer together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 09:45:01 +00:00
Junmo Park
d92d3ed12b Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 09:42:39 +00:00
Asaf Badouh
665e71adfd [X86][AVX512] small fix in ptestm intrinsics
move ptestm{q|d} intrinsics from patterns form (in td file) to the intrinsics table

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 08:33:22 +00:00
Matthias Braun
f2fb0002fc ValueTracking: Use fixed array for assumption exclude set in Query.
The Query structure is constructed often and is relevant for compiletime
performance. We can replace the SmallPtrSet for assumption exclusions in
this structure with a fixed size array because we know the maximum
number of elements.  This improves typical clang -O3 -emit-llvm compiletime
by 1.2% in my measurements.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259025 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 06:29:33 +00:00
Junmo Park
91de9d1201 [DAGCombiner] Don't add volatile or indexed stores to ChainedStores
Summary:
findBetterNeighborChains does not handle volatile or indexed stores.
However, it did not check when adding stores to ChainedStores.

Reviewers: arsenm

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 06:23:33 +00:00
Matthias Braun
7f3c3c37bd SmallPtrSet: Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 05:09:01 +00:00
JF Bastien
d1b64bf251 WebAssembly: fix build
r259016 didn't also revert r258957 which broken the WebAssembly build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 05:05:17 +00:00
Matthias Braun
a1e9f2f407 SmallPtrSet: Make destructor available for inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 04:49:14 +00:00
Matthias Braun
1732754567 SmallPtrSet: Share some code between copy/move constructor/assignment operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 04:49:11 +00:00
Matthias Braun
ae4e8d2bfe SmallPtrSet: Remove trailing whitespace, fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 04:49:07 +00:00
NAKAMURA Takumi
c1aeea845d Revert r258951 (and r258950), "Refactor backend diagnostics for unsupported features"
It broke layering violation in LLVMIR.

clang r258950 "Add backend dignostic printer for unsupported features"
llvm  r258951 "Refactor backend diagnostics for unsupported features"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 04:41:32 +00:00
Dan Gohman
99c12c224c [WebAssembly] Don't stackify a register def past a get_local use in the same tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 03:59:09 +00:00
Junmo Park
7c63a3a8e2 Minor code formatting cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 01:23:18 +00:00
Dan Gohman
dbc2732e36 [WebAssembly] Enhanced register stackification
This patch revamps the RegStackifier pass with a new tree traversal mechanism,
enabling three major new features:

 - Stackification of values with multiple uses, using the result value of set_local
 - More aggressive stackification of instructions with side effects
 - Reordering operands in commutative instructions to enable more stackification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259009 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 01:22:44 +00:00
George Burgess IV
134d29444d Minor style cleanup of CFLAA. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 00:54:01 +00:00
Sanjay Patel
3b4e43df24 less indenting; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 00:03:16 +00:00
Adam Nemet
35ef8f155d [TTI] Add getPrefetchDistance from PPCLoopDataPrefetch, NFC
This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).

As it was discussed in the above thread, getPrefetchDistance is
currently using instruction count which may change in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 22:21:25 +00:00
Evgeniy Stepanov
ca14b57177 Tweak unnamed label syntax in textual IR for easier matching in tests.
Change the unnamed label comments like
  ; <label>:8  ; preds = %1
to
  ; <label>:8:  ; preds = %1

This way lit tests can match [[LABEL]]: in both asserts and no-asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 21:53:08 +00:00
Derek Schuff
ffa1468fac [WebAssembly] Implement byval arguments
Summary:
Just does the simple allocation of a stack object and passes
a pointer to the callee.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 21:17:39 +00:00
Simon Pilgrim
10fe174ef8 [utils] Add windows support to update_llc_test_checks.py
Strip dos line endings from llc generated files to allow the regex patterns to match them.

Ensure updated *.ll files are generated with unix style line endings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 21:13:18 +00:00
Davide Italiano
1db4cdc3b1 [llvm-nm] Remove redundant check for file validity.
We already perform it at the beginning of the function so we can't
arrive here with an invalid object. Also, add a test so that bugs
won't sneak in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258982 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 20:27:44 +00:00
Tim Northover
8362c240ca ARMv7k: base ABI decision on v7k Arch rather than watchos OS.
Various bits we want to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 19:32:29 +00:00
Benjamin Kramer
b8c1bbf870 One more batch of self-containing headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258974 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 19:29:56 +00:00
Benjamin Kramer
8cbe47dfe5 Don't put classes in headers into anonymous namespaces.
You want ODR violations? That's how you get ODR violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258973 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 19:29:42 +00:00
Sanjay Patel
50c72a431d [SimplifyCFG] limit recursion depth when speculating instructions (PR26308)
This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=26308

With the switch to using the TTI cost model in:
http://reviews.llvm.org/rL228826
...it became possible to hit a zero-cost cycle of instructions (gep -> phi -> gep...), 
so we need a cap for the recursion in DominatesMergePoint().

A recursion depth parameter was already added for a different reason in:
http://reviews.llvm.org/rL255660
...so we can just set a limit for it.

I pulled "10" out of the air and made it an independent parameter that we can play with.
It might be higher than it needs to be given the currently low default value of 
PHINodeFoldingThreshold (2). That's the starting cost value that we enter the recursion
with, and most instructions have cost set to TCC_Basic (1), so I don't think we're going
to speculate more than 2 instructions with the current parameters.

As noted in the review and the TODO comment, we can do better than just limiting recursion
depth.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 19:22:45 +00:00
John McCall
5ee1f22ae3 Add support for objc_unsafeClaimAutoreleasedReturnValue to the
ObjC ARC Optimizer.

The main implication of this is:

1. Ensuring that we treat it conservatively in terms of optimization.
2. We put the ASM marker on it so that the runtime can recognize
objc_unsafeClaimAutoreleasedReturnValue from releaseRV.

<rdar://problem/21567064>

Patch by Michael Gottesman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258970 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 19:05:08 +00:00
Benjamin Kramer
5e3603a240 Unbreak wasm build after r258951.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258957 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 18:03:40 +00:00
Benjamin Kramer
06342012ac Make more headers self-contained.
A lot of this comes from the new complete type requirement of DenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258956 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 18:03:37 +00:00
Oliver Stannard
bf8415a84d Refactor backend diagnostics for unsupported features
The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.

There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.

The implementation of DiagnosticInfoUnsupported::print must be in
lib/Codegen rather than in the existing file in lib/IR/ to avoid
introducing a dependency from IR to CodeGen.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 17:30:33 +00:00
Sanjoy Das
377bac24c2 [IndVars] Hoist DataLayout load out of loop; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258946 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 17:05:09 +00:00
Sanjoy Das
153af475b3 [IndVars] Use isSCEVable; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 17:05:06 +00:00
Sanjoy Das
a33e8b3c3b [IndVars] Use range-for; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 17:05:03 +00:00
Benjamin Kramer
b714d34a7e Move SafeStack to CodeGen.
It depends on the target machinery, that's not available for
instrumentation passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 16:53:42 +00:00
Simon Pilgrim
705e6271de [X86][SSE] Test insertps instrinsic calls with masks that can't combine to something simpler
For these basic tests of the intrinsic, make sure the mask can't simplify to movss, blend-with-zero or something else

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 16:51:57 +00:00
Benjamin Kramer
d254be2cd3 Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/
It's a SelectionDAG thing, not a Target thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 16:32:26 +00:00
Benjamin Kramer
f80dcd65f5 Move passes that live in lib/CodeGen out of Scalar.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258938 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 16:05:42 +00:00
Benjamin Kramer
509a6e348c Make some headers self-contained, remove unused includes that violate layering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 16:05:37 +00:00
Tom Stellard
5d1474cab5 AMDGPU/SI: Fix commuting of 32-bit VOPC instructions
Summary:
We didn't have entries in the commuting table for the 32-bit
instructions.  I don't think we hit this problem now, but we
will once uniform branching is enabled.  Tests will come in
a later commit.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 15:53:52 +00:00