Devang Patel
eff4619cc8
Try again.
...
Instead of loading small global string from memory, use
integer constant.
llvm-svn: 43148
2007-10-18 19:52:32 +00:00
Owen Anderson
f0e040a0c7
Allow GVN to eliminate redundant calls to functions without side effects.
...
llvm-svn: 43147
2007-10-18 19:39:33 +00:00
Chris Lattner
efaf4ba65d
Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll by
...
fixing some obviously broken code :(
llvm-svn: 43141
2007-10-18 18:49:29 +00:00
Owen Anderson
4b407757d0
Move Split<...>() into DomTreeBase. This should make the #include's of DominatorInternals.h
...
in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
llvm-svn: 43115
2007-10-18 05:13:52 +00:00
Evan Cheng
1c34d807ce
Reverting r43070 for now. It's causing llc test failures.
...
llvm-svn: 43103
2007-10-17 23:51:13 +00:00
Devang Patel
9cb3c09156
Do not raise free() call that is called through invoke instruction.
...
llvm-svn: 43083
2007-10-17 20:12:58 +00:00
Hartmut Kaiser
4cbb4f081b
Fixed linker errors (unresolved externals: split<>(...)) when compiling with VC++. Please review.
...
llvm-svn: 43081
2007-10-17 18:37:09 +00:00
Devang Patel
cf2f9d6daa
Apply "Instead of loading small c string constant, use integer constant directly" transformation while processing load instruction.
...
llvm-svn: 43070
2007-10-17 07:24:40 +00:00
Devang Patel
c3d0477a0e
Use immediate stores.
...
llvm-svn: 43055
2007-10-16 23:44:18 +00:00
Devang Patel
7d1d5d6bf6
Achieve same result but use fewer lines of code.
...
llvm-svn: 42985
2007-10-15 15:31:35 +00:00
Devang Patel
f65c028dad
Dest type is always i8 *. This allows some simplification.
...
Do not filter memmove.
llvm-svn: 42930
2007-10-12 20:10:21 +00:00
Chris Lattner
3af877f26a
Fix a bug in my patch last night that broke InstCombine/2007-10-12-Crash.ll
...
llvm-svn: 42920
2007-10-12 18:05:47 +00:00
Gabor Greif
cbfb655705
eliminate warning
...
llvm-svn: 42892
2007-10-12 07:44:54 +00:00
Chris Lattner
3c23c37233
Fix some 80 column violations.
...
Fix DecomposeSimpleLinearExpr to handle simple constants better.
Don't nuke gep(bitcast(allocation)) if the bitcast(allocation) will
fold the allocation. This fixes PR1728 and Instcombine/malloc3.ll
llvm-svn: 42891
2007-10-12 05:30:59 +00:00
Devang Patel
15d6257fa8
Lower memcpy if it makes sense.
...
llvm-svn: 42864
2007-10-11 17:21:57 +00:00
Devang Patel
b13057acf6
Do not walk invalid iterator.
...
llvm-svn: 42812
2007-10-09 21:31:36 +00:00
Devang Patel
36b68478cb
Fix bug in updating dominance frontier after loop
...
unswitch when frontier includes basic blocks that
are not inside loop.
llvm-svn: 42654
2007-10-05 22:29:34 +00:00
Devang Patel
5efcf79cf3
Fix 80 col violation.
...
llvm-svn: 42591
2007-10-03 21:17:43 +00:00
Devang Patel
1e2cced8b9
Refactor code in a separate method.
...
llvm-svn: 42590
2007-10-03 21:16:08 +00:00
Dan Gohman
30ba45b569
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Dale Johannesen
529cc16893
Tone down an overzealous optimization.
...
llvm-svn: 42582
2007-10-03 17:45:27 +00:00
Tanya Lattner
1400027d41
Fix PR1719, by not marking llvm.global.annotations internal.
...
llvm-svn: 42578
2007-10-03 17:05:40 +00:00
Chris Lattner
21b1f72d4c
Fix PR1719, by not marking llvm.noinline internal.
...
llvm-svn: 42565
2007-10-03 03:59:15 +00:00
Dale Johannesen
d94f00234f
Fix stride computations for long double arrays.
...
llvm-svn: 42508
2007-10-01 23:08:35 +00:00
Devang Patel
42f006a51a
Relax unsafe use check. If there is one unconditional use inside the loop then it is safe to promote value even if there is another conditional use inside the loop.
...
llvm-svn: 42493
2007-10-01 18:12:58 +00:00
Dale Johannesen
a30678c8f0
minor long double related changes
...
llvm-svn: 42439
2007-09-28 18:06:58 +00:00
Dale Johannesen
412575891e
Don't do SRA for unions with long double fields.
...
Fixes a SWB crash.
llvm-svn: 42422
2007-09-28 00:21:38 +00:00
Devang Patel
d98abb62ce
Handle multiple induction variables.
...
This fixes PR714.
llvm-svn: 42309
2007-09-25 18:24:48 +00:00
Devang Patel
ab58843813
Do not reserve DOM check for GetElementPtrInst.
...
llvm-svn: 42306
2007-09-25 17:55:50 +00:00
Devang Patel
f35e6c1181
doh..
...
llvm-svn: 42300
2007-09-25 17:43:08 +00:00
Devang Patel
de9d1c3654
Add transformation to update loop interation space. Now,
...
for (i=A; i<N; i++) {
if (i < X && i > Y)
do_something();
}
is transformed into
U=min(N,X); L=max(A,Y);
for (i=L;i<U;i++)
do_somethihg();
llvm-svn: 42299
2007-09-25 17:31:19 +00:00
Devang Patel
65f8d0c2d7
Do not promote null values because it may be unsafe to do so.
...
llvm-svn: 42270
2007-09-24 20:02:42 +00:00
Dan Gohman
ed361aa114
explicit keywords.
...
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Devang Patel
b741c56cfc
Fix PR1692
...
llvm-svn: 42209
2007-09-21 21:18:19 +00:00
Owen Anderson
9070cf6dea
Add partial caching of non-local memory dependence queries. This provides a modest
...
speedup for GVN.
llvm-svn: 42185
2007-09-21 03:53:52 +00:00
Devang Patel
632653ce8f
Update aux. info associated with an instruction before erasing instruction.
...
llvm-svn: 42180
2007-09-20 23:45:50 +00:00
Devang Patel
57b0b31257
Don't increment invalid iterator.
...
llvm-svn: 42178
2007-09-20 23:01:50 +00:00
Nick Lewycky
3baa4cde1c
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Devang Patel
648d7a1074
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00
Duncan Sands
f7abe75944
Improve comment.
...
llvm-svn: 42132
2007-09-19 10:25:38 +00:00
Duncan Sands
d88f60ed32
A global variable with external weak linkage can be null, while
...
an alias could alias such a global variable.
llvm-svn: 42130
2007-09-19 10:10:31 +00:00
Devang Patel
339bee9291
Relax loop ExitCondition predicate restriction.
...
llvm-svn: 42122
2007-09-19 00:28:47 +00:00
Devang Patel
2883f5cc94
Filter loops where split condition's false branch is not empty. For example
...
for (int i = 0; i < N; ++i) {
if (i == somevalue)
dosomething();
else
dosomethingelse();
}
llvm-svn: 42121
2007-09-19 00:15:16 +00:00
Devang Patel
03df2adc31
Bail out early, before modifying anything.
...
llvm-svn: 42120
2007-09-19 00:11:01 +00:00
Devang Patel
9806df698b
Work is incomplete. Loop is not modified at all right now.
...
llvm-svn: 42119
2007-09-19 00:08:13 +00:00
Devang Patel
4014965efb
Fix PR1657
...
llvm-svn: 42075
2007-09-18 01:54:42 +00:00
Devang Patel
578a1ae12a
Do not eliminate loop when it is invalid to do so. For example,
...
for(int i = 0; i < N; i++) {
if ( i == XYZ) {
A;
else
B;
}
C;
D;
}
llvm-svn: 42058
2007-09-17 21:01:05 +00:00
Devang Patel
14b9a01c02
Skeleton for transformations to truncate loop's iteration space.
...
llvm-svn: 42054
2007-09-17 20:39:48 +00:00
Devang Patel
f4411aa165
Fix comment.
...
llvm-svn: 42048
2007-09-17 20:07:40 +00:00
Chris Lattner
cc315726f7
Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
...
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
llvm-svn: 42042
2007-09-17 18:34:04 +00:00