Dan Gohman
fd3e3003f3
Whitespace cleanups.
...
llvm-svn: 51089
2008-05-14 00:43:10 +00:00
Dan Gohman
4e974ab933
Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.
...
llvm-svn: 51088
2008-05-14 00:42:30 +00:00
Dan Gohman
3dc2d92ebd
Split the loop unroll mechanism logic out into a utility function.
...
Patch by Matthijs Kooijman!
llvm-svn: 51083
2008-05-14 00:24:14 +00:00
Owen Anderson
17816b321f
Fix Analysis/BasicAA/pure-const-dce.ll. This turned out to be a correctness
...
bug as well as a missed optimization. We weren't properly checking for local
dependencies before moving on to non-local ones when doing non-local read-only
call CSE.
llvm-svn: 51082
2008-05-13 23:18:30 +00:00
Gabor Greif
5ef7404dc7
Merge of r51073-51074 from use-diet branch.
...
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.
Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.
llvm-svn: 51078
2008-05-13 22:51:52 +00:00
Devang Patel
a9fcf009a3
Dominance Frontier is cfg only pass.
...
llvm-svn: 51075
2008-05-13 22:43:21 +00:00
Owen Anderson
3ab976a21f
Fix memdep's handling of invokes when finding the dependency of another call
...
instruction. This fixes some Ada miscompiles reported in PR2324.
llvm-svn: 51069
2008-05-13 21:25:37 +00:00
Dale Johannesen
e695ab227c
Fix for PR 2323, infinite loop in tail dup.
...
llvm-svn: 51063
2008-05-13 20:06:43 +00:00
Chris Lattner
03ce206143
add a note
...
llvm-svn: 51062
2008-05-13 19:56:20 +00:00
Evan Cheng
f8ab712fa9
- Fix the pasto in the fix for a previous pasto.
...
- Incorporate Chris' comment suggestion.
llvm-svn: 51061
2008-05-13 18:59:59 +00:00
Chris Lattner
d17f58ae6e
add a note
...
llvm-svn: 51060
2008-05-13 18:48:54 +00:00
Nate Begeman
6645714f16
Fix one more encoding bug.
...
llvm-svn: 51057
2008-05-13 17:52:09 +00:00
Evan Cheng
595e226085
- Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
...
- Correct a pasto.
llvm-svn: 51054
2008-05-13 16:45:56 +00:00
Owen Anderson
8c2391d00d
Make the non-local CSE safety checks slightly more thorough.
...
llvm-svn: 51035
2008-05-13 13:41:23 +00:00
Sanjiv Gupta
4394c2376c
Adding files for Microchip's PIC16 target.
...
A brief description about PIC16:
===============================
PIC16 is an 8-bit microcontroller with only one 8-bit register which is the
accumulator. All arithmetic/load/store operations are 8-bit only.
The architecture has two address spaces: program and data. The program memory
is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory.
It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register).
Two classes of registers exist: (8-bit class which is only one
accumulator) (16-bit class, which contains one or more 16 bit
pointer(s))
llvm-svn: 51027
2008-05-13 09:02:57 +00:00
Evan Cheng
1120279ae6
Instead of a vector load, shuffle and then extract an element. Load the element from address with an offset.
...
pshufd $1, (%rdi), %xmm0
movd %xmm0, %eax
=>
movl 4(%rdi), %eax
llvm-svn: 51026
2008-05-13 08:35:03 +00:00
Owen Anderson
69057b80c7
Add support for non-local CSE of read-only calls.
...
llvm-svn: 51024
2008-05-13 08:17:22 +00:00
Gabor Greif
0d42adf65b
Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
...
llvm-svn: 51023
2008-05-13 07:09:08 +00:00
Dan Gohman
0479aa5c0b
Change class' public PassInfo variables to by initialized with the
...
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.
Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.
llvm-svn: 51022
2008-05-13 02:05:11 +00:00
Nate Begeman
53c5c62d6d
80 col / tabs fixes
...
llvm-svn: 51021
2008-05-13 01:48:26 +00:00
Nate Begeman
50f7ef30bb
Fix and encoding error in the psrad xmm, imm8 instruction.
...
llvm-svn: 51020
2008-05-13 01:47:52 +00:00
Evan Cheng
3f40c69083
On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.
...
llvm-svn: 51019
2008-05-13 00:54:02 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Nate Begeman
b87e63a730
Teach Legalize how to scalarize VSETCC
...
Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next.
llvm-svn: 51009
2008-05-12 23:09:43 +00:00
Evan Cheng
b980f6fb3d
Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
...
llvm-svn: 51008
2008-05-12 23:04:07 +00:00
Dale Johannesen
9d29283fc7
Be more aggressive about tail-merging small blocks
...
if those blocks consist entirely of common instructions;
merging will not add an extra branch in this case.
llvm-svn: 51006
2008-05-12 22:53:12 +00:00
Bill Wendling
6b8bd513d4
Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
...
changes that don't change functionality.
llvm-svn: 51004
2008-05-12 22:15:05 +00:00
Bill Wendling
1e11768a4f
Constify the machine instruction passed into the
...
"is{Trivially,Really}ReMaterializable" methods.
llvm-svn: 51001
2008-05-12 20:54:26 +00:00
Nate Begeman
d875c3e2fd
Initial X86 codegen support for VSETCC.
...
llvm-svn: 51000
2008-05-12 20:34:32 +00:00
Dale Johannesen
c4c4d8e1f7
Further rework of tail merge algorithm. Not quite
...
semantically identical, but little difference in
either results or execution speed; but it's much
easier to read, at least IMO.
llvm-svn: 50999
2008-05-12 20:33:57 +00:00
Nate Begeman
68586bddb1
Simplify some checks
...
llvm-svn: 50998
2008-05-12 20:33:52 +00:00
Dan Gohman
0863b19ae6
Fix a copy+paste bug; pseudo-instructions shouldn't have
...
encoding information.
llvm-svn: 50997
2008-05-12 20:22:45 +00:00
Nate Begeman
17c5434a16
Pointer comparisons should use icmp, not vicmp
...
llvm-svn: 50996
2008-05-12 20:16:55 +00:00
Owen Anderson
f792860255
Go back to passing the analyses around as parameters.
...
llvm-svn: 50995
2008-05-12 20:15:55 +00:00
Nate Begeman
66d0a0e8f4
Pointer comparisons should be handled by icmp, not vicmp :)
...
llvm-svn: 50994
2008-05-12 20:11:05 +00:00
Nate Begeman
1196287522
Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
...
This was breaking a bunch of tests
llvm-svn: 50992
2008-05-12 20:01:56 +00:00
Evan Cheng
2609d5e779
Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.
...
llvm-svn: 50991
2008-05-12 19:56:52 +00:00
Bill Wendling
2930845065
Revert the previous commit. Go ahead and hoist rematerializable instructions.
...
llvm-svn: 50990
2008-05-12 19:47:18 +00:00
Nate Begeman
cfcb56091b
Add support for vicmp/vfcmp codegen, more legalize support coming.
...
This is necessary to unbreak the build.
llvm-svn: 50988
2008-05-12 19:40:03 +00:00
Bill Wendling
70613b84da
One real change - don't hoist something that's trivially rematerializable. It's
...
possible for it to produce worse code than before.
The rest of this patch is code cleanup.
llvm-svn: 50987
2008-05-12 19:38:32 +00:00
Nate Begeman
ac7f3d99dd
Fix build breakage
...
llvm-svn: 50986
2008-05-12 19:23:22 +00:00
Nate Begeman
d21957002a
Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
...
for details. CodeGen support coming in a follow up patch
llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Dan Gohman
02e5933fa3
Make firstEightPowers const.
...
llvm-svn: 50975
2008-05-12 16:38:14 +00:00
Dan Gohman
e9bc2ba256
Update comments.
...
llvm-svn: 50974
2008-05-12 16:34:30 +00:00
Dan Gohman
906716c40f
Fix a compile error on compilers that still want a return value
...
in a non-void function that calls abort.
llvm-svn: 50969
2008-05-12 16:17:19 +00:00
Dan Gohman
ecb77385ab
Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!
...
llvm-svn: 50967
2008-05-12 16:07:15 +00:00
Owen Anderson
4afb1c864a
Move the various analyses used by GVN into static variables so we don't have to keep passing them around or refetching them.
...
llvm-svn: 50963
2008-05-12 08:15:27 +00:00
Chris Lattner
9fdb814a56
prune #includes.
...
llvm-svn: 50962
2008-05-12 01:13:53 +00:00
Chris Lattner
5287765d1a
Add a new SparsePropagation analysis utility, which allows you to do
...
SCCP like sparse lattice analysis with relative ease. Just pick your
lattice function and implement the transfer function and you're good.
Just make sure you don't break monotonicity ;-)
llvm-svn: 50961
2008-05-12 01:12:24 +00:00
Nick Lewycky
c38c1712f7
Make constructors target-specific. This fixes problems where the path would
...
include backslashes on Windows. This should fix llvm-ld problems on win32.
llvm-svn: 50960
2008-05-11 17:37:40 +00:00