Devang Patel [Wed, 2 Feb 2011 22:35:53 +0000 (22:35 +0000)]
Add support to describe template value parameter in debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124755
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 2 Feb 2011 21:38:25 +0000 (21:38 +0000)]
Add support to describe template parameter type in debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124752
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 2 Feb 2011 20:52:00 +0000 (20:52 +0000)]
Reenable the transform "(X*Y)/Y->X" when the multiplication is known not to
overflow (nsw flag), which was disabled because it breaks 254.gap. I have
informed the GAP authors of the mistake in their code, and arranged for the
testsuite to use -fwrapv when compiling this benchmark.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124746
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 2 Feb 2011 18:20:55 +0000 (18:20 +0000)]
Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.
The algorithm for identifying which operand is invalid will now always point to
some operand and not the mnemonic sometimes. The change is now that ErrorInfo
is the index of the highest operand that does not match for any of the matching
mnemonics records. And no longer the ~0U value when the mnemonic matches and
not every record with a matching mnemonic has the same mismatching operand
index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124734
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 2 Feb 2011 17:29:40 +0000 (17:29 +0000)]
Update comment to match my recent change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124725
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 2 Feb 2011 15:56:22 +0000 (15:56 +0000)]
SimplifyCFG: Turn switches into sub+icmp+branch if possible.
This makes the job of the later optzn passes easier, allowing the vast amount of
icmp transforms to chew on it.
We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
binary on i386-linux.
The testcase from README.txt now compiles into
decl %edi
cmpl $3, %edi
sbbl %eax, %eax
andl $1, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124724
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 2 Feb 2011 14:57:41 +0000 (14:57 +0000)]
Add support for trampolines on the XCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124722
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 2 Feb 2011 10:08:38 +0000 (10:08 +0000)]
Remove NoVendor and NoOS, added in commit 123990, from Triple. While it
may be useful to understand "none", this is not the place for it. Tweak
the fix to Normalize while there: the fix added in 123990 works correctly,
but I like this way better. Finally, now that Triple understands some
non-trivial environment values, teach the unittests about them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124720
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 2 Feb 2011 05:31:01 +0000 (05:31 +0000)]
Remove wasteful caching. This isn't needed for correctness because any function
that might have changed been affected by a merge elsewhere will have been
removed from the function set, and it isn't needed for performance because we
call grow() ahead of time to prevent reallocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124717
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 2 Feb 2011 02:05:46 +0000 (02:05 +0000)]
Conservatively, clear optional flags, such as nsw, when performing
reassociation. No testcase, because I wasn't able to create a testcase
which actually demonstrates a problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124713
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 2 Feb 2011 02:02:34 +0000 (02:02 +0000)]
Fix reassociate to clear optional flags, such as nsw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124712
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Wed, 2 Feb 2011 01:09:02 +0000 (01:09 +0000)]
Fixed a bug in the disassembler where the mandatory 0x66
prefix would be misinterpreted in some cases on 32-bit
x86 platforms. Thanks to Olivier Meurant for identifying
the bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124709
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 2 Feb 2011 01:06:55 +0000 (01:06 +0000)]
Given a pair of floating point load and store, if there are no other uses of
the load, then it may be legal to transform the load and store to integer
load and store of the same width.
This is done if the target specified the transformation as profitable. e.g.
On arm, this can transform:
vldr.32 s0, []
vstr.32 s0, []
to
ldr r12, []
str r12, []
rdar://
8944252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124708
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 2 Feb 2011 00:46:09 +0000 (00:46 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124705
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 1 Feb 2011 22:30:51 +0000 (22:30 +0000)]
PR9081: Split up LDM instruction with deprecated use of both LR and PC.
This is completely untested but pretty straightforward, so hopefully I
got it right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124694
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 1 Feb 2011 22:12:50 +0000 (22:12 +0000)]
Take Bill Wendling's suggestion for structuring a couple of asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124688
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 1 Feb 2011 21:47:35 +0000 (21:47 +0000)]
Update to match changes in lldb interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124687
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 1 Feb 2011 20:22:53 +0000 (20:22 +0000)]
Fix imm printing for logical instructions.
Patch by Brian G. Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124679
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 1 Feb 2011 20:08:28 +0000 (20:08 +0000)]
Document the LLVM GIT mirror
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124677
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 1 Feb 2011 19:12:32 +0000 (19:12 +0000)]
[AVX] Implement EnforceSmallerThan for mixed int/fp type lists. This
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.
This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type. There is no attempt
to check type sizes across the int/fp sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124672
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 1 Feb 2011 17:22:12 +0000 (17:22 +0000)]
Remove stale references of obsolete @llvm.dbg.variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124664
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 1 Feb 2011 09:22:34 +0000 (09:22 +0000)]
Make SwitchInst::removeCase() more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124659
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 1 Feb 2011 09:06:20 +0000 (09:06 +0000)]
Add a m_Undef pattern for convenience. This is so that code that uses
pattern matching can also pattern match undef, creating a more uniform
style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124657
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 1 Feb 2011 08:50:33 +0000 (08:50 +0000)]
Add a m_SignBit pattern for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124656
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Nick Lewycky [Sat, 29 Jan 2011 01:09:53 +0000 (01:09 +0000)]
Most browsers eliminate whitespace between anchor tags. Force whitespace with
so that the code reads properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124514
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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