oota-llvm.git
10 years agoLoopVectorizer: Preserve fast-math flags
Arnold Schwaighofer [Wed, 5 Mar 2014 21:10:47 +0000 (21:10 +0000)]
LoopVectorizer: Preserve fast-math flags

Fixes PR19045.

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

10 years agoAlways print the implicit .text at the start of an asm file.
Rafael Espindola [Wed, 5 Mar 2014 20:09:15 +0000 (20:09 +0000)]
Always print the implicit .text at the start of an asm file.

Before llvm-mc would print it, but llc was assuming that it would produce
another section changing directive before one was needed. That assumption is
false with inline asm.

Fixes PR19049.

Another option would be to always create the section, but in the asm printer
avoid printing sections changes during initialization. That would work, but
* We do use the fact that llvm-mc prints it in testing. The tests can be changed
  if needed.
* A quick poll on IRC suggest that most developers prefer the implicit .text to
  be printed.

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

10 years agoFix an inconsistency in treatment of trailing / in path::const_iterator
Ben Langmuir [Wed, 5 Mar 2014 19:56:30 +0000 (19:56 +0000)]
Fix an inconsistency in treatment of trailing / in path::const_iterator

When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.

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

10 years agoConstantFolding: Also fold the vector overloads of our math intrinsics.
Benjamin Kramer [Wed, 5 Mar 2014 19:41:48 +0000 (19:41 +0000)]
ConstantFolding: Also fold the vector overloads of our math intrinsics.

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

10 years agoLower AVX v4i64->v4i32 truncate to one shuffle.
Cameron McInally [Wed, 5 Mar 2014 19:41:16 +0000 (19:41 +0000)]
Lower AVX v4i64->v4i32 truncate to one shuffle.

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

10 years agoFix clang -Werror build break due to mismatched sign comparison.
David Blaikie [Wed, 5 Mar 2014 18:53:36 +0000 (18:53 +0000)]
Fix clang -Werror build break due to mismatched sign comparison.

Originally committed in r202985.

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

10 years agoWork around MSVC bug in IntrusiveRefCntPtr.h
Hans Wennborg [Wed, 5 Mar 2014 16:26:04 +0000 (16:26 +0000)]
Work around MSVC bug in IntrusiveRefCntPtr.h

The build was failing with:

  error C2664: 'std::atomic_int::atomic_int(const std::atomic_int &)' : cannot convert argument 1 from 'int' to 'const std::atomic_int &'

Apparently "std::atomic_int x(0)" doesn't work, but "std::atomic<int> x(0)"
does.

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

10 years agoARM: Correctly align arguments after a byval struct is passed on the stack
Oliver Stannard [Wed, 5 Mar 2014 15:25:27 +0000 (15:25 +0000)]
ARM: Correctly align arguments after a byval struct is passed on the stack

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

10 years agoAdd a ThreadSafeRefCountedBase
Ben Langmuir [Wed, 5 Mar 2014 15:24:33 +0000 (15:24 +0000)]
Add a ThreadSafeRefCountedBase

A version of RefCountedBase that uses std::atomic_int to store its
reference count.

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

10 years ago[LangRef] Improve llvm.mem.parallel_loop_access example
Tobias Grosser [Wed, 5 Mar 2014 13:36:04 +0000 (13:36 +0000)]
[LangRef] Improve llvm.mem.parallel_loop_access example

The following changes have been applied:

  - Removed 'align 4'. We can simplify this away, as it does not provide useful
    information in the example.
  - Use named instructions instead of '%0'. This is nicer, but more importantly
    this makes the IR valid. Before we had two assignments to %0 in a single
    example.
  - Add a missing branch instruction to make the loop structure clear.
  - Move one access into outer.for.body to make it not look that empty.
  - The statments that are only in the outer loop body should not reference the
    inner loop metadata, but only the outer loop. Only statements in both loops
    should reference both surrounding loops.
  - Rename the array indexes to make them all independent. Before there were
    identical array indexes in the inner and the outer loop. We want to
    avoid this special case as it may lead to confusion.

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

10 years agoEnable integrated assembler on OpenBSD/PPC32 by default, too.
Joerg Sonnenberger [Wed, 5 Mar 2014 11:37:04 +0000 (11:37 +0000)]
Enable integrated assembler on OpenBSD/PPC32 by default, too.
From Brad Smith.

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

10 years agoThis patch implements .set dsp directive and sets appropriate feature bits.This direc...
Vladimir Medic [Wed, 5 Mar 2014 11:05:09 +0000 (11:05 +0000)]
This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file.

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

10 years agoAdd missing parenthesis in SCEV comment
Tobias Grosser [Wed, 5 Mar 2014 10:37:17 +0000 (10:37 +0000)]
Add missing parenthesis in SCEV comment

Contributed-by: Michael Zolutukin <mzolotukhin@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202963 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[Layering] Move AutoUpgrade.h into the IR library where its
Chandler Carruth [Wed, 5 Mar 2014 10:34:14 +0000 (10:34 +0000)]
[Layering] Move AutoUpgrade.h into the IR library where its
implementation already lives.

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

10 years ago[Layering] Move DebugLoc.h into the IR library. The implementation
Chandler Carruth [Wed, 5 Mar 2014 10:30:38 +0000 (10:30 +0000)]
[Layering] Move DebugLoc.h into the IR library. The implementation
already lived there and it is where it belongs -- this is the in-memory
debug location representation.

This is just cleanup -- Modules can actually cope with this, but that
doesn't make it right. After chatting with folks that have out-of-tree
stuff, going ahead and moving the rest of the headers seems preferable.

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

10 years ago[C++11] Add overloads for externally used OwningPtr functions.
Ahmed Charles [Wed, 5 Mar 2014 10:27:34 +0000 (10:27 +0000)]
[C++11] Add overloads for externally used OwningPtr functions.

This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particular
functions were determined by building clang/lld/lldb.

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

10 years ago[C++11] Make this interface accept const Use pointers and use override
Chandler Carruth [Wed, 5 Mar 2014 10:21:48 +0000 (10:21 +0000)]
[C++11] Make this interface accept const Use pointers and use override
to ensure we don't mess up any of the overrides. Necessary for cleaning
up the Value use iterators and enabling range-based traversing of use
lists.

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

10 years ago[C++11] Replace OwningPtr::take() with OwningPtr::release().
Ahmed Charles [Wed, 5 Mar 2014 10:19:29 +0000 (10:19 +0000)]
[C++11] Replace OwningPtr::take() with OwningPtr::release().

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 09:10:37 +0000 (09:10 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add release() to OwningPtr.
Ahmed Charles [Wed, 5 Mar 2014 08:25:08 +0000 (08:25 +0000)]
[C++11] Add release() to OwningPtr.

This will make the transition to unique_ptr easier by allowing more
incremental changes.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 07:52:44 +0000 (07:52 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years ago[C++11] Add 'override' keyword to virtual methods that override their base class.
Craig Topper [Wed, 5 Mar 2014 07:30:04 +0000 (07:30 +0000)]
[C++11] Add 'override' keyword to virtual methods that override their base class.

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

10 years agoMake stackmap machineinstrs clobber the scratch regs too.
Andrew Trick [Wed, 5 Mar 2014 07:08:16 +0000 (07:08 +0000)]
Make stackmap machineinstrs clobber the scratch regs too.

Patchpoints already did this. Doing it for stackmaps is a convenience
for the runtime in the event that it needs to scratch register to
patch or perform a runtime call thunk.

Unlike patchpoints, we just assume the AnyRegCC calling
convention. This is the only language and target independent calling
convention specific to stackmaps so makes sense.  Although the calling
convention is not currently used to select the scratch registers.

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

10 years ago[C++11] Add 'override' keyword to IR library.
Craig Topper [Wed, 5 Mar 2014 06:35:38 +0000 (06:35 +0000)]
[C++11] Add 'override' keyword to IR library.

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

10 years ago[C++11] Add 'override' keywords to tablegen code.
Craig Topper [Wed, 5 Mar 2014 05:17:42 +0000 (05:17 +0000)]
[C++11] Add 'override' keywords to tablegen code.

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

10 years ago[C API] Implement LLVM{Get,Set}Alignment for AllocaInst.
Peter Zotov [Wed, 5 Mar 2014 05:05:34 +0000 (05:05 +0000)]
[C API] Implement LLVM{Get,Set}Alignment for AllocaInst.

Patch by Manuel Jacob.

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

10 years agoRemove unnecessary variables.
Ahmed Charles [Wed, 5 Mar 2014 05:04:00 +0000 (05:04 +0000)]
Remove unnecessary variables.

Found self-hosting clang-cl on windows. :)

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

10 years agoFix unused variable in FunctionLoweringInfo.cpp
Hans Wennborg [Wed, 5 Mar 2014 03:21:23 +0000 (03:21 +0000)]
Fix unused variable in FunctionLoweringInfo.cpp

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

10 years agoCheck for dynamic allocas and inline asm that clobbers sp before building
Hans Wennborg [Wed, 5 Mar 2014 02:43:26 +0000 (02:43 +0000)]
Check for dynamic allocas and inline asm that clobbers sp before building
selection dag (PR19012)

In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
to make sure that ESI isn't used as a base pointer register before we choose to
emit rep movs (which clobbers esi).

The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
inline asm that clobbers the stack pointer until SelectionDAGBuilder has
encountered them.

This patch fixes the problem by checking for such things when building the
FunctionLoweringInfo.

Differential Revision: http://llvm-reviews.chandlerc.com/D2954

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

10 years agoChange x86mmx -> x86_mmx in LangRef.rst
Reid Kleckner [Wed, 5 Mar 2014 02:41:37 +0000 (02:41 +0000)]
Change x86mmx -> x86_mmx in LangRef.rst

The correct name of the type in LLVM assembly is "x86_mmx".  Also remove
the reST label "t_x86mmx" because it was unused anyway.

Patch by Manuel Jacob!

Differential Revision: http://llvm-reviews.chandlerc.com/D2955

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

10 years agoC API: Add functions to get or set a GlobalValue's DLLStorageClass
Reid Kleckner [Wed, 5 Mar 2014 02:34:23 +0000 (02:34 +0000)]
C API: Add functions to get or set a GlobalValue's DLLStorageClass

Patch by Manuel Jacob!

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

10 years agoLangRef: Remove stale docs on LLVM types in module structure
Reid Kleckner [Wed, 5 Mar 2014 02:21:50 +0000 (02:21 +0000)]
LangRef: Remove stale docs on LLVM types in module structure

The distinction between "identified" and "literal" struct types is fully
documented in a later section.

Patch by Philip Reames!

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

10 years agoMake the DIEValue constructor even more explicit.
Eric Christopher [Wed, 5 Mar 2014 02:14:02 +0000 (02:14 +0000)]
Make the DIEValue constructor even more explicit.

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

10 years agoTrivial test commit.
Raul E. Silvera [Wed, 5 Mar 2014 02:09:51 +0000 (02:09 +0000)]
Trivial test commit.

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

10 years ago[C++11] Sink the iterator over a Value's users into the Value type
Chandler Carruth [Wed, 5 Mar 2014 01:50:35 +0000 (01:50 +0000)]
[C++11] Sink the iterator over a Value's users into the Value type
itself and teach it to convert between the non-const and const variants.
De-templatetize its usage in APIs to just use the const variant which
always works for those use cases. Also, rename its implementation to
reflect that it is an iterator over *users* not over *uses*.

This is a step toward providing both iterator and range support for
walking the *uses* distinct from the *users*. In a subsequent patch this
will get renamed to make it clear that this is an adaptor over the
fundamental use iterator.

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

10 years agoUse a bool for whether or not an abbreviation has children rather than
Eric Christopher [Wed, 5 Mar 2014 01:44:58 +0000 (01:44 +0000)]
Use a bool for whether or not an abbreviation has children rather than
using a full uint16_t with the flag value... which happens to be
0 or 1. Update the class for bool values and rename functions slightly.

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

10 years agoUse dwarf::Attribute instead of a bare uint16_t.
Eric Christopher [Wed, 5 Mar 2014 01:10:59 +0000 (01:10 +0000)]
Use dwarf::Attribute instead of a bare uint16_t.

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

10 years agoExpand slightly on comment.
Eric Christopher [Wed, 5 Mar 2014 00:43:43 +0000 (00:43 +0000)]
Expand slightly on comment.

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

10 years agoUnindent namespace.
Eric Christopher [Wed, 5 Mar 2014 00:43:41 +0000 (00:43 +0000)]
Unindent namespace.

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

10 years agoUpdate comment.
Eric Christopher [Wed, 5 Mar 2014 00:43:38 +0000 (00:43 +0000)]
Update comment.

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

10 years agoPartially roll back r202915.
Rui Ueyama [Wed, 5 Mar 2014 00:43:02 +0000 (00:43 +0000)]
Partially roll back r202915.

I did not intend to cast a pointer to ulittle32_t there because the return
type is const void*.

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

10 years agoFix endianness bug.
Rui Ueyama [Wed, 5 Mar 2014 00:32:34 +0000 (00:32 +0000)]
Fix endianness bug.

Looks like llvm-readobj is the only customer of this code, and apparently
there's no test to cover this function. I'll write it after finishing
plumbing from llvm-objdump to there.

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

10 years agoAllow constant folding of fma and fmuladd
Matt Arsenault [Wed, 5 Mar 2014 00:02:00 +0000 (00:02 +0000)]
Allow constant folding of fma and fmuladd

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

10 years agoFix duplicate code in ConstantFolding
Matt Arsenault [Wed, 5 Mar 2014 00:01:58 +0000 (00:01 +0000)]
Fix duplicate code in ConstantFolding

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

10 years ago[DAGCombiner] Factor out distributeTruncateThroughAnd
Adam Nemet [Tue, 4 Mar 2014 23:28:31 +0000 (23:28 +0000)]
[DAGCombiner] Factor out distributeTruncateThroughAnd

Currently this code is duplicated across visitSHL, visitSRA and visitSRL.  The
plan is to add rotates as clients to this new function.

There is no functional change intended here.

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

10 years agoRemove a special character in comment that accidentially got committed.
Evan Cheng [Tue, 4 Mar 2014 22:56:57 +0000 (22:56 +0000)]
Remove a special character in comment that accidentially got committed.

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

10 years agoRemove dependence on std::function.
Richard Smith [Tue, 4 Mar 2014 22:13:07 +0000 (22:13 +0000)]
Remove dependence on std::function.

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

10 years agoAdd support for arbitrary functors to CrashRecoveryContext.
Richard Smith [Tue, 4 Mar 2014 21:48:49 +0000 (21:48 +0000)]
Add support for arbitrary functors to CrashRecoveryContext.

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

10 years agoAPFloat: Add a move ctor and operator=
Benjamin Kramer [Tue, 4 Mar 2014 20:26:51 +0000 (20:26 +0000)]
APFloat: Add a move ctor and operator=

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

10 years agollvm-objdump: Indent unwind info contents.
Rui Ueyama [Tue, 4 Mar 2014 19:23:56 +0000 (19:23 +0000)]
llvm-objdump: Indent unwind info contents.

Unwind info contents were indented at the same level as function table
contents. That's a bit confusing because the unwind info is pointed by
function table. In other places we usually increment indentation depth
by one when dereferncing a pointer.

This patch also removes extraneous newlines between function tables.

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

10 years agollvm-objdump: Fix typo in output.
Rui Ueyama [Tue, 4 Mar 2014 19:03:42 +0000 (19:03 +0000)]
llvm-objdump: Fix typo in output.

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

10 years agoMS asm: Attempt to parse variables followed by a bracketed displacement
Reid Kleckner [Tue, 4 Mar 2014 17:57:01 +0000 (17:57 +0000)]
MS asm: Attempt to parse variables followed by a bracketed displacement

This is required to include MSVC's <atomic> header, which we do now in
LLVM.

Tests forthcoming in Clang, since that's where we test semantic inline
asm changes.

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

10 years agoX86: 80-column
Saleem Abdulrasool [Tue, 4 Mar 2014 17:11:46 +0000 (17:11 +0000)]
X86: 80-column

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

10 years ago[CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list.
NAKAMURA Takumi [Tue, 4 Mar 2014 17:05:28 +0000 (17:05 +0000)]
[CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list.

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

10 years ago[PowerPC] support powerpc64le as syntax-checking target (pass2)
Will Schmidt [Tue, 4 Mar 2014 16:51:52 +0000 (16:51 +0000)]
[PowerPC] support powerpc64le as syntax-checking target (pass2)

Register the Asm Printer for the ppc64le target.

This fills in a spot that was missed in an earlier change (r187179).

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

10 years ago[XCore] Fix call of absolute address.
Richard Osborne [Tue, 4 Mar 2014 16:50:30 +0000 (16:50 +0000)]
[XCore] Fix call of absolute address.

Previously for:

tail call void inttoptr (i64 65536 to void ()*)() nounwind

We would emit:

bl 65536

The immediate operand of the bl instruction is a relative offset so it is
wrong to use the absolute address here.

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

10 years ago[CMake] check-llvm: Include "bugpoint" in dependent list.
NAKAMURA Takumi [Tue, 4 Mar 2014 16:13:30 +0000 (16:13 +0000)]
[CMake] check-llvm: Include "bugpoint" in dependent list.

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

10 years agoRemove out-of-date comment in llvm/tools/CMakeLists.txt.
NAKAMURA Takumi [Tue, 4 Mar 2014 16:13:21 +0000 (16:13 +0000)]
Remove out-of-date comment in llvm/tools/CMakeLists.txt.

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

10 years ago[mips][msa] Correct the behaviour of the COPY_FW pseudo on lanes 2 and 3.
Daniel Sanders [Tue, 4 Mar 2014 13:54:30 +0000 (13:54 +0000)]
[mips][msa] Correct the behaviour of the COPY_FW pseudo on lanes 2 and 3.

Summary:
Previously, attempting to extract lanes 2 and 3 would actually extract lane 1.
The MSA CodeGen tests only covered lanes 0 and 1.

Differential Revision: http://llvm-reviews.chandlerc.com/D2935

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

10 years agoHey, we can stop depending on the IR library from the Support unittests
Chandler Carruth [Tue, 4 Mar 2014 12:56:38 +0000 (12:56 +0000)]
Hey, we can stop depending on the IR library from the Support unittests
now. ;] Tested on both a static and shared CMake build. Hopefully the
bots will agree.

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

10 years ago[Modules] Move the LeakDetector header into the IR library where the
Chandler Carruth [Tue, 4 Mar 2014 12:46:06 +0000 (12:46 +0000)]
[Modules] Move the LeakDetector header into the IR library where the
source file had already been moved. Also move the unittest into the IR
unittest library.

This may seem an odd thing to put in the IR library but we only really
use this with instructions and it needs the LLVM context to work, so it
is intrinsically tied to the IR library.

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

10 years ago[cleanup] Fix a typo in the path.
Chandler Carruth [Tue, 4 Mar 2014 12:33:40 +0000 (12:33 +0000)]
[cleanup] Fix a typo in the path.

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

10 years ago[Modules] Move the PassNameParser to the IR library as it deals in the
Chandler Carruth [Tue, 4 Mar 2014 12:32:42 +0000 (12:32 +0000)]
[Modules] Move the PassNameParser to the IR library as it deals in the
PassInfo structures of the legacy pass manager. Also give it the Legacy
prefix as it is not a particularly widely used header.

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

10 years ago[Modules] Move the ConstantRange class into the IR library. This is
Chandler Carruth [Tue, 4 Mar 2014 12:24:34 +0000 (12:24 +0000)]
[Modules] Move the ConstantRange class into the IR library. This is
a bit surprising, as the class is almost entirely abstracted away from
any particular IR, however it encodes the comparsion predicates which
mutate ranges as ICmp predicate codes. This is reasonable as they're
used for both instructions and constants. Thus, it belongs in the IR
library with instructions and constants.

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

10 years ago[Modules] Stop including CFG.h from GenericDomTree.h. This used to be
Chandler Carruth [Tue, 4 Mar 2014 12:11:55 +0000 (12:11 +0000)]
[Modules] Stop including CFG.h from GenericDomTree.h. This used to be
necessary, but is no longer.

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

10 years ago[Modules] Move the PredIteratorCache into the IR library -- it is
Chandler Carruth [Tue, 4 Mar 2014 12:09:19 +0000 (12:09 +0000)]
[Modules] Move the PredIteratorCache into the IR library -- it is
hardcoded to use IR BasicBlocks.

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

10 years ago[Modules] Move the NoFolder into the IR library as it creates
Chandler Carruth [Tue, 4 Mar 2014 12:05:47 +0000 (12:05 +0000)]
[Modules] Move the NoFolder into the IR library as it creates
instructions.

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

10 years ago[Modules] Move the ConstantFolder into the IR library where it can
Chandler Carruth [Tue, 4 Mar 2014 12:02:47 +0000 (12:02 +0000)]
[Modules] Move the ConstantFolder into the IR library where it can
reference the ConstantExpr implementation.

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

10 years ago[Modules] Move the TargetFolder into the Analysis library. Historically,
Chandler Carruth [Tue, 4 Mar 2014 11:59:06 +0000 (11:59 +0000)]
[Modules] Move the TargetFolder into the Analysis library. Historically,
this would have been required because of the use of DataLayout, but that
has moved into the IR proper. It is still required because this folder
uses the constant folding in the analysis library (which uses the
datalayout) as the more aggressive basis of its folder.

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

10 years ago[Modules] Move CFG.h to the IR library as it defines graph traits over
Chandler Carruth [Tue, 4 Mar 2014 11:45:46 +0000 (11:45 +0000)]
[Modules] Move CFG.h to the IR library as it defines graph traits over
IR types.

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

10 years ago[Modules] Delete DataFlow.h rather than move it to the IR library. No
Chandler Carruth [Tue, 4 Mar 2014 11:33:42 +0000 (11:33 +0000)]
[Modules] Delete DataFlow.h rather than move it to the IR library. No
one in the tree (or in Polly) is using this.

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

10 years ago[Modules] Move ValueMap to the IR library. While this class does not
Chandler Carruth [Tue, 4 Mar 2014 11:26:31 +0000 (11:26 +0000)]
[Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

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

10 years ago[Modules] Move ValueHandle into the IR library where Value itself lives.
Chandler Carruth [Tue, 4 Mar 2014 11:17:44 +0000 (11:17 +0000)]
[Modules] Move ValueHandle into the IR library where Value itself lives.

Move the test for this class into the IR unittests as well.

This uncovers that ValueMap too is in the IR library. Ironically, the
unittest for ValueMap is useless in the Support library (honestly, so
was the ValueHandle test) and so it already lives in the IR unittests.
Mmmm, tasty layering.

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

10 years ago[Modules] Move the LLVM IR pattern match header into the IR library, it
Chandler Carruth [Tue, 4 Mar 2014 11:08:18 +0000 (11:08 +0000)]
[Modules] Move the LLVM IR pattern match header into the IR library, it
obviously is coupled to the IR.

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

10 years ago[Modules] Move CallSite into the IR library where it belogs. It is
Chandler Carruth [Tue, 4 Mar 2014 11:01:28 +0000 (11:01 +0000)]
[Modules] Move CallSite into the IR library where it belogs. It is
abstracting between a CallInst and an InvokeInst, both of which are IR
concepts.

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

10 years ago[Modules] Move GetElementPtrTypeIterator into the IR library. As its
Chandler Carruth [Tue, 4 Mar 2014 10:40:04 +0000 (10:40 +0000)]
[Modules] Move GetElementPtrTypeIterator into the IR library. As its
name might indicate, it is an iterator over the types in an instruction
in the IR.... You see where this is going.

Another step of modularizing the support library.

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

10 years ago[Modules] Move InstIterator out of the Support library, where it had no
Chandler Carruth [Tue, 4 Mar 2014 10:30:26 +0000 (10:30 +0000)]
[Modules] Move InstIterator out of the Support library, where it had no
business.

This header includes Function and BasicBlock and directly uses the
interfaces of both classes. It has to do with the IR, it even has that
in the name. =] Put it in the library it belongs to.

This is one step toward making LLVM's Support library survive a C++
modules bootstrap.

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

10 years ago[cleanup] Re-sort all the includes with utils/sort_includes.py.
Chandler Carruth [Tue, 4 Mar 2014 10:07:28 +0000 (10:07 +0000)]
[cleanup] Re-sort all the includes with utils/sort_includes.py.

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

10 years agoRemove unused typedef
Timur Iskhodzhanov [Tue, 4 Mar 2014 09:57:00 +0000 (09:57 +0000)]
Remove unused typedef

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

10 years agoThis patch implements .set mips32r2 directive and sets appropriate feature bits....
Vladimir Medic [Tue, 4 Mar 2014 09:54:09 +0000 (09:54 +0000)]
This patch implements .set mips32r2 directive and sets appropriate feature bits. It also introduces helper functions that are used to set and clear feature bits as necessary. This directive is a counterpart of -mips32r2 command line options with the exception that it does not influence elf header flags. The usage example is gives in test file.

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

10 years agoCleaning up a bunch of pre-Visual C++ 2012 build hacks.
Yaron Keren [Tue, 4 Mar 2014 09:23:33 +0000 (09:23 +0000)]
Cleaning up a bunch of pre-Visual C++ 2012 build hacks.

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

10 years ago[cleanup] Add a getOperandNo method to the Use class and implement it
Chandler Carruth [Tue, 4 Mar 2014 09:19:43 +0000 (09:19 +0000)]
[cleanup] Add a getOperandNo method to the Use class and implement it
out-of-line so that it can refer to the methods on User. As
a consequence, this removes the need to define one template method if
value_use_iterator in the extremely strange User.h header (!!!).

This makse Use.h slightly less peculiar. The only remaining real
peculiarity is the definition of Use::set in Value.h

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

10 years ago[cleanup] Use early exit and simpler temporary variables to clarify the
Chandler Carruth [Tue, 4 Mar 2014 09:00:15 +0000 (09:00 +0000)]
[cleanup] Use early exit and simpler temporary variables to clarify the
swap implementation.

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

10 years agoFix gcc -Wunused-but-set-variable warning.
Patrik Hagglund [Tue, 4 Mar 2014 08:55:18 +0000 (08:55 +0000)]
Fix gcc -Wunused-but-set-variable warning.

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

10 years ago[cleanup] Run clang-format over the Use code. It was *really*
Chandler Carruth [Tue, 4 Mar 2014 08:53:41 +0000 (08:53 +0000)]
[cleanup] Run clang-format over the Use code. It was *really*
inconsistent both with itself and with LLVM at large with formatting.
The *s were on the wrong side, the indent was off, etc etc. This is much
cleaner.

Also, go clang-format laying out the array of tags in nice columns.

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

10 years ago[cleanup] Tidy up and modernize comments and the definition order for
Chandler Carruth [Tue, 4 Mar 2014 08:51:00 +0000 (08:51 +0000)]
[cleanup] Tidy up and modernize comments and the definition order for
the Use class.

More cleanups to come here. This class just needs some TLC.

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

10 years agoPBQP/Graph.h: Prune @return in setNodeCosts, possibly copypasto. [-Wdocumentation]
NAKAMURA Takumi [Tue, 4 Mar 2014 07:27:08 +0000 (07:27 +0000)]
PBQP/Graph.h: Prune @return in setNodeCosts, possibly copypasto. [-Wdocumentation]

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

10 years agoPBQP/Graph.h: s/os/OS/ in @param. [-Wdocumentation]
NAKAMURA Takumi [Tue, 4 Mar 2014 07:26:55 +0000 (07:26 +0000)]
PBQP/Graph.h: s/os/OS/ in @param. [-Wdocumentation]

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

10 years ago[C+11] Add 'override' keyword to methods in the support library.
Craig Topper [Tue, 4 Mar 2014 06:24:11 +0000 (06:24 +0000)]
[C+11] Add 'override' keyword to methods in the support library.

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

10 years agoFix typo.
Rui Ueyama [Tue, 4 Mar 2014 04:22:41 +0000 (04:22 +0000)]
Fix typo.

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

10 years agoUse auto for readability.
Rui Ueyama [Tue, 4 Mar 2014 04:15:59 +0000 (04:15 +0000)]
Use auto for readability.

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

10 years agollvm-objdump: Print x64 unwind info in executable.
Rui Ueyama [Tue, 4 Mar 2014 04:00:55 +0000 (04:00 +0000)]
llvm-objdump: Print x64 unwind info in executable.

The original code does not work correctly on executable files because the
code is written in such a way that only object files are assumed to be given
to llvm-objdump.

Contents of RuntimeFunction are different between executables and objects. In
executables, fields in RuntimeFunction have actual addresses to unwind info
structures. On the other hand, in object files, the fields have zero value,
but instead there are relocations pointing to the fields, so that Linker will
fill them at link-time.

So, when we are reading an object file, we need to use relocation info to
find the location of unwind info. When executable, we should just look at the
values in RuntimeFunction.

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

10 years agoMake a test for llvm-objdump a little bit more readable.
Rui Ueyama [Tue, 4 Mar 2014 03:23:19 +0000 (03:23 +0000)]
Make a test for llvm-objdump a little bit more readable.

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

10 years agollvm-objdump: Split printRuntimeFunction to two small functions.
Rui Ueyama [Tue, 4 Mar 2014 03:08:45 +0000 (03:08 +0000)]
llvm-objdump: Split printRuntimeFunction to two small functions.

No functionality change.

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

10 years ago[AArch64]Fix improper diagnostics about offset range of load/store instructions.
Kevin Qin [Tue, 4 Mar 2014 02:05:13 +0000 (02:05 +0000)]
[AArch64]Fix improper diagnostics about offset range of load/store instructions.

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

10 years agoMC: Fix Intel assembly parser for [global + offset]
Reid Kleckner [Tue, 4 Mar 2014 00:33:17 +0000 (00:33 +0000)]
MC: Fix Intel assembly parser for [global + offset]

We were dropping the displacement on the floor if we also had some
immediate offset.

Should fix PR19033.

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

10 years agoRevert "[AArch64] This is a work in progress to provide a machine description"
Chad Rosier [Tue, 4 Mar 2014 00:32:07 +0000 (00:32 +0000)]
Revert "[AArch64] This is a work in progress to provide a machine description"

This reverts commit ff717c8fc786a0cfa1602982b91895fa09e514fc.

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

10 years agollvm-objdump: Split printCOFFUnwindInfo into small functions.
Rui Ueyama [Tue, 4 Mar 2014 00:31:48 +0000 (00:31 +0000)]
llvm-objdump: Split printCOFFUnwindInfo into small functions.

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

10 years agollvm-objdump: Use range-based-for loop and fix format.
Rui Ueyama [Tue, 4 Mar 2014 00:03:09 +0000 (00:03 +0000)]
llvm-objdump: Use range-based-for loop and fix format.

This is a small cleanup before making a bit larger change to this function.

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

10 years ago[AArch64] This is a work in progress to provide a machine description
Chad Rosier [Mon, 3 Mar 2014 23:32:47 +0000 (23:32 +0000)]
[AArch64] This is a work in progress to provide a machine description
for the Cortex-A53 subtarget in the AArch64 backend.

This patch lays the ground work to annotate each AArch64 instruction
(no NEON yet) with a list of SchedReadWrite types. The patch also
provides the Cortex-A53 processor resources, maps those the the default
SchedReadWrites, and provides basic latency. NEON support will be added
in a subsequent patch with proper forwarding logic.

Verification was done by setting the pre-RA scheduler to linearize to
better gauge the effect of the MIScheduler. Even without modeling the
forward logic, the results show a modest improvement for Cortex-A53.

Reviewers: apazos, mcrosier, atrick
Patch by Dave Estes <cestes@codeaurora.org>!

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