oota-llvm.git
9 years ago[X86] Preserve mem refs on newly created 'Store' node instead of 'Load' node when...
Craig Topper [Tue, 10 Feb 2015 06:29:28 +0000 (06:29 +0000)]
[X86] Preserve mem refs on newly created 'Store' node instead of 'Load' node when handling store unfolding.

Bug spotted by Steve King.

I have no idea how to test this.

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

9 years ago[X86] Remove unnecessary alignment checks from the load folding tables.
Craig Topper [Tue, 10 Feb 2015 05:10:50 +0000 (05:10 +0000)]
[X86] Remove unnecessary alignment checks from the load folding tables.

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

9 years agoTeach llvm_add_library() to find include dirs.
Zachary Turner [Tue, 10 Feb 2015 05:04:37 +0000 (05:04 +0000)]
Teach llvm_add_library() to find include dirs.

Since header files are not compilation units, CMake does not require
you to specify them in the CMakeLists.txt file.  As a result, unless a
header file is explicitly added, CMake won't know about it, and when
generating IDE-based projects, CMake won't put the header files into
the IDE project.  LLVM currently tries to deal with this in two ways:

  1) It looks for all .h files that are in the project directory, and
     adds those.
  2) llvm_add_library() understands the ADDITIONAL_HEADERS argument,
     which allows one to list an arbitrary list of headers.

This patch takes things one step further.  It adds the ability for
llvm_add_library() to take an ADDITIONAL_HEADER_DIRS argument, which
will specify a list of folders which CMake will glob for header files.
Furthermore, it will glob not only for .h files, but also for .inc
files.

Included in this CL is an update to one of the existing users of
ADDITIONAL_HEADERS to use this new argument instead, to serve as an
illustration of how this cleans up the CMake.

The big advantage of this new approach is that until now, there was no
way for the IDE projects to locate the header files that are in the
include tree.  In other words, if you are in, for example,
lib/DebugInfo/DWARF, the corresponding includes for this project will
be located under include/llvm/DebugInfo/DWARF.  Now, in the
CMakeLists.txt for lib/DebugInfo/DWARF, you can simply write:

  ADDITIONAL_HEADER_DIRS
  ../../include/llvm/DebugInfo/DWARF

as an argument to llvm_add_library(), and all header files will get
added to the IDE project.

Differential Revision: http://reviews.llvm.org/D7460
Reviewed By: Chris Bieneman

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

9 years agoDefine HAVE_DIA_SDK on Windows when DIA is present.
Zachary Turner [Tue, 10 Feb 2015 05:04:25 +0000 (05:04 +0000)]
Define HAVE_DIA_SDK on Windows when DIA is present.

This allows all CMake projects, as well as C++ code, to detect if
and when DIA SDK is available for use so that we can enable the
DIA-based PDB reader implementation.

Differential Revision: http://reviews.llvm.org/D7457
Reviewed By: Chandler Carruth

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

9 years agoRemove non-test files that appear to have been accidentally committed in r228641.
Nick Lewycky [Tue, 10 Feb 2015 02:39:17 +0000 (02:39 +0000)]
Remove non-test files that appear to have been accidentally committed in r228641.

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

9 years ago[x86] Fix PR22524: the DAG combiner was incorrectly handling illegal
Chandler Carruth [Tue, 10 Feb 2015 02:25:56 +0000 (02:25 +0000)]
[x86] Fix PR22524: the DAG combiner was incorrectly handling illegal
nodes when folding bitcasts of constants.

We can't fold things and then check after-the-fact whether it was legal.
Once we have formed the DAG node, arbitrary other nodes may have been
collapsed to it. There is no easy way to go back. Instead, we need to
test for the specific folding cases we're interested in and ensure those
are legal first.

This could in theory make this less powerful for bitcasting from an
integer to some vector type, but AFAICT, that can't actually happen in
the SDAG so its fine. Now, we *only* whitelist specific int->fp and
fp->int bitcasts for post-legalization folding. I've added the test case
from the PR.

(Also as a note, this does not appear to be in 3.6, no backport needed)

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

9 years agoVerifier: reuse getInlinedAt() result, NFC
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 02:25:18 +0000 (02:25 +0000)]
Verifier: reuse getInlinedAt() result, NFC

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

9 years ago[DOC] Asserts are only enabled in Debug build, update the doc accordingly
Mehdi Amini [Tue, 10 Feb 2015 02:04:29 +0000 (02:04 +0000)]
[DOC] Asserts are only enabled in Debug build, update the doc accordingly

Summary:
The CMake configuration is explicitely looking for Debug build, all the
other variant disable assertions.

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoIR: Remove unnecessary fields from MDTemplateParameter
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:59:57 +0000 (01:59 +0000)]
IR: Remove unnecessary fields from MDTemplateParameter

I noticed this fields were never used in r228607, but I neglected to
propagate that into `MDTemplateParameter` until now.  This really should
have been done before commit in r228640; sorry for the churn.

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

9 years agoVerifier: Check for valid tags in debug nodes
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:40:40 +0000 (01:40 +0000)]
Verifier: Check for valid tags in debug nodes

Check that specialized `DebugNode`s have valid `DW_TAG`s.

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

9 years agoIR: Add accessors to MDExpression
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:36:46 +0000 (01:36 +0000)]
IR: Add accessors to MDExpression

Add some accessors to `MDExpression`.

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

9 years agoVerifier: Add simple checks for MDLocation
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:32:56 +0000 (01:32 +0000)]
Verifier: Add simple checks for MDLocation

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

9 years agoVerifier: Create stubs for specialized metadata nodes
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:09:50 +0000 (01:09 +0000)]
Verifier: Create stubs for specialized metadata nodes

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

9 years agoAsmParser: Add stubs for specialized MDNodes, NFC
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 01:08:16 +0000 (01:08 +0000)]
AsmParser: Add stubs for specialized MDNodes, NFC

Well, the exact error from the failed parse will change, but...

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

9 years agoX86: Emit an ABI compliant prologue and epilogue for Win64
David Majnemer [Tue, 10 Feb 2015 00:57:42 +0000 (00:57 +0000)]
X86: Emit an ABI compliant prologue and epilogue for Win64

Win64 has specific contraints on what valid prologues and epilogues look
like.  This constraint is born from the flexibility and descriptiveness
of Win64's unwind opcodes.

Prologues previously emitted by LLVM could not be represented by the
unwind opcodes, preventing operations powered by stack unwinding to
successfully work.

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

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

9 years agoIR: Add specialized debug info metadata nodes
Duncan P. N. Exon Smith [Tue, 10 Feb 2015 00:52:32 +0000 (00:52 +0000)]
IR: Add specialized debug info metadata nodes

Add specialized debug info metadata nodes that match the `DIDescriptor`
wrappers (used by `DIBuilder`) closely.  Assembly and bitcode support to
follow soon (it'll mostly just be obvious), but this sketches in today's
schema.  This is the first big commit (well, the only *big* one aside
from the testcase changes that'll come when I move this into place) for
PR22464.

I've marked a bunch of obvious changes as `TODO`s in the source; I plan
to make those changes promptly after this hierarchy is moved underneath
`DIDescriptor`, but for now I'm aiming mostly to match the status quo.

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

9 years agoMigrate PPCAsmPrinter's subtarget from reference to pointer in
Eric Christopher [Tue, 10 Feb 2015 00:44:17 +0000 (00:44 +0000)]
Migrate PPCAsmPrinter's subtarget from reference to pointer in
preparation for making it MachineFunction dependent.

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

9 years ago[Orc] Back out one of the GCC ICE workarounds from r228568. NFC.
Lang Hames [Tue, 10 Feb 2015 00:37:26 +0000 (00:37 +0000)]
[Orc] Back out one of the GCC ICE workarounds from r228568. NFC.

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

9 years agoFix the clang -Werror build (-Wunused-variable)
David Blaikie [Tue, 10 Feb 2015 00:16:36 +0000 (00:16 +0000)]
Fix the clang -Werror build (-Wunused-variable)

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

9 years agoAdjust how we avoid poll insertion inside the poll function (NFC)
Philip Reames [Tue, 10 Feb 2015 00:04:53 +0000 (00:04 +0000)]
Adjust how we avoid poll insertion inside the poll function (NFC)

I realized that my early fix for this was overly complicated.  Rather than scatter checks around in a bunch of places, just exit early when we visit the poll function itself.

Thinking about it a bit, the whole inlining mechanism used with gc.safepoint_poll could probably be cleaned up a bit.  Originally, poll insertion was fused with gc relocation rewriting.  It might be worth going back to see if we can simplify the chain of events now that these two are seperated.  As one thought, maybe it makes sense to rewrite calls inside the helper function before inlining it to the many callers.  This would require us to visit the poll function before any other functions though..

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

9 years agoReverting r228628; it broke at least one builder due to the forward declare of RaiseE...
Aaron Ballman [Tue, 10 Feb 2015 00:00:54 +0000 (00:00 +0000)]
Reverting r228628; it broke at least one builder due to the forward declare of RaiseException.

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

9 years agoDebug info: When updating debug info during SROA, do not emit debug info
Adrian Prantl [Mon, 9 Feb 2015 23:57:22 +0000 (23:57 +0000)]
Debug info: When updating debug info during SROA, do not emit debug info
for any padding introduced by SROA. In particular, do not emit debug info
for an alloca that represents only the padding introduced by a previous
iteration.

Fixes PR22495.

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

9 years agoDebug info: Use DW_OP_bit_piece instead of DW_OP_piece in the
Adrian Prantl [Mon, 9 Feb 2015 23:57:15 +0000 (23:57 +0000)]
Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in the
intermediate representation. This
- increases consistency by using the same granularity everywhere
- allows for pieces < 1 byte
- DW_OP_piece didn't actually allow storing an offset.

Part of PR22495.

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

9 years ago[Hexagon] Adding missing load instructions and removing an unused multiclass parameter.
Colin LeMahieu [Mon, 9 Feb 2015 23:45:24 +0000 (23:45 +0000)]
[Hexagon] Adding missing load instructions and removing an unused multiclass parameter.

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

9 years agoADT: Allow up to 18 arguments in hash_combine()
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 23:21:05 +0000 (23:21 +0000)]
ADT: Allow up to 18 arguments in hash_combine()

I just realized that the specialized metadata node patch I'm about to
commit won't compile on old compilers.  Bump `hash_combine()`'s support
for non-variadic templates to 18 (I tested this by reversing the logic
in the #ifdef).

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

9 years agoOn Windows, we now use RaiseException to generate the kind of trap we require (one...
Aaron Ballman [Mon, 9 Feb 2015 23:11:39 +0000 (23:11 +0000)]
On Windows, we now use RaiseException to generate the kind of trap we require (one which calls our vectored exception handler), and fall back to using a volatile write to simulate a trap elsewhere.

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

9 years ago[Hexagon] Factoring classes out of some load patterns and deleting some unused ones.
Colin LeMahieu [Mon, 9 Feb 2015 23:05:44 +0000 (23:05 +0000)]
[Hexagon] Factoring classes out of some load patterns and deleting some unused ones.

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

9 years ago[Statepoint] Improve two asserts, fix some style (NFC)
Ramkumar Ramachandra [Mon, 9 Feb 2015 23:02:10 +0000 (23:02 +0000)]
[Statepoint] Improve two asserts, fix some style (NFC)

Summary:
It's important that our users immediately know what gc.safepoint_poll
is. Also fix the style of the declaration of CreateGCStatepoint, in
preparation for another change that will wrap it.

Reviewers: reames

Subscribers: llvm-commits

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

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

9 years agoPlaceSafepoints: modernize gc.result.* -> gc.result
Ramkumar Ramachandra [Mon, 9 Feb 2015 23:00:40 +0000 (23:00 +0000)]
PlaceSafepoints: modernize gc.result.* -> gc.result

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

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

9 years agoDebugInfo: Remove DW_TAG_constant
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 22:48:04 +0000 (22:48 +0000)]
DebugInfo: Remove DW_TAG_constant

Remove handling for DW_TAG_constant.  We started producing it in
r110656, but reverted that in r110876 without dropping the support.
Finish the job.

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

9 years agoUpdate file comment to clarify points highlighted in review (NFC)
Philip Reames [Mon, 9 Feb 2015 22:44:03 +0000 (22:44 +0000)]
Update file comment to clarify points highlighted in review (NFC)

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

9 years agoUse range for loops in PlaceSafepoints (NFC)
Philip Reames [Mon, 9 Feb 2015 22:26:11 +0000 (22:26 +0000)]
Use range for loops in PlaceSafepoints (NFC)

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

9 years agoIR: Take uint64_t in DIBuilder::createExpression()
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 22:13:27 +0000 (22:13 +0000)]
IR: Take uint64_t in DIBuilder::createExpression()

`DIExpression` deals with `uint64_t`, so it doesn't make sense that
`createExpression()` is created from `int64_t`.  Switch to `uint64_t` to
unify them.

I've temporarily left in the `int64_t` version, which forwards to the
`uint64_t` version.  I'll delete it once I've updated the callers.

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

9 years agoIntroduce more tests for PlaceSafepoints
Philip Reames [Mon, 9 Feb 2015 22:10:15 +0000 (22:10 +0000)]
Introduce more tests for PlaceSafepoints

These tests the two optimizations for backedge insertion currently implemented and the split backedge flag which is currently off by default.

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

9 years agoRevert "Raising minimum required CMake version to 2.8.12.2."
Chris Bieneman [Mon, 9 Feb 2015 22:07:49 +0000 (22:07 +0000)]
Revert "Raising minimum required CMake version to 2.8.12.2."

This reverts commit add62ac537d8249fa2161405066e318ca80e199d.

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

9 years agoRaising minimum required CMake version to 2.8.12.2.
Chris Bieneman [Mon, 9 Feb 2015 22:05:07 +0000 (22:05 +0000)]
Raising minimum required CMake version to 2.8.12.2.

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

9 years ago[Hexagon] Removing more V4 predicates since V4 is the required minimum.
Colin LeMahieu [Mon, 9 Feb 2015 21:56:37 +0000 (21:56 +0000)]
[Hexagon] Removing more V4 predicates since V4 is the required minimum.

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

9 years agoMinor test cleanup
Philip Reames [Mon, 9 Feb 2015 21:50:31 +0000 (21:50 +0000)]
Minor test cleanup

a) add gc attribute
b) remove unused param

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

9 years agoMemDerefPrinter: Require DataLayoutPass for higher accuracy
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:50:03 +0000 (21:50 +0000)]
MemDerefPrinter: Require DataLayoutPass for higher accuracy

Without a valid data layout, deferenceable(N) doesn't get parsed or
propagated. Since this is the key item we are testing, add a dependency
on the pass.

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

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

9 years agoAdd basic tests for PlaceSafepoints
Philip Reames [Mon, 9 Feb 2015 21:48:05 +0000 (21:48 +0000)]
Add basic tests for PlaceSafepoints

This is just adding really simple tests which should have been part of the original submission.  When doing so, I discovered that I'd mistakenly removed required pieces when preparing the patch for upstream submission.  I fixed two such bugs in this submission.

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

9 years agoVerifier: Const-qualify Metadata, NFC
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:30:05 +0000 (21:30 +0000)]
Verifier: Const-qualify Metadata, NFC

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

9 years agoIR: Document horrible abuse of loose DIDescriptor, NFC
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:26:34 +0000 (21:26 +0000)]
IR: Document horrible abuse of loose DIDescriptor, NFC

I'll circle back and fix this somehow; for now I just don't want to
forget about it.

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

9 years agoIR: Remove dead code in DITemplate*
Duncan P. N. Exon Smith [Mon, 9 Feb 2015 21:23:34 +0000 (21:23 +0000)]
IR: Remove dead code in DITemplate*

These are never referenced or filled in.

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

9 years agoisDereferenceablePointer: look through gc.relocate calls
Ramkumar Ramachandra [Mon, 9 Feb 2015 21:08:03 +0000 (21:08 +0000)]
isDereferenceablePointer: look through gc.relocate calls

While a theoretical GC might change dereferenceability on collection,
there is no such known collector and no need to account for the case
with a flag yet.

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

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

9 years ago[Hexagon] Removing v2-4 flags. V4 is the minimum supported version.
Colin LeMahieu [Mon, 9 Feb 2015 21:07:35 +0000 (21:07 +0000)]
[Hexagon] Removing v2-4 flags.  V4 is the minimum supported version.

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

9 years agoReduce the LockFileManager timeout, and provide unsafeRemoveLockFile
Ben Langmuir [Mon, 9 Feb 2015 20:34:24 +0000 (20:34 +0000)]
Reduce the LockFileManager timeout, and provide unsafeRemoveLockFile

5 minutes is an eternity, so try to strike a better balance between
waiting long enough for any reasonable module build and not so long that
users kill the process because they think it's hanging.

Also give the client a way to delete the lock file after a timeout.

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

9 years ago[Hexagon] Factoring classes out of store patterns.
Colin LeMahieu [Mon, 9 Feb 2015 20:33:46 +0000 (20:33 +0000)]
[Hexagon] Factoring classes out of store patterns.

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

9 years ago[Hexagon] Formatting v5 TD file. Removing commented defs.
Colin LeMahieu [Mon, 9 Feb 2015 20:03:42 +0000 (20:03 +0000)]
[Hexagon] Formatting v5 TD file.  Removing commented defs.

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

9 years agoMemDepPrinter: cleanup a few loops (NFC)
Ramkumar Ramachandra [Mon, 9 Feb 2015 19:49:54 +0000 (19:49 +0000)]
MemDepPrinter: cleanup a few loops (NFC)

Make use of the newly introduced inst_range to clean up two loops. Clean
up a third one while at it.

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

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

9 years agoAddress post-commit review for rL228587: make it explicit that the
Sanjoy Das [Mon, 9 Feb 2015 19:39:00 +0000 (19:39 +0000)]
Address post-commit review for rL228587: make it explicit that the
<NW> bit of a SCEVAddRecExpr does not depend on the sign of the step
and the start value of the step.

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

9 years ago[Hexagon] Cleaning up definition formatting.
Colin LeMahieu [Mon, 9 Feb 2015 19:24:44 +0000 (19:24 +0000)]
[Hexagon] Cleaning up definition formatting.

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

9 years agoClarify the wording on what it means for a SCEVAddRecExpr to be <NW>.
Sanjoy Das [Mon, 9 Feb 2015 18:44:42 +0000 (18:44 +0000)]
Clarify the wording on what it means for a SCEVAddRecExpr to be <NW>.

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

9 years agoBugfix: SCEV incorrectly marks certain add recurrences as nsw
Sanjoy Das [Mon, 9 Feb 2015 18:34:55 +0000 (18:34 +0000)]
Bugfix: SCEV incorrectly marks certain add recurrences as nsw

When creating a scev for sext({X,+,Y}), scev checks if the expression
is equivalent to {sext X,+,zext Y}.  If it can prove that, it also
tags the original {X,+,Y} as <nsw>, which is not correct.

In the test case I run `-scalar-evolution` twice because the bug
manifests only once SCEV has run through and seen the `sext`
expressions (and then does a in-place mutation on {X,+,Y}).

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

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

9 years ago[Orc] Revert r228567 (GCC ICE workaround) - it doesn't seem to have helped.
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

9 years agofixed to test features, not CPUs
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

9 years agoThis change implements the following three logical vector operations:
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

9 years agorename variable to give it some meaning; remove obvious comments; NFC
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

9 years agofix comment that didn't match the code; remove unnecessary braces; NFC
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

9 years agoAllow ScalarEvolution to catch more min/max cases
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

9 years ago[Orc] Try another workaround for the GCC 4.7.2 ICE introduced in r228557. NFC.
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

9 years ago[Orc] Tweak lambda capture lists to try to avoid an ICE on gcc-4.7.2. NFC.
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

9 years agoFix a bug in DemoteRegToStack where a reload instruction was inserted into the
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

9 years agoMC: Calculate intra-section symbol differences correctly for COFF
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

9 years ago[Orc] Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
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

9 years ago[X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer used.
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

9 years ago[X86] Remove 'memop' uses from AVX512. Use 'load' instead.
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

9 years agoDeadArgElim: fix mismatch in accounting of array return types.
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

9 years agoDeadArgElim: assess uses of entire return value aggregate.
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

9 years ago[Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.
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

9 years agoInstCombine: propagate nonNull through assume
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

9 years ago[emacs] Get llvm-mode to font-lock "personality"
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

9 years agoFix -Wuninitialized build by referencing the relevant ctor parameter instead of the...
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

9 years agoMake PDBSymbol's IPDBSymbol reference const.
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

9 years agoBugfix: ScalarEvolution incorrectly assumes that the start of certain
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

9 years ago[X86] Remove the remaining uses of memop from AVX and AVX2 instruction patterns....
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

9 years agoMetadata: Use <algorithm> to simplify code. NFC.
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

9 years agofix test attributes; this is an SSE2 test, not a Nehalem test
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

9 years agofix test attributes; this is an x86-64 test, not a Nehalem test
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

9 years agofix test attributes; these are SSE2 tests, not Nehalem tests
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

9 years agoKaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove...
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

9 years agoDebugInfoPDB: Make the symbol base case hold an IPDBSession ref.
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

9 years agofix test attributes; these are SSE2 tests, not Nehalem tests
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

9 years agoKaleidoscope-Orc: Extract IRGen work into a utility function.
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

9 years agoConstify the Orc Kaleidoscope examples IRGen functions.
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

9 years agofix test attributes; these are x86-64 tests, not Nehalem tests
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

9 years agofix test attributes; these are MMX tests, not Nehalem tests
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

9 years agofix test attributes; these are SSE2 tests, not Nehalem tests
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

9 years agogeneralize test; nothing Nehalem-specific here
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

9 years ago[Orc][Kaleidoscope] Build Kaleidoscope/Orc tutorials with warnings.
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

9 years ago[Orc][Kaleidoscope] Remove fixed sized buffers from string conversion code and
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

9 years agofix typos; NFC
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

9 years ago[X86][AVX2] AVX2 broadcast + permute memory folding tests.
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

9 years agoMake UTF8->UTF16 conversion null terminate output on empty input.
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

9 years agoMoved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. NFC.
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

9 years agoCorrectly combine alias.scope metadata by a union instead of intersecting
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

9 years ago[CMake] Kaleidoscope-Orc: Update libdeps.
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

9 years agoMasked Gather and Scatter Intrinsics.
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

9 years agoAdd CMake build support for Orc examples (& fix some clang -Werror build
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

9 years ago[Orc][Kaleidoscope] Fix method-name think-o. NFC.
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

9 years agoARM & AArch64: teach LowerVSETCC that output type size may differ from input.
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