oota-llvm.git
10 years agoReplace X86 FMA intrinsic pseduo-instructions with def pats.
Lang Hames [Fri, 31 Jan 2014 21:29:19 +0000 (21:29 +0000)]
Replace X86 FMA intrinsic pseduo-instructions with def pats.

It looks like these pseudos were only used for pattern matching. Def pats are
the appropriate way to do that. As a bonus, these intrinsics will now have
memory operands folded properly, and better FMA3 variants selected where
appropriate (see r199933).

<rdar://problem/15611947>

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

10 years ago[SLPV] Recognize vectorizable intrinsics during SLP vectorization and
Chandler Carruth [Fri, 31 Jan 2014 21:14:40 +0000 (21:14 +0000)]
[SLPV] Recognize vectorizable intrinsics during SLP vectorization and
transform accordingly. Based on similar code from Loop vectorization.
Subsequent commits will include vectorization of function calls to
vector intrinsics and form function calls to vector library calls.

Patch by Raul Silvera! (Much delayed due to my not running dcommit)

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

10 years agoSimplify getSymbolFlags.
Rafael Espindola [Fri, 31 Jan 2014 20:57:12 +0000 (20:57 +0000)]
Simplify getSymbolFlags.

None of the object formats require extra parsing to compute these flags,
so the method cannot fail.

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

10 years agoIf we're not producing DWARF accel tables, don't waste memory
Paul Robinson [Fri, 31 Jan 2014 20:39:19 +0000 (20:39 +0000)]
If we're not producing DWARF accel tables, don't waste memory
keeping track of those entries.

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

10 years agoAdd support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashing
Eric Christopher [Fri, 31 Jan 2014 20:02:58 +0000 (20:02 +0000)]
Add support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashing
algorithm. Sink the 'A' + Attribute hash into each form so we don't
have to check valid forms before deciding whether or not we're going
to hash which will let the default be to return without doing anything.

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

10 years agoFix name of nested type in comment to match code.
Eric Christopher [Fri, 31 Jan 2014 20:02:55 +0000 (20:02 +0000)]
Fix name of nested type in comment to match code.

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

10 years agoDebugInfo: Flag type unit references as declarations
David Blaikie [Fri, 31 Jan 2014 19:52:26 +0000 (19:52 +0000)]
DebugInfo: Flag type unit references as declarations

This ensures DWARF consumers don't confuse these references for
definitions. I'd argue it might be nice to improve debuggers so we don't
need this, but it's just one field in an abbreviation anyway - so it
doesn't seem worth the fight.

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

10 years agox86: Rename NumBytesForCalleeToPush to ...Pop for accuracy
Reid Kleckner [Fri, 31 Jan 2014 19:07:18 +0000 (19:07 +0000)]
x86: Rename NumBytesForCalleeToPush to ...Pop for accuracy

If we have a callee cleanup convention, the callee is going to pop the
arguments off the stack, not push them on.

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

10 years agoRevert r200560, "LTO itself hasn't depended on MCDisassembler any more."
NAKAMURA Takumi [Fri, 31 Jan 2014 17:57:50 +0000 (17:57 +0000)]
Revert r200560, "LTO itself hasn't depended on MCDisassembler any more."

Oh sorry, I missed LTO.exports, ... I checked just only *.cpp(s).

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

10 years ago[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'
Reid Kleckner [Fri, 31 Jan 2014 17:41:22 +0000 (17:41 +0000)]
[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'

MSVC always places the 'this' parameter for a method first.  The
implicit 'sret' pointer for methods always comes second.  We already
implement this for __thiscall by putting sret parameters on the stack,
but __cdecl methods require putting both parameters on the stack in
opposite order.

Using a special calling convention allows frontends to keep the sret
parameter first, which avoids breaking lots of assumptions in LLVM and
Clang.

Fixes PR15768 with the corresponding change in Clang.

Reviewers: ributzka, majnemer

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

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

10 years agoLTO itself hasn't depended on MCDisassembler any more.
NAKAMURA Takumi [Fri, 31 Jan 2014 17:40:11 +0000 (17:40 +0000)]
LTO itself hasn't depended on MCDisassembler any more.

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

10 years agollvm/tools: Prune redundant target_link_libraries.
NAKAMURA Takumi [Fri, 31 Jan 2014 17:40:06 +0000 (17:40 +0000)]
llvm/tools: Prune redundant target_link_libraries.

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

10 years ago[CMake] Move libgtest for external projects.
NAKAMURA Takumi [Fri, 31 Jan 2014 17:32:46 +0000 (17:32 +0000)]
[CMake] Move libgtest for external projects.

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

10 years agoAddLLVM.cmake: Untabify.
NAKAMURA Takumi [Fri, 31 Jan 2014 17:32:42 +0000 (17:32 +0000)]
AddLLVM.cmake: Untabify.

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

10 years agoHandleLLVMOptions.cmake: Typo, s/proerty/property/
NAKAMURA Takumi [Fri, 31 Jan 2014 17:32:36 +0000 (17:32 +0000)]
HandleLLVMOptions.cmake: Typo, s/proerty/property/

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

10 years ago[mips][msa] Add insert.d instruction.
Matheus Almeida [Fri, 31 Jan 2014 13:31:20 +0000 (13:31 +0000)]
[mips][msa] Add insert.d instruction.

This instruction is only available on Mips64 cores that implement the MSA ASE.

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

10 years agoUpdate FileCheck prefixes in preparation for the addition of Mips64 MSA tests.
Matheus Almeida [Fri, 31 Jan 2014 13:05:56 +0000 (13:05 +0000)]
Update FileCheck prefixes in preparation for the addition of Mips64 MSA tests.

No functional changes.

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

10 years ago[vectorizer] Tweak the way we do small loop runtime unrolling in the
Chandler Carruth [Fri, 31 Jan 2014 10:51:08 +0000 (10:51 +0000)]
[vectorizer] Tweak the way we do small loop runtime unrolling in the
loop vectorizer to not do so when runtime pointer checks are needed and
share code with the new (not yet enabled) load/store saturation runtime
unrolling. Also ensure that we only consider the runtime checks when the
loop hasn't already been vectorized. If it has, the runtime check cost
has already been paid.

I've fleshed out a test case to cover the scalar unrolling as well as
the vector unrolling and comment clearly why we are or aren't following
the pattern.

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

10 years agoSeparate x86 opcode maps and 0x66/0xf2/0xf3 prefixes from each other in the TSFlags...
Craig Topper [Fri, 31 Jan 2014 08:47:06 +0000 (08:47 +0000)]
Separate x86 opcode maps and 0x66/0xf2/0xf3 prefixes from each other in the TSFlags. This greatly simplifies the switch statements in the disassembler tables and the code emitters.

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

10 years agoMove REP out of the Prefix field of the X86 format. Give it its own bit. It had speci...
Craig Topper [Fri, 31 Jan 2014 07:00:55 +0000 (07:00 +0000)]
Move REP out of the Prefix field of the X86 format. Give it its own bit. It had special handling anyway and this enables a future patch.

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

10 years agoMove address override handling in X86CodeEmitter to a place where it works for VEX...
Craig Topper [Fri, 31 Jan 2014 05:42:35 +0000 (05:42 +0000)]
Move address override handling in X86CodeEmitter to a place where it works for VEX encoded instructions too. This allows 32-bit addressing to work in 64-bit mode.

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

10 years agoMove address override handling in X86MCCodeEmitter to a place where it works for...
Craig Topper [Fri, 31 Jan 2014 05:33:45 +0000 (05:33 +0000)]
Move address override handling in X86MCCodeEmitter to a place where it works for VEX encoded instructions too. This allows 32-bit addressing to work in 64-bit mode.

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

10 years agoFix a bug in gcov instrumentation introduced by r195513. <rdar://15930350>
Bob Wilson [Fri, 31 Jan 2014 05:24:01 +0000 (05:24 +0000)]
Fix a bug in gcov instrumentation introduced by r195513. <rdar://15930350>

The entry block of a function starts with all the static allocas. The change
in r195513 splits the block before those allocas, which has the effect of
turning them into dynamic allocas. That breaks all sorts of things. Change to
split after the initial allocas, and also add a comment explaining why the
block is split.

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

10 years ago[Sparc] Save and restore float registers that may be used for parameter passing.
Venkatraman Govindaraju [Fri, 31 Jan 2014 01:53:08 +0000 (01:53 +0000)]
[Sparc] Save and restore float registers that may be used for parameter passing.

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

10 years agoThis patch teaches the DAGCombiner how to fold insert_subvector nodes
Manman Ren [Fri, 31 Jan 2014 01:10:35 +0000 (01:10 +0000)]
This patch teaches the DAGCombiner how to fold insert_subvector nodes
when the input is a concat_vectors and the insert replaces one of the
concat halves:

Lower half: fold (insert_subvector (concat_vectors X, Y), Z) ->
(concat_vectors Z, Y)
Upper half: fold (insert_subvector (concat_vectors X, Y), Z) ->
(concat_vectors X, Z)

This can be seen with the following IR:

define <8 x float> @lower_half(<4 x float> %v1, <4 x float> %v2, <4 x
float> %v3) {
  %1 = shufflevector <4 x float> %v1, <4 x float> %v2, <8 x i32> <i32
0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %2 = tail call <8 x float> @llvm.x86.avx.vinsertf128.ps.256(<8 x
float> %1, <4 x float> %v3, i8 0)

The vinsertf128 intrinsic is converted into an insert_subvector node
in SelectionDAGBuilder.cpp.

Using AVX, without the patch this generates two vinsertf128 instructions:

vinsertf128 $1, %xmm1, %ymm0, %ymm0
vinsertf128 $0, %xmm2, %ymm0, %ymm0

With the patch this is optimized into:

vinsertf128 $1, %xmm1, %ymm2, %ymm0

Patch by Robert Lougher.

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

10 years agoDAGCombine should not produce ISD::OR nodes after operation legalization if they...
Owen Anderson [Fri, 31 Jan 2014 00:51:43 +0000 (00:51 +0000)]
DAGCombine should not produce ISD::OR nodes after operation legalization if they're not legal.

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

10 years agoPGO branch weight: update edge weights in SelectionDAGBuilder.
Manman Ren [Fri, 31 Jan 2014 00:42:44 +0000 (00:42 +0000)]
PGO branch weight: update edge weights in SelectionDAGBuilder.

When converting from "or + br" to two branches, or converting from
"and + br" to two branches, we correctly update the edge weights of
the two branches.

The previous attempt at r200431 was reverted at r200434 because of
two testing case failures. I modified my patch a little, but forgot
to re-run "make check-all".

Testing case CodeGen/ARM/lsr-unfolded-offset.ll is updated because of
the patch's impact on branch probability which causes changes in
spill placement.

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

10 years agoAllow speculating llvm.sqrt, fma and fmuladd
Matt Arsenault [Fri, 31 Jan 2014 00:09:00 +0000 (00:09 +0000)]
Allow speculating llvm.sqrt, fma and fmuladd

This doesn't set errno, so this should be OK.
Also update the documentation to explicitly state
that errno are not set.

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

10 years agoAdd a link to a bug to a couple of FIXMEs
Timur Iskhodzhanov [Thu, 30 Jan 2014 23:14:38 +0000 (23:14 +0000)]
Add a link to a bug to a couple of FIXMEs

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

10 years ago[CMake] llvm_update_compile_flags: Honor LLVM_COMPILE_FLAGS.
NAKAMURA Takumi [Thu, 30 Jan 2014 22:55:25 +0000 (22:55 +0000)]
[CMake] llvm_update_compile_flags: Honor LLVM_COMPILE_FLAGS.

I accidentally mis-dropped LLVM_COMPILE_FLAGS in r200301. Sorry for that.

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

10 years agoHandleLLVMOptions.cmake: Typo in comment.
NAKAMURA Takumi [Thu, 30 Jan 2014 22:55:20 +0000 (22:55 +0000)]
HandleLLVMOptions.cmake: Typo in comment.

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

10 years ago[x86] Fix signed relocations for i64i32imm operands
David Woodhouse [Thu, 30 Jan 2014 22:20:41 +0000 (22:20 +0000)]
[x86] Fix signed relocations for i64i32imm operands

These should end up (in ELF) as R_X86_64_32S relocs, not R_X86_64_32.
Kill the horrid and incomplete special case and FIXME in
EncodeInstruction() and set things up so it can infer the signedness
from the ImmType just like it can the size and whether it's PC-relative.

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

10 years agoThis file already has a "using namespace object;", use it.
Rafael Espindola [Thu, 30 Jan 2014 21:51:42 +0000 (21:51 +0000)]
This file already has a "using namespace object;", use it.

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

10 years ago[AArch64] Custom lower concat_vector patterns with v4i16, v4i32, v8i8, v8i16, v16i8...
Chad Rosier [Thu, 30 Jan 2014 21:46:54 +0000 (21:46 +0000)]
[AArch64] Custom lower concat_vector patterns with v4i16, v4i32, v8i8, v8i16, v16i8 types.

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

10 years agoFix PR18381 - print a minimal diagnostic rather than assert on unresolved .secidx...
Timur Iskhodzhanov [Thu, 30 Jan 2014 21:13:05 +0000 (21:13 +0000)]
Fix PR18381 - print a minimal diagnostic rather than assert on unresolved .secidx target

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

10 years agoOnly ELF has a dynamic symbol table. Remove it from ObjectFile.
Rafael Espindola [Thu, 30 Jan 2014 20:45:33 +0000 (20:45 +0000)]
Only ELF has a dynamic symbol table. Remove it from ObjectFile.

COFF has only one symbol table.
MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about
the one symbol table (LC_SYMTAB).
IR (coming soon) also has only one table.

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

10 years agoThis has been fixed.
Rafael Espindola [Thu, 30 Jan 2014 20:29:25 +0000 (20:29 +0000)]
This has been fixed.

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

10 years agoUse early returns and factor the object::Binary creation.
Rafael Espindola [Thu, 30 Jan 2014 19:24:00 +0000 (19:24 +0000)]
Use early returns and factor the object::Binary creation.

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

10 years ago[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoin...
Juergen Ributzka [Thu, 30 Jan 2014 18:58:27 +0000 (18:58 +0000)]
[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoint intrinsic.

Re-applying the patch, but this time without using AsmPrinter methods.

Reviewed by Andy

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

10 years agoComment out unused macro because of warning
Renato Golin [Thu, 30 Jan 2014 18:55:47 +0000 (18:55 +0000)]
Comment out unused macro because of warning

Modern compilers (Clang 3.4, GCC 4.8) warn on variadic macros being
introduced in C99, which produces a huge number of useless diagnostics
since this macro is unused in the whole project.

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

10 years agoExplicitly specify the CPU to avoid Atom-specific assembly mismatch
Timur Iskhodzhanov [Thu, 30 Jan 2014 17:53:45 +0000 (17:53 +0000)]
Explicitly specify the CPU to avoid Atom-specific assembly mismatch

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

10 years agoReenable ARM EHABI on Android.
Evgeniy Stepanov [Thu, 30 Jan 2014 14:18:25 +0000 (14:18 +0000)]
Reenable ARM EHABI on Android.

Broken in r200388.

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

10 years ago[mips] Fix typo.
Matheus Almeida [Thu, 30 Jan 2014 13:40:26 +0000 (13:40 +0000)]
[mips] Fix typo.

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

10 years agoRemove duplicate patterns
Craig Topper [Thu, 30 Jan 2014 07:19:10 +0000 (07:19 +0000)]
Remove duplicate patterns

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

10 years agoCouple minor formatting fixes to the XXXGenDAGISel.inc files.
Craig Topper [Thu, 30 Jan 2014 06:42:52 +0000 (06:42 +0000)]
Couple minor formatting fixes to the XXXGenDAGISel.inc files.

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

10 years agoRemove some AddedComplexity tags that were forcing priority for AVX over SSE. Use...
Craig Topper [Thu, 30 Jan 2014 06:26:25 +0000 (06:26 +0000)]
Remove some AddedComplexity tags that were forcing priority for AVX over SSE. Use predicates instead.

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

10 years agotools: fix Twine abuse
Saleem Abdulrasool [Thu, 30 Jan 2014 06:19:27 +0000 (06:19 +0000)]
tools: fix Twine abuse

utohexstr provides a temporary string, making it unsafe to use with the Twine
interface which will not copy the string.  Switch to using std::string.

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

10 years agotools: remove unnecessary typename
Saleem Abdulrasool [Thu, 30 Jan 2014 06:19:24 +0000 (06:19 +0000)]
tools: remove unnecessary typename

This is acceptted by clang and gcc, but MSVC seems to balk at it.  As it is
unneeded, simply drop it.  Fixes MSVC buildbots.

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

10 years agoRemove duplicate pattern and add predicate checks on other patterns.
Craig Topper [Thu, 30 Jan 2014 06:03:19 +0000 (06:03 +0000)]
Remove duplicate pattern and add predicate checks on other patterns.

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

10 years agotools: repair Windows build
Saleem Abdulrasool [Thu, 30 Jan 2014 05:20:31 +0000 (05:20 +0000)]
tools: repair Windows build

exp2 is not available on Windows.  Fortunately, we are calculating powers of 2
with expontents within the range of [4,12].  Simply use an equivalent bitshift
operation to repair compilation with MSVC which does not provide this standard
function.

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

10 years agoImplement SPARCv9 atomic_swap_64 with a pseudo.
Jakob Stoklund Olesen [Thu, 30 Jan 2014 04:48:46 +0000 (04:48 +0000)]
Implement SPARCv9 atomic_swap_64 with a pseudo.

The SWAP instruction only exists in a 32-bit variant, but the 64-bit
atomic swap can be implemented in terms of CASX, like the other atomic
rmw primitives.

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

10 years agoARM IAS: support .object_arch
Saleem Abdulrasool [Thu, 30 Jan 2014 04:46:41 +0000 (04:46 +0000)]
ARM IAS: support .object_arch

The .object_arch directive indicates an alternative architecture to be specified
in the object file.  The directive does *not* effect the enabled feature bits
for the object file generation.  This is particularly useful when the code
performs runtime detection and would like to indicate a lower architecture as
the requirements than the actual instructions used.

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

10 years agotools: add support for decoding ARM attributes
Saleem Abdulrasool [Thu, 30 Jan 2014 04:46:33 +0000 (04:46 +0000)]
tools: add support for decoding ARM attributes

Enhance the ARM specific parsing support in llvm-readobj to support attributes.
This allows for simpler tests to validate encoding of the build attributes as
specified in the ARM ELF specification.

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

10 years agoARM IAS: support .movsp
Saleem Abdulrasool [Thu, 30 Jan 2014 04:46:24 +0000 (04:46 +0000)]
ARM IAS: support .movsp

.movsp is an ARM unwinding directive that indicates to the unwinder that a
register contains an offset from the current stack pointer.  If the offset is
unspecified, it defaults to zero.

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

10 years agoARM: suuport .tlsdescseq directive
Saleem Abdulrasool [Thu, 30 Jan 2014 04:02:47 +0000 (04:02 +0000)]
ARM: suuport .tlsdescseq directive

This enhances the ARMAsmParser to handle .tlsdescseq directives.  This is a
slightly special relocation.  We must be able to generate them, but not consume
them in assembly.  The relocation is meant to assist the linker in generating a
TLS descriptor sequence.  The ELF target streamer is enhanced to append
additional fixups into the current segment and that is used to emit the new
R_ARM_TLS_DESCSEQ relocations.

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

10 years agoARM: support TLS descriptor relocations
Saleem Abdulrasool [Thu, 30 Jan 2014 04:02:38 +0000 (04:02 +0000)]
ARM: support TLS descriptor relocations

Add support for tlsdesc relocations which are part of the ABI, marked as
experimental.  These relocations permit the linker to perform TLS reference
optimizations.

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

10 years agoARM: support tlscall relocations
Saleem Abdulrasool [Thu, 30 Jan 2014 04:02:31 +0000 (04:02 +0000)]
ARM: support tlscall relocations

This adds support for TLS CALL relocations.  TLS CALL relocations are used to
indicate to the linker to generate appropriate entries to resolve TLS references
via an appropriate function invocation (e.g. __tls_get_addr(PLT)).

In order to accomodate the linker relaxation of the TLS access model for the
references (GD/LD -> IE, IE -> LE), the relocation addend must be incomplete.
This requires that the partial inplace value is also incomplete (i.e. 0).  We
simply avoid the offset value calculation at the time of the fixup adjustment in
the ARM assembler backend.

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

10 years agoRevert "[Stackmaps] Record the stack size of each function that contains a stackmap...
Juergen Ributzka [Thu, 30 Jan 2014 03:34:02 +0000 (03:34 +0000)]
Revert "[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoint intrinsic."

This reverts commit r200444 to unbreak buildbots.

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

10 years ago[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoin...
Juergen Ributzka [Thu, 30 Jan 2014 03:06:14 +0000 (03:06 +0000)]
[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoint intrinsic.

Reviewed by Andy

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

10 years agoSimplify the handling of iterators in ObjectFile.
Rafael Espindola [Thu, 30 Jan 2014 02:49:50 +0000 (02:49 +0000)]
Simplify the handling of iterators in ObjectFile.

None of the object file formats reported error on iterator increment. In
retrospect, that is not too surprising: no object format stores symbols or
sections in a linked list or other structure that requires chasing pointers.
As a consequence, all error checking can be done on begin() and end().

This reduces the text segment of bin/llvm-readobj in my machine from 521233 to
518526 bytes.

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

10 years agoExtend the preserve_most/all calling convention description in LangRef about the
Juergen Ributzka [Thu, 30 Jan 2014 02:39:00 +0000 (02:39 +0000)]
Extend the preserve_most/all calling convention description in LangRef about the
fact that the argument registers will be preserved too.

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

10 years agoReland r200340 - 'Add line table debug info to COFF files when using a win32 triple'
Timur Iskhodzhanov [Thu, 30 Jan 2014 01:39:17 +0000 (01:39 +0000)]
Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple'

This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651

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

10 years agoadd a bunch of LLVM_OVERRIDE before I start refactoring these.
Rafael Espindola [Thu, 30 Jan 2014 01:17:42 +0000 (01:17 +0000)]
add a bunch of LLVM_OVERRIDE before I start refactoring these.

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

10 years agoRemove dead code.
Rafael Espindola [Thu, 30 Jan 2014 01:10:21 +0000 (01:10 +0000)]
Remove dead code.

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

10 years agoRevert r200431 due to bot failures.
Manman Ren [Thu, 30 Jan 2014 00:53:27 +0000 (00:53 +0000)]
Revert r200431 due to bot failures.

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

10 years agoFix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.
Rafael Espindola [Thu, 30 Jan 2014 00:42:30 +0000 (00:42 +0000)]
Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.

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

10 years agoPGO branch weight: update edge weights in SelectionDAGBuilder.
Manman Ren [Thu, 30 Jan 2014 00:24:37 +0000 (00:24 +0000)]
PGO branch weight: update edge weights in SelectionDAGBuilder.

When converting from "or + br" to two branches, or converting from
"and + br" to two branches, we correctly update the edge weights of
the two branches.

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

10 years agoPGO branch weight: update edge weights in IfConverter.
Manman Ren [Wed, 29 Jan 2014 23:18:47 +0000 (23:18 +0000)]
PGO branch weight: update edge weights in IfConverter.

This commit only handles IfConvertTriangle. To update edge weights
of a successor, one interface is added to MachineBasicBlock:
/// Set successor weight of a given iterator.
setSuccWeight(succ_iterator I, uint32_t weight)

An existing testing case test/CodeGen/Thumb2/v8_IT_5.ll is updated,
since we now correctly update the edge weights, the cold block
is placed at the end of the function and we jump to the cold block.

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

10 years agoMove range handling for a function to endFunction rather than
Eric Christopher [Wed, 29 Jan 2014 23:05:43 +0000 (23:05 +0000)]
Move range handling for a function to endFunction rather than
when we create the subprogram DIE.

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

10 years agoIf we use DW_AT_ranges we need to specify a base address that ranges
Eric Christopher [Wed, 29 Jan 2014 22:22:56 +0000 (22:22 +0000)]
If we use DW_AT_ranges we need to specify a base address that ranges
are relative to in the compile unit. Currently let's just use 0...

Thanks to Greg Clayton for the catch!

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

10 years agoTurn on CU ranges if we've got multiple compile units in the same
Eric Christopher [Wed, 29 Jan 2014 22:06:27 +0000 (22:06 +0000)]
Turn on CU ranges if we've got multiple compile units in the same
module since there's no range guarantee that we could make given
output order. This also fixes up the testcases that have multiple
CUs to have the correct range offset.

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

10 years agoMake the compile unit map a MapVector so that we can assume a stable
Eric Christopher [Wed, 29 Jan 2014 22:06:23 +0000 (22:06 +0000)]
Make the compile unit map a MapVector so that we can assume a stable
output ordering.

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

10 years agoFix formatting of comment.
Eric Christopher [Wed, 29 Jan 2014 22:06:21 +0000 (22:06 +0000)]
Fix formatting of comment.

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

10 years agollvm-cov: Accept the long forms of gcov options
Justin Bogner [Wed, 29 Jan 2014 21:31:47 +0000 (21:31 +0000)]
llvm-cov: Accept the long forms of gcov options

This is a bit imperfect, as these options don't show up in the help as
is and single dash variants are accepted, which differs from gcov.
Unfortunately, this seems to be as good as it gets with the cl::opt
machinery, so it'll do as an incremental step.

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

10 years agollvm-cov: Improve help message text
Justin Bogner [Wed, 29 Jan 2014 21:31:45 +0000 (21:31 +0000)]
llvm-cov: Improve help message text

This Properly capitalizes and clarifies the help output from
llvm-cov. It also puts the llvm-only / non-gcov-compatible options in
their own category.

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

10 years agollvm-cov: Expect a source file as a positional parameter
Justin Bogner [Wed, 29 Jan 2014 21:31:34 +0000 (21:31 +0000)]
llvm-cov: Expect a source file as a positional parameter

Currently, llvm-cov isn't command-line compatible with gcov, which
accepts a source file name as its first parameter and infers the gcno
and gcda file names from that. This change keeps our -gcda and -gcno
options available for convenience in overriding this behaviour, but
adds the required parameter and inference behaviour as a compatible
default.

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

10 years agoRemove C++11ism from r200407.
Jordan Rose [Wed, 29 Jan 2014 19:14:23 +0000 (19:14 +0000)]
Remove C++11ism from r200407.

Oops!

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

10 years agoMC: Better management of macro arguments
David Majnemer [Wed, 29 Jan 2014 18:57:46 +0000 (18:57 +0000)]
MC: Better management of macro arguments

The linux kernel makes uses of a GAS `feature' which substitutes nothing
for macro arguments which aren't specified.

Proper support for these kind of macro arguments necessitated a cleanup of
differences between `GAS' and `Darwin' dialect macro processing.

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

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

10 years agoLoopVectorizer: Add a test case for unrolling of small loops that need a runtime
Arnold Schwaighofer [Wed, 29 Jan 2014 18:55:44 +0000 (18:55 +0000)]
LoopVectorizer: Add a test case for unrolling of small loops that need a runtime
check.

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

10 years ago[CommandLine] Aliases require an value if their target requires a value.
Jordan Rose [Wed, 29 Jan 2014 18:54:17 +0000 (18:54 +0000)]
[CommandLine] Aliases require an value if their target requires a value.

This can still be overridden by explicitly setting a value requirement on the
alias option, but by default it should be the same.

PR18649

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

10 years agoAdd support for PC-relative non-extern relocations to RuntimeDyldMachO.
Lang Hames [Wed, 29 Jan 2014 18:31:35 +0000 (18:31 +0000)]
Add support for PC-relative non-extern relocations to RuntimeDyldMachO.

Also replaces testcase for r180790 (support for absolute non-externs relocs)
with a more robust version.

<rdar://problem/15864721>

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

10 years ago[X86][SchedModel] Fix typos in the definitions of the ports for Haswell.
Quentin Colombet [Wed, 29 Jan 2014 18:26:59 +0000 (18:26 +0000)]
[X86][SchedModel] Fix typos in the definitions of the ports for Haswell.

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

10 years agoTest commit
Oliver Stannard [Wed, 29 Jan 2014 16:01:24 +0000 (16:01 +0000)]
Test commit

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

10 years ago[mips][msa] Add fill.d instruction.
Matheus Almeida [Wed, 29 Jan 2014 15:12:02 +0000 (15:12 +0000)]
[mips][msa] Add fill.d instruction.

This instruction is only available on Mips64 cores
that implement the MSA ASE.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA 2r_vector_scalar.ll test.
Matheus Almeida [Wed, 29 Jan 2014 14:32:03 +0000 (14:32 +0000)]
[mips][msa] CHECK-DAG-ize MSA 2r_vector_scalar.ll test.

This update is a preparation for the addition of Mips64 MSA tests.

No functional changes.

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

10 years ago[mips][msa] Add copy_{u,s}.d.
Matheus Almeida [Wed, 29 Jan 2014 14:05:28 +0000 (14:05 +0000)]
[mips][msa] Add copy_{u,s}.d.

These instructions are only available on Mips64 cores
that implement the MSA ASE.

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

10 years ago[mips][msa] CHECK-DAG-ize MSA elm_copy.ll test.
Matheus Almeida [Wed, 29 Jan 2014 13:51:34 +0000 (13:51 +0000)]
[mips][msa] CHECK-DAG-ize MSA elm_copy.ll test.

This update is a preparation for the addition of Mips64 MSA tests.

No functional changes.

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

10 years ago[LPM] Fix PR18643, another scary place where loop transforms failed to
Chandler Carruth [Wed, 29 Jan 2014 13:16:53 +0000 (13:16 +0000)]
[LPM] Fix PR18643, another scary place where loop transforms failed to
preserve loop simplify of enclosing loops.

The problem here starts with LoopRotation which ends up cloning code out
of the latch into the new preheader it is buidling. This can create
a new edge from the preheader into the exit block of the loop which
breaks LoopSimplify form. The code tries to fix this by splitting the
critical edge between the latch and the exit block to get a new exit
block that only the latch dominates. This sadly isn't sufficient.

The exit block may be an exit block for multiple nested loops. When we
clone an edge from the latch of the inner loop to the new preheader
being built in the outer loop, we create an exiting edge from the outer
loop to this exit block. Despite breaking the LoopSimplify form for the
inner loop, this is fine for the outer loop. However, when we split the
edge from the inner loop to the exit block, we create a new block which
is in neither the inner nor outer loop as the new exit block. This is
a predecessor to the old exit block, and so the split itself takes the
outer loop out of LoopSimplify form. We need to split every edge
entering the exit block from inside a loop nested more deeply than the
exit block in order to preserve all of the loop simplify constraints.

Once we try to do that, a problem with splitting critical edges
surfaces. Previously, we tried a very brute force to update LoopSimplify
form by re-computing it for all exit blocks. We don't need to do this,
and doing this much will sometimes but not always overlap with the
LoopRotate bug fix. Instead, the code needs to specifically handle the
cases which can start to violate LoopSimplify -- they aren't that
common. We need to see if the destination of the split edge was a loop
exit block in simplified form for the loop of the source of the edge.
For this to be true, all the predecessors need to be in the exact same
loop as the source of the edge being split. If the dest block was
originally in this form, we have to split all of the deges back into
this loop to recover it. The old mechanism of doing this was
conservatively correct because at least *one* of the exiting blocks it
rewrote was the DestBB and so the DestBB's predecessors were fixed. But
this is a much more targeted way of doing it. Making it targeted is
important, because ballooning the set of edges touched prevents
LoopRotate from being able to split edges *it* needs to split to
preserve loop simplify in a coherent way -- the critical edge splitting
would sometimes find the other edges in need of splitting but not
others.

Many, *many* thanks for help from Nick reducing these test cases
mightily. And helping lots with the analysis here as this one was quite
tricky to track down.

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

10 years agoRemove -arm-enable-ehabi from Android build rules. It's enabled by default.
Evgeniy Stepanov [Wed, 29 Jan 2014 12:36:18 +0000 (12:36 +0000)]
Remove -arm-enable-ehabi from Android build rules. It's enabled by default.

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

10 years agoDocument EHABI enabled by default
Renato Golin [Wed, 29 Jan 2014 12:04:13 +0000 (12:04 +0000)]
Document EHABI enabled by default

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

10 years agoEnable EHABI by default
Renato Golin [Wed, 29 Jan 2014 11:50:56 +0000 (11:50 +0000)]
Enable EHABI by default

After all hard work to implement the EHABI and with the test-suite
passing, it's time to turn it on by default and allow users to
disable it as a work-around while we fix the eventual bugs that show
up.

This commit also remove the -arm-enable-ehabi-descriptors, since we
want the tables to be printed every time the EHABI is turned on
for non-Darwin ARM targets.

Although MCJIT EHABI is not working yet (needs linking with the right
libraries), this commit also fixes some relocations on MCJIT regarding
the EH tables/lib calls, and update some tests to avoid using EH tables
when none are needed.

The EH tests in the test-suite that were previously disabled on ARM
now pass with these changes, so a follow-up commit on the test-suite
will re-enable them.

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

10 years agoMC: Reorganize macro MC test along dialect lines
David Majnemer [Wed, 29 Jan 2014 09:18:43 +0000 (09:18 +0000)]
MC: Reorganize macro MC test along dialect lines

This commit seeks to do two things:
 - Run the surfeit of tests under the Darwin dialect.  This ends up
   affecting tests which assumed that spaces could deliminate arguments.
 - The GAS dialect tests should limit their surface area to things that
   could plausibly work under GAS. For example, Darwin style arguments
   have no business being in such a test.

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

10 years ago[asan] simplify a test
Kostya Serebryany [Wed, 29 Jan 2014 07:35:43 +0000 (07:35 +0000)]
[asan] simplify a test

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

10 years agoDelete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.
Craig Topper [Wed, 29 Jan 2014 07:06:07 +0000 (07:06 +0000)]
Delete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.

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

10 years ago[Sparc] Use %r_disp32 for pc_rel entries in FDE as well.
Venkatraman Govindaraju [Wed, 29 Jan 2014 06:59:20 +0000 (06:59 +0000)]
[Sparc] Use %r_disp32 for pc_rel entries in FDE as well.

This makes MCAsmInfo::getExprForFDESymbol() a virtual function and overrides it in SparcMCAsmInfo.

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

10 years agoRevert r200340, "Add line table debug info to COFF files when using a win32 triple."
NAKAMURA Takumi [Wed, 29 Jan 2014 06:05:38 +0000 (06:05 +0000)]
Revert r200340, "Add line table debug info to COFF files when using a win32 triple."

It was incompatible with --target=i686-win32.

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

10 years agoNormalize the style in llvm-nm.cpp.
Rafael Espindola [Wed, 29 Jan 2014 04:56:19 +0000 (04:56 +0000)]
Normalize the style in llvm-nm.cpp.

It had grown fairly inconsistent. I am about to change it quite a bit to also
use the object api when handling IR files.

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

10 years ago[Sparc] Use %r_disp32 for pc_rel entries in gcc_except_table and eh_frame.
Venkatraman Govindaraju [Wed, 29 Jan 2014 04:51:35 +0000 (04:51 +0000)]
[Sparc] Use %r_disp32 for pc_rel entries in gcc_except_table and eh_frame.

Otherwise, assembler (gas) fails to assemble them with error message "operation
combines symbols in different segments". This is because MC computes
pc_rel entries with subtract expression between labels from different sections.

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

10 years ago[LPM] Fix PR18642, a pretty nasty bug in IndVars that "never mattered"
Chandler Carruth [Wed, 29 Jan 2014 04:40:19 +0000 (04:40 +0000)]
[LPM] Fix PR18642, a pretty nasty bug in IndVars that "never mattered"
because of the inside-out run of LoopSimplify in the LoopPassManager and
the fact that LoopSimplify couldn't be "preserved" across two
independent LoopPassManagers.

Anyways, in that case, IndVars wasn't correctly preserving an LCSSA PHI
node because it thought it was rewriting (via SCEV) the incoming value
to a loop invariant value. While it may well be invariant for the
current loop, it may be rewritten in terms of an enclosing loop's
values. This in and of itself is fine, as the LCSSA PHI node in the
enclosing loop for the inner loop value we're rewriting will have its
own LCSSA PHI node if used outside of the enclosing loop. With me so
far?

Well, the current loop and the enclosing loop may share an exiting
block and exit block, and when they do they also share LCSSA PHI nodes.
In this case, its not valid to RAUW through the LCSSA PHI node.

Expected crazy test included.

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

10 years agoLoopVectorizer: Don't count the induction variable multiple times
Arnold Schwaighofer [Wed, 29 Jan 2014 04:36:12 +0000 (04:36 +0000)]
LoopVectorizer: Don't count the induction variable multiple times

When estimating register pressure, don't count the induction variable mulitple
times. It is unlikely to be unrolled. This is currently disabled and hidden
behind a flag ("enable-ind-var-reg-heur").

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