Reid Spencer
da05f00bbf
Correct the title and the success criteria: strcmp -> strncmp
...
llvm-svn: 21659
2005-05-03 00:52:19 +00:00
Reid Spencer
263c65154c
Add a new test case for the StrNCmpOptimization.
...
llvm-svn: 21658
2005-05-03 00:50:43 +00:00
Reid Spencer
a5fcd1660f
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
26558086d2
Add a test case for testing the FPrintFOptimization.
...
llvm-svn: 21656
2005-05-02 23:07:14 +00:00
Andrew Lenharth
d46211fc03
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
1e1117ed7a
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
d1933cb2e4
Fixed a comment.
...
llvm-svn: 21653
2005-05-02 14:47:42 +00:00
Duraid Madina
4d9c8f8dce
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
7a185a79a5
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
cdd21b06d3
Mention that arguments to functions must be first class types.
...
llvm-svn: 21650
2005-05-01 22:22:57 +00:00
Tanya Lattner
889ebef2ba
Add accessor method,
...
llvm-svn: 21649
2005-05-01 16:22:41 +00:00
Tanya Lattner
ec45f6a4cd
Adding ModuloSched SB.
...
llvm-svn: 21648
2005-05-01 16:14:34 +00:00
Chris Lattner
7db64049a6
Implement getelementptr.ll:test11
...
llvm-svn: 21647
2005-05-01 04:42:15 +00:00
Chris Lattner
743d822ba6
new testcase
...
llvm-svn: 21646
2005-05-01 04:41:57 +00:00
Chris Lattner
cee86a7095
Check for volatile loads only once.
...
Implement load.ll:test7
llvm-svn: 21645
2005-05-01 04:24:53 +00:00
Chris Lattner
2b67adb1f8
add a new testcase
...
llvm-svn: 21644
2005-05-01 04:24:15 +00:00
Tanya Lattner
845b0cc908
SMS for superblocks.
...
llvm-svn: 21643
2005-05-01 01:27:47 +00:00
Tanya Lattner
b9da851880
Added extra constructor for superblocks.
...
llvm-svn: 21642
2005-05-01 01:25:53 +00:00
Tanya Lattner
425f215095
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
936709ad19
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
66f1632de8
Do not use deprecated APIs
...
llvm-svn: 21639
2005-04-30 07:13:31 +00:00
Reid Spencer
f7511e4fe2
Fix a comment that stated the wrong thing.
...
llvm-svn: 21638
2005-04-30 06:45:47 +00:00
Chris Lattner
b0f53013d6
Eliminate some random whitespace
...
llvm-svn: 21637
2005-04-30 04:44:07 +00:00
Chris Lattner
fe72cdf838
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
26293c64e5
add sin/cos tests
...
llvm-svn: 21635
2005-04-30 04:41:27 +00:00
Chris Lattner
b0af0dd919
Doesn't support these nodes
...
llvm-svn: 21634
2005-04-30 04:26:56 +00:00
Chris Lattner
ce0d8c2408
This target doesn't support the FSIN/FCOS/FSQRT nodes yet
...
llvm-svn: 21633
2005-04-30 04:26:06 +00:00
Chris Lattner
15d29b0220
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
663664d10c
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
05d8a36ba7
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
0366e4c0d3
Lower llvm.sqrt -> fsqrt/sqrt
...
llvm-svn: 21629
2005-04-30 04:07:50 +00:00
Chris Lattner
1fd5429d1d
Add a test for llvm.sqrt
...
llvm-svn: 21628
2005-04-30 04:07:15 +00:00
Chris Lattner
234ffe2395
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Reid Spencer
cc551c4345
* 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
14bca88587
* Fix signed/unsigned usage problem
...
* Rearrange for readability.
llvm-svn: 21625
2005-04-30 03:06:36 +00:00
Reid Spencer
b6a4ce9b30
A new test case for the ToAsciiOptimizer.
...
llvm-svn: 21624
2005-04-30 01:00:52 +00:00
Reid Spencer
61371cb4b6
A new test case for the StrCmpOptimization in -simplify-libcalls.
...
llvm-svn: 21623
2005-04-30 00:52:04 +00:00
Reid Spencer
ba12fdd328
This is StrCpy, NOT StrCat!
...
llvm-svn: 21622
2005-04-29 23:02:15 +00:00
Reid Spencer
2332ee8830
Get the name of the pass right in the documentation.
...
llvm-svn: 21621
2005-04-29 23:01:21 +00:00
Reid Spencer
182a598ca9
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
7e6d82eebf
Actually make this pass test something related to fputs.
...
llvm-svn: 21619
2005-04-29 10:10:17 +00:00
Reid Spencer
a32eb179ed
Implement the optimizations for "pow" and "fputs" library calls.
...
llvm-svn: 21618
2005-04-29 09:39:47 +00:00
Reid Spencer
1846b68692
Add a test case for the puts libcall optimization.
...
llvm-svn: 21616
2005-04-29 07:19:00 +00:00
Reid Spencer
5c9efed75f
Add a testcase for optimizing the strcpy libcall.
...
llvm-svn: 21615
2005-04-29 06:01:28 +00:00
Reid Spencer
ff5cc3cb16
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
16dac19584
New test case for testing pow(3) math library optimizations.
...
llvm-svn: 21613
2005-04-29 05:47:05 +00:00
Jeff Cohen
6dccb593c9
Consistently use 'class' to silence VC++
...
llvm-svn: 21612
2005-04-29 03:05:44 +00:00
Reid Spencer
fb6e0590a8
* Add constant folding for additional floating point library calls such as
...
sinh, cosh, etc.
* Make the name comparisons for the fp libcalls a little more efficient by
switching on the first character of the name before doing comparisons.
llvm-svn: 21611
2005-04-28 23:01:59 +00:00
Chris Lattner
27a534f181
Add support for FSQRT node, patch contributed by Morten Ofstad
...
llvm-svn: 21610
2005-04-28 22:07:18 +00:00
Chris Lattner
fb0d0ea349
These functions can set errno!
...
llvm-svn: 21609
2005-04-28 21:52:31 +00:00