Commit Graph

18525 Commits

Author SHA1 Message Date
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
Reid Spencer ed55a6b5e0 * 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 014d2c42e7 Add support for FSQRT node, patch contributed by Morten Ofstad
llvm-svn: 21610
2005-04-28 22:07:18 +00:00
Chris Lattner 59ecb57e4a These functions can set errno!
llvm-svn: 21609
2005-04-28 21:52:31 +00:00
Chris Lattner 61827484c7 Add some new X86 instrs, patch contributed by Morten Ofstad
llvm-svn: 21608
2005-04-28 21:50:05 +00:00
Chris Lattner effaec5436 Codegen fabs/fabsf as FABS. Patch contributed by Morten Ofstad
llvm-svn: 21607
2005-04-28 21:48:42 +00:00
Chris Lattner 9d6fa98ec7 Legalize FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
llvm-svn: 21606
2005-04-28 21:44:33 +00:00
Chris Lattner 2f82d2d58a Add FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
llvm-svn: 21605
2005-04-28 21:44:03 +00:00
Reid Spencer 16983ca865 Remove from the TODO list those optimizations that are already handled by
constant folding implemented in lib/Transforms/Utils/Local.cpp.

llvm-svn: 21604
2005-04-28 18:05:16 +00:00
Reid Spencer 649ac283e4 Document additional libcall transformations that need to be written.
Help Wanted!

There's a lot of them to write.

llvm-svn: 21603
2005-04-28 04:40:06 +00:00
Reid Spencer 7ddcfb3375 Doxygenate.
llvm-svn: 21602
2005-04-27 21:29:20 +00:00