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
Chris Lattner
3fb2b87f17
bugfix
...
llvm-svn: 31074
2006-10-20 20:44:34 +00:00
Chris Lattner
6ea0134893
Fix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
...
llvm-svn: 31073
2006-10-20 20:19:08 +00:00
Chris Lattner
38ed7d9e49
Fix miscompilation of MallocBench/espresso which code review pointed out
...
but apparently didn't make it into the final patch.
llvm-svn: 31070
2006-10-20 18:20:21 +00:00
Chris Lattner
2f54afc364
Make flag and chain edges visually distinguishable from value edges in DOT
...
output.
llvm-svn: 31067
2006-10-20 18:06:09 +00:00
Chris Lattner
62a0f00312
Implement branch analysis/xform hooks required by the branch folding pass.
...
llvm-svn: 31065
2006-10-20 17:42:20 +00:00
Reid Spencer
d414793dbc
For PR950:
...
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Devang Patel
b030b91f4a
While creating mask, use 1ULL instead of 1.
...
llvm-svn: 31062
2006-10-20 01:16:56 +00:00
Chris Lattner
d9aa90ded4
Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.
...
llvm-svn: 31061
2006-10-20 00:42:07 +00:00
Chris Lattner
5b4ca99562
add a method to determine whether evaluation of a constant can trap.
...
llvm-svn: 31059
2006-10-20 00:27:06 +00:00
Bill Wendling
edce5ede57
Partially in response to PR926: insert the newly created machine basic
...
blocks into the basic block list when lowering the switch inst. into a
binary tree of if-then statements. This allows the "visitSwitchCase" func
to allow for fall-through behavior.
llvm-svn: 31057
2006-10-19 21:46:38 +00:00
Devang Patel
880a9d823f
It is OK to remove extra cast if operation is EQ/NE even though source
...
and destination sign may not match but other conditions are met.
llvm-svn: 31056
2006-10-19 20:59:13 +00:00
Devang Patel
88406a6e1e
Typo Typo.
...
llvm-svn: 31055
2006-10-19 19:21:36 +00:00
Devang Patel
277990c79f
Typo.
...
llvm-svn: 31054
2006-10-19 19:05:38 +00:00
Devang Patel
d9ade71cc7
Fix bug in PR454 resolution. Added new test case.
...
This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin.
llvm-svn: 31053
2006-10-19 18:54:08 +00:00
Rafael Espindola
c08546401b
use Pat to implement extloadi8 and extloadi16
...
llvm-svn: 31052
2006-10-19 17:05:03 +00:00
Rafael Espindola
35e92188e0
implement undef
...
llvm-svn: 31049
2006-10-19 13:45:00 +00:00
Rafael Espindola
f7a41f3ddd
print common symbols
...
llvm-svn: 31048
2006-10-19 13:30:40 +00:00
Rafael Espindola
722266845b
implement extloadi8 and extloadi16
...
llvm-svn: 31047
2006-10-19 12:45:04 +00:00
Rafael Espindola
17544c1c1d
expand SIGN_EXTEND_INREG
...
llvm-svn: 31046
2006-10-19 12:06:50 +00:00
Rafael Espindola
6cc20c7950
expand brind so that we don't have to implement jump tables right now
...
llvm-svn: 31045
2006-10-19 10:56:43 +00:00
Reid Spencer
765ea73e59
Beef up the output from DiffFilesWithTolerance by setting the error code
...
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.
llvm-svn: 31044
2006-10-18 20:23:52 +00:00
Jim Laskey
c06a0bc853
Add option for controlling inclusion of global AA.
...
llvm-svn: 31040
2006-10-18 19:08:31 +00:00
Chris Lattner
a86fff7583
fit in 80 cols
...
llvm-svn: 31039
2006-10-18 18:26:48 +00:00
Chris Lattner
fa22dc8afe
add a note
...
llvm-svn: 31038
2006-10-18 17:04:09 +00:00
Rafael Espindola
1220d18e11
add blx
...
llvm-svn: 31037
2006-10-18 16:21:43 +00:00
Rafael Espindola
73e8f41749
add isTerminatortto b and bcond
...
llvm-svn: 31036
2006-10-18 16:20:57 +00:00
Jim Laskey
288c230cbd
Use global info for alias analysis.
...
llvm-svn: 31035
2006-10-18 12:29:57 +00:00
Rafael Espindola
80c7461ada
implement CallingConv::Fast as CallingConv::C
...
llvm-svn: 31034
2006-10-18 12:03:07 +00:00
Anton Korobeynikov
d1436ae792
Fixed mingw\cygwin linkonce linkage once again.
...
Added workaround for linker bug with linkonce sections.
Changed sections prefix to allow linker merge them
(PE loader doesn't like too much long-named sections :) )
All of this unbreaks libstdc++ on mingw32 allowing (small)
programs to be compiled, linked and run.
llvm-svn: 31033
2006-10-18 09:12:29 +00:00
Owen Anderson
de03eb21c2
Add support for the new "target data" information in .ll files. This provides
...
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.
Update the generated files.
llvm-svn: 31031
2006-10-18 02:21:48 +00:00
Owen Anderson
12374f766b
Add support for the new "target data" information in .ll files. This provides
...
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.
llvm-svn: 31030
2006-10-18 02:21:12 +00:00
Chris Lattner
0f686ec438
set the ppc64 stack pointer right, dynamic alloca now works for ppc64
...
llvm-svn: 31028
2006-10-18 01:20:43 +00:00
Chris Lattner
6c403f7102
Expand alloca for ppc64
...
llvm-svn: 31027
2006-10-18 01:18:48 +00:00
Chris Lattner
cd00328fad
Teach the branch folder to update debug info if it removes blocks with line
...
# notes in it.
llvm-svn: 31026
2006-10-17 23:17:27 +00:00
Chris Lattner
22e311fe77
add a method to remove a line # record.
...
llvm-svn: 31025
2006-10-17 23:16:42 +00:00