opencl/llvm.git
8 years agoDebug info: Don't crash in SelectionDAGISel when a vreg that is being
Adrian Prantl [Sat, 5 Oct 2013 00:08:27 +0000 (00:08 +0000)]
Debug info: Don't crash in SelectionDAGISel when a vreg that is being
pointed to by a dbg_value belonging to a function argument is eliminated
during instruction selection.
rdar://problem/15094721.

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

8 years agoMake a bunch of CompileUnit member functions private.
Eric Christopher [Sat, 5 Oct 2013 00:05:51 +0000 (00:05 +0000)]
Make a bunch of CompileUnit member functions private.

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

8 years ago[Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondi...
Venkatraman Govindaraju [Fri, 4 Oct 2013 23:54:30 +0000 (23:54 +0000)]
[Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondition().

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

8 years agoMinor formatting/comment rewording/etc.
David Blaikie [Fri, 4 Oct 2013 23:52:02 +0000 (23:52 +0000)]
Minor formatting/comment rewording/etc.

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

8 years agoRemove odd use of this.
Eric Christopher [Fri, 4 Oct 2013 23:49:31 +0000 (23:49 +0000)]
Remove odd use of this.

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

8 years agoReformat some odd formattings.
Eric Christopher [Fri, 4 Oct 2013 23:49:29 +0000 (23:49 +0000)]
Reformat some odd formattings.

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

8 years agoTighten up some type arguments to functions. Where we expect a
Eric Christopher [Fri, 4 Oct 2013 23:49:26 +0000 (23:49 +0000)]
Tighten up some type arguments to functions. Where we expect a
scope, pass a scope.

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

8 years agoUpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors
Hal Finkel [Fri, 4 Oct 2013 23:41:05 +0000 (23:41 +0000)]
UpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors

UpdatePHINodes has an optimization to reuse an existing PHI node, where it
first deletes all of its entries and then replaces them. Unfortunately, in the
case where we had duplicate predecessors (which are allowed so long as the
associated PHI entries have the same value), the loop removing the existing PHI
entries from the to-be-reused PHI would assert (if that PHI was not the one
which had the duplicates).

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

8 years agoRemove some dead code.
David Blaikie [Fri, 4 Oct 2013 23:37:30 +0000 (23:37 +0000)]
Remove some dead code.

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

8 years agoPull this out for a bit of readability.
Eric Christopher [Fri, 4 Oct 2013 23:35:30 +0000 (23:35 +0000)]
Pull this out for a bit of readability.

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

8 years agoSimplify setting of DIE tag for type DIEs by setting it in one* place.
David Blaikie [Fri, 4 Oct 2013 23:21:16 +0000 (23:21 +0000)]
Simplify setting of DIE tag for type DIEs by setting it in one* place.

* two actually due to some weird template thing... investigating that.

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

8 years agoReformat.
Eric Christopher [Fri, 4 Oct 2013 23:15:52 +0000 (23:15 +0000)]
Reformat.

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

8 years agoFormatting.
Eric Christopher [Fri, 4 Oct 2013 23:06:14 +0000 (23:06 +0000)]
Formatting.

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

8 years agoPrune includes.
Eric Christopher [Fri, 4 Oct 2013 22:54:28 +0000 (22:54 +0000)]
Prune includes.

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

8 years agoforgot to remove this file as well
Jack Carter [Fri, 4 Oct 2013 22:54:05 +0000 (22:54 +0000)]
forgot to remove this file as well

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

8 years agoreverting per request
Jack Carter [Fri, 4 Oct 2013 22:52:31 +0000 (22:52 +0000)]
reverting per request

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

8 years agoUse addFlag to add the enum class attribute.
Eric Christopher [Fri, 4 Oct 2013 22:40:10 +0000 (22:40 +0000)]
Use addFlag to add the enum class attribute.

This has the side effect of using DW_FORM_flag_present on dwarf4 and above.

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

8 years agoUse Die->addValue and DIEIntegerOne directly when we want to add
Eric Christopher [Fri, 4 Oct 2013 22:40:05 +0000 (22:40 +0000)]
Use Die->addValue and DIEIntegerOne directly when we want to add
a flag. No functional change.

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

8 years agoFix DAGCombiner::visitFP_EXTEND to ignore indexed loads
Hal Finkel [Fri, 4 Oct 2013 22:18:12 +0000 (22:18 +0000)]
Fix DAGCombiner::visitFP_EXTEND to ignore indexed loads

DAGCombiner::visitFP_EXTEND will apply the following transformation:

  fold (fpext (load x)) -> (fpext (fptrunc (extload x)))

but the implementation does not handle indexed loads (pre/post inc.), but did
not specifically ignore them either (unlike for extending loads, which it
already ignored), causing an assert when the transformation was applied to an
indexed load. This is the minimal fix for correctness (causing the
transformation to be skipped for indexed loads).

Unfortunately, I don't have an in-tree test case.

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

8 years agoSupport tblockaddr for static compilation in Mips16.
Reed Kotler [Fri, 4 Oct 2013 22:01:40 +0000 (22:01 +0000)]
Support tblockaddr for static compilation in Mips16.

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

8 years agoFix object file writing in llvm-lto on Windows.
Rafael Espindola [Fri, 4 Oct 2013 21:40:54 +0000 (21:40 +0000)]
Fix object file writing in llvm-lto on Windows.

We were writing in text mode.

Patch by Greg Bedwell.

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

8 years ago[MC][AsmParser] Hook for post assembly file processing
Jack Carter [Fri, 4 Oct 2013 21:26:15 +0000 (21:26 +0000)]
[MC][AsmParser] Hook for post assembly file processing

This patch handles LLVM standalone assembler (llvm-mc) ELF flag setting based on input file
directive processing.

Mips assembly requires processing inline directives that directly and
indirectly affect the output ELF header flags. This patch handles one
".abicalls".

To process these directives we are following the model the code generator
uses by storing state in a container as we go through processing and when
we detect the end of input file processing, AsmParser is notified and we
update the ELF header flags through a MipsELFStreamer method with a call from
MCTargetAsmParser::emitEndOfAsmFile(MCStreamer &OutStreamer).

This patch will allow other targets the same functionality.

Jack

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

8 years agoAttempting to fix lli build error
Andrew Kaylor [Fri, 4 Oct 2013 20:53:49 +0000 (20:53 +0000)]
Attempting to fix lli build error

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

8 years ago[mips] Fix a bug in MipsLongBranch::replaceBranch, which was erasing
Akira Hatanaka [Fri, 4 Oct 2013 20:51:40 +0000 (20:51 +0000)]
[mips] Fix a bug in MipsLongBranch::replaceBranch, which was erasing
instructions in delay slots along with the original branch instructions.

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

8 years agoSLPVectorizer: Sort inputs to commutative binary operations
Arnold Schwaighofer [Fri, 4 Oct 2013 20:39:16 +0000 (20:39 +0000)]
SLPVectorizer: Sort inputs to commutative binary operations

Sort the operands of the other entries in the current vectorization root
according to the first entry's operands opcodes.

%conv0 = uitofp ...
%load0 = load float ...

= fmul %conv0, %load0
= fmul %load0, %conv1
= fmul %load0, %conv2

Make sure that we recursively vectorize <%conv0, %conv1, %conv2> and <%load0,
%load0, %load0>.

This makes it more likely to obtain vectorizable trees. We have to be careful
when we sort that we don't destroy 'good' existing ordering implied by source
order.

radar://15080067

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

8 years agoFixing container/pointer bug in remote-lli found by ASan
Andrew Kaylor [Fri, 4 Oct 2013 20:09:36 +0000 (20:09 +0000)]
Fixing container/pointer bug in remote-lli found by ASan

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

8 years agoTemporarily revert r176882 as it needs to be implemented in a different
Eric Christopher [Fri, 4 Oct 2013 19:40:33 +0000 (19:40 +0000)]
Temporarily revert r176882 as it needs to be implemented in a different
way for all platforms.

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

8 years agolli: Check pipe creation for errors.
Benjamin Kramer [Fri, 4 Oct 2013 19:10:03 +0000 (19:10 +0000)]
lli: Check pipe creation for errors.

This is unlikely to ever fail, but ubuntu GCC warns when the return value is
unused.

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

8 years agoAdd lto_codegen_add_dso_symbol to the export list.
Rafael Espindola [Fri, 4 Oct 2013 17:30:14 +0000 (17:30 +0000)]
Add lto_codegen_add_dso_symbol to the export list.

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

8 years agoTemporarily revert r191792 as it is causing some LTO debug failures
Eric Christopher [Fri, 4 Oct 2013 17:08:38 +0000 (17:08 +0000)]
Temporarily revert r191792 as it is causing some LTO debug failures
on platforms with relocations in debug info and also temporarily
revert r191800 due to conflicts with the revert of r191792.

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

8 years agoFix comment
Matthias Braun [Fri, 4 Oct 2013 16:53:02 +0000 (16:53 +0000)]
Fix comment

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

8 years agoFix indentation
Matthias Braun [Fri, 4 Oct 2013 16:53:00 +0000 (16:53 +0000)]
Fix indentation

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

8 years agoFix typo
Matthias Braun [Fri, 4 Oct 2013 16:52:58 +0000 (16:52 +0000)]
Fix typo

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

8 years agoARM: optimizeSelect has to consider the previous register class
Matthias Braun [Fri, 4 Oct 2013 16:52:56 +0000 (16:52 +0000)]
ARM: optimizeSelect has to consider the previous register class

optimizeSelect folds (predicated) copy instructions, it must not ignore
the original register class of the operand when replacing the register
with the copies dest register.

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

8 years agoARM: do not add a regmask for TAILJUMPs
Matthias Braun [Fri, 4 Oct 2013 16:52:54 +0000 (16:52 +0000)]
ARM: do not add a regmask for TAILJUMPs

The jump doesn't really kill the registers, the following call does but
we never get back anyway.
This avoids some verify-machineinstrs problems when TAILJUMPs are
if-converted.

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

8 years agoARM: preserve undef flag in pseudo instruction expanders
Matthias Braun [Fri, 4 Oct 2013 16:52:51 +0000 (16:52 +0000)]
ARM: preserve undef flag in pseudo instruction expanders

Copy over the whole register machine operand instead of creating a new one
with an incomplete set of flags.

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

8 years agoFix this test.
Rafael Espindola [Fri, 4 Oct 2013 14:53:58 +0000 (14:53 +0000)]
Fix this test.

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

8 years agoRevert "Test commit to check e-mail address. Please discard this."
Alp Toker [Fri, 4 Oct 2013 10:59:13 +0000 (10:59 +0000)]
Revert "Test commit to check e-mail address. Please discard this."

This reverts commit r191942.

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

8 years agoRestore LLVM_BUILD_RUNTIME option that was deleted in r191835, but is still used...
Alexey Samsonov [Fri, 4 Oct 2013 10:41:38 +0000 (10:41 +0000)]
Restore LLVM_BUILD_RUNTIME option that was deleted in r191835, but is still used to control building of compiler-rt and libcxx

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

8 years agoImplement aarch64 neon instruction set AdvSIMD (3V elem).
Jiangning Liu [Fri, 4 Oct 2013 09:20:44 +0000 (09:20 +0000)]
Implement aarch64 neon instruction set AdvSIMD (3V elem).

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

8 years agoTest commit to check e-mail address. Please discard this.
Jin-Gu Kang [Fri, 4 Oct 2013 06:53:57 +0000 (06:53 +0000)]
Test commit to check e-mail address. Please discard this.

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

8 years agoRevert r191940 to see if it fixes the build bots.
Craig Topper [Fri, 4 Oct 2013 05:52:17 +0000 (05:52 +0000)]
Revert r191940 to see if it fixes the build bots.

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

8 years agoAdd OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChi...
Craig Topper [Fri, 4 Oct 2013 05:22:20 +0000 (05:22 +0000)]
Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.

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

8 years agoDebugInfo: Fix ordering of members after r191928
David Blaikie [Fri, 4 Oct 2013 01:39:59 +0000 (01:39 +0000)]
DebugInfo: Fix ordering of members after r191928

In the case (shown in the attached test) where a member function
definition was emitted into debug info the following could occur:

1) build the debug info for the member function definition
2) in (1), build the debug info for the member function declaration
3) construct and add the member function declaration DIE
4) add it to its context
5) build its context (the type it is a member of)
6) construct the members and add them to the type
7) except don't add member functions because "getOrCreateSubprogram"
adds the function to its parent anyway
8) except we're only partway through building this subprogram
declaration so it hasn't been added yet - but we returned the partially
constructed DIE (since it's already in the MDNode->DIE mapping to avoid
infinitely recursing trying to create the member function DIE)
9) once the type is constructed, add the member function to it
10) now the members are out of order (the member function being defined
is listed as the last member, even though it was declared as the first)

To avoid this, construct the context of the subprogram DIE before we
query to see if it exists. That way we never end up creating it before
creating its context and ending up in this situation.

Alternatively, the type construction that visits/builds all the members
could call something like getOrCreateSubprogram, but that doesn't ever
do the "add to context" step. Then the type building code would always
be responsible for adding members (and the subprogram "addToContextDIE"
would no-op because the context building would have added the subprogram
declaration to the type/context DIE already).

(the test cases updated were overly-sensitive to offsets or abbreviation
numbers. We don't have a nice way to make these tests more robust as yet
- multiline FileCheck matches would be required)

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

8 years agoAdding support and tests for multiple module handling in lli
Andrew Kaylor [Fri, 4 Oct 2013 00:49:38 +0000 (00:49 +0000)]
Adding support and tests for multiple module handling in lli

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

8 years agoFixed a bug with section names containing special characters.
Richard Mitton [Thu, 3 Oct 2013 22:07:08 +0000 (22:07 +0000)]
Fixed a bug with section names containing special characters.

Changed the dwarf aranges code to not use getLabelEndName, as it turns out it's not reliable to call that given user-defined section names. Section names can have characters in that aren't representable as symbol names.

The dwarf-aranges test case has been updated to include a special character, to check this.

This fixes pr17416.

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

8 years agoPull fptrunc's upwards through selects when one of the select's selectands was a...
Owen Anderson [Thu, 3 Oct 2013 21:08:05 +0000 (21:08 +0000)]
Pull fptrunc's upwards through selects when one of the select's selectands was a constant.  This has a number of benefits, including producing small immediates (easier to materialize, smaller constant pools) as well as being more likely to allow the fptrunc to fuse with a preceding instruction (truncating selects are unusual).

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

8 years agoDebugInfo: Avoid redundantly adding child DIEs to parents.
David Blaikie [Thu, 3 Oct 2013 20:07:20 +0000 (20:07 +0000)]
DebugInfo: Avoid redundantly adding child DIEs to parents.

DIE::addChild had a shortcircuit that silently no-op'd when a child was
readded to the same parent. This hid some quirky/redundant code in
DwarfDebug/CompileUnit. By removing that functionality and replacing it
with an assert I was able to find and cleanup those cases, mostly
centering around adding members to types in various circumstances.

1) The original oddity I noticed while working on type units (which
actually was helping me in the short term, by accident) was the
addToContextOwner call in constructTypeDIE. This call was completely
bogus (why was it only done for non-virtual types? what relevance does
that have at all) and redundant with the more uniform addToContextOwner
made in getOrCreateTypeDIE.

2) If a member function definition was visited (createSubprogramDIE), it
would attempt to build the member function declaration. The declaration
DIE would then be added to its context, but in building the context (the
type for which this function is a member) the members of the type would
be added to the type automatically, so by the time the context was
constructed, the member function was already associated with it.

3) The same as (2) but without the member function being constructed
first. Whenever a type was constructed, the members would be created and
member functions would be created by getOrCreateSubprogramDIE - this
would lead to the subprogram being added to the (incomplete) type
already, then the general member-construction code would add it again.

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

8 years agoRename DataLayout variables TD -> DL
Matt Arsenault [Thu, 3 Oct 2013 19:50:01 +0000 (19:50 +0000)]
Rename DataLayout variables TD -> DL

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

8 years agoOptimize linkonce_odr unnamed_addr functions during LTO.
Rafael Espindola [Thu, 3 Oct 2013 18:29:09 +0000 (18:29 +0000)]
Optimize linkonce_odr unnamed_addr functions during LTO.

Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.

The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).

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

8 years agoMake gep i8* X, -(ptrtoint Y) transform work with address spaces
Matt Arsenault [Thu, 3 Oct 2013 18:15:57 +0000 (18:15 +0000)]
Make gep i8* X, -(ptrtoint Y) transform work with address spaces

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

8 years agoTest commit. Fixed a copy-paste error in the Makefile for lib/LTO.
Tom Roeder [Thu, 3 Oct 2013 18:05:12 +0000 (18:05 +0000)]
Test commit. Fixed a copy-paste error in the Makefile for lib/LTO.

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

8 years ago[llvm-c][Disassembler] When printing latency information, fall back to the
Quentin Colombet [Thu, 3 Oct 2013 17:51:49 +0000 (17:51 +0000)]
[llvm-c][Disassembler] When printing latency information, fall back to the
itinerary model in case the target does not supply a scheduling model.

By doing this, targets like cortex-a8 can benefit from the latency printing
feature added in r191859.

This part of <rdar://problem/14687488>.

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

8 years agoMake sure we emit a section for pubnames even if that section is
Eric Christopher [Thu, 3 Oct 2013 17:41:20 +0000 (17:41 +0000)]
Make sure we emit a section for pubnames even if that section is
going to be empty. This is particularly important for the gnu
pubnames case since we're emitting a relocation to the section.

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

8 years agoFix cut and paste typo.
Eric Christopher [Thu, 3 Oct 2013 17:41:16 +0000 (17:41 +0000)]
Fix cut and paste typo.

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

8 years agoraw_fd_ostream: Be more verbose about the reason when opening a file fails.
Benjamin Kramer [Thu, 3 Oct 2013 16:59:14 +0000 (16:59 +0000)]
raw_fd_ostream: Be more verbose about the reason when opening a file fails.

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

8 years agoAdded checking code whehter target supports specific dag combining about rotate
Jin-Gu Kang [Thu, 3 Oct 2013 15:58:48 +0000 (15:58 +0000)]
Added checking code whehter target supports specific dag combining about rotate
or not. The corresponding dag patterns are as following:

"DAGCombier::MatchRotate" function in DAGCombiner.cpp
Pattern1
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext y)),
//          (srl (*ext x), (*ext (sub 32, y)))) ->
//   (*ext (rotr x, (sub 32, y)))

pattern2
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotl x, y))
// fold (or (shl (*ext x), (*ext (sub 32, y))),
//          (srl (*ext x), (*ext y))) ->
//   (*ext (rotr x, (sub 32, y)))

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

8 years agoCaptureTracking: Plug a loophole in the "too many uses" heuristic.
Benjamin Kramer [Thu, 3 Oct 2013 13:24:02 +0000 (13:24 +0000)]
CaptureTracking: Plug a loophole in the "too many uses" heuristic.

The heuristic was added to avoid spending too much compile time A specially
crafted test case (PR17461, PR16474) with many uses on a select or bitcast
instruction can still trigger the slow case. Add a check for that case.

This only affects compile time, don't have a good way to test it.

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

8 years ago[arm] Enhance the test case by checking .fpu directive.
Logan Chien [Thu, 3 Oct 2013 12:18:56 +0000 (12:18 +0000)]
[arm] Enhance the test case by checking .fpu directive.

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

8 years agoAVX-512: Fixed encoding of VMOVQ instruction.
Elena Demikhovsky [Thu, 3 Oct 2013 12:03:26 +0000 (12:03 +0000)]
AVX-512: Fixed encoding of VMOVQ instruction.

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

8 years ago[ARM] Warn on deprecated IT blocks in v8 AArch32 assembly.
Amara Emerson [Thu, 3 Oct 2013 09:31:51 +0000 (09:31 +0000)]
[ARM] Warn on deprecated IT blocks in v8 AArch32 assembly.

Patch by Artyom Skrobov.

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

8 years agoRemove wild .debug_aranges entries generated from unimportant labels
Alexey Samsonov [Thu, 3 Oct 2013 08:54:43 +0000 (08:54 +0000)]
Remove wild .debug_aranges entries generated from unimportant labels

r191052 added emitting .debug_aranges to Clang, but this
functionality is broken: it uses all MC labels added in DWARF Asm
printer, including the labels for build relocations between
different DWARF sections, like .Lsection_line or .Ldebug_loc0.

As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
attribute, .debug_aranges would also contain a range starting from 0x123,
breaking tools that rely on this section.

This patch fixes this by using only MC labels that corresponds to the
addresses in the user program.

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

8 years agoReplace C++ style comment with a C style comment to satisfy some of the build bots.
Craig Topper [Thu, 3 Oct 2013 06:29:59 +0000 (06:29 +0000)]
Replace C++ style comment with a C style comment to satisfy some of the build bots.

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

8 years agoRemove comma from the end of an enum.
Craig Topper [Thu, 3 Oct 2013 06:18:26 +0000 (06:18 +0000)]
Remove comma from the end of an enum.

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

8 years agoAdd XOP disassembler support. Fixes PR13933.
Craig Topper [Thu, 3 Oct 2013 05:17:48 +0000 (05:17 +0000)]
Add XOP disassembler support. Fixes PR13933.

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

8 years agoRemove duplicated test cases that occurred when I applied the same patch file to...
Craig Topper [Thu, 3 Oct 2013 04:27:14 +0000 (04:27 +0000)]
Remove duplicated test cases that occurred when I applied the same patch file to my model twice.

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

8 years agoAdd patterns for selecting TBM instructions from logical operations. Patch from Yunzh...
Craig Topper [Thu, 3 Oct 2013 04:16:45 +0000 (04:16 +0000)]
Add patterns for selecting TBM instructions from logical operations. Patch from Yunzhong Gao.

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

8 years agoAdd v4f16 to supported value types.
Pete Cooper [Thu, 3 Oct 2013 03:29:21 +0000 (03:29 +0000)]
Add v4f16 to supported value types.

This is useful for some ARM intrinsics such as VCVTN which does a <4 x float> <-> <4 x half> conversion.

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

8 years agoDispose the codegen even when just writing the bitcode file.
Rafael Espindola [Thu, 3 Oct 2013 00:07:30 +0000 (00:07 +0000)]
Dispose the codegen even when just writing the bitcode file.

This makes it possible to add timers to the code generator and still use them
with -plugin-opt=emit-llvm.

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

8 years ago[llvm-c][Disassembler] When printing latency information, skip scheduling
Quentin Colombet [Wed, 2 Oct 2013 23:11:47 +0000 (23:11 +0000)]
[llvm-c][Disassembler] When printing latency information, skip scheduling
classes that are marked as Variant as those require an MI to pass to
SubTargetInfo::resolveSchedClass.

This is part of <rdar://problem/14687488>.

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

8 years agoDon't use runtime bounds check between address spaces.
Matt Arsenault [Wed, 2 Oct 2013 22:38:17 +0000 (22:38 +0000)]
Don't use runtime bounds check between address spaces.

Don't vectorize with a runtime check if it requires a
comparison between pointers with different address spaces.
The values can't be assumed to be directly comparable.
Previously it would create an illegal bitcast.

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

8 years agoFixing lli-child-target build
Andrew Kaylor [Wed, 2 Oct 2013 22:27:23 +0000 (22:27 +0000)]
Fixing lli-child-target build

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

8 years ago[llvm-c][Disassembler] Add an option to print latency information in
Quentin Colombet [Wed, 2 Oct 2013 22:07:57 +0000 (22:07 +0000)]
[llvm-c][Disassembler] Add an option to print latency information in
disassembled output alongside the instructions.
E.g., on a vector shuffle operation with a memory operand, disassembled
outputs are:
* Without the option:
    vpshufd $-0x79, (%rsp), %xmm0

* With the option:
    vpshufd $-0x79, (%rsp), %xmm0   ## Latency: 5

The printed latency is extracted from the schedule model available in the
disassembler context. Thus, this option has no effect if there is not a
scheduling model for the target.
This boils down to one may need to specify the CPU string, so that this
option could have an effect.

Note: Latency < 2 are not printed.

This part of <rdar://problem/14687488>.

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

8 years agoAdd newline at eof.
Benjamin Kramer [Wed, 2 Oct 2013 21:58:02 +0000 (21:58 +0000)]
Add newline at eof.

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

8 years agoPass the resolved lli-child-target executable name to execv, rather than
Richard Smith [Wed, 2 Oct 2013 21:33:12 +0000 (21:33 +0000)]
Pass the resolved lli-child-target executable name to execv, rather than
searching $PATH for it then blindly executing it from $PWD anyway.

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

8 years agoFix missing CHECK-LABELs
Matt Arsenault [Wed, 2 Oct 2013 20:29:00 +0000 (20:29 +0000)]
Fix missing CHECK-LABELs

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

8 years agoApply slp vectorization on fully-vectorizable tree of height 2
Yi Jiang [Wed, 2 Oct 2013 20:20:39 +0000 (20:20 +0000)]
Apply slp vectorization on fully-vectorizable tree of height 2

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

8 years agoFix debug printing spacing.
Matt Arsenault [Wed, 2 Oct 2013 20:04:29 +0000 (20:04 +0000)]
Fix debug printing spacing.

Fix missing newlines, missing and extra spaces in printed messages.

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

8 years agoFix comment grammar and capitalization.
Matt Arsenault [Wed, 2 Oct 2013 20:04:26 +0000 (20:04 +0000)]
Fix comment grammar and capitalization.

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

8 years agoFix build problems with remote lli implementation
Andrew Kaylor [Wed, 2 Oct 2013 19:26:16 +0000 (19:26 +0000)]
Fix build problems with remote lli implementation

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

8 years agoSLPVectorizer: Make store chain finding more aggressive with GetUnderlyingObject.
Benjamin Kramer [Wed, 2 Oct 2013 19:06:06 +0000 (19:06 +0000)]
SLPVectorizer: Make store chain finding more aggressive with GetUnderlyingObject.

This recursively strips all GEPs like the existing code. It also handles bitcasts and
other operations that do not change the pointer value.

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

8 years agoClean up lli execution code
Andrew Kaylor [Wed, 2 Oct 2013 18:04:40 +0000 (18:04 +0000)]
Clean up lli execution code

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

8 years agoFixing compile warnings
Andrew Kaylor [Wed, 2 Oct 2013 18:00:34 +0000 (18:00 +0000)]
Fixing compile warnings

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

8 years agoAdding out-of-process execution support to lli.
Andrew Kaylor [Wed, 2 Oct 2013 17:12:36 +0000 (17:12 +0000)]
Adding out-of-process execution support to lli.

At this time only Unix-based systems are supported.  Windows has stubs and should re-route to the simulated mode.

Thanks to Sriram Murali for contributions to this patch.

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

8 years agoStructurizeCFG: Add dependency on LowerSwitch pass
Tom Stellard [Wed, 2 Oct 2013 17:04:59 +0000 (17:04 +0000)]
StructurizeCFG: Add dependency on LowerSwitch pass

Switch instructions were crashing the StructurizeCFG pass, and it's
probably easier anyway if we don't need to handle them in this pass.

Reviewed-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191841 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMCJIT: skip some more new multi-module tests on unsupported platforms.
Tim Northover [Wed, 2 Oct 2013 16:11:07 +0000 (16:11 +0000)]
MCJIT: skip some more new multi-module tests on unsupported platforms.

This should fix the i386 Darwin build-bot.

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

8 years agoR600: Add a ldptr intrinsic to support MSAA.
Vincent Lejeune [Wed, 2 Oct 2013 16:00:33 +0000 (16:00 +0000)]
R600: Add a ldptr intrinsic to support MSAA.

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

8 years agoTry harder to disable the LTO tests on windows.
Rafael Espindola [Wed, 2 Oct 2013 15:47:30 +0000 (15:47 +0000)]
Try harder to disable the LTO tests on windows.

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

8 years agoRemove the very substantial, largely unmaintained legacy PGO
Chandler Carruth [Wed, 2 Oct 2013 15:42:23 +0000 (15:42 +0000)]
Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

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

8 years agoRemove "localize global" optimization
Alexey Samsonov [Wed, 2 Oct 2013 15:31:34 +0000 (15:31 +0000)]
Remove "localize global" optimization

Summary:
As discussed in http://llvm-reviews.chandlerc.com/D1754,
this optimization isn't really valid for C, and fires too rarely anyway.

Reviewers: rafael, nicholas

Reviewed By: nicholas

CC: rnk, llvm-commits, nicholas
Differential Revision: http://llvm-reviews.chandlerc.com/D1769

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

8 years agoTidy up this line of the Makefile before I start hacking on it.
Chandler Carruth [Wed, 2 Oct 2013 15:14:13 +0000 (15:14 +0000)]
Tidy up this line of the Makefile before I start hacking on it.

I really should sort it or do something more sustainable, but I couldn't
work up the energy to do it... Sorry.

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

8 years agoAdd test I forgot to git add in r191824.
Rafael Espindola [Wed, 2 Oct 2013 14:49:41 +0000 (14:49 +0000)]
Add test I forgot to git add in r191824.

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

8 years agoDisable this test on Win32 for now.
Rafael Espindola [Wed, 2 Oct 2013 14:48:35 +0000 (14:48 +0000)]
Disable this test on Win32 for now.

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

8 years agoFix option parsing in the gold plugin.
Rafael Espindola [Wed, 2 Oct 2013 14:36:23 +0000 (14:36 +0000)]
Fix option parsing in the gold plugin.

This was broken when options were moved up in r191680. No test because this is
specific LLVMgold.so/libLTO.so.

Patch by Tom Roeder!

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

8 years agoDon't layout items in a list in columns. That requires changing every
Chandler Carruth [Wed, 2 Oct 2013 14:31:21 +0000 (14:31 +0000)]
Don't layout items in a list in columns. That requires changing every
line just to add or remove a single element. What I wouldn't give to
have clang-format here an be able to format this more densely without
caring...

Re-group and sort the entries while here to make the whole thing more
clear.

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

8 years agoAdd a -exported-symbol option to llvm-lto.
Rafael Espindola [Wed, 2 Oct 2013 14:12:56 +0000 (14:12 +0000)]
Add a -exported-symbol option to llvm-lto.

Patch by Tom Roeder.

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

8 years agoAdd Support For .bss Named Section Directive For Darwin Targets.
Rafael Espindola [Wed, 2 Oct 2013 14:09:29 +0000 (14:09 +0000)]
Add Support For .bss Named Section Directive For Darwin Targets.

Patch by Nicholas White.

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

8 years agoEnable building LTO on WIN32.
Rafael Espindola [Wed, 2 Oct 2013 14:04:38 +0000 (14:04 +0000)]
Enable building LTO on WIN32.

Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

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

8 years agoAVX-512: fixed a bug in getLoadStoreRegOpcode() for AVX-512 target
Elena Demikhovsky [Wed, 2 Oct 2013 12:20:42 +0000 (12:20 +0000)]
AVX-512: fixed a bug in getLoadStoreRegOpcode() for AVX-512 target

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

8 years agoProgram.h: Fix \Note into \note. [-Wdocumentation]
NAKAMURA Takumi [Wed, 2 Oct 2013 08:14:38 +0000 (08:14 +0000)]
Program.h: Fix \Note into \note. [-Wdocumentation]

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