Chris Lattner
c597b8a55e
Make iostream #inclusion explicit
...
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Reid Spencer
175613adf6
Improve ResolveFunctions to:
...
a) use better local variable names (OldMT -> OldFT) where "M" is used to
mean "Function" (perhaps it was previously "Method"?)
b) print out the module identifier in a warning message so that it is
possible to track down in which module the error occurred.
llvm-svn: 24698
2005-12-13 19:56:51 +00:00
Misha Brukman
b1c9317bb4
Remove trailing whitespace
...
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
531f9e92d4
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
d6a4492f81
Adjust to changes in APIs
...
llvm-svn: 19958
2005-02-01 01:23:31 +00:00
Chris Lattner
9af8efddd3
Disable the 'WARNING: Found global types that are not compatible' warning
...
that always prints when linking programs to libstdc++ :(
llvm-svn: 16603
2004-09-30 00:12:29 +00:00
Chris Lattner
4f2cf030e8
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
14c198d09a
If we are linking two global variables and they have the same size, do not
...
spew warnings, even if the types don't match.
llvm-svn: 15933
2004-08-20 00:30:39 +00:00
Misha Brukman
63b38bd2ed
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Reid Spencer
cb3fb5d4f5
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Chris Lattner
1e1abdd6ed
Do not function resolve intrinsics. This prevents warnings and possible bad
...
things from happening due to
declare bool %llvm.isunordered(double, double)
declare bool %llvm.isunordered(float, float)
llvm-svn: 14219
2004-06-18 05:50:48 +00:00
Chris Lattner
6b7275996c
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
fa829be4d3
Start using the new and improve interface to FunctionType arguments
...
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
8791e26de1
* Finegrainify namespacification
...
* Implement FuncResolve/2003-11-20-BogusResolveWarning.ll
... which eliminates a large number of annoying warnings. I know misha
will miss them though!
llvm-svn: 10123
2003-11-20 21:21:31 +00:00
Chris Lattner
18e5d5228a
When spewing out warnings during function resolution, do not vomit out pages
...
and pages of non-symbolic types.
llvm-svn: 10109
2003-11-20 18:19:35 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
9e8fe49c37
This important patch fixes two warnings in the linker which can occur from linking
...
valid pieces of code
llvm-svn: 9390
2003-10-22 23:03:38 +00:00
Chris Lattner
6d3425e87a
Update the 'used' flag correctly
...
llvm-svn: 9366
2003-10-22 04:43:18 +00:00
Chris Lattner
12b3593dea
Loop over the module, not the symbol table. This makes the code handle
...
unused external functions again
llvm-svn: 9365
2003-10-22 04:42:20 +00:00
Chris Lattner
4cd99ffa57
Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll
...
llvm-svn: 9363
2003-10-22 03:35:34 +00:00
Chris Lattner
af2c00bf14
Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll
...
llvm-svn: 9359
2003-10-21 23:17:56 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
6fc0ee9901
Fix bug: FunctionResolve/2003-08-23-ArgumentWarning.ll
...
llvm-svn: 8076
2003-08-23 20:03:05 +00:00
Chris Lattner
015d98e940
Unless we CANNOT merge the arguments, do so
...
llvm-svn: 7999
2003-08-20 23:50:38 +00:00
Chris Lattner
cbf0839a03
Fix FIXME by removing FIXME
...
llvm-svn: 7832
2003-08-13 22:15:04 +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
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
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
Chris Lattner
fa58d79cf2
Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
...
llvm-svn: 6273
2003-05-21 20:51: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
defe5c72e8
Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
...
llvm-svn: 5816
2003-04-19 00:15:27 +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
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
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
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
52b8fc0c35
Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
...
llvm-svn: 4668
2002-11-10 03:36:55 +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
5f9f4e3aac
Account for global variables resolved more accurately.
...
llvm-svn: 4143
2002-10-13 17:30:30 +00:00
Chris Lattner
013eca003a
Almost a complete rewrite of FunctionResolution to now resolve functions
...
and global variables.
This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c
Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced. This
is more of an infrastructure problem than anything.
llvm-svn: 4099
2002-10-09 21:10:06 +00:00
Chris Lattner
bf3a099a62
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
5c447863d5
Simplify code (somtimes dramatically), by using the new "auto-insert" feature
...
of instruction constructors.
llvm-svn: 3655
2002-09-10 17:03:06 +00:00
Chris Lattner
7ff5a21f0f
Remove unneccesary #inlcude
...
llvm-svn: 3200
2002-08-01 20:01:02 +00:00