John Thompson [Tue, 15 Mar 2011 21:51:56 +0000 (21:51 +0000)]
Add scei vendor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127705
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 15 Mar 2011 21:15:20 +0000 (21:15 +0000)]
The VTBL (and VTBX) instructions are rather permissive concerning the masks they
accept. If a value in the mask is out of range, it uses the value 0, for VTBL,
or leaves the value unchanged, for VTBX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127700
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 15 Mar 2011 21:13:25 +0000 (21:13 +0000)]
Trace back through sibling copies to hoist spills and find rematerializable defs.
After live range splitting, an original value may be available in multiple
registers. Tracing back through the registers containing the same value, find
the best place to insert a spill, determine if the value has already been
spilled, or discover a reaching def that may be rematerialized.
This is only the analysis part. The information is not used for anything yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127698
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 15 Mar 2011 21:13:22 +0000 (21:13 +0000)]
Preserve both isPHIDef and isDefByCopy bits when copying parent values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127697
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 15 Mar 2011 21:07:44 +0000 (21:07 +0000)]
lit/ProgressBar.py: [PR7919] Improve line wrap for XN-incapable terminals.
On Win32 console, emitting char to col#79 causes linefeed, and the cursor will not return to col#79 upper line with backspace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127696
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 15 Mar 2011 20:47:26 +0000 (20:47 +0000)]
Some minor cleanups based on feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127694
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Mar 2011 20:25:54 +0000 (20:25 +0000)]
Trailing whitespae.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127691
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 15 Mar 2011 18:42:33 +0000 (18:42 +0000)]
Clean up something noticed by Fritz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127684
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 15 Mar 2011 18:41:52 +0000 (18:41 +0000)]
Do not form thumb2 ldrd / strd if the offset is by multiple of 4. rdar://
9133587
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127683
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 15 Mar 2011 15:55:30 +0000 (15:55 +0000)]
Don't indent cases in a switch, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127681
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 15 Mar 2011 15:10:11 +0000 (15:10 +0000)]
On the XCore the scavenging slot should be closest to the SP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127680
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 15 Mar 2011 14:53:53 +0000 (14:53 +0000)]
is_llvm_target_library: recognize libraries without the LLVM prefix.
Without this cmake fails at configuration when some target pass
"native" on LLVM_LINK_COMPONENTS and that is expanded to "X86".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127679
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 15 Mar 2011 13:45:47 +0000 (13:45 +0000)]
Add XCore intrinsics for getps, setps, setsr and clrsr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127678
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 15 Mar 2011 13:24:15 +0000 (13:24 +0000)]
PTX: Set PTX 2.0 as the minimum supported version
- Remove PTX 1.4 code generation
- Change type of intrinsics to .v4.i32 instead of .v4.i16
- Add and/or/xor integer instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127677
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Mar 2011 08:54:51 +0000 (08:54 +0000)]
Silence compiler warning about case values not being in the enumerated type
MCFixupKind. This is the same technique that is used elsewhere in MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127676
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Mar 2011 08:41:24 +0000 (08:41 +0000)]
Avoid a compiler warning about reg possibly being used uninitialized
when building with assertions disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127675
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 15 Mar 2011 07:41:25 +0000 (07:41 +0000)]
Do not add PHIs with no users when creating LCSSA form. Patch by Andrew Clinton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127674
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Mar 2011 07:31:32 +0000 (07:31 +0000)]
Add C++ global operator {new,new[],delete,delete[]}(unsigned {int,long}) to the
memory builtins as equivalent to malloc/free.
This is different from any attribute we have. For example, you can delete the
allocators when their result is unused, but you can't collapse two calls to the
same function, even if no global/memory state has changed in between. The
noalias return states that the result does not alias any other pointer, but
instcombine optimizes malloc() as though the result is non-null for the purpose
of eliminating unused pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127673
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 15 Mar 2011 05:13:13 +0000 (05:13 +0000)]
Add a peephole optimization to optimize pairs of bitcasts. e.g.
v2 = bitcast v1
...
v3 = bitcast v2
...
= v3
=>
v2 = bitcast v1
...
= v1
if v1 and v3 are of in the same register class.
bitcast between i32 and fp (and others) are often not nops since they
are in different register classes. These bitcast instructions are often
left because they are in different basic blocks and cannot be
eliminated by dag combine.
rdar://
9104514
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127668
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 15 Mar 2011 05:09:26 +0000 (05:09 +0000)]
- Add "Bitcast" target instruction property for instructions which perform
nothing more than a bitcast.
- Teach tablegen to automatically infer "Bitcast" property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127667
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 15 Mar 2011 02:23:35 +0000 (02:23 +0000)]
PR9450: Make switch optimization in SimplifyCFG not dependent on the ordering
of pointers in an std::map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127650
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 15 Mar 2011 02:22:10 +0000 (02:22 +0000)]
sext(undef) = 0, because the top bits will all be the same.
zext(undef) = 0, because the top bits will be zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127649
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 15 Mar 2011 01:49:08 +0000 (01:49 +0000)]
Testcase for r127630.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127648
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 15 Mar 2011 01:32:46 +0000 (01:32 +0000)]
Basic sanity checks to ensure that 2- and 3-byte
VEX prefixes are working for triadic AVX
instructions. This concludes the patch set to
enable AVX support for the X86 disassebler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127647
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 15 Mar 2011 01:28:15 +0000 (01:28 +0000)]
Enabled disassembler support for AVX instructions
in the instruction tables and fixed a few bugs that
were causing decode conflicts. Rudimentary tests
are coming up in the next patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127646
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 15 Mar 2011 01:23:15 +0000 (01:23 +0000)]
X86 table-generator and disassembler support for the AVX
instruction set. This code adds support for the VEX prefix
and for the YMM registers accessible on AVX-enabled
architectures. Instruction table support that enables AVX
instructions for the disassembler is in an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127644
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 15 Mar 2011 01:16:14 +0000 (01:16 +0000)]
Remove getMinusSCEVForExitTest().
This function performed acrobatics to prove no-self-wrap, which we now
have for free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127643
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 15 Mar 2011 01:13:17 +0000 (01:13 +0000)]
Fixed an ARM disassembler bug where it does not handle STRi12 correctly because an extra
register operand was erroneously added. Remove an incorrect assert which triggers the bug.
rdar://problem/
9131529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127642
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 15 Mar 2011 01:03:17 +0000 (01:03 +0000)]
There are some situations which can cause the URoR hack to infinitely recurse
and then go kablooie. The problem was that it was tracking the PHI nodes anew
each time into this function. But it didn't need to. And because the recursion
didn't know that a PHINode was visited before, it would go ahead and call
itself.
There is a testcase, but unfortunately it's too big to add. This problem will go
away with the EH rewrite.
<rdar://problem/
8856298>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127640
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 15 Mar 2011 00:37:00 +0000 (00:37 +0000)]
Propagate SCEV no-wrap flags whenever possible.
This needs review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127638
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 15 Mar 2011 00:30:40 +0000 (00:30 +0000)]
Clean up ARM tail calls a bit. They're pseudo-instructions for normal branches.
Also more cleanly separate the ARM vs. Thumb functionality. Previously, the
encoding would be incorrect for some Thumb instructions (the indirect calls).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127637
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 15 Mar 2011 00:25:41 +0000 (00:25 +0000)]
If we don't know how long a string is we can't fold an _chk version to the
normal version.
Fixes rdar://
9123638
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127636
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Mon, 14 Mar 2011 23:07:21 +0000 (23:07 +0000)]
Make llvm::Consumer a class (to remove a MSVC warning since Consumer is later forward declared as a struct)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127632
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 14 Mar 2011 23:02:38 +0000 (23:02 +0000)]
Generate a VTBL instruction instead of a series of loads and stores when we
can. As Nate pointed out, VTBL isn't super performant, but it *has* to be better
than this:
_shuf:
@ BB#0: @ %entry
push {r4, r7, lr}
add r7, sp, #4
sub sp, #12
mov r4, sp
bic r4, r4, #7
mov sp, r4
mov r2, sp
vmov d16, r0, r1
orr r0, r2, #6
orr r3, r2, #7
vst1.8 {d16[0]}, [r3]
vst1.8 {d16[5]}, [r0]
subs r4, r7, #4
orr r0, r2, #5
vst1.8 {d16[4]}, [r0]
orr r0, r2, #4
vst1.8 {d16[4]}, [r0]
orr r0, r2, #3
vst1.8 {d16[0]}, [r0]
orr r0, r2, #2
vst1.8 {d16[2]}, [r0]
orr r0, r2, #1
vst1.8 {d16[1]}, [r0]
vst1.8 {d16[3]}, [r2]
vldr.64 d16, [sp]
vmov r0, r1, d16
mov sp, r4
pop {r4, r7, pc}
The "illegal" testcase in vext.ll is no longer illegal.
<rdar://problem/
9078775>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127630
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 14 Mar 2011 22:41:50 +0000 (22:41 +0000)]
Version N of the llvm_unreachable patch: VC++ doesn't recognize that abort()
doesn't return, so just go back to using the old runtime function instead
of trying to use abort() when __builtin_unreachable (or an equivalent) isn't
supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127629
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 14 Mar 2011 22:22:46 +0000 (22:22 +0000)]
This patch is a big refactoring of llvm-diff. It doesn't add new features, but it re-organizes the old features, so I can insert the MetadataEngine to use the same infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127627
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Sjödin [Mon, 14 Mar 2011 22:12:35 +0000 (22:12 +0000)]
Check that the AsmParser exists for the native target to enable initialization
function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127626
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 14 Mar 2011 21:05:21 +0000 (21:05 +0000)]
Fix this test up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127621
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 14 Mar 2011 20:59:06 +0000 (20:59 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127620
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 14 Mar 2011 20:58:49 +0000 (20:58 +0000)]
Ignore isCodeGenOnly instructions when generating diassembly tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127619
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 14 Mar 2011 20:57:14 +0000 (20:57 +0000)]
Place context in member variables instead of passing around pointers.
Use the opportunity to get rid of the trailing underscore variable names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127618
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 14 Mar 2011 20:20:29 +0000 (20:20 +0000)]
Okay, some compilers complain if you provide the exception-specification
where none was before. Just don't declare it and hope it's declared
in every translation unit that needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127612
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 14 Mar 2011 20:10:50 +0000 (20:10 +0000)]
Fix the exception-specification of abort() when declaring it in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127610
91177308-0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 14 Mar 2011 20:01:21 +0000 (20:01 +0000)]
Make llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
builds, which was the apparent consensus of PR8973 and llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127608
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 14 Mar 2011 19:56:43 +0000 (19:56 +0000)]
Rename members to match LLVM naming conventions more closely.
Remove the unused reserved_ bit vector, no functional change intended.
This doesn't break 'svn blame', this file really is all my fault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127607
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 14 Mar 2011 18:34:35 +0000 (18:34 +0000)]
Remove some dead patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127601
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 14 Mar 2011 18:19:52 +0000 (18:19 +0000)]
BIT_CONVERT has been renamed to BITCAST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127600
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 14 Mar 2011 18:15:55 +0000 (18:15 +0000)]
Minor optimization. sign-ext/anyext of undef is still undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127598
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 14 Mar 2011 18:02:30 +0000 (18:02 +0000)]
Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127595
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 14 Mar 2011 17:38:54 +0000 (17:38 +0000)]
Negating a recurrence preserves no-self-wrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127593
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 14 Mar 2011 17:32:49 +0000 (17:32 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127592
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 14 Mar 2011 17:28:02 +0000 (17:28 +0000)]
HowFarToZero can compute a trip count as long as the recurrence has no-self-wrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127591
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 14 Mar 2011 16:50:06 +0000 (16:50 +0000)]
Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrap
properties.
Added the self-wrap flag for SCEV::AddRecExpr.
A slew of temporary FIXMEs indicate the intention of the no-self-wrap flag
without changing behavior in this revision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127590
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 14 Mar 2011 16:48:10 +0000 (16:48 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127589
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 14 Mar 2011 15:40:11 +0000 (15:40 +0000)]
PTX: Emit global arrays with proper sizes
- Emit all arrays as type .b8 and proper sizes in bytes to conform
to the output of nvcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127584
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Mon, 14 Mar 2011 14:09:33 +0000 (14:09 +0000)]
PTX: Add support for sqrt/sin/cos intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127578
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Mon, 14 Mar 2011 11:26:01 +0000 (11:26 +0000)]
ptx: add set.p instruction and related changes to predicate execution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127577
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Mon, 14 Mar 2011 04:20:57 +0000 (04:20 +0000)]
Emacs mode string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127576
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Mon, 14 Mar 2011 02:30:32 +0000 (02:30 +0000)]
Correct small comment order typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127575
91177308-0d34-0410-b5e6-
96231b3b80d8
Jin-Gu Kang [Mon, 14 Mar 2011 01:21:00 +0000 (01:21 +0000)]
This case is solved by Scalar Replacement of Aggregates (DT) and
Early CSE pass so this patch reverts it to original source code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127574
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Sun, 13 Mar 2011 17:26:00 +0000 (17:26 +0000)]
ptx: add basic support of predicate execution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jin-Gu Kang [Sun, 13 Mar 2011 14:05:51 +0000 (14:05 +0000)]
Add comment as following:
load and store reference same memory location, the memory location
is represented by getelementptr with two uses (load and store) and
the getelementptr's base is alloca with single use. At this point,
instructions from alloca to store can be removed.
(this pattern is generated when bitfield is accessed.)
For example,
%u = alloca %struct.test, align 4 ; [#uses=1]
%0 = getelementptr inbounds %struct.test* %u, i32 0, i32 0;[#uses=2]
%1 = load i8* %0, align 4 ; [#uses=1]
%2 = and i8 %1, -16 ; [#uses=1]
%3 = or i8 %2, 5 ; [#uses=1]
store i8 %3, i8* %0, align 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127565
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 13 Mar 2011 03:06:59 +0000 (03:06 +0000)]
LTO is not ready for Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127562
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:29:32 +0000 (01:29 +0000)]
Now that we are deleting unused live intervals during allocation, pointers may be reused.
Use the virtual register number as a cache tag instead. They are not reused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127561
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 13 Mar 2011 01:23:11 +0000 (01:23 +0000)]
Tell the register allocator about new unused virtual registers.
This allows the allocator to free any resources used by the virtual register,
including physical register assignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127560
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 22:01:47 +0000 (22:01 +0000)]
Build EnhancedDisassembly as a shared library too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127555
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 22:01:42 +0000 (22:01 +0000)]
Build CompilerDriver library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127554
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 22:01:36 +0000 (22:01 +0000)]
Build LTO as a static library too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127553
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 17:32:30 +0000 (17:32 +0000)]
Build LTO as a static library too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127549
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 12 Mar 2011 17:18:11 +0000 (17:18 +0000)]
Teach ComputeMaskedBits about sub nsw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127548
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 16:48:54 +0000 (16:48 +0000)]
Whe we build a shared library, add its list of used libraries to the
link command.
Fixed a pair of IF expressions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127546
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 16:48:49 +0000 (16:48 +0000)]
Update link components for llvm-dis and LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127545
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 12 Mar 2011 13:07:37 +0000 (13:07 +0000)]
Speculatively revert commit 127478 (jsjodin) in an attempt to fix the
llvm-gcc-i386-linux-selfhost and llvm-x86_64-linux-checks buildbots.
The original log entry:
Remove optimization emitting a reference insted of label difference, since
it can create more relocations. Removed isBaseAddressKnownZero method,
because it is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127540
91177308-0d34-0410-b5e6-
96231b3b80d8
Jin-Gu Kang [Sat, 12 Mar 2011 12:18:44 +0000 (12:18 +0000)]
This patch removes some of useless instructions generated by bitfield access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127539
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 12 Mar 2011 04:25:36 +0000 (04:25 +0000)]
Include snippets in the live stack interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127530
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 12 Mar 2011 04:17:20 +0000 (04:17 +0000)]
Spill multiple registers at once.
Live range splitting can create a number of small live ranges containing only a
single real use. Spill these small live ranges along with the large range they
are connected to with copies. This enables memory operand folding and maximizes
the spill to fill distance.
Work in progress with known bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127529
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Sat, 12 Mar 2011 03:27:54 +0000 (03:27 +0000)]
Fixed the comparison operator for the enhanced
disassembler's disassembler map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127527
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 12 Mar 2011 01:50:35 +0000 (01:50 +0000)]
That's it, I am declaring this a failure of the C++03 STL.
There are too many compatibility problems with using mixed types in
std::upper_bound, and I don't want to spend 110 lines of boilerplate setting up
a call to a 10-line function. Binary search is not /that/ hard to implement
correctly.
I tried terminating the binary search with a linear search, but that actually
made the algorithm slower against my expectation. Most live intervals have less
than 4 segments. The early test against endIndex() does pay, and this version is
25% faster than plain std::upper_bound().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127522
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 12 Mar 2011 01:36:23 +0000 (01:36 +0000)]
Saving files before committing is overrated.
Add a RUN line to this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127520
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 12 Mar 2011 01:09:29 +0000 (01:09 +0000)]
Sometimes isPredicable lies to us and tells us we don't need the operands.
Go ahead and add them on when we might want to use them and let
later passes remove them.
Fixes rdar://
9118569
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 12 Mar 2011 01:05:29 +0000 (01:05 +0000)]
Remove no-longer-correct special case for disasm of ARM BL instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127517
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 12 Mar 2011 00:51:00 +0000 (00:51 +0000)]
Add FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127516
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 12 Mar 2011 00:45:26 +0000 (00:45 +0000)]
Pseudo-ize the ARM Darwin *r9 call instruction definitions. They're the same
actual instruction as the non-Darwin defs, but have different call-clobber
semantics and so need separate patterns. They don't need to duplicate the
encoding information, however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127515
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:25:21 +0000 (23:25 +0000)]
Add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127511
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:24:15 +0000 (23:24 +0000)]
Pseudo-ize the ARM 'B' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127510
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:15:02 +0000 (23:15 +0000)]
Remove dead code. These ARM instruction definitions no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127509
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:11:41 +0000 (23:11 +0000)]
Remove dead code. These ARM instruction definitions no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127508
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:09:50 +0000 (23:09 +0000)]
Pseudo-ize VMOVDcc and VMOVScc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127506
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 23:00:16 +0000 (23:00 +0000)]
80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127505
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 22:51:41 +0000 (22:51 +0000)]
Properly pseudo-ize the ARM LDMIA_RET instruction. This has the nice side-
effect that we get proper instruction printing using the "pop" mnemonic for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127502
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 11 Mar 2011 21:52:04 +0000 (21:52 +0000)]
Roll r127459 back in:
Optimize trivial branches in CodeGenPrepare, which often get created from the
lowering of objectsize intrinsics. Unfortunately, a number of tests were relying
on llc not optimizing trivial branches, so I had to add an option to allow them
to continue to test what they originally tested.
This fixes <rdar://problem/
8785296> and <rdar://problem/
9112893>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127498
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 11 Mar 2011 21:51:56 +0000 (21:51 +0000)]
Fix the GCC test suite issue exposed by r127477, which was caused by stack
protector insertion not working correctly with unreachable code. Since that
revision was rolled out, this test doesn't actual fail before this fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127497
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 11 Mar 2011 21:33:55 +0000 (21:33 +0000)]
Teach FastISel to support register-immediate-immediate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127496
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 21:02:27 +0000 (21:02 +0000)]
80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127495
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:59:19 +0000 (20:59 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127493
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:51:07 +0000 (20:51 +0000)]
Remove dead code. These ARM instruction definitions don't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127491
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:44:08 +0000 (20:44 +0000)]
ARM VDUPfd and VDUPfq can just be patterns. The instruction is the same
as for VDUP32d and VDUP32q, respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127489
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:38:18 +0000 (20:38 +0000)]
Remove dead code. These ARM instruction definitions don't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127488
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:31:17 +0000 (20:31 +0000)]
ARM VDUPLNfq and VDUPLNfd definitions can just be Pat<>s for VDUPLN32q
and VDUPLN32d, respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127486
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Mar 2011 20:18:05 +0000 (20:18 +0000)]
ARM VREV64df and VREV64qf can just be patterns. The instruction is the same
as for VREV64d32 and VREV64q32, respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127485
91177308-0d34-0410-b5e6-
96231b3b80d8