Lang Hames [Mon, 9 Feb 2015 18:16:43 +0000 (18:16 +0000)]
[Orc] Revert r228567 (GCC ICE workaround) - it doesn't seem to have helped.
As far as I can tell r228568 was the right workaround, and r228567 was
unnecessary. If reverting this causes problems on the bots I'll reinstate it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228585
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 17:17:09 +0000 (17:17 +0000)]
fixed to test features, not CPUs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228581
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Mon, 9 Feb 2015 17:03:18 +0000 (17:03 +0000)]
This change implements the following three logical vector operations:
veqv (vector equivalence)
vnand
vorc
I increased the AddedComplexity for these instructions to 500 to ensure they are generated instead of issuing other VSX instructions.
Phabricator review: http://reviews.llvm.org/D7469
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228580
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 16:30:58 +0000 (16:30 +0000)]
rename variable to give it some meaning; remove obvious comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228579
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 9 Feb 2015 16:04:52 +0000 (16:04 +0000)]
fix comment that didn't match the code; remove unnecessary braces; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228578
91177308-0d34-0410-b5e6-
96231b3b80d8
Johannes Doerfert [Mon, 9 Feb 2015 12:34:23 +0000 (12:34 +0000)]
Allow ScalarEvolution to catch more min/max cases
For the attached test case different types are used in the ICmpInst
and SelectInst that represent the min/max expressions. However, if the
ICmpInst type is smaller a comparison with the sign/zero extended
operands would have yielded the same result. This situation might
arise after the instruction combination pass was applied.
Differential Revision: http://reviews.llvm.org/D7338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228572
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 07:47:32 +0000 (07:47 +0000)]
[Orc] Try another workaround for the GCC 4.7.2 ICE introduced in r228557. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228568
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 07:22:56 +0000 (07:22 +0000)]
[Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC.
Apparently gcc-4.7.2 is touchy about 'this' appearing in a lambda capture list
along with other captures. I've rewritten my captures to try to avoid the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228567
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 9 Feb 2015 06:38:23 +0000 (06:38 +0000)]
Fix a bug in DemoteRegToStack where a reload instruction was inserted into the
wrong basic block.
This would happen when the result of an invoke was used by a phi instruction
in the invoke's normal destination block. An instruction to reload the invoke's
value would get inserted before the critical edge was split and a new basic
block (which is the correct insertion point for the reload) was created. This
commit fixes the bug by splitting the critical edge before all the reload
instructions are inserted.
Also, hoist up the code which computes the insertion point to the only place
that need that computation.
rdar://problem/
15978721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228566
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 9 Feb 2015 06:31:31 +0000 (06:31 +0000)]
MC: Calculate intra-section symbol differences correctly for COFF
This fixes PR22060.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228565
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 04:46:41 +0000 (04:46 +0000)]
[Orc] Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228564
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Feb 2015 04:04:53 +0000 (04:04 +0000)]
[X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228563
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 9 Feb 2015 04:04:50 +0000 (04:04 +0000)]
[X86] Remove 'memop' uses from AVX512. Use 'load' instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228562
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 9 Feb 2015 01:21:00 +0000 (01:21 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228559
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 9 Feb 2015 01:20:53 +0000 (01:20 +0000)]
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..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228558
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Feb 2015 01:20:51 +0000 (01:20 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228557
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 01:13:13 +0000 (01:13 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228556
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Mon, 9 Feb 2015 00:30:03 +0000 (00:30 +0000)]
[emacs] Get llvm-mode to font-lock "personality"
Differential Revision: http://reviews.llvm.org/D7494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228555
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 8 Feb 2015 23:15:37 +0000 (23:15 +0000)]
Fix -Wuninitialized build by referencing the relevant ctor parameter instead of the base class member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228554
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 8 Feb 2015 22:53:53 +0000 (22:53 +0000)]
Make PDBSymbol's IPDBSymbol reference const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228553
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 8 Feb 2015 22:52:17 +0000 (22:52 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228552
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 8 Feb 2015 22:38:25 +0000 (22:38 +0000)]
[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'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228551
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Feb 2015 21:56:09 +0000 (21:56 +0000)]
Metadata: Use <algorithm> to simplify code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228550
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 21:14:27 +0000 (21:14 +0000)]
fix test attributes; this is an SSE2 test, not a Nehalem test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228546
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 21:10:40 +0000 (21:10 +0000)]
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
Sanjay Patel [Sun, 8 Feb 2015 21:05:03 +0000 (21:05 +0000)]
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
David Blaikie [Sun, 8 Feb 2015 21:03:30 +0000 (21:03 +0000)]
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
Zachary Turner [Sun, 8 Feb 2015 20:58:09 +0000 (20:58 +0000)]
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
Sanjay Patel [Sun, 8 Feb 2015 20:50:58 +0000 (20:50 +0000)]
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
David Blaikie [Sun, 8 Feb 2015 20:29:28 +0000 (20:29 +0000)]
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
David Blaikie [Sun, 8 Feb 2015 20:15:01 +0000 (20:15 +0000)]
Constify the Orc Kaleidoscope examples IRGen functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228537
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 8 Feb 2015 20:05:53 +0000 (20:05 +0000)]
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
Sanjay Patel [Sun, 8 Feb 2015 20:01:12 +0000 (20:01 +0000)]
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
Sanjay Patel [Sun, 8 Feb 2015 19:50:55 +0000 (19:50 +0000)]
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
Sanjay Patel [Sun, 8 Feb 2015 19:38:25 +0000 (19:38 +0000)]
generalize test; nothing Nehalem-specific here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228532
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 8 Feb 2015 19:15:33 +0000 (19:15 +0000)]
[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
Lang Hames [Sun, 8 Feb 2015 19:14:56 +0000 (19:14 +0000)]
[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
Sanjay Patel [Sun, 8 Feb 2015 18:54:22 +0000 (18:54 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228529
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 8 Feb 2015 18:33:13 +0000 (18:33 +0000)]
[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
Zachary Turner [Sun, 8 Feb 2015 18:08:51 +0000 (18:08 +0000)]
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
Simon Pilgrim [Sun, 8 Feb 2015 17:13:54 +0000 (17:13 +0000)]
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
Bjorn Steinbrink [Sun, 8 Feb 2015 17:07:14 +0000 (17:07 +0000)]
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
NAKAMURA Takumi [Sun, 8 Feb 2015 11:15:08 +0000 (11:15 +0000)]
[CMake] Kaleidoscope-Orc: Update libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228524
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 8 Feb 2015 08:27:19 +0000 (08:27 +0000)]
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
David Blaikie [Sun, 8 Feb 2015 07:20:04 +0000 (07:20 +0000)]
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
Lang Hames [Sun, 8 Feb 2015 04:34:13 +0000 (04:34 +0000)]
[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
Tim Northover [Sun, 8 Feb 2015 00:50:47 +0000 (00:50 +0000)]
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
Zachary Turner [Sun, 8 Feb 2015 00:41:31 +0000 (00:41 +0000)]
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
Zachary Turner [Sun, 8 Feb 2015 00:29:29 +0000 (00:29 +0000)]
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
Craig Topper [Sat, 7 Feb 2015 23:36:51 +0000 (23:36 +0000)]
[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
Craig Topper [Sat, 7 Feb 2015 23:36:36 +0000 (23:36 +0000)]
[X86] Add GETSEC instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228514
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 7 Feb 2015 23:28:16 +0000 (23:28 +0000)]
[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
David Blaikie [Sat, 7 Feb 2015 23:23:43 +0000 (23:23 +0000)]
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
Simon Pilgrim [Sat, 7 Feb 2015 21:44:06 +0000 (21:44 +0000)]
[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
Benjamin Kramer [Sat, 7 Feb 2015 21:37:08 +0000 (21:37 +0000)]
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
Joerg Sonnenberger [Sat, 7 Feb 2015 21:24:06 +0000 (21:24 +0000)]
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
Simon Pilgrim [Sat, 7 Feb 2015 21:20:11 +0000 (21:20 +0000)]
[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
Benjamin Kramer [Sat, 7 Feb 2015 19:29:02 +0000 (19:29 +0000)]
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
Bjorn Steinbrink [Sat, 7 Feb 2015 17:54:36 +0000 (17:54 +0000)]
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
Jonathan Roelofs [Sat, 7 Feb 2015 17:18:26 +0000 (17:18 +0000)]
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
Ahmed Bougacha [Sat, 7 Feb 2015 17:04:29 +0000 (17:04 +0000)]
[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
Benjamin Kramer [Sat, 7 Feb 2015 16:41:12 +0000 (16:41 +0000)]
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
Benjamin Kramer [Sat, 7 Feb 2015 16:41:02 +0000 (16:41 +0000)]
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
Simon Pilgrim [Sat, 7 Feb 2015 16:14:55 +0000 (16:14 +0000)]
[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
Simon Pilgrim [Sat, 7 Feb 2015 16:07:27 +0000 (16:07 +0000)]
[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
Andrea Di Biagio [Sat, 7 Feb 2015 13:56:20 +0000 (13:56 +0000)]
Fix typos; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228493
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 7 Feb 2015 12:28:15 +0000 (12:28 +0000)]
Move DebugLocs around instead of copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228491
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 7 Feb 2015 08:26:40 +0000 (08:26 +0000)]
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
Chandler Carruth [Sat, 7 Feb 2015 08:12:22 +0000 (08:12 +0000)]
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
Hal Finkel [Sat, 7 Feb 2015 07:32:58 +0000 (07:32 +0000)]
[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
Bruce Mitchener [Sat, 7 Feb 2015 06:35:30 +0000 (06:35 +0000)]
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
Zachary Turner [Sat, 7 Feb 2015 02:02:23 +0000 (02:02 +0000)]
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
Zachary Turner [Sat, 7 Feb 2015 01:47:14 +0000 (01:47 +0000)]
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
Sean Silva [Sat, 7 Feb 2015 01:16:26 +0000 (01:16 +0000)]
[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
Duncan P. N. Exon Smith [Sat, 7 Feb 2015 01:07:30 +0000 (01:07 +0000)]
Support: Fix tests for VirtualityString
Since these `dwarf` functions return `const char *`, the tests need to
use `StringRef` for checks. Should fix, e.g., hexagon [1].
[1]: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22435
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228478
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Feb 2015 00:37:15 +0000 (00:37 +0000)]
Support: Add dwarf::getVirtuality()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228474
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 7 Feb 2015 00:36:23 +0000 (00:36 +0000)]
Support: Use Dwarf.def for DW_VIRTUALITY, NFC
Use definition file for `DW_VIRTUALITY_*`. Add a `DW_VIRTUALITY_max`
both for ease of testing and for future use by the `LLParser`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228473
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 23:46:49 +0000 (23:46 +0000)]
Support: Add dwarf::getAttributeEncoding()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228470
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 23:45:37 +0000 (23:45 +0000)]
Support: Rewrite AttributeEncodingString(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228469
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 23:44:24 +0000 (23:44 +0000)]
Support: Stop stringifying DW_ATE_{lo,hi}_user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228468
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 6 Feb 2015 23:30:06 +0000 (23:30 +0000)]
[PowerPC] Fixup incomplete revert of test/CodeGen/PowerPC/tls-pic.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228467
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 6 Feb 2015 23:26:33 +0000 (23:26 +0000)]
[Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-irgen.
This tutorial builds on the lazy_codegen kaleidoscope/orc tutorial by making
a small set of changes (~75 lines diff) to defer ir-generation for function
definitions until functions are actually referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228466
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 6 Feb 2015 23:25:38 +0000 (23:25 +0000)]
Add code to llvm-objdump so the -section option with -macho will dump literal
sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228465
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 Feb 2015 23:15:39 +0000 (23:15 +0000)]
[AArch64] Use the source location of the IR branch when creating Bcc
from a conditional branch fed by an add/sub/mul-with-overflow node.
We previously used the SDLoc of the overflow node, for no good reason.
In some cases, this led to the Bcc and B terminators having different
source orders, and DBG_VALUEs being inserted between them.
The real issue is with the code that can't handle DBG_VALUEs between
terminators: the few places affected by this will be fixed soon.
In the meantime, fixing the SDLoc is a positive change no matter what.
No tests, as I have no idea how to get .loc emitted for branches?
rdar://
19347133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228463
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 Feb 2015 23:12:15 +0000 (23:12 +0000)]
[X86][AVX2] Begun adding AVX2 integer stack folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228462
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 6 Feb 2015 23:07:40 +0000 (23:07 +0000)]
Revert "r227976 - [PowerPC] Yet another approach to __tls_get_addr" and related fixups
Unfortunately, even with the workaround of disabling the linker TLS
optimizations in Clang restored (which has already been done), this still
breaks self-hosting on my P7 machine (-O3 -DNDEBUG -mcpu=native).
Bill is currently working on an alternate implementation to address the TLS
issue in a way that also fully elides the linker bug (which, unfortunately,
this approach did not fully), so I'm reverting this now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228460
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 6 Feb 2015 23:04:53 +0000 (23:04 +0000)]
[Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-codegen.
This tutorial builds on the initial kaleidoscope/orc tutorial by adding a
LazyEmittingLayer to the custom stack. This extra layer defers compilation
of modules in the JIT until they are statically referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228459
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:55:13 +0000 (22:55 +0000)]
Support: Add dwarf::getLanguage()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228458
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:53:19 +0000 (22:53 +0000)]
Support: Rewrite dwarf::LanguageString(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228457
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 6 Feb 2015 22:52:04 +0000 (22:52 +0000)]
[Orc] Add a Kaleidoscope tutorial for Orc demonstrating eager compilation.
This tutorial demonstrates a very basic custom Orc JIT stack that performs eager
compilation: All modules are CodeGen'd immediately upon being added to the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228456
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:50:13 +0000 (22:50 +0000)]
IR: Allow 32-bits for lines in debug location
Remove unnecessary restriction of 24-bits for line numbers in
`MDLocation`.
The rest of the debug info schema (with the exception of local
variables) uses 32-bits for line numbers. As I introduce the
specialized nodes, it makes sense to canonicalize on one size or the
other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228455
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 6 Feb 2015 22:48:43 +0000 (22:48 +0000)]
[Orc] Add more missing headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228454
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 6 Feb 2015 22:43:52 +0000 (22:43 +0000)]
use local variables; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228452
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:34:48 +0000 (22:34 +0000)]
Support: Stop stringifying DW_LANG_{lo,hi}_user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228451
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:29:35 +0000 (22:29 +0000)]
AsmParser: Use DW_TAG_hi_user instead of magic constant, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228448
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:28:05 +0000 (22:28 +0000)]
AsmWriter: Extract writeTag(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228447
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 6 Feb 2015 22:27:22 +0000 (22:27 +0000)]
AsmWriter: Extract writeMetadataAsOperand(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228446
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 6 Feb 2015 21:47:39 +0000 (21:47 +0000)]
[msan] Fix "missing origin" in atomic store.
An atomic store always make the target location fully initialized (in the
current implementation). It should not store origin. Initialized memory can't
have meaningful origin, and, due to origin granularity (4 bytes) there is a
chance that this extra store would overwrite meaningfull origin for an adjacent
location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228444
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Esfahani [Fri, 6 Feb 2015 21:33:08 +0000 (21:33 +0000)]
Test commit to see if it triggers an email to llvm-commits. No change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228442
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 6 Feb 2015 20:42:03 +0000 (20:42 +0000)]
Try to fix Makefile build for LLVMDebugInfoPDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228437
91177308-0d34-0410-b5e6-
96231b3b80d8