Chris Lattner
23540b142c
add a method
...
llvm-svn: 31249
2006-10-28 01:24:05 +00:00
Chris Lattner
5191c65485
prepare for a change I'm about to make
...
llvm-svn: 31248
2006-10-28 00:59:20 +00:00
Chris Lattner
a6873c0f88
don't dist internal readme
...
llvm-svn: 31247
2006-10-28 00:51:15 +00:00
Chris Lattner
acc6b37d0d
don't dist internal readme's
...
llvm-svn: 31246
2006-10-28 00:49:54 +00:00
Chris Lattner
3be52bb570
don't distribute internal readme's
...
llvm-svn: 31245
2006-10-28 00:48:27 +00:00
Reid Spencer
247e09a07c
Make sure all the readme files get distributed.
...
llvm-svn: 31244
2006-10-28 00:11:39 +00:00
Jim Laskey
bd0f088743
Clean up.
...
llvm-svn: 31243
2006-10-27 23:52:51 +00:00
Chris Lattner
84a035056e
Fix a bug in merged condition handling (CodeGen/Generic/2006-10-27-CondFolding.ll).
...
Add many fewer CFG edges and PHI node entries. If there is a switch which has
the same block as multiple destinations, only add that block once as a successor/phi
node (in the jumptable case)
llvm-svn: 31242
2006-10-27 23:50:33 +00:00
Jim Laskey
f576b42bb2
Switch over from SelectionNodeCSEMap to FoldingSet.
...
llvm-svn: 31240
2006-10-27 23:46:08 +00:00
Chris Lattner
28174f5a3a
this doesn't occur any more in mason
...
llvm-svn: 31236
2006-10-27 22:02:19 +00:00
Chris Lattner
4c0cc53da1
the code in question is now:
...
cmpw cr0, r7, r3
ble cr0, LBB1_5 ;bb25
LBB1_8: ;bb17
cmpw cr0, r8, r5
bgt cr0, LBB1_2 ;bb
which is just as good as crnand.
llvm-svn: 31235
2006-10-27 22:00:55 +00:00
Chris Lattner
b9392fb635
remove debug code
...
llvm-svn: 31233
2006-10-27 21:58:03 +00:00
Chris Lattner
f1b54fd7a5
Codegen cond&cond with two branches. This compiles (f.e.) PowerPC/and-branch.ll to:
...
cmpwi cr0, r4, 4
bgt cr0, LBB1_2 ;UnifiedReturnBlock
LBB1_3: ;entry
cmplwi cr0, r3, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
instead of:
cmpwi cr7, r4, 4
mfcr r2
addic r4, r3, -1
subfe r3, r4, r3
rlwinm r2, r2, 30, 31, 31
or r2, r2, r3
cmplwi cr0, r2, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
LBB1_1: ;cond_true
llvm-svn: 31232
2006-10-27 21:54:23 +00:00
Chris Lattner
ed0110b949
Turn conditions like x<Y|z==q into multiple blocks.
...
This compiles Regression/CodeGen/X86/or-branch.ll into:
_foo:
subl $12, %esp
call L_bar$stub
movl 20(%esp), %eax
movl 16(%esp), %ecx
cmpl $5, %eax
jl LBB1_1 #cond_true
LBB1_3: #entry
testl %ecx, %ecx
jne LBB1_2 #UnifiedReturnBlock
LBB1_1: #cond_true
call L_bar$stub
addl $12, %esp
ret
LBB1_2: #UnifiedReturnBlock
addl $12, %esp
ret
instead of:
_foo:
subl $12, %esp
call L_bar$stub
movl 20(%esp), %eax
movl 16(%esp), %ecx
cmpl $4, %eax
setg %al
testl %ecx, %ecx
setne %cl
testb %cl, %al
jne LBB1_2 #UnifiedReturnBlock
LBB1_1: #cond_true
call L_bar$stub
addl $12, %esp
ret
LBB1_2: #UnifiedReturnBlock
addl $12, %esp
ret
And on ppc to:
cmpwi cr0, r29, 5
blt cr0, LBB1_1 ;cond_true
LBB1_3: ;entry
cmplwi cr0, r30, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
instead of:
cmpwi cr7, r4, 4
mfcr r2
addic r4, r3, -1
subfe r30, r4, r3
rlwinm r29, r2, 30, 31, 31
and r2, r29, r30
cmplwi cr0, r2, 0
bne cr0, LBB1_2 ;UnifiedReturnBlock
llvm-svn: 31230
2006-10-27 21:36:01 +00:00
Evan Cheng
e056dd5928
Fixed a significant bug where unpcklpd is incorrectly used to extract element 1 from a v2f64 value.
...
llvm-svn: 31228
2006-10-27 21:08:32 +00:00
Jim Laskey
cef515fcc0
SmallVector append not insert.
...
llvm-svn: 31224
2006-10-27 19:38:32 +00:00
Jim Laskey
a9e9cae33e
Grrr.
...
llvm-svn: 31223
2006-10-27 19:20:12 +00:00
Jim Laskey
a88e609c0f
Temp patch for missing functionality.
...
llvm-svn: 31222
2006-10-27 19:14:16 +00:00
Reid Spencer
115511f2e2
Make the Value and Type methods print a newline so it prints nicely in gdb
...
llvm-svn: 31221
2006-10-27 18:58:54 +00:00
Evan Cheng
bf3df77758
Fix for PR968: expand vector sdiv, udiv, srem, urem.
...
llvm-svn: 31220
2006-10-27 18:49:08 +00:00
Bill Wendling
e0412f500e
MathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.
...
llvm-svn: 31219
2006-10-27 18:47:29 +00:00
Jim Laskey
6ca4a345dd
Apply editorials.
...
llvm-svn: 31218
2006-10-27 18:05:12 +00:00
Jim Laskey
43bc1847a2
Breakout folding hash set from SelectionDAGCSEMap.
...
llvm-svn: 31215
2006-10-27 16:16:16 +00:00
Reid Spencer
e54243f030
Initialize CStringSection member var.
...
llvm-svn: 31214
2006-10-27 16:14:06 +00:00
Evan Cheng
f53ae69365
Change load PatFrag to ignore indexed load.
...
llvm-svn: 31210
2006-10-26 21:55:50 +00:00
Evan Cheng
96d6bf50ae
getPreIndexedLoad -> getIndexedLoad.
...
llvm-svn: 31209
2006-10-26 21:53:40 +00:00
Evan Cheng
e1e06c2de8
Place cstrings in .cstring section.
...
llvm-svn: 31207
2006-10-26 21:48:57 +00:00
Evan Cheng
e974da6bb7
Speed up isCString()
...
llvm-svn: 31206
2006-10-26 21:48:03 +00:00
Reid Spencer
00c482b7a2
Simplify code a bit by changing instances of:
...
InsertNewInstBefore(new CastInst(Val, ValTy, Val->GetName()), I)
into:
InsertCastBefore(Val, ValTy, I)
llvm-svn: 31204
2006-10-26 19:19:06 +00:00
Evan Cheng
392f645783
Put cstrings in .cstring section when compiling for Mac OS X.
...
llvm-svn: 31203
2006-10-26 19:18:18 +00:00
Evan Cheng
3763c5b1c4
Add isCString() - returns true if a ConstantArray is a CString.
...
llvm-svn: 31201
2006-10-26 19:15:05 +00:00
Chris Lattner
91386800ea
Fix Transforms/InstCombine/2006-10-26-VectorReassoc.ll
...
llvm-svn: 31200
2006-10-26 18:27:26 +00:00
Chris Lattner
fac5f9110c
Add isFPOrFPVector() method, which indicates if a type is either FP or a
...
vector of FP types.
llvm-svn: 31198
2006-10-26 18:22:45 +00:00
Rafael Espindola
a23166d6a4
initial support for frame pointers
...
llvm-svn: 31197
2006-10-26 13:31:26 +00:00
Reid Spencer
c6b52da458
Enclose a case in { and } so that the pickier compilers don't complain.
...
llvm-svn: 31196
2006-10-26 06:17:40 +00:00
Reid Spencer
7e80b0b31e
For PR950:
...
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
llvm-svn: 31195
2006-10-26 06:15:43 +00:00
Nick Lewycky
5b979ae531
Fix 2006-10-25-AddSetCC. A relational operator (like setlt) can never
...
produce an EQ property.
llvm-svn: 31193
2006-10-26 02:35:18 +00:00
Reid Spencer
810dd064aa
Make the makefile tell us when Intrinsics.gen is being updated.
...
llvm-svn: 31191
2006-10-26 01:42:23 +00:00
Nick Lewycky
9d17c82a26
Resurrect r1.25.
...
Fix and comment the "or", "and" and "xor" transformations.
llvm-svn: 31189
2006-10-25 23:48:24 +00:00
Chris Lattner
0d4479b77d
simplify code
...
llvm-svn: 31188
2006-10-25 22:21:37 +00:00
Evan Cheng
c415c5be49
During vector shuffle lowering, we sometimes commute a vector shuffle to try
...
to match MOVL (movss, movsd, etc.). Don't forget to commute it back and try
unpck* and shufp* if that doesn't pan out.
llvm-svn: 31186
2006-10-25 21:49:50 +00:00
Evan Cheng
7e065ff7e4
X86ISD::PEXTRW 3rd operand type is always target pointer type.
...
llvm-svn: 31185
2006-10-25 21:35:05 +00:00
Chris Lattner
53f53db919
hide symbols properly
...
llvm-svn: 31184
2006-10-25 21:14:31 +00:00
Evan Cheng
798b306311
Remove -disable-x86-shuffle-opti
...
llvm-svn: 31183
2006-10-25 20:48:19 +00:00
Chris Lattner
9feb308d51
turn off tail merging for now
...
llvm-svn: 31180
2006-10-25 18:08:50 +00:00
Chris Lattner
7a7835deb4
be more aggressive about matching identical instructions.
...
llvm-svn: 31179
2006-10-25 18:08:14 +00:00
Devang Patel
71b99297aa
Move getPreferredAlignmentLog from AsmPrinter to TargetData
...
llvm-svn: 31171
2006-10-24 20:32:14 +00:00
Rafael Espindola
bd29281e97
expand ISD::VACOPY
...
llvm-svn: 31170
2006-10-24 20:15:21 +00:00
John Criswell
6af0b120b8
Removed extraneous semi-colon; this was prevening the grammar file from
...
bison'ing correctly.
llvm-svn: 31169
2006-10-24 19:09:48 +00:00
Chris Lattner
61bcf9154d
visitSwitchCase knows how to insert conditional branches well. Change
...
visitBr to just call visitSwitchCase, eliminating duplicate logic.
llvm-svn: 31167
2006-10-24 18:07:37 +00:00
Chris Lattner
963ddad31a
Generalize CaseBlock a bit more:
...
Rename LHSBB/RHSBB to TrueBB/FalseBB. Allow the RHS value to be null,
in which case the LHS is treated as a bool.
llvm-svn: 31166
2006-10-24 17:57:59 +00:00
Chris Lattner
9030fc690a
Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
...
isel changes happened months ago.
llvm-svn: 31164
2006-10-24 17:09:43 +00:00
Rafael Espindola
ed32883b27
fix warning about missing newline at end of file
...
llvm-svn: 31162
2006-10-24 17:07:11 +00:00
Chris Lattner
3f179d24c6
generalize 'CaseBlock'. It really allows any comparison to be inserted.
...
llvm-svn: 31161
2006-10-24 17:03:35 +00:00
Chris Lattner
aaeede0aa2
implement uncond branch insertion, mark branches with isBranch.
...
llvm-svn: 31160
2006-10-24 16:47:57 +00:00
Chris Lattner
ccd7704354
implement uncond branch insertion for the branch folding pass
...
llvm-svn: 31159
2006-10-24 16:44:55 +00:00
Chris Lattner
042d56230e
implement uncond branch insertion so alpha works work branchfolding.
...
llvm-svn: 31158
2006-10-24 16:41:36 +00:00
Chris Lattner
b7267bd034
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
f054003ba7
new bad case
...
llvm-svn: 31156
2006-10-24 16:12:47 +00:00
Jim Laskey
1941bfa361
Don't do dead block elimination in fast mode.
...
llvm-svn: 31155
2006-10-24 16:11:49 +00:00
Jim Laskey
a916192267
LinearScanner hotspot.
...
llvm-svn: 31153
2006-10-24 14:35:25 +00:00
Jim Laskey
516cd40b5c
Tighter data structure for deleted debug labels.
...
llvm-svn: 31152
2006-10-24 11:50:43 +00:00
Chris Lattner
ebb1ad4382
Fix Transforms/ScalarRepl/2006-10-23-PointerUnionCrash.ll
...
llvm-svn: 31151
2006-10-24 06:26:32 +00:00
Chris Lattner
ceb51d8427
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
d43e8a7429
Add intrinsics for the rest of the DCB* instructions.
...
llvm-svn: 31148
2006-10-24 01:08:42 +00:00
Chris Lattner
dc7b9beb20
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
94866bef35
add moveBefore/moveAfter helper methods
...
llvm-svn: 31145
2006-10-24 00:02:26 +00:00
Chris Lattner
ebdb1d6724
Enable tail merging by default.
...
llvm-svn: 31140
2006-10-23 22:10:12 +00:00
Rafael Espindola
b43efe86f5
implement STRB and STRH
...
llvm-svn: 31138
2006-10-23 20:34:27 +00:00
Rafael Espindola
cd5f662c7b
expand ISD::MEMSET
...
llvm-svn: 31137
2006-10-23 20:08:22 +00:00
Andrew Lenharth
9cdaa53007
Make these hack flags hidden, like other dsa hack flags
...
llvm-svn: 31136
2006-10-23 19:55:24 +00:00
Andrew Lenharth
0c3211eff0
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
fe7b6ef346
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
4c931502cc
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
5e1a34032b
More complete solution to deleting blocks and debug info.
...
llvm-svn: 31129
2006-10-23 14:56:37 +00:00
Jim Laskey
bd7a1d2b4d
[SU]int update - inactive code may get activated someday
...
llvm-svn: 31128
2006-10-23 14:39:22 +00:00
Nick Lewycky
53b4158448
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
76a7bc8c55
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
4c3ef4782d
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
6f5c30fcec
Fix similar missing optimization opportunity in XOR.
...
llvm-svn: 31123
2006-10-22 22:22:58 +00:00
Chris Lattner
bb3084546a
this part implemented.
...
llvm-svn: 31122
2006-10-22 21:40:12 +00:00
Nick Lewycky
af2b0571d0
Whoops! Add missing NULL check.
...
llvm-svn: 31121
2006-10-22 21:38:24 +00:00
Anton Korobeynikov
41a83d7871
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
6d6fc26257
Implement PR964 and Regression/CodeGen/Generic/SwitchLowering.ll
...
llvm-svn: 31119
2006-10-22 21:36:53 +00:00
Nick Lewycky
2c734f3fc1
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
f345008339
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
250eff20da
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
aa1c614784
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
c7212791a4
Regenerate.
...
llvm-svn: 31111
2006-10-22 07:03:43 +00:00
Reid Spencer
6309fa1438
Remove unneeded CHECK_FOR_ERROR invocations.
...
llvm-svn: 31110
2006-10-22 07:03:09 +00:00
Chris Lattner
7d1d03445e
regenerate
...
llvm-svn: 31109
2006-10-22 06:08:13 +00:00
Chris Lattner
fd3d29a978
change keyword to datalayout
...
llvm-svn: 31108
2006-10-22 06:07:41 +00:00
Chris Lattner
0489716a67
Change keyword to datalayout
...
llvm-svn: 31107
2006-10-22 06:06:56 +00:00
Chris Lattner
af17096dcf
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
9f5a129543
don't break infinite loops
...
llvm-svn: 31102
2006-10-21 06:11:43 +00:00
Chris Lattner
23f22de26f
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
28f17f45be
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
3a897f31fa
Implement support for branch condition reversal.
...
llvm-svn: 31099
2006-10-21 05:52:40 +00:00
Chris Lattner
3ca52185af
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
d881660366
Simplify code, no functionality change
...
llvm-svn: 31097
2006-10-21 05:42:09 +00:00