Bill Wendling
da1364d669
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>
llvm-svn: 127630
2011-03-14 23:02:38 +00:00
John McCall
cb1d6e9690
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.
llvm-svn: 127629
2011-03-14 22:41:50 +00:00
Renato Golin
4c9d4ab277
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.
...
llvm-svn: 127627
2011-03-14 22:22:46 +00:00
Jan Sjödin
d6b1fb373b
Check that the AsmParser exists for the native target to enable initialization
...
function.
llvm-svn: 127626
2011-03-14 22:12:35 +00:00
Eric Christopher
8180806e0f
Fix this test up a bit.
...
llvm-svn: 127621
2011-03-14 21:05:21 +00:00
Jim Grosbach
560a7bf8b1
Trailing whitespace.
...
llvm-svn: 127620
2011-03-14 20:59:06 +00:00
Owen Anderson
49965661d5
Ignore isCodeGenOnly instructions when generating diassembly tables.
...
llvm-svn: 127619
2011-03-14 20:58:49 +00:00
Jakob Stoklund Olesen
29a9539e7f
Place context in member variables instead of passing around pointers.
...
Use the opportunity to get rid of the trailing underscore variable names.
llvm-svn: 127618
2011-03-14 20:57:14 +00:00
John McCall
952cbb2634
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.
llvm-svn: 127612
2011-03-14 20:20:29 +00:00
John McCall
46f704310d
Fix the exception-specification of abort() when declaring it in C++.
...
llvm-svn: 127610
2011-03-14 20:10:50 +00:00
John McCall
fe51bf5de7
Make llvm_unreachable evaluate to __builtin_unreachable() in -Asserts
...
builds, which was the apparent consensus of PR8973 and llvmdev.
llvm-svn: 127608
2011-03-14 20:01:21 +00:00
Jakob Stoklund Olesen
da1afc2d80
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.
llvm-svn: 127607
2011-03-14 19:56:43 +00:00
Jim Grosbach
6ee5aef028
Remove some dead patterns.
...
llvm-svn: 127601
2011-03-14 18:34:35 +00:00
Evan Cheng
50f2d406ec
BIT_CONVERT has been renamed to BITCAST.
...
llvm-svn: 127600
2011-03-14 18:19:52 +00:00
Evan Cheng
cb70b9e80b
Minor optimization. sign-ext/anyext of undef is still undef.
...
llvm-svn: 127598
2011-03-14 18:15:55 +00:00
Evan Cheng
fbb846289a
Indentation.
...
llvm-svn: 127595
2011-03-14 18:02:30 +00:00
Andrew Trick
da253e79f0
Negating a recurrence preserves no-self-wrap.
...
llvm-svn: 127593
2011-03-14 17:38:54 +00:00
Jim Grosbach
973ab94013
Trailing whitespace.
...
llvm-svn: 127592
2011-03-14 17:32:49 +00:00
Andrew Trick
dab71254b6
HowFarToZero can compute a trip count as long as the recurrence has no-self-wrap.
...
llvm-svn: 127591
2011-03-14 17:28:02 +00:00
Andrew Trick
5d45b563c5
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.
llvm-svn: 127590
2011-03-14 16:50:06 +00:00
Andrew Trick
e0442babf1
whitespace
...
llvm-svn: 127589
2011-03-14 16:48:10 +00:00
Justin Holewinski
a2f7c8557c
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
llvm-svn: 127584
2011-03-14 15:40:11 +00:00
Justin Holewinski
995d10cfea
PTX: Add support for sqrt/sin/cos intrinsics
...
llvm-svn: 127578
2011-03-14 14:09:33 +00:00
Che-Liang Chiou
6ff0aa8ab3
ptx: add set.p instruction and related changes to predicate execution
...
llvm-svn: 127577
2011-03-14 11:26:01 +00:00
Mikhail Glushenkov
5a7b935681
Emacs mode string.
...
llvm-svn: 127576
2011-03-14 04:20:57 +00:00
Francois Pichet
0e434150f9
Correct small comment order typo.
...
llvm-svn: 127575
2011-03-14 02:30:32 +00:00
Jin-Gu Kang
9d52ff5473
This case is solved by Scalar Replacement of Aggregates (DT) and
...
Early CSE pass so this patch reverts it to original source code.
llvm-svn: 127574
2011-03-14 01:21:00 +00:00
Che-Liang Chiou
962612fc5c
ptx: add basic support of predicate execution
...
llvm-svn: 127569
2011-03-13 17:26:00 +00:00
Jin-Gu Kang
5000ba8961
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
llvm-svn: 127565
2011-03-13 14:05:51 +00:00
Oscar Fuentes
d57f14037a
LTO is not ready for Windows.
...
llvm-svn: 127562
2011-03-13 03:06:59 +00:00
Jakob Stoklund Olesen
7d23be25ab
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.
llvm-svn: 127561
2011-03-13 01:29:32 +00:00
Jakob Stoklund Olesen
2d87d5139b
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.
llvm-svn: 127560
2011-03-13 01:23:11 +00:00
Oscar Fuentes
e747eabef1
Build EnhancedDisassembly as a shared library too.
...
llvm-svn: 127555
2011-03-12 22:01:47 +00:00
Oscar Fuentes
208de1fcc4
Build CompilerDriver library.
...
llvm-svn: 127554
2011-03-12 22:01:42 +00:00
Oscar Fuentes
a153a45c99
Build LTO as a static library too.
...
llvm-svn: 127553
2011-03-12 22:01:36 +00:00
Oscar Fuentes
eef24d34e6
Build LTO as a static library too.
...
llvm-svn: 127549
2011-03-12 17:32:30 +00:00
Benjamin Kramer
5986a24bae
Teach ComputeMaskedBits about sub nsw.
...
llvm-svn: 127548
2011-03-12 17:18:11 +00:00
Oscar Fuentes
443b4dd3ca
Whe we build a shared library, add its list of used libraries to the
...
link command.
Fixed a pair of IF expressions too.
llvm-svn: 127546
2011-03-12 16:48:54 +00:00
Oscar Fuentes
471e660c5a
Update link components for llvm-dis and LTO.
...
llvm-svn: 127545
2011-03-12 16:48:49 +00:00
Duncan Sands
0514e10276
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.
llvm-svn: 127540
2011-03-12 13:07:37 +00:00
Jin-Gu Kang
5e537a9449
This patch removes some of useless instructions generated by bitfield access.
...
llvm-svn: 127539
2011-03-12 12:18:44 +00:00
Jakob Stoklund Olesen
6d02ddbbc3
Include snippets in the live stack interval.
...
llvm-svn: 127530
2011-03-12 04:25:36 +00:00
Jakob Stoklund Olesen
1f9f236b8a
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.
llvm-svn: 127529
2011-03-12 04:17:20 +00:00
Sean Callanan
4f6e58ff09
Fixed the comparison operator for the enhanced
...
disassembler's disassembler map.
llvm-svn: 127527
2011-03-12 03:27:54 +00:00
Jakob Stoklund Olesen
925b25d53d
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().
llvm-svn: 127522
2011-03-12 01:50:35 +00:00
Eric Christopher
392d8f7d08
Saving files before committing is overrated.
...
Add a RUN line to this test.
llvm-svn: 127520
2011-03-12 01:36:23 +00:00
Eric Christopher
80a45901e0
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
llvm-svn: 127518
2011-03-12 01:09:29 +00:00
Jim Grosbach
a87f223848
Remove no-longer-correct special case for disasm of ARM BL instructions.
...
llvm-svn: 127517
2011-03-12 01:05:29 +00:00
Jim Grosbach
f7531e7697
Add FIXME.
...
llvm-svn: 127516
2011-03-12 00:51:00 +00:00
Jim Grosbach
555d910477
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.
llvm-svn: 127515
2011-03-12 00:45:26 +00:00