Commit Graph

212 Commits

Author SHA1 Message Date
Chris Lattner 13bf28c00a Initial checkin of DAE pass
llvm-svn: 6759
2003-06-17 22:21:05 +00:00
Chris Lattner bf2be2163b Fix compilation problem on GCC 2.9x
llvm-svn: 6667
2003-06-07 20:29:58 +00:00
Sumant Kowshik c318ca1a51 Made changes suggested by Chris
llvm-svn: 6606
2003-06-04 08:03:57 +00:00
Chris Lattner 2b1329611b Fix bug: FunctionResolve/2003-05-31-AllInternalDecls.ll
llvm-svn: 6486
2003-05-31 21:57:06 +00:00
Chris Lattner 080436820e Fix bug: FuncResolve/2003-05-31-InternalDecl.ll
Count resolutions correctly.

llvm-svn: 6482
2003-05-31 21:08:45 +00:00
Chris Lattner 709c1d469b Simplify funcresolve a bit more
llvm-svn: 6480
2003-05-31 20:44:46 +00:00
Chris Lattner 5ef98de61c Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll
llvm-svn: 6479
2003-05-31 20:33:31 +00:00
Sumant Kowshik 04c1382291 Added support for function pointers
llvm-svn: 6420
2003-05-29 22:42:44 +00:00
Chris Lattner 530d4bffbf * Separate all of the grunt work of inlining out into the Utils library.
* Make the function inliner _significantly_ smarter.  :)

llvm-svn: 6396
2003-05-29 15:11:31 +00:00
Chris Lattner 8d0a71aff8 Remove using declarations
llvm-svn: 6306
2003-05-22 22:00:07 +00:00
Chris Lattner 224ae025ef Make the list accept comma separated names
llvm-svn: 6295
2003-05-22 20:27:13 +00:00
Chris Lattner ad44cd840b * Revert to old behavior of ignoring a module if it doesn't contain a main
function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
  list is small, and making a new file is annoying.

llvm-svn: 6289
2003-05-22 19:48:00 +00:00
Chris Lattner 44457bb5ea Add option to internalize to allow it to read a file to determine which symbols
should not be internalized

llvm-svn: 6288
2003-05-22 19:34:49 +00:00
Chris Lattner fa58d79cf2 Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
llvm-svn: 6273
2003-05-21 20:51:52 +00:00
Chris Lattner fce555a981 Don't inline functions that take variable numbers of arguments!
llvm-svn: 6024
2003-05-08 02:36:43 +00:00
Chris Lattner d9bd5a0443 Remove using decl
llvm-svn: 6023
2003-05-08 02:34:52 +00:00
Chris Lattner 9810b94850 Fix several bugs:
* Warnings were emitted all of the time and were really annoying
  * Functions could not be resolved unless they had external linkage.  Linkonce
    linkage was not allowed
  * ConstantPointerRef's were not handled when linking functions
    we now actually handle cast (CPR) to X -> cast (NewCPR) to X

llvm-svn: 5967
2003-04-28 01:23:29 +00:00
Chris Lattner 889f620841 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner defe5c72e8 Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
llvm-svn: 5816
2003-04-19 00:15:27 +00:00
Chris Lattner 424132aa57 Global constants CAN be external
llvm-svn: 5808
2003-04-18 04:34:29 +00:00
Chris Lattner 46b3d30bf6 Change the interface to constant expressions to allow automatic folding
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner 379a8d2d1c Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner 50cbb9081a Eliminate tons of bogus warnings
llvm-svn: 5686
2003-03-03 19:57:46 +00:00
Chris Lattner dbb05b0f09 Replace assertion with a handler.
llvm-svn: 5653
2003-02-27 20:55:48 +00:00
Chris Lattner 04c9274e50 Fix a bug that cause a crash resolving questionable function calls
llvm-svn: 5567
2003-02-14 19:12:29 +00:00
Chris Lattner ade85ecf77 Fix a misunderstanding of the standard associative containers
llvm-svn: 5565
2003-02-14 05:34:36 +00:00
Chris Lattner 4ecd2d0125 Fix a problem Sumant was running into
llvm-svn: 5499
2003-02-06 22:03:46 +00:00
Chris Lattner 82723d73ba Split public interface out into header file
llvm-svn: 5472
2003-02-03 19:08:18 +00:00
Chris Lattner c44c04af44 Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup

llvm-svn: 5460
2003-02-01 04:52:08 +00:00
Chris Lattner 68f63f779c Fix a bug resolving sprintf(...) to sprintf(char*, char*, ...)
llvm-svn: 5446
2003-01-30 22:38:44 +00:00
Chris Lattner 47948952dd Actually print the function _name_ if there is a problem
llvm-svn: 5443
2003-01-30 21:33:07 +00:00
Chris Lattner b2d9f7dcc9 * Fix function resolution for varargs function to generate incorrect bytecode instead of crashing
* remove using decls
 CVS: ----------------------------------------------------------------------

llvm-svn: 5437
2003-01-30 18:22:32 +00:00
Chris Lattner 6e07784692 Initial checkin of pool allocation code
llvm-svn: 5432
2003-01-29 21:12:13 +00:00
Chris Lattner d1fd7e958c Disable construction of pool allocator
llvm-svn: 5422
2003-01-24 20:13:20 +00:00
Chris Lattner 661841c49b Fix references to functions
llvm-svn: 5222
2003-01-13 00:27:23 +00:00
Vikram S. Adve d9676ed983 External routines used to identify Cilk operations inserted by the
parallelization pass.

llvm-svn: 4965
2002-12-10 13:08:48 +00:00
Vikram S. Adve 9a672d17ae This file implements a pass that automatically parallelizes a program,
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.

llvm-svn: 4962
2002-12-10 00:43:34 +00:00
Chris Lattner 8016a16ed0 Fix symbol table problem
llvm-svn: 4785
2002-11-20 19:32:43 +00:00
Chris Lattner 98cf1f5d64 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner c362618f2a Minor changes to cloning interface
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner b1120055b9 Rework inline pass to use cloning infrastructure to do the dirty work
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner 1666751257 Start using the new function cloning header
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner d06467db62 Move MutatStructTypes.h out of IPO
llvm-svn: 4762
2002-11-19 20:49:40 +00:00
Chris Lattner fb8ca4a899 Rename CloneFunction.h to Cloning.h
llvm-svn: 4760
2002-11-19 20:08:24 +00:00
Chris Lattner 58f9002b4a Move the function extractor pass from tools/extract into lib/Xform/IPO
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner 52b8fc0c35 Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
llvm-svn: 4668
2002-11-10 03:36:55 +00:00
Chris Lattner 17069b342a Use the new getMainFunction() method to efficiently locate main
llvm-svn: 4630
2002-11-08 20:34:21 +00:00
Chris Lattner 5997c3d866 Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
llvm-svn: 4618
2002-11-08 00:38:20 +00:00
Chris Lattner 3ff5457b32 Really disable pool allocator
llvm-svn: 4216
2002-10-17 04:57:09 +00:00
Chris Lattner 149376dee5 - Change Function's so that their argument list is populated when they are
constructed.  Before, external functions would have an empty argument list,
    now a Function ALWAYS has a populated argument list.

llvm-svn: 4149
2002-10-13 20:57:00 +00:00