John Criswell
35364c8408
Removing the pool allocator from the main CVS tree.
...
Use the poolalloc module in CVS from now on.
llvm-svn: 7810
2003-08-13 15:36:15 +00:00
Sumant Kowshik
46d9b22e90
Bug fix: Some nodes pointed to by globals may not be marked incomplete and need to be tracked to find pool arguments
...
llvm-svn: 7763
2003-08-12 00:45:13 +00:00
Chris Lattner
603e0076c0
Fix handling of 'free' if it has absolutely no prototype
...
llvm-svn: 7721
2003-08-11 15:05:08 +00:00
John Criswell
449670a8f7
Fixed a segfault in gccld.
...
The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called. To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().
llvm-svn: 7673
2003-08-07 14:43:13 +00:00
Sumant Kowshik
0b83080595
Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes
...
llvm-svn: 7662
2003-08-07 05:29:28 +00:00
Chris Lattner
c592c9f8a3
Remove unnecessary use of NonCopyable
...
llvm-svn: 7641
2003-08-06 17:16:24 +00:00
Chris Lattner
adc5a89a3b
Minor changes:
...
* Expand most tabs into spaces
* Move #define DEBUG_TYPE to top of file to avoid warning
llvm-svn: 7611
2003-08-05 18:44:12 +00:00
Sumant Kowshik
0383a65103
Major bug fixes including a memory leak and tracking some exceptional conditions. Also added support for including global and indirect call information in the DS graphs used by the pool allocation
...
llvm-svn: 7605
2003-08-05 17:01:54 +00:00
Chris Lattner
8abcd56c74
DEBUG got moved to Support/Debug.h
...
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
e9340228c9
Fix bug: FunctionResolve/2003-07-23-CPR-Reference.ll
...
This fixes a long time annoyance which caused prototypes for bzero, bcopy,
bcmp, fputs, and fputs_unlocked to never get deleted. Grr.
llvm-svn: 7285
2003-07-23 22:03:18 +00:00
Chris Lattner
6e69c28229
Eliminate using declarations, adjust for new DSGraph API
...
llvm-svn: 6992
2003-06-30 03:14:44 +00:00
Chris Lattner
fbfcf01b98
Allow the inlining limit to be controlled from the command line!
...
llvm-svn: 6929
2003-06-28 15:57:04 +00:00
Chris Lattner
eaae578820
Add support to globaldce for deleting dead function prototypes
...
llvm-svn: 6918
2003-06-26 05:41:18 +00:00
Chris Lattner
fd5d323ea9
When internalizing global ctor/dtor list, also mark it constant. This is gross, but
...
until DSA is working all of the time and is totally reliable, we do this.
llvm-svn: 6917
2003-06-26 05:30:40 +00:00
Chris Lattner
2ab04f7a41
Add argument to DAE to allow operation on non-internal functions
...
llvm-svn: 6895
2003-06-25 04:12:49 +00:00
Chris Lattner
0024dff76f
Fix the build. :(
...
llvm-svn: 6797
2003-06-20 14:36:52 +00:00
Chris Lattner
d01460495e
Changes to privatize NodeType
...
llvm-svn: 6795
2003-06-19 21:15:26 +00:00
Chris Lattner
bbe2dab909
Remove a bunch of complicated code. The functionality is implemented in instcombine instead
...
llvm-svn: 6782
2003-06-19 16:59:19 +00:00
Chris Lattner
5d3c145d4e
Handle arguments passed in through the va_arg area
...
llvm-svn: 6769
2003-06-18 16:25:51 +00:00
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