Chris Lattner
75165d07a0
remove some dead code
...
llvm-svn: 31740
2006-11-14 21:41:35 +00:00
Chris Lattner
7c9f48cefb
Add support for nodes that return iPTR.
...
llvm-svn: 31739
2006-11-14 21:32:01 +00:00
Chris Lattner
110c777f2c
changes to get ptr_rc to be accepted in patterns. This is needed for ppc preinc
...
stores.
llvm-svn: 31738
2006-11-14 21:18:40 +00:00
Evan Cheng
cf772f7eca
Revert. This wasn't meant to be checked in.
...
llvm-svn: 31737
2006-11-14 19:20:33 +00:00
Chris Lattner
e79a451475
group load and store instructions together. No functionality change.
...
llvm-svn: 31736
2006-11-14 19:19:53 +00:00
Chris Lattner
58e8bed48e
Fix predicates for unindexed stores so they don't accidentally match indexed
...
stores.
llvm-svn: 31735
2006-11-14 19:13:39 +00:00
Chris Lattner
44dbdbe5cf
Rework PPC64 calls. Now we have a LR8/CTR8 register which the PPC64 calls
...
clobber. This allows LR8 to be save/restored correctly as a 64-bit quantity,
instead of handling it as a 32-bit quantity. This unbreaks ppc64 codegen when
the code is actually located above the 4G boundary.
llvm-svn: 31734
2006-11-14 18:44:47 +00:00
Chris Lattner
b542925b22
remove a ton of custom selection logic no longer needed
...
llvm-svn: 31733
2006-11-14 18:43:11 +00:00
Chris Lattner
f8c06b335d
Fix a bug handling nodes with variable arguments. The code was fixed to assume
...
that there were two input operands before the variable operand portion. This
*happened* to be true for all call instructions, which took a chain and a
destination, but was not true for the PPC BCTRL instruction, whose destination
is implicit.
Making this code more general allows elimination of the custom selection logic
for BCTRL.
llvm-svn: 31732
2006-11-14 18:41:38 +00:00
Chris Lattner
4916acbd0f
it would be nice of ctlz were lowered to bsf etc.
...
llvm-svn: 31730
2006-11-14 08:08:46 +00:00
Chris Lattner
f05d69ae72
implement InstCombine/shift-simplify.ll by transforming:
...
(X >> Z) op (Y >> Z) -> (X op Y) >> Z
for all shifts and all ops={and/or/xor}.
llvm-svn: 31729
2006-11-14 07:46:50 +00:00
Chris Lattner
c348c50c38
new testcase
...
llvm-svn: 31728
2006-11-14 07:45:36 +00:00
Chris Lattner
d12a4bf799
implement InstCombine/and-compare.ll:test1. This compiles:
...
typedef struct { unsigned prefix : 4; unsigned code : 4; unsigned unsigned_p : 4; } tree_common;
int foo(tree_common *a, tree_common *b) { return a->code == b->code; }
into:
_foo:
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl (%eax), %eax
xorl (%ecx), %eax
# TRUNCATE movb %al, %al
shrb $4, %al
testb %al, %al
sete %al
movzbl %al, %eax
ret
instead of:
_foo:
movl 8(%esp), %eax
movb (%eax), %al
shrb $4, %al
movl 4(%esp), %ecx
movb (%ecx), %cl
shrb $4, %cl
cmpb %al, %cl
sete %al
movzbl %al, %eax
ret
saving one cycle by eliminating a shift.
llvm-svn: 31727
2006-11-14 06:06:06 +00:00
Chris Lattner
9adf8294ef
new testcase
...
llvm-svn: 31726
2006-11-14 06:04:35 +00:00
Chris Lattner
97ff46b3cc
lower "X = seteq Y, Z" to '(shr (ctlz (xor Y, Z)), 5)' instead of
...
'(shr (ctlz (sub Y, Z)), 5)'.
The use of xor better exposes the operation to bit-twiddling logic in the
dag combiner. For example, this:
typedef struct {
unsigned prefix : 4;
unsigned code : 4;
unsigned unsigned_p : 4;
} tree_common;
int foo(tree_common *a, tree_common *b) {
return a->code == b->code;
}
Now compiles to:
_foo:
lwz r2, 0(r4)
lwz r3, 0(r3)
xor r2, r3, r2
rlwinm r2, r2, 28, 28, 31
cntlzw r2, r2
srwi r3, r2, 5
blr
instead of:
_foo:
lbz r2, 3(r4)
lbz r3, 3(r3)
srwi r2, r2, 4
srwi r3, r3, 4
subf r2, r2, r3
cntlzw r2, r2
srwi r3, r2, 5
blr
saving a cycle.
llvm-svn: 31725
2006-11-14 05:28:08 +00:00
Andrew Lenharth
0ad1e3845b
A shim over other AA impls to catch incorrect uses
...
llvm-svn: 31724
2006-11-14 05:21:04 +00:00
Reid Spencer
1b89a7bcc1
Discard code that supported old bytecode formats. This makes the Bytecode
...
Reader code much easier to read and maintain. Backwards compatibility from
version 5 format has been retained. Older formats will produce an error.
llvm-svn: 31723
2006-11-14 04:47:22 +00:00
Devang Patel
ca1892699c
Implement removeDeadPasses().
...
llvm-svn: 31722
2006-11-14 03:05:08 +00:00
Devang Patel
3f0832a3b5
Keep track of Last user of analysis phase.
...
llvm-svn: 31721
2006-11-14 02:54:23 +00:00
Devang Patel
f60b5d9676
Use std::map to map AnalysisID and Pass.
...
llvm-svn: 31720
2006-11-14 01:59:59 +00:00
Chris Lattner
6dc22332bf
add a note
...
llvm-svn: 31719
2006-11-14 01:57:53 +00:00
Chris Lattner
683712583a
minor tweaks, reject vector preinc.
...
llvm-svn: 31717
2006-11-14 01:38:31 +00:00
Devang Patel
050ec72ae4
Manage analysis passes during run.
...
llvm-svn: 31716
2006-11-14 01:23:29 +00:00
Tanya Lattner
9ce0379da2
Updating configure script for 2.0
...
llvm-svn: 31715
2006-11-14 00:59:52 +00:00
Devang Patel
dafa4ddc46
Update comments.
...
llvm-svn: 31713
2006-11-14 00:03:04 +00:00
Evan Cheng
dbd3d294e6
Matches MachineInstr changes.
...
llvm-svn: 31712
2006-11-13 23:36:35 +00:00
Evan Cheng
77af6ac5e8
- Let MachineInstr ctors add implicit def and use operands. Other operands
...
will be inserted before these operands. If the opcode changes (by
setOpcode), the implicit operands are updated as well.
- Added IsKill, IsDead fields to MachineOperand in preparation for changes
that move kill / dead info to MachineInstr's.
llvm-svn: 31711
2006-11-13 23:34:06 +00:00
Devang Patel
7086844634
Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
...
managed passmanagers.
llvm-svn: 31710
2006-11-13 22:53:19 +00:00
Devang Patel
ebba970a6d
Check currently available anlysis in active managers.
...
llvm-svn: 31709
2006-11-13 22:40:09 +00:00
Chris Lattner
1121e50f7e
teach the g5 hazard recognizer about update loads. This fixes
...
Ptrdist/anagram among others.
llvm-svn: 31708
2006-11-13 20:11:06 +00:00
Reid Spencer
3d1027193f
For PR950:
...
Changes for new cast instructions that are backwards compatible.
llvm-svn: 31707
2006-11-13 18:00:52 +00:00
Reid Spencer
7354395590
Don't hard code test names into the test.
...
llvm-svn: 31706
2006-11-13 17:55:34 +00:00
Reid Spencer
83c7a1e710
Fix 80 cols violations.
...
llvm-svn: 31705
2006-11-13 16:21:09 +00:00
Reid Spencer
5953e4e805
For PR950:
...
Use the notcast script in preparation for 12 casts.
llvm-svn: 31704
2006-11-13 16:13:38 +00:00
Reid Spencer
6170dff047
For PR950:
...
Use the notcast script in preparation for 12 cast instructions.
llvm-svn: 31703
2006-11-13 16:12:25 +00:00
Reid Spencer
7debe5e948
Make it handle plain old cast too, for old assembly.
...
llvm-svn: 31702
2006-11-13 16:11:14 +00:00
Reid Spencer
6f406f91d2
Handle ptrtoint and inttoptr
...
llvm-svn: 31701
2006-11-13 16:09:37 +00:00
Reid Spencer
cac60e8eb4
Add some output so the user is informed while they wait.
...
llvm-svn: 31700
2006-11-13 16:08:51 +00:00
Reid Spencer
e473e41e59
Add a link to the GEP FAQ.
...
llvm-svn: 31698
2006-11-13 08:03:59 +00:00
Chris Lattner
5c833df633
remove redundant code
...
llvm-svn: 31697
2006-11-13 01:10:12 +00:00
Nick Lewycky
0df2ada9d4
Cute example from Chris Lattner.
...
llvm-svn: 31696
2006-11-13 00:23:28 +00:00
Bill Wendling
ad75361d42
Initialize some pointers to quiet the compiler (when doing build_gcc
...
builds).
llvm-svn: 31694
2006-11-12 11:10:39 +00:00
Reid Spencer
5b9506439a
Document new constant expr operators, rename bitconvert as bitcast.
...
llvm-svn: 31693
2006-11-11 23:08:07 +00:00
Reid Spencer
b608daeec3
Revert premature patch.
...
llvm-svn: 31692
2006-11-11 23:06:47 +00:00
Reid Spencer
8b8913ba61
Document new constant expr operators, rename bitconvert as bitcast.
...
llvm-svn: 31691
2006-11-11 22:34:59 +00:00
Jim Laskey
1dfc6110ff
Make sure stack link is set in 64-bit.
...
llvm-svn: 31690
2006-11-11 22:22:07 +00:00
Jim Laskey
a3262ee8ec
XFAIL All but powerpc
...
llvm-svn: 31689
2006-11-11 22:14:46 +00:00
Reid Spencer
b7344ff025
Add a preview of two new conversion operators: ptrtoint and inttoptr. Update
...
the defintion of bitconvert correspondingly.
llvm-svn: 31688
2006-11-11 21:00:47 +00:00
Reid Spencer
06d8e0fa3b
Remvoe a do-nothing else block.
...
llvm-svn: 31687
2006-11-11 20:27:49 +00:00
Reid Spencer
2230144a75
Make an assert comment match the tested assertion.
...
llvm-svn: 31686
2006-11-11 20:07:59 +00:00