oota-llvm.git
13 years agoHave m_One also match constant vectors for which every element is 1.
Duncan Sands [Tue, 1 Feb 2011 08:39:12 +0000 (08:39 +0000)]
Have m_One also match constant vectors for which every element is 1.

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

13 years agoTest commit - fix a double 'should' in a comment.
Carl Norum [Tue, 1 Feb 2011 07:38:42 +0000 (07:38 +0000)]
Test commit - fix a double 'should' in a comment.

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

13 years agoCorrectly merge available_externally and regular definitions when they have
Rafael Espindola [Tue, 1 Feb 2011 05:33:52 +0000 (05:33 +0000)]
Correctly merge available_externally and regular definitions when they have
different visibilities.

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

13 years agoFix bogus assert condition noticed by Csaba Raduly.
Evan Cheng [Tue, 1 Feb 2011 01:50:49 +0000 (01:50 +0000)]
Fix bogus assert condition noticed by Csaba Raduly.

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

13 years agoReapply 124275 since the Dragonegg failure was unreproducible.
Eric Christopher [Tue, 1 Feb 2011 01:16:32 +0000 (01:16 +0000)]
Reapply 124275 since the Dragonegg failure was unreproducible.

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

13 years agoFix test for non-darwin targets.
Evan Cheng [Tue, 1 Feb 2011 01:16:18 +0000 (01:16 +0000)]
Fix test for non-darwin targets.

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

13 years agoPatches to build EFI with Clang/LLVM. By Carl Norum.
Evan Cheng [Tue, 1 Feb 2011 01:14:13 +0000 (01:14 +0000)]
Patches to build EFI with Clang/LLVM. By Carl Norum.

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

13 years agoRemove stale test that has never worked, afaik.
Devang Patel [Tue, 1 Feb 2011 00:47:16 +0000 (00:47 +0000)]
Remove stale test that has never worked, afaik.

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

13 years agoDon't tell the linker about available_externally definitions. If we do, it will
Rafael Espindola [Tue, 1 Feb 2011 00:41:51 +0000 (00:41 +0000)]
Don't tell the linker about available_externally definitions. If we do, it will
complain about duplicated definitions.

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

13 years agoKeep track of incoming argument's location while emitting LiveIns.
Devang Patel [Mon, 31 Jan 2011 21:38:14 +0000 (21:38 +0000)]
Keep track of incoming argument's location while emitting LiveIns.

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

13 years agoWhile printing "interesting" breakpoint locations for debug info quality test harness...
Devang Patel [Mon, 31 Jan 2011 21:36:24 +0000 (21:36 +0000)]
While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.

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

13 years agoEnumerate .code16/32/64 instead of checking .code prefix. This
Roman Divacky [Mon, 31 Jan 2011 21:19:43 +0000 (21:19 +0000)]
Enumerate .code16/32/64 instead of checking .code prefix. This
unbreaks some ARM tests.

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

13 years agoTidy up.
Devang Patel [Mon, 31 Jan 2011 21:16:37 +0000 (21:16 +0000)]
Tidy up.

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

13 years agoFocus on arguments for now.
Devang Patel [Mon, 31 Jan 2011 21:15:39 +0000 (21:15 +0000)]
Focus on arguments for now.

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

13 years agoError on all .code* directives instead of just .code16 as they
Roman Divacky [Mon, 31 Jan 2011 20:56:49 +0000 (20:56 +0000)]
Error on all .code* directives instead of just .code16 as they
all lead to a silent miscompilation of code.

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

13 years agoFix vector sign extend to put the source and destination types in the
David Greene [Mon, 31 Jan 2011 20:39:01 +0000 (20:39 +0000)]
Fix vector sign extend to put the source and destination types in the
correct places.

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

13 years agoadd a note, progress unblocked by PR8575 being fixed.
Chris Lattner [Mon, 31 Jan 2011 20:23:28 +0000 (20:23 +0000)]
add a note, progress unblocked by PR8575 being fixed.

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

13 years agoAdds some platform checks to cmake/config-ix.cmake and fixes checking
Oscar Fuentes [Mon, 31 Jan 2011 18:25:25 +0000 (18:25 +0000)]
Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

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

13 years agoFix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
Richard Osborne [Mon, 31 Jan 2011 17:41:44 +0000 (17:41 +0000)]
Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.

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

13 years agoCMake: Fix a few definition to suppress warnings.
NAKAMURA Takumi [Mon, 31 Jan 2011 09:41:20 +0000 (09:41 +0000)]
CMake: Fix a few definition to suppress warnings.

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

13 years agoSave a mapping between original and cloned constpool entries.
Anton Korobeynikov [Sun, 30 Jan 2011 22:07:39 +0000 (22:07 +0000)]
Save a mapping between original and cloned constpool entries.

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

13 years agoClarify the LSDASection NULL check
Anton Korobeynikov [Sun, 30 Jan 2011 22:07:31 +0000 (22:07 +0000)]
Clarify the LSDASection NULL check

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

13 years agoRecognize and simplify
Anders Carlsson [Sun, 30 Jan 2011 22:01:13 +0000 (22:01 +0000)]
Recognize and simplify

(A+B) == A  ->  B == 0
A == (A+B)  ->  B == 0

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

13 years agoRespect the -tail-dup-size command line option even when optimizing for size.
Jakob Stoklund Olesen [Sun, 30 Jan 2011 20:38:12 +0000 (20:38 +0000)]
Respect the -tail-dup-size command line option even when optimizing for size.

This is similar to the -unroll-threshold option. There should be no change in
behavior when -tail-dup-size is not explicit on the llc command line.

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

13 years agoCommit 124487 broke 254.gap. See if disabling the part that might be triggered
Duncan Sands [Sun, 30 Jan 2011 18:24:20 +0000 (18:24 +0000)]
Commit 124487 broke 254.gap.  See if disabling the part that might be triggered
by PR9088 fixes things.

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

13 years agoTransform (X/Y)*Y into X if the division is exact. Instcombine already knows how
Duncan Sands [Sun, 30 Jan 2011 18:03:50 +0000 (18:03 +0000)]
Transform (X/Y)*Y into X if the division is exact.  Instcombine already knows how
to do this and more, but would only do it if X/Y had only one use.  Spotted as the
most common missed simplification in SPEC by my auto-simplifier, now that it knows
about nuw/nsw/exact flags.  This removes a bunch of multiplications from 447.dealII
and 483.xalancbmk.  It also removes a lot from tramp3d-v4, which results in much
more inlining.

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

13 years agoTeach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2...
Benjamin Kramer [Sun, 30 Jan 2011 16:38:43 +0000 (16:38 +0000)]
Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off.

This happens all the time when a smul is promoted to a larger type.

On x86-64 we now compile "int test(int x) { return x/10; }" into
  movslq  %edi, %rax
  imulq $1717986919, %rax, %rax
  movq  %rax, %rcx
  shrq  $63, %rcx
  sarq  $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax"
  addl  %ecx, %eax

This fires 96 times in gcc.c on x86-64.

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

13 years agoFix 'fcmp one' constant folding. Noticed by inspection.
Nick Lewycky [Sun, 30 Jan 2011 01:49:58 +0000 (01:49 +0000)]
Fix 'fcmp one' constant folding. Noticed by inspection.

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

13 years agoFix some formatting and upgrade comments from llvm 1.x to 2.x syntax.
Nick Lewycky [Sun, 30 Jan 2011 01:48:50 +0000 (01:48 +0000)]
Fix some formatting and upgrade comments from llvm 1.x to 2.x syntax.

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

13 years agoThis is #included by .c files. Remove C++-style comments.
Bill Wendling [Sat, 29 Jan 2011 21:54:26 +0000 (21:54 +0000)]
This is #included by .c files. Remove C++-style comments.

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

13 years agoAdd the select optimization recently added to instcombine to constant folding.
Nick Lewycky [Sat, 29 Jan 2011 20:35:06 +0000 (20:35 +0000)]
Add the select optimization recently added to instcombine to constant folding.
This is the one where one of the branches of the select is another select on
the same condition.

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

13 years agoUnbreak the MSVC build.
Francois Pichet [Sat, 29 Jan 2011 20:06:16 +0000 (20:06 +0000)]
Unbreak the MSVC build.

The DEBUG() call at line 606 demands to see raw_ostream's definition. I have no idea why this seems to only break MSVC.

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

13 years agoFix comment.
Nick Lewycky [Sat, 29 Jan 2011 19:55:23 +0000 (19:55 +0000)]
Fix comment.

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

13 years agoCall SimplifyFDivInst() in InstCombiner::visitFDiv().
Frits van Bommel [Sat, 29 Jan 2011 17:50:27 +0000 (17:50 +0000)]
Call SimplifyFDivInst() in InstCombiner::visitFDiv().

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

13 years agoMove InstCombine's knowledge of fdiv to SimplifyInstruction().
Frits van Bommel [Sat, 29 Jan 2011 15:26:31 +0000 (15:26 +0000)]
Move InstCombine's knowledge of fdiv to SimplifyInstruction().

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

13 years agoFix typo: should have been testing that X was odd, not V.
Duncan Sands [Sat, 29 Jan 2011 13:27:00 +0000 (13:27 +0000)]
Fix typo: should have been testing that X was odd, not V.

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

13 years agoAdd the missing sub identity "A-(A-B) -> B" to DAGCombine.
Benjamin Kramer [Sat, 29 Jan 2011 12:34:05 +0000 (12:34 +0000)]
Add the missing sub identity "A-(A-B) -> B" to DAGCombine.

This happens e.g. for code like "X - X%10" where we lower the modulo operation
to a series of multiplies and shifts that are then subtracted from X, leading to
this missed optimization.

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

13 years agoAdd a test for TCE return duplication.
Evan Cheng [Sat, 29 Jan 2011 04:53:35 +0000 (04:53 +0000)]
Add a test for TCE return duplication.

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

13 years agoRe-apply r124518 with fix. Watch out for invalidated iterator.
Evan Cheng [Sat, 29 Jan 2011 04:46:23 +0000 (04:46 +0000)]
Re-apply r124518 with fix. Watch out for invalidated iterator.

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

13 years agoRevert r124518. It broke Linux self-host.
Evan Cheng [Sat, 29 Jan 2011 02:43:04 +0000 (02:43 +0000)]
Revert r124518. It broke Linux self-host.

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

13 years agoRe-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional...
Evan Cheng [Sat, 29 Jan 2011 01:29:26 +0000 (01:29 +0000)]
Re-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional predecessor to enable TCE on demand.

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

13 years agoImplementation of path profiling.
Andrew Trick [Sat, 29 Jan 2011 01:09:53 +0000 (01:09 +0000)]
Implementation of path profiling.
Modified patch by Adam Preuss.

This builds on the existing framework for block tracing, edge profiling and optimal edge profiling.
See -help-hidden for new flags.
For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs.

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

13 years agoMost browsers eliminate whitespace between anchor tags. Force whitespace with
Nick Lewycky [Sat, 29 Jan 2011 01:09:53 +0000 (01:09 +0000)]
Most browsers eliminate whitespace between anchor tags. Force whitespace with
&nbsp; so that the code reads properly.

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

13 years agoError on .code16 instead of producing wrong (32bit) code.
Roman Divacky [Fri, 28 Jan 2011 19:29:48 +0000 (19:29 +0000)]
Error on .code16 instead of producing wrong (32bit) code.

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

13 years agoThis dyn_cast should be a cast. Pointed out by Frits van Bommel.
Duncan Sands [Fri, 28 Jan 2011 18:53:08 +0000 (18:53 +0000)]
This dyn_cast should be a cast.  Pointed out by Frits van Bommel.

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

13 years agoThread divisions over selects and phis. This doesn't fire much and has basically
Duncan Sands [Fri, 28 Jan 2011 18:50:50 +0000 (18:50 +0000)]
Thread divisions over selects and phis.  This doesn't fire much and has basically
zero effect on the testsuite (it improves two Ada testcases).

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

13 years agoPR9030: Fix disassembly of ARM "mov pc, lr" instruction.
Bob Wilson [Fri, 28 Jan 2011 17:50:30 +0000 (17:50 +0000)]
PR9030: Fix disassembly of ARM "mov pc, lr" instruction.
Patch by Jyun-Yan You.

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

13 years agoMy auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC
Duncan Sands [Fri, 28 Jan 2011 16:51:11 +0000 (16:51 +0000)]
My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC
benchmarks, and that it can be simplified to X/Y.  (In general you can only
simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the
form "X/Y" then this is the case).  This patch implements that transform and
moves some Div logic out of instcombine and into InstructionSimplify.
Unfortunately instcombine gets in the way somewhat, since it likes to change
(X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too.
Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y"
does not overflow, because the flag says so, so I added that logic too.  This
eliminates a bunch of divisions and subtractions in 447.dealII, and has good
effects on some other benchmarks too.  It seems to have quite an effect on
tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions
changed, resulting in massive changes all over.

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

13 years agoFix libffi usage when it is on a custom path.
Oscar Fuentes [Fri, 28 Jan 2011 16:49:05 +0000 (16:49 +0000)]
Fix libffi usage when it is on a custom path.

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

13 years agoAdd support for parsing .float
Roman Divacky [Fri, 28 Jan 2011 14:20:32 +0000 (14:20 +0000)]
Add support for parsing .float

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

13 years agoRename functions to follow coding standard. Also rejiggers comments. No
Nick Lewycky [Fri, 28 Jan 2011 08:43:14 +0000 (08:43 +0000)]
Rename functions to follow coding standard. Also rejiggers comments. No
functionality change.

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

13 years agoAdd a doxygen comment for this class.
Nick Lewycky [Fri, 28 Jan 2011 08:19:00 +0000 (08:19 +0000)]
Add a doxygen comment for this class.

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

13 years agoReorder for readability. (Chris, is this what you meant?)
Nick Lewycky [Fri, 28 Jan 2011 07:36:21 +0000 (07:36 +0000)]
Reorder for readability. (Chris, is this what you meant?)

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

13 years agoRevert r124462. There are a few big regressions that I need to fix first.
Evan Cheng [Fri, 28 Jan 2011 07:12:38 +0000 (07:12 +0000)]
Revert r124462. There are a few big regressions that I need to fix first.

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

13 years agoReduce the number of functions we look at in the first pass, and preallocate
Nick Lewycky [Fri, 28 Jan 2011 05:48:15 +0000 (05:48 +0000)]
Reduce the number of functions we look at in the first pass, and preallocate
the function equality set.

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

13 years agoClean up the tests a little, make sure we match an instruction in the right
Nick Lewycky [Fri, 28 Jan 2011 05:13:17 +0000 (05:13 +0000)]
Clean up the tests a little, make sure we match an instruction in the right
test.

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

13 years agoFix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!
Nick Lewycky [Fri, 28 Jan 2011 04:00:15 +0000 (04:00 +0000)]
Fix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!

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

13 years agoAdd a triple.
Rafael Espindola [Fri, 28 Jan 2011 03:57:55 +0000 (03:57 +0000)]
Add a triple.

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

13 years agoAdd missing include for ptrdiff_t. Patch by Joerg Sonnenberger!
Nick Lewycky [Fri, 28 Jan 2011 03:52:25 +0000 (03:52 +0000)]
Add missing include for ptrdiff_t. Patch by Joerg Sonnenberger!

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

13 years agoFold select + select where both selects are on the same condition.
Nick Lewycky [Fri, 28 Jan 2011 03:28:10 +0000 (03:28 +0000)]
Fold select + select where both selects are on the same condition.

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

13 years agoPrint the visibility of declarations.
Rafael Espindola [Fri, 28 Jan 2011 03:20:10 +0000 (03:20 +0000)]
Print the visibility of declarations.

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

13 years agoPR8951: Support for .equiv in integrated assembler, patch by Jörg Sonnenberger!
Nico Weber [Fri, 28 Jan 2011 03:04:41 +0000 (03:04 +0000)]
PR8951: Support for .equiv in integrated assembler, patch by Jörg Sonnenberger!

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

13 years ago- Stop simplifycfg from duplicating "ret" instructions into unconditional
Evan Cheng [Fri, 28 Jan 2011 02:19:21 +0000 (02:19 +0000)]
- Stop simplifycfg from duplicating "ret" instructions into unconditional
  branches. PR8575, rdar://5134905, rdar://8911460.
- Allow codegen tail duplication to dup small return blocks after register
  allocation is done.

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

13 years agoFix PLD encoding.
Evan Cheng [Thu, 27 Jan 2011 23:48:34 +0000 (23:48 +0000)]
Fix PLD encoding.

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

13 years agoChanged llvm-mc arm target to give an error if .syntax divided is used. Since
Kevin Enderby [Thu, 27 Jan 2011 23:22:36 +0000 (23:22 +0000)]
Changed llvm-mc arm target to give an error if .syntax divided is used.  Since
only .syntax unified is supported.

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

13 years agoFix a comment typo.
Bob Wilson [Thu, 27 Jan 2011 23:08:52 +0000 (23:08 +0000)]
Fix a comment typo.

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

13 years agoUse the paths to libffi's header and library even when no custom
Oscar Fuentes [Thu, 27 Jan 2011 22:58:34 +0000 (22:58 +0000)]
Use the paths to libffi's header and library even when no custom
location was stated with FFI_INCLUDE_DIR/FFI_LIBRARY_DIR.

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

13 years ago[AVX] Clean up the code to configure target lowering for AVX. Specify
David Greene [Thu, 27 Jan 2011 22:38:56 +0000 (22:38 +0000)]
[AVX] Clean up the code to configure target lowering for AVX.  Specify
how to lower more/new operations.  This is a prerequisite for adding
additional AVX lowering.

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

13 years agoRemove a temporary workaround for a lencod miscompile. Depends on the fix in r124442.
Andrew Trick [Thu, 27 Jan 2011 21:28:51 +0000 (21:28 +0000)]
Remove a temporary workaround for a lencod miscompile. Depends on the fix in r124442.

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

13 years agoVirtRegRewriter fix: update kill flags, which are used by the scavenger.
Andrew Trick [Thu, 27 Jan 2011 21:26:43 +0000 (21:26 +0000)]
VirtRegRewriter fix: update kill flags, which are used by the scavenger.
rdar://problem/8893967: JM/lencod miscompile at -arch armv7 -mthumb -O3

Added ResurrectKill to remove kill flags after we decide to reused a
physical register. And (hopefully) ensure that we call it in all the
right places.

Sorry, I'm not checking in a unit test given that it's a miscompile I
can't reproduce easily with a toy example. Failures in the rewriter
depend on a series of heuristic decisions maked during one of the many
upstream phases in codegen. This case would require coercing regalloc
to generate a couple of rematerialzations in a way that causes the
scavenger to reuse the same register at just the wrong point.

The general way to test this is to implement kill flags
verification. Then we could have a simple, robust compile-only unit
test. That would be worth doing if the whole pass was not about to
disappear. At this point we focus verification work on the next
generation of regalloc.

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

13 years agoClang: separate the access-control diagnostics from other diagnostics that do not...
Douglas Gregor [Thu, 27 Jan 2011 21:06:17 +0000 (21:06 +0000)]
Clang: separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior.

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

13 years agoUnbreak the build.
Benjamin Kramer [Thu, 27 Jan 2011 20:30:54 +0000 (20:30 +0000)]
Unbreak the build.

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

13 years agoExpound upon this comparison!
Nick Lewycky [Thu, 27 Jan 2011 19:51:31 +0000 (19:51 +0000)]
Expound upon this comparison!

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

13 years agoUse dyn_cast instead of isa+cast.
Nick Lewycky [Thu, 27 Jan 2011 19:42:43 +0000 (19:42 +0000)]
Use dyn_cast instead of isa+cast.

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

13 years agoDon't show -pedantic, -W and -Wall on the output of
Oscar Fuentes [Thu, 27 Jan 2011 19:29:48 +0000 (19:29 +0000)]
Don't show -pedantic, -W and -Wall on the output of

llvm-config --cflags --cxxflags --cppflags

We shouldn't impose those flags on people who use llvm-config for
building their own projects.

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

13 years agoSpeculatively revert r124380.
Devang Patel [Thu, 27 Jan 2011 19:15:01 +0000 (19:15 +0000)]
Speculatively revert r124380.

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

13 years agoWhile legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
Devang Patel [Thu, 27 Jan 2011 17:43:53 +0000 (17:43 +0000)]
While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.

Take 2. This includes fix for dragonegg crash.

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

13 years agoAdd support for specifying register name in cfi-register/offset/def
Roman Divacky [Thu, 27 Jan 2011 17:16:37 +0000 (17:16 +0000)]
Add support for specifying register name in cfi-register/offset/def
as well as register number.

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

13 years agoIntroduce virtual ParseRegister method in TargetAsmParser.
Roman Divacky [Thu, 27 Jan 2011 17:14:22 +0000 (17:14 +0000)]
Introduce virtual ParseRegister method in TargetAsmParser.
Create override of this method in X86/ARM/MBlaze.

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

13 years agoFix indentation.
Jay Foad [Thu, 27 Jan 2011 14:44:55 +0000 (14:44 +0000)]
Fix indentation.

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

13 years agoAdd DenseSet::resize for API parity with DenseMap::resize.
Nick Lewycky [Thu, 27 Jan 2011 09:10:42 +0000 (09:10 +0000)]
Add DenseSet::resize for API parity with DenseMap::resize.

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

13 years agoFix surprising missed optimization in mergefunc where we forgot to consider
Nick Lewycky [Thu, 27 Jan 2011 08:38:19 +0000 (08:38 +0000)]
Fix surprising missed optimization in mergefunc where we forgot to consider
that relationships like "i8* null" is equivalent to "i32* null".

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

13 years agoDon't infinitely recurse! Patch by Marius Wachtler!
Chris Lattner [Thu, 27 Jan 2011 07:35:27 +0000 (07:35 +0000)]
Don't infinitely recurse!  Patch by Marius Wachtler!

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

13 years agoAvoid modifying the OneClassForEachPhysReg map while iterating over it.
Bob Wilson [Thu, 27 Jan 2011 07:26:15 +0000 (07:26 +0000)]
Avoid modifying the OneClassForEachPhysReg map while iterating over it.
Linear scan regalloc is currently assuming that any register aliased with
a member of a regclass must also be in at least one regclass.  That is not
always true.  For example, for X86, RIP is in a regclass but IP is not.
If you're unlucky, this can cause a crash by invalidating the iterator.

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

13 years agoAdd a testcase for my last checkin.
Eric Christopher [Thu, 27 Jan 2011 06:01:17 +0000 (06:01 +0000)]
Add a testcase for my last checkin.

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

13 years agoUse the incoming VT not the VT of where we're trying to store to determine
Eric Christopher [Thu, 27 Jan 2011 05:44:56 +0000 (05:44 +0000)]
Use the incoming VT not the VT of where we're trying to store to determine
if we can store a value. Also, the exclusion is or, not and.

Fixes rdar://8920247.

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

13 years agolib/Target/X86/X86ISelDAGToDAG.cpp: __main should be WINCALL64 on Win64.
NAKAMURA Takumi [Thu, 27 Jan 2011 03:20:19 +0000 (03:20 +0000)]
lib/Target/X86/X86ISelDAGToDAG.cpp: __main should be WINCALL64 on Win64.

CALL64 marks %xmm* as dead.

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

13 years agoTry harder to not have unused variables.
Matt Beaumont-Gay [Thu, 27 Jan 2011 02:39:27 +0000 (02:39 +0000)]
Try harder to not have unused variables.

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

13 years agoOpt-mode -Wunused-variable cleanup
Matt Beaumont-Gay [Thu, 27 Jan 2011 01:47:50 +0000 (01:47 +0000)]
Opt-mode -Wunused-variable cleanup

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

13 years agoReapply 124301
Devang Patel [Thu, 27 Jan 2011 00:13:27 +0000 (00:13 +0000)]
Reapply 124301

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

13 years agoInitialize variable to get rid of clang warning.
Bill Wendling [Wed, 26 Jan 2011 22:21:35 +0000 (22:21 +0000)]
Initialize variable to get rid of clang warning.

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

13 years agoSimplify User::operator delete().
Jay Foad [Wed, 26 Jan 2011 21:56:10 +0000 (21:56 +0000)]
Simplify User::operator delete().

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

13 years agoAdd a MnemonicIsValid method to the asm matcher.
Bob Wilson [Wed, 26 Jan 2011 21:43:46 +0000 (21:43 +0000)]
Add a MnemonicIsValid method to the asm matcher.
Patch by Bill Wendling.

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

13 years agoRevert 124301.
Devang Patel [Wed, 26 Jan 2011 21:41:22 +0000 (21:41 +0000)]
Revert 124301.

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

13 years agoFix spelling of CouldMatchAmbiguouslyWith method name.
Bob Wilson [Wed, 26 Jan 2011 21:26:21 +0000 (21:26 +0000)]
Fix spelling of CouldMatchAmbiguouslyWith method name.

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

13 years agoWhitespace and 80-column fixes.
Bob Wilson [Wed, 26 Jan 2011 21:26:19 +0000 (21:26 +0000)]
Whitespace and 80-column fixes.

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

13 years agoRevert r124302
Devang Patel [Wed, 26 Jan 2011 21:12:32 +0000 (21:12 +0000)]
Revert r124302

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

13 years agoAdd support for printing out floating point values from the ARM assembly
Bill Wendling [Wed, 26 Jan 2011 20:57:43 +0000 (20:57 +0000)]
Add support for printing out floating point values from the ARM assembly
parser. The parser will always give us a binary representation of the floating
point number.

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

13 years agoImprove the AsmMatcher's ability to handle suboperands.
Bob Wilson [Wed, 26 Jan 2011 19:44:55 +0000 (19:44 +0000)]
Improve the AsmMatcher's ability to handle suboperands.

When an operand class is defined with MIOperandInfo set to a list of
suboperands, the AsmMatcher has so far required that operand to also define
a custom ParserMatchClass, and InstAlias patterns have not been able to
set the individual suboperands separately.  This patch removes both of those
restrictions.  If a "compound" operand does not override the default
ParserMatchClass, then the AsmMatcher will now parse its suboperands
separately.  If an InstAlias operand has the same class as the corresponding
compound operand, then it will be handled as before; but if that check fails,
TableGen will now try to match up a sequence of InstAlias operands with the
corresponding suboperands.

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

13 years agoTemporarily revert 124275 to see if it brings the dragonegg buildbot back.
Eric Christopher [Wed, 26 Jan 2011 19:40:31 +0000 (19:40 +0000)]
Temporarily revert 124275 to see if it brings the dragonegg buildbot back.

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