Jeff Cohen
4e3aedeaa6
Use ANSI-approved way of getting the value infinity (otherwise VC++ won't compile it)
...
llvm-svn: 21662
2005-05-03 03:13:01 +00:00
Reid Spencer
95d8efdfcf
Avoid garbage output in the statistics display by ensuring that the
...
strings passed to Statistic's constructor are not destructable. The stats
are printed during static destruction and the SimplifyLibCalls module was
getting destructed before the statistics.
llvm-svn: 21661
2005-05-03 02:54:54 +00:00
Reid Spencer
49fa070401
Add the StrNCmpOptimization which is similar to strcmp.
...
Unfortunately, this optimization didn't trigger on any llvm-test tests.
llvm-svn: 21660
2005-05-03 01:43:45 +00:00
Reid Spencer
8204531db1
Correct the title and the success criteria: strcmp -> strncmp
...
llvm-svn: 21659
2005-05-03 00:52:19 +00:00
Reid Spencer
0a23afbedb
Add a new test case for the StrNCmpOptimization.
...
llvm-svn: 21658
2005-05-03 00:50:43 +00:00
Reid Spencer
2d5c7beebd
Implement the fprintf optimization which converts calls like this:
...
fprintf(F,"hello") -> fwrite("hello",strlen("hello"),1,F)
fprintf(F,"%s","hello") -> fwrite("hello",strlen("hello"),1,F)
fprintf(F,"%c",'x') -> fputc('c',F)
This optimization fires severals times in llvm-test:
313 MultiSource/Applications/Burg
302 MultiSource/Benchmarks/Prolangs-C/TimberWolfMC
189 MultiSource/Benchmarks/Prolangs-C/mybison
175 MultiSource/Benchmarks/Prolangs-C/football
130 MultiSource/Benchmarks/Prolangs-C/unix-tbl
llvm-svn: 21657
2005-05-02 23:59:26 +00:00
Reid Spencer
59605a1b57
Add a test case for testing the FPrintFOptimization.
...
llvm-svn: 21656
2005-05-02 23:07:14 +00:00
Andrew Lenharth
c73e633a41
fold fp div by 0 to inf, the way gcc does. This is legal according to the FP spec
...
llvm-svn: 21655
2005-05-02 21:25:47 +00:00
Andrew Lenharth
f5d58d1bc3
Remove support for 1.0 style varargs
...
amusing of course, because we will have to go back to those semantics soon
llvm-svn: 21654
2005-05-02 19:07:27 +00:00
John Criswell
f42ed7bdaf
Fixed a comment.
...
llvm-svn: 21653
2005-05-02 14:47:42 +00:00
Duraid Madina
7acd5d5f06
support multiplication by constant negative integers
...
this constmul code is still buggy though, so beware. mul by 7427 is currently
broken, for example. will fix it when I get a moment :)
llvm-svn: 21652
2005-05-02 07:27:14 +00:00
Duraid Madina
0e73188c10
add support for bools to SELECT, this fixes Prolangs-C/bison from the
...
testsuite, however 09-vor is still dead (hopefully for other reasons!)
llvm-svn: 21651
2005-05-02 06:41:13 +00:00
Reid Spencer
d845d160f6
Mention that arguments to functions must be first class types.
...
llvm-svn: 21650
2005-05-01 22:22:57 +00:00
Tanya Lattner
846b8b00e2
Add accessor method,
...
llvm-svn: 21649
2005-05-01 16:22:41 +00:00
Tanya Lattner
c187835632
Adding ModuloSched SB.
...
llvm-svn: 21648
2005-05-01 16:14:34 +00:00
Chris Lattner
a816eee427
Implement getelementptr.ll:test11
...
llvm-svn: 21647
2005-05-01 04:42:15 +00:00
Chris Lattner
cdb2465152
new testcase
...
llvm-svn: 21646
2005-05-01 04:41:57 +00:00
Chris Lattner
a9d84e3388
Check for volatile loads only once.
...
Implement load.ll:test7
llvm-svn: 21645
2005-05-01 04:24:53 +00:00
Chris Lattner
da96eeb2d5
add a new testcase
...
llvm-svn: 21644
2005-05-01 04:24:15 +00:00
Tanya Lattner
9d43c75a55
SMS for superblocks.
...
llvm-svn: 21643
2005-05-01 01:27:47 +00:00
Tanya Lattner
bdfb9e61a0
Added extra constructor for superblocks.
...
llvm-svn: 21642
2005-05-01 01:25:53 +00:00
Tanya Lattner
4d0ee754e3
Fixed bug in searchPath function for finding nodes between two recurrences.
...
Changed dependence analyzer to only use dep distances of 2 or less.
This is experimental.
Changed MSchedGraph to be able to represent more then one BB (first steps).
llvm-svn: 21641
2005-04-30 23:07:59 +00:00
Andrew Lenharth
537332eba8
I was sure I had thought about this and there was a reason it should work.
...
But it is entirely possible I am just crazy.
llvm-svn: 21640
2005-04-30 14:19:13 +00:00
Alkis Evlogimenos
d7e534b2b3
Do not use deprecated APIs
...
llvm-svn: 21639
2005-04-30 07:13:31 +00:00
Reid Spencer
16449a9eb0
Fix a comment that stated the wrong thing.
...
llvm-svn: 21638
2005-04-30 06:45:47 +00:00
Chris Lattner
c8a6633dea
Eliminate some random whitespace
...
llvm-svn: 21637
2005-04-30 04:44:07 +00:00
Chris Lattner
8002640eab
Codegen and legalize sin/cos/llvm.sqrt as FSIN/FCOS/FSQRT calls. This patch
...
was contributed by Morten Ofstad, with some minor tweaks and bug fixes added
by me.
llvm-svn: 21636
2005-04-30 04:43:14 +00:00
Chris Lattner
9efa7e7533
add sin/cos tests
...
llvm-svn: 21635
2005-04-30 04:41:27 +00:00
Chris Lattner
9993823876
Doesn't support these nodes
...
llvm-svn: 21634
2005-04-30 04:26:56 +00:00
Chris Lattner
9c6bbafc15
This target doesn't support the FSIN/FCOS/FSQRT nodes yet
...
llvm-svn: 21633
2005-04-30 04:26:06 +00:00
Chris Lattner
db68d39a01
Add support for FSIN/FCOS when unsafe math ops are enabled. Patch contributed by
...
Morten Ofstad!
llvm-svn: 21632
2005-04-30 04:25:35 +00:00
Chris Lattner
3b20386551
Add support for llvm.sqrt and sin/cos if unsafe math optimizations are enabled.
...
llvm-svn: 21631
2005-04-30 04:12:40 +00:00
Chris Lattner
4a2cc6603d
Expose an option allowing unsafe math optimizations. Patch contributed by
...
Morten Ofstad!
llvm-svn: 21630
2005-04-30 04:09:52 +00:00
Chris Lattner
30fe4ac2fb
Lower llvm.sqrt -> fsqrt/sqrt
...
llvm-svn: 21629
2005-04-30 04:07:50 +00:00
Chris Lattner
7100fcde6c
Add a test for llvm.sqrt
...
llvm-svn: 21628
2005-04-30 04:07:15 +00:00
Chris Lattner
1c636f1118
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Reid Spencer
4c444fe007
* Don't depend on "guessing" what a FILE* is, just require that the actual
...
type be obtained from a CallInst we're optimizing.
* Make it possible for getConstantStringLength to return the ConstantArray
that it extracts in case the content is needed by an Optimization.
* Implement the strcmp optimization
* Implement the toascii optimization
This pass is now firing several to many times in the following MultiSource
tests:
Applications/Burg - 7 (strcat,strcpy)
Applications/siod - 13 (strcat,strcpy,strlen)
Applications/spiff - 120 (exit,fputs,strcat,strcpy,strlen)
Applications/treecc - 66 (exit,fputs,strcat,strcpy)
Applications/kimwitu++ - 34 (strcmp,strcpy,strlen)
Applications/SPASS - 588 (exit,fputs,strcat,strcpy,strlen)
llvm-svn: 21626
2005-04-30 03:17:54 +00:00
Reid Spencer
29c6b848db
* Fix signed/unsigned usage problem
...
* Rearrange for readability.
llvm-svn: 21625
2005-04-30 03:06:36 +00:00
Reid Spencer
10e99b2667
A new test case for the ToAsciiOptimizer.
...
llvm-svn: 21624
2005-04-30 01:00:52 +00:00
Reid Spencer
89339ffb22
A new test case for the StrCmpOptimization in -simplify-libcalls.
...
llvm-svn: 21623
2005-04-30 00:52:04 +00:00
Reid Spencer
1279398b1c
This is StrCpy, NOT StrCat!
...
llvm-svn: 21622
2005-04-29 23:02:15 +00:00
Reid Spencer
cadbe2bbf1
Get the name of the pass right in the documentation.
...
llvm-svn: 21621
2005-04-29 23:01:21 +00:00
Reid Spencer
a2ddce3119
Fix the success criteria for the test to make call instructions with "pow"
...
not just any occurrence of "pow".
llvm-svn: 21620
2005-04-29 10:11:23 +00:00
Reid Spencer
9610da2670
Actually make this pass test something related to fputs.
...
llvm-svn: 21619
2005-04-29 10:10:17 +00:00
Reid Spencer
9361697f93
Implement the optimizations for "pow" and "fputs" library calls.
...
llvm-svn: 21618
2005-04-29 09:39:47 +00:00
Reid Spencer
fc4cf1d435
Add a test case for the puts libcall optimization.
...
llvm-svn: 21616
2005-04-29 07:19:00 +00:00
Reid Spencer
2645640325
Add a testcase for optimizing the strcpy libcall.
...
llvm-svn: 21615
2005-04-29 06:01:28 +00:00
Reid Spencer
c968ea0495
Remove optimizations that don't require both operands to be constant. These
...
are moved to simplify-libcalls pass.
llvm-svn: 21614
2005-04-29 05:55:35 +00:00
Reid Spencer
a8b889490e
New test case for testing pow(3) math library optimizations.
...
llvm-svn: 21613
2005-04-29 05:47:05 +00:00
Jeff Cohen
4bc952f703
Consistently use 'class' to silence VC++
...
llvm-svn: 21612
2005-04-29 03:05:44 +00:00