Commit Graph

113146 Commits

Author SHA1 Message Date
Sanjay Patel
751e3f1f80 fix test attributes; this is an x86-64 test, not a Nehalem test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 21:10:40 +00:00
Sanjay Patel
714f3d3a0f fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228544 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 21:05:03 +00:00
David Blaikie
861a3dd510 Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove an unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 21:03:30 +00:00
Zachary Turner
926749af90 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:58:09 +00:00
Sanjay Patel
e755d452e0 fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228541 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:50:58 +00:00
David Blaikie
9044440ba5 Kaleidoscope-Orc: Extract IRGen work into a utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:29:28 +00:00
David Blaikie
aa5b4fa8ae Constify the Orc Kaleidoscope examples IRGen functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228537 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:15:01 +00:00
Sanjay Patel
78547012ac fix test attributes; these are x86-64 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228536 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:05:53 +00:00
Sanjay Patel
8d32999929 fix test attributes; these are MMX tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228535 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 20:01:12 +00:00
Sanjay Patel
7596cf2b66 fix test attributes; these are SSE2 tests, not Nehalem tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228534 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 19:50:55 +00:00
Sanjay Patel
c3803c8bc2 generalize test; nothing Nehalem-specific here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228532 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 19:38:25 +00:00
Lang Hames
4f79dee97c [Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228531 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 19:15:33 +00:00
Lang Hames
13f2d9943f [Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code and
further c++ify the Kaleidoscope/Orc tutorials.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228530 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 19:14:56 +00:00
Sanjay Patel
b3d4cc50ca fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 18:54:22 +00:00
Simon Pilgrim
c92ffedc5c [X86][AVX2] AVX2 broadcast + permute memory folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 18:33:13 +00:00
Zachary Turner
3afd6d0734 Make UTF8->UTF16 conversion null terminate output on empty input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 18:08:51 +00:00
Simon Pilgrim
2ba70e81a4 Moved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228526 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 17:13:54 +00:00
Bjorn Steinbrink
61a16d2a16 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 17:07:14 +00:00
NAKAMURA Takumi
186332c0c9 [CMake] Kaleidoscope-Orc: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228524 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 11:15:08 +00:00
Elena Demikhovsky
8be39c81b0 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228521 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 08:27:19 +00:00
David Blaikie
b1ffebbbdb Add CMake build support for Orc examples (& fix some clang -Werror build
breaks due to unused variables).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228520 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 07:20:04 +00:00
Lang Hames
b7e0983d80 [Orc][Kaleidoscope] Fix method-name think-o. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228519 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 04:34:13 +00:00
Tim Northover
848d812931 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228518 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 00:50:47 +00:00
Zachary Turner
2c797c6dc4 Removed unused function mistakenly left in, triggering -Werror.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228517 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 00:41:31 +00:00
Zachary Turner
e642985be9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 00:29:29 +00:00
Craig Topper
3e7edda4aa [X86] Add register use/def for wrmsr and rdmsr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 23:36:51 +00:00
Craig Topper
e15d286e83 [X86] Add GETSEC instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228514 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 23:36:36 +00:00
Simon Pilgrim
437265ee96 [X86][AVX2] AVX2 integer stack folding tests.
This adds tests for the remaining AVX2 instructions that currently support memory folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 23:28:16 +00:00
David Blaikie
092251cccb Rename the 'Extending the Language: Debug Information' to 'Adding Debug Information' since this isn't actually modifying/extending the language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 23:23:43 +00:00
Simon Pilgrim
2134ae7f38 [X86][AVX] Added missing stack folding support + test for vptest ymm instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228509 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 21:44:06 +00:00
Benjamin Kramer
fd3cd51a3a 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228508 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 21:37:08 +00:00
Joerg Sonnenberger
128482cfc4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228507 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 21:24:06 +00:00
Simon Pilgrim
710e70bb70 [X86][SSE] Added missing stack folding tests for (v)mpsadbw instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228506 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 21:20:11 +00:00
Benjamin Kramer
a54b82a9fe 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228503 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 19:29:02 +00:00
Bjorn Steinbrink
2dd5f23a1d Properly update AA metadata when performing call slot optimization
Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228500 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 17:54:36 +00:00
Jonathan Roelofs
f516614e8a Fix docs typo regarding lit.local.cfg files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228499 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 17:18:26 +00:00
Ahmed Bougacha
9c252165a7 [BasicAA] Try to disambiguate GEPs through arrays of structs into
different fields.

We can show that two GEPs off of the same (possibly multidimensional)
array of structs, into different fields, can't alias.  Quoting:

For two GEPOperators GEP1 and GEP2, if we find that:
- both GEPs begin indexing from the exact same pointer;
- the last indices in both GEPs are constants, indexing into a struct;
- said indices are different, hence,the pointed-to fields are different;
- and both GEPs only index through arrays prior to that;

this lets us determine that the struct that GEP1 indexes into and the
struct that GEP2 indexes into must either precisely overlap or be
completely disjoint.  Because they cannot partially overlap, indexing
into different non-overlapping fields of the struct will never alias.

The other BasicAA::aliasGEP rules worked in some cases, but not all
(for example, the i32x3 struct in the testcase).
We can add this simple ad-hoc rule to complement them.

rdar://19717375
Differential Revision: http://reviews.llvm.org/D7453


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228498 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 17:04:29 +00:00
Benjamin Kramer
0e0271af87 SCEV: Compress disposition pairs.
Composing DenseMaps and SmallVectors is still somewhat suboptimal,
but this at least halves the size of the vector elements. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228497 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 16:41:12 +00:00
Benjamin Kramer
ff53b757ea SmallVector: Move emplace_back to SmallVectorImpl.
This resolves the strange effect that emplace_back is only available
when the type contained in the vector is not trivially copyable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 16:41:02 +00:00
Simon Pilgrim
3281412d2a [X86] Force fp stack folding tests to keep to specific domain.
General boolean instructions (AND, ANDN, OR, XOR) need to use a specific domain instruction (and not just the default).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228495 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 16:14:55 +00:00
Simon Pilgrim
bf4a435d0a [X86][AVX2] More AVX2 integer stack folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228494 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 16:07:27 +00:00
Andrea Di Biagio
0e0dfd99f9 Fix typos; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228493 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 13:56:20 +00:00
Benjamin Kramer
74cdff870f Move DebugLocs around instead of copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228491 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 12:28:15 +00:00
David Majnemer
fdac306a12 MC: Emit COFF section flags in the "proper" order
COFF section flags are not idempotent:
  'rd' will make a read-write section because 'd' implies write
  'dr' will make a read-only section because 'r' disables write

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228490 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 08:26:40 +00:00
Chandler Carruth
7e940c4725 Consistently use override rather than virtual.
This fixes -Winconsistent-missing-override warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228489 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 08:12:22 +00:00
Hal Finkel
05bd43dc6e [PowerPC] Handle loop predecessor invokes
If a loop predecessor has an invoke as its terminator, and the return value
from that invoke is used to determine the loop iteration space, then we can't
insert a computation based on that value in the loop predecessor prior to the
terminator (oops). If there's such an invoke, or just no predecessor for that
matter, insert a new loop preheader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228488 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 07:32:58 +00:00
Bruce Mitchener
8143b4da3f Add more DWARF 5 language constants.
Differential Revision: http://reviews.llvm.org/D7430

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228487 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 06:35:30 +00:00
Zachary Turner
6a03769d1c Change RHS-style decltype to LHS-style decltype<declval()>.
Seems some compilers don't like the RHS-style decltype specifier.

This should fix the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228484 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 02:02:23 +00:00
Zachary Turner
d0898f1565 Resubmit unittests for DebugInfoPDB.
These were originally submitted as part of r228428, but this part
caused a build breakage in LLVMConfig.  The library portion was
resubmitted independently since it was not causing breakage.

There were two reasons this was causing the build to fail.  The
first is that there were no Makefiles added for the PDB tests.  And
the second is that the DebugInfoPDB library was only being built by
CMake behind an "if (MSVC)" check.  This is wrong since this the
library hides platform specific details, and it was causing
LLVM-Config to not find the library when trying to build unittests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228482 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 01:47:14 +00:00
Sean Silva
cd04094266 [docs][LLVM-style RTTI] Add a mention of multiple inheritance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228479 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 01:16:26 +00:00