Chris Lattner
f899cf0dc5
implement uncond branch insertion for sparc to fix regressions from last night
...
due to branchfolding
llvm-svn: 31157
2006-10-24 16:39:19 +00:00
Chris Lattner
efee605648
new bad case
...
llvm-svn: 31156
2006-10-24 16:12:47 +00:00
Jim Laskey
55d57252c3
Don't do dead block elimination in fast mode.
...
llvm-svn: 31155
2006-10-24 16:11:49 +00:00
Jim Laskey
47b2dcf17f
LinearScanner hotspot.
...
llvm-svn: 31153
2006-10-24 14:35:25 +00:00
Jim Laskey
605cf8cc6a
Tighter data structure for deleted debug labels.
...
llvm-svn: 31152
2006-10-24 11:50:43 +00:00
Chris Lattner
0cf64c9469
Fix Transforms/ScalarRepl/2006-10-23-PointerUnionCrash.ll
...
llvm-svn: 31151
2006-10-24 06:26:32 +00:00
Chris Lattner
533b205309
move single basic blocks that are neither fallen into nor fall out of into
...
a place more useful. In particular, if we can put them in a place where code
will be able to fall into it, do so. Otherwise, put it in a place it can fall
through into a successor. Otherwise, if preventing a fallthrough, move to the
end of the function, out of the way.
This deletes several hundred unconditional branches from spass.
llvm-svn: 31149
2006-10-24 01:12:32 +00:00
Chris Lattner
e38c95d2a3
Add intrinsics for the rest of the DCB* instructions.
...
llvm-svn: 31148
2006-10-24 01:08:42 +00:00
Chris Lattner
d13449ed3e
Revert back to r1.21, which was the last revision of predsimplify that
...
passes llvm-gcc bootstrap.
llvm-svn: 31146
2006-10-24 00:36:21 +00:00
Chris Lattner
131eb21cc7
add moveBefore/moveAfter helper methods
...
llvm-svn: 31145
2006-10-24 00:02:26 +00:00
Chris Lattner
0c3fabc9a4
Enable tail merging by default.
...
llvm-svn: 31140
2006-10-23 22:10:12 +00:00
Rafael Espindola
70f01d5cc0
implement STRB and STRH
...
llvm-svn: 31138
2006-10-23 20:34:27 +00:00
Rafael Espindola
357f151d9d
expand ISD::MEMSET
...
llvm-svn: 31137
2006-10-23 20:08:22 +00:00
Andrew Lenharth
67fc2c366f
Make these hack flags hidden, like other dsa hack flags
...
llvm-svn: 31136
2006-10-23 19:55:24 +00:00
Andrew Lenharth
20f5c4f47d
Revert the aggressive inlining for now, it doesn't handle external correctly
...
llvm-svn: 31135
2006-10-23 19:53:37 +00:00
Chris Lattner
91e628645b
Handle fallout from the recent branch-on-undef changes. This fixes
...
Prolangs-C/agrep and SCCP/2006-10-23-IPSCCP-Crash.ll
llvm-svn: 31132
2006-10-23 18:57:02 +00:00
Chris Lattner
06236f7928
Minor tweak. Instead of generating:
...
movl 32(%esp), %eax
cmpl $1, %eax
je LBB1_1 #bb
LBB1_4: #entry
cmpl $2, %eax
je LBB1_2 #bb2
jmp LBB1_3 #UnifiedReturnBlock
LBB1_1: #bb
notice that we would miss the fall through and emit this instead:
movl 32(%esp), %eax
cmpl $2, %eax
je LBB1_2 #bb2
LBB1_4: #entry
cmpl $1, %eax
jne LBB1_3 #UnifiedReturnBlock
LBB1_1: #bb
llvm-svn: 31130
2006-10-23 18:38:22 +00:00
Jim Laskey
f6a28d7161
More complete solution to deleting blocks and debug info.
...
llvm-svn: 31129
2006-10-23 14:56:37 +00:00
Jim Laskey
0eeabf8ff5
[SU]int update - inactive code may get activated someday
...
llvm-svn: 31128
2006-10-23 14:39:22 +00:00
Nick Lewycky
6830bee9b4
Remove the Backwards operation. Resolving now works at the time when a
...
property is added by running through the list of uses of the value and
adding resolved properties to the property set.
llvm-svn: 31126
2006-10-23 01:56:02 +00:00
Chris Lattner
d91d082100
Fix phi node updating for switches lowered to linear sequences of branches.
...
llvm-svn: 31125
2006-10-22 23:00:53 +00:00
Chris Lattner
f592f04e3f
disable this code for now, it's not yet safely updating phi nodes
...
llvm-svn: 31124
2006-10-22 22:47:10 +00:00
Nick Lewycky
25e815f0a2
Fix similar missing optimization opportunity in XOR.
...
llvm-svn: 31123
2006-10-22 22:22:58 +00:00
Chris Lattner
3826e15c8d
this part implemented.
...
llvm-svn: 31122
2006-10-22 21:40:12 +00:00
Nick Lewycky
5eec4941d1
Whoops! Add missing NULL check.
...
llvm-svn: 31121
2006-10-22 21:38:24 +00:00
Anton Korobeynikov
da7897a6c8
Do section switching right way for Mingw\Cygwin and Linux.
...
This will allow (after llvm-gcc linkage fix) more dummy tests using
libstdc++ to pass on mingw :)
llvm-svn: 31120
2006-10-22 21:37:13 +00:00
Chris Lattner
a07b38f113
Implement PR964 and Regression/CodeGen/Generic/SwitchLowering.ll
...
llvm-svn: 31119
2006-10-22 21:36:53 +00:00
Nick Lewycky
b81c926e06
Handle "if ((x|y) != 0)" for ints like we do for bools. Fixes missed
...
optimization opportunity pointed out by Chris Lattner.
llvm-svn: 31118
2006-10-22 21:36:41 +00:00
Nick Lewycky
c680dabd94
AllocaInst can't return a null pointer. Fixes missed optimization
...
opportunity pointed out by Andrew Lewycky.
llvm-svn: 31115
2006-10-22 19:53:27 +00:00
Chris Lattner
51e762d4cb
Add a workaround for PR962, disabling the more aggressive form of this
...
transformation. This speeds up a C++ app 2.25x.
llvm-svn: 31113
2006-10-22 18:42:26 +00:00
Reid Spencer
65b4f5b2dd
Don't generate a prototype for _setjmp. At least on Linux, this function
...
has a different prototype than the one #included from <setjmp.h>. This
patch fixes siod and a number of other test cases on Linux that were
failing the CBE because of this _setjmp issue.
llvm-svn: 31112
2006-10-22 09:58:21 +00:00
Reid Spencer
9ca9ec40f1
Regenerate.
...
llvm-svn: 31111
2006-10-22 07:03:43 +00:00
Reid Spencer
9caeb2165b
Remove unneeded CHECK_FOR_ERROR invocations.
...
llvm-svn: 31110
2006-10-22 07:03:09 +00:00
Chris Lattner
25fd3d8b99
regenerate
...
llvm-svn: 31109
2006-10-22 06:08:13 +00:00
Chris Lattner
0bf0490e0c
change keyword to datalayout
...
llvm-svn: 31108
2006-10-22 06:07:41 +00:00
Chris Lattner
9e59066602
Change keyword to datalayout
...
llvm-svn: 31107
2006-10-22 06:06:56 +00:00
Chris Lattner
50b3810d9a
3 Changes:
...
1. Better document what is going on here.
2. Only hack on one branch per iteration, making the results less conservative.
3. Handle the problematic case by marking edges executable instead of by
playing with value lattice states. This is far less pessimistic, and fixes
SCCP/ipsccp-gvar.ll.
llvm-svn: 31106
2006-10-22 05:59:17 +00:00
Chris Lattner
9e7d74961b
don't break infinite loops
...
llvm-svn: 31102
2006-10-21 06:11:43 +00:00
Chris Lattner
a9adb1e558
Implement support for branch reversal, fix a bug in branch analysis.
...
This provides stuff like:
cmpw cr0, r15, r29
mr r14, r15
- bge cr0, LBB3_111 ;bb656
- b LBB3_90 ;bb501
+ blt cr0, LBB3_90 ;bb501
LBB3_111: ;bb656
lwz r18, 68(r1)
which is particularly good for dispatch group formation.
llvm-svn: 31101
2006-10-21 06:03:11 +00:00
Chris Lattner
210d322b1f
Use branch reversal to do stuff like this:
...
call L_strcmp$stub
testl %eax, %eax
- jne LBB26_208 #cond_true6020
- jmp LBB26_227 #bb7119
+ je LBB26_227 #bb7119
LBB26_208: #cond_true6020
movl $l31_str14, 4(%esp)
testl %eax, %eax
- jne LBB26_704 #cond_true13042
- jmp LBB26_713 #bb13151
+ je LBB26_713 #bb13151
LBB26_704: #cond_true13042
movl $_str52, 4(%esp)
cmpl 76(%ecx), %eax
- jge LBB26_1628 #cond_false63.i.i
- jmp LBB26_1769 #_Z8makeGridP13mrSurfaceListidiidd.exit.i
+ jl LBB26_1769 #_Z8makeGridP13mrSurfaceListidiidd.exit.i
LBB26_1628: #cond_false63.i.i
movl $0, 48964(%esp)
llvm-svn: 31100
2006-10-21 05:54:00 +00:00
Chris Lattner
016325f336
Implement support for branch condition reversal.
...
llvm-svn: 31099
2006-10-21 05:52:40 +00:00
Chris Lattner
cf7f500cfd
Transform code like:
...
jle FOO
jmp BAR
BAR:
into:
jle FOO
BAR:
... whoa!
llvm-svn: 31098
2006-10-21 05:43:30 +00:00
Chris Lattner
20bb8bfd45
Simplify code, no functionality change
...
llvm-svn: 31097
2006-10-21 05:42:09 +00:00
Chris Lattner
d3e583b2e1
implement support for inserting a cond branch
...
llvm-svn: 31096
2006-10-21 05:36:13 +00:00
Chris Lattner
b638d287f4
allow insertion of a conditional branch with fall-through
...
llvm-svn: 31095
2006-10-21 05:34:23 +00:00
Chris Lattner
d4cb8dc857
Three changes:
...
1. Remove a bunch of ifdef'd code.
2. When a block just contains an uncond branch, change all blocks branching
to it to jump to the destination instead.
3. If branch analysis tells us some edges in the machinecfg are not actually
possible, remove them.
#2 triggers a suprisingly large number of times.
llvm-svn: 31094
2006-10-21 05:08:28 +00:00
Chris Lattner
596c126372
update assert message
...
llvm-svn: 31093
2006-10-21 04:42:29 +00:00
Chris Lattner
52a4558cf2
Add an experimental cross-jumping implementation.
...
This is currently disabled by default and limited in several ways, but does
have a positive effect.
llvm-svn: 31090
2006-10-21 00:47:49 +00:00
Chris Lattner
cf4137d0b9
implement MachineOperand::isIdenticalTo
...
llvm-svn: 31088
2006-10-20 22:39:59 +00:00
Chris Lattner
ef1a8ce64a
llvm-extract should remove module-level asm
...
llvm-svn: 31086
2006-10-20 21:35:41 +00:00