1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

112965 Commits

Author SHA1 Message Date
Lang Hames
79fa1f9f13 [Orc] Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
llvm-svn: 228564
2015-02-09 04:46:41 +00:00
Craig Topper
52b42f0b75 [X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer used.
llvm-svn: 228563
2015-02-09 04:04:53 +00:00
Craig Topper
a684f06383 [X86] Remove 'memop' uses from AVX512. Use 'load' instead.
llvm-svn: 228562
2015-02-09 04:04:50 +00:00
Tim Northover
e34e125ece DeadArgElim: fix mismatch in accounting of array return types.
Some parts of DeadArgElim were only considering the individual fields
of StructTypes separately, but others (where insertvalue &
extractvalue instructions occur) also looked into ArrayTypes.

This one is an actual bug; the mismatch can lead to an argument being
considered used by a return sub-value that isn't being tracked (and
hence is dead by default). It then gets incorrectly eliminated.

llvm-svn: 228559
2015-02-09 01:21:00 +00:00
Tim Northover
3d150e22ef DeadArgElim: assess uses of entire return value aggregate.
Previously, a non-extractvalue use of an aggregate return value meant
the entire return was considered live (the algorithm gave up
entirely). This was correct, but conservative. It's better to actually
look at that Use, making the analysis results apply to all sub-values
under consideration.

E.g.

  %val = call { i32, i32 } @whatever()
  [...]
  ret { i32, i32 } %val

The return is using the entire aggregate (sub-values 0 and 1). We can
still simplify @whatever if we can prove that this return is itself
unused.

Also unifies the logic slightly between aggregate and non-aggregate
cases..

llvm-svn: 228558
2015-02-09 01:20:53 +00:00
Lang Hames
92f9dd24ac [Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.
This patch refactors a key piece of the Orc APIs: It removes the
*::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target
addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn
respectively, which return instances of the new JITSymbol type. Unlike the old
methods, calling findSymbol or findSymbolIn does not cause the symbol to be
immediately materialized when found. Instead, the symbol will be materialized
if/when the getAddress method is called on the returned JITSymbol. This allows
us to query for the existence of symbols without actually materializing them. In
the future I expect more information to be attached to the JITSymbol class, for
example whether the returned symbol is a weak or strong definition. This will
allow us to properly handle weak symbols and multiple definitions.

llvm-svn: 228557
2015-02-09 01:20:51 +00:00
Ramkumar Ramachandra
570fa73130 InstCombine: propagate nonNull through assume
Make assume (load (call|invoke) != null) set nonNull return attribute
for the call and invoke. Also include tests.

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

llvm-svn: 228556
2015-02-09 01:13:13 +00:00
Ramkumar Ramachandra
e9173d98c2 [emacs] Get llvm-mode to font-lock "personality"
Differential Revision: http://reviews.llvm.org/D7494

llvm-svn: 228555
2015-02-09 00:30:03 +00:00
David Blaikie
0ab351a78f Fix -Wuninitialized build by referencing the relevant ctor parameter instead of the base class member variable.
llvm-svn: 228554
2015-02-08 23:15:37 +00:00
Zachary Turner
71e3bf6e80 Make PDBSymbol's IPDBSymbol reference const.
llvm-svn: 228553
2015-02-08 22:53:53 +00:00
Sanjoy Das
9bd991cb84 Bugfix: ScalarEvolution incorrectly assumes that the start of certain
add recurrences don't overflow.

This change makes the optimization more restrictive.  It still assumes
that an overflowing `add nsw` is undefined behavior; and this change
will need revisiting once we have a consistent semantics for poison
values.

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

llvm-svn: 228552
2015-02-08 22:52:17 +00:00
Craig Topper
39e5a46fee [X86] Remove the remaining uses of memop from AVX and AVX2 instruction patterns. AVX and AVX2 can handle unaligned loads being folded so we can just use 'load'
llvm-svn: 228551
2015-02-08 22:38:25 +00:00
Benjamin Kramer
2f55b73a71 Metadata: Use <algorithm> to simplify code. NFC.
llvm-svn: 228550
2015-02-08 21:56:09 +00:00
Sanjay Patel
aab4929127 fix test attributes; this is an SSE2 test, not a Nehalem test
llvm-svn: 228546
2015-02-08 21:14:27 +00:00
Sanjay Patel
b2034cf7b4 fix test attributes; this is an x86-64 test, not a Nehalem test
llvm-svn: 228545
2015-02-08 21:10:40 +00:00
Sanjay Patel
46a1da8b0e fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228544
2015-02-08 21:05:03 +00:00
David Blaikie
b1d9c1be95 Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove an unused parameter.
llvm-svn: 228543
2015-02-08 21:03:30 +00:00
Zachary Turner
754851ad80 DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.
Dumping a symbol often requires access to data that isn't inside
the symbol hierarchy, but which is only accessible through the
top-level session.  This patch is a pure interface change to give
symbols a reference to the session.

llvm-svn: 228542
2015-02-08 20:58:09 +00:00
Sanjay Patel
091da2db42 fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228541
2015-02-08 20:50:58 +00:00
David Blaikie
518f29b489 Kaleidoscope-Orc: Extract IRGen work into a utility function.
llvm-svn: 228539
2015-02-08 20:29:28 +00:00
David Blaikie
1f9ab7d592 Constify the Orc Kaleidoscope examples IRGen functions.
llvm-svn: 228537
2015-02-08 20:15:01 +00:00
Sanjay Patel
fea32fd7dc fix test attributes; these are x86-64 tests, not Nehalem tests
llvm-svn: 228536
2015-02-08 20:05:53 +00:00
Sanjay Patel
fe04920f0e fix test attributes; these are MMX tests, not Nehalem tests
llvm-svn: 228535
2015-02-08 20:01:12 +00:00
Sanjay Patel
880c5c4f36 fix test attributes; these are SSE2 tests, not Nehalem tests
llvm-svn: 228534
2015-02-08 19:50:55 +00:00
Sanjay Patel
c25859ef62 generalize test; nothing Nehalem-specific here
llvm-svn: 228532
2015-02-08 19:38:25 +00:00
Lang Hames
0d443d6653 [Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.
llvm-svn: 228531
2015-02-08 19:15:33 +00:00
Lang Hames
c5bd46a2c2 [Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code and
further c++ify the Kaleidoscope/Orc tutorials.

llvm-svn: 228530
2015-02-08 19:14:56 +00:00
Sanjay Patel
5093636637 fix typos; NFC
llvm-svn: 228529
2015-02-08 18:54:22 +00:00
Simon Pilgrim
c65658ff6d [X86][AVX2] AVX2 broadcast + permute memory folding tests.
llvm-svn: 228528
2015-02-08 18:33:13 +00:00
Zachary Turner
d65edd8565 Make UTF8->UTF16 conversion null terminate output on empty input.
llvm-svn: 228527
2015-02-08 18:08:51 +00:00
Simon Pilgrim
9fae6cc7c6 Moved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. NFC.
llvm-svn: 228526
2015-02-08 17:13:54 +00:00
Bjorn Steinbrink
a6a56743c3 Correctly combine alias.scope metadata by a union instead of intersecting
Summary:
The alias.scope metadata represents sets of things an instruction might
alias with. When generically combining the metadata from two
instructions the result must be the union of the original sets, because
the new instruction might alias with anything any of the original
instructions aliased with.

Reviewers: hfinkel

Subscribers: llvm-commits

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

llvm-svn: 228525
2015-02-08 17:07:14 +00:00
NAKAMURA Takumi
fe49ccef6f [CMake] Kaleidoscope-Orc: Update libdeps.
llvm-svn: 228524
2015-02-08 11:15:08 +00:00
Elena Demikhovsky
40c204cf7d Masked Gather and Scatter Intrinsics.
Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store.
This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification.

Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction.
The intrinsics are not target specific and will have the following syntax:
Gather:
declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>)
declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>)

Scatter:
declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>)
declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> )

Vector of ptrs - a set of source/destination addresses, to load/store the value. 
Mask - switches on/off vector lanes to prevent memory access for switched-off lanes
vector of ptrs, value and mask should have the same vector width.

These are code examples where gather / scatter should be used and will allow function vectorization
;void foo1(int * restrict A, int * restrict B, int * restrict C) {
; for (int i=0; i<SIZE; i++) {
; A[i] = B[C[i]];
; }
;}

;void foo3(int * restrict A, int * restrict B) {
; for (int i=0; i<SIZE; i++) {
; A[B[i]] = i+5;
; }
;}

Tests will come in the following patches, with CodeGen and Vectorizer.

http://reviews.llvm.org/D7433

llvm-svn: 228521
2015-02-08 08:27:19 +00:00
David Blaikie
e5a2bce6c8 Add CMake build support for Orc examples (& fix some clang -Werror build
breaks due to unused variables).

llvm-svn: 228520
2015-02-08 07:20:04 +00:00
Lang Hames
40b2958350 [Orc][Kaleidoscope] Fix method-name think-o. NFC.
llvm-svn: 228519
2015-02-08 04:34:13 +00:00
Tim Northover
78c64c2e1c ARM & AArch64: teach LowerVSETCC that output type size may differ from input.
While various DAG combines try to guarantee that a vector SETCC
operation will have the same output size as input, there's nothing
intrinsic to either creation or LegalizeTypes that actually guarantees
it, so the function needs to be ready to handle a mismatch.

Fortunately this is easy enough, just extend or truncate the naturally
compared result.

I couldn't reproduce the failure in other backends that I know have
SIMD, so it's probably only an issue for these two due to shared
heritage.

Should fix PR21645.

llvm-svn: 228518
2015-02-08 00:50:47 +00:00
Zachary Turner
6fb87b6e2d Removed unused function mistakenly left in, triggering -Werror.
llvm-svn: 228517
2015-02-08 00:41:31 +00:00
Zachary Turner
ca172bdb48 Some cleanup for libpdb.
This patch implements a few of the optional suggestions from the
initial patch comitting libpdb.  In particular, it implements a
virtual function out of line for each of the concrete classes.

A few other minor cleanups exist as well, such as using override
instead of virtual, etc.

llvm-svn: 228516
2015-02-08 00:29:29 +00:00
Craig Topper
55bddcfc08 [X86] Add register use/def for wrmsr and rdmsr.
llvm-svn: 228515
2015-02-07 23:36:51 +00:00
Craig Topper
0fbb3fa6e9 [X86] Add GETSEC instruction.
llvm-svn: 228514
2015-02-07 23:36:36 +00:00
Simon Pilgrim
a28dacc86e [X86][AVX2] AVX2 integer stack folding tests.
This adds tests for the remaining AVX2 instructions that currently support memory folding.

llvm-svn: 228513
2015-02-07 23:28:16 +00:00
David Blaikie
7042f50113 Rename the 'Extending the Language: Debug Information' to 'Adding Debug Information' since this isn't actually modifying/extending the language.
llvm-svn: 228512
2015-02-07 23:23:43 +00:00
Simon Pilgrim
8cad14c8ba [X86][AVX] Added missing stack folding support + test for vptest ymm instruction
llvm-svn: 228509
2015-02-07 21:44:06 +00:00
Benjamin Kramer
dbe6d1cc4d LoopIdiom: Use utility functions.
The only difference between deleteIfDeadInstruction and
RecursivelyDeleteTriviallyDeadInstructions is that the former also
manually invalidates SCEV. That's unnecessary because SCEV automatically
gets informed when an instruction is deleted via a ValueHandle. NFC.

llvm-svn: 228508
2015-02-07 21:37:08 +00:00
Joerg Sonnenberger
a2eff404d0 Avoid integer overflows around realloc calls resulting in potential
heap. Problem identified by Guido Vranken. Changes differ from original
OpenBSD sources by not depending on non-portable reallocarray.

llvm-svn: 228507
2015-02-07 21:24:06 +00:00
Simon Pilgrim
9af0a10c0c [X86][SSE] Added missing stack folding tests for (v)mpsadbw instruction
llvm-svn: 228506
2015-02-07 21:20:11 +00:00
Benjamin Kramer
3aeb5530c5 ValueTracking: Make isBytewiseValue simpler and more powerful at the same time.
Turns out there is a simpler way of checking that all bytes in a word are equal
than binary decomposition.

llvm-svn: 228503
2015-02-07 19:29:02 +00:00
Bjorn Steinbrink
7de3907fdc Properly update AA metadata when performing call slot optimization
Subscribers: llvm-commits

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

llvm-svn: 228500
2015-02-07 17:54:36 +00:00
Jonathan Roelofs
40c3cf941d Fix docs typo regarding lit.local.cfg files
llvm-svn: 228499
2015-02-07 17:18:26 +00:00