Commit Graph

125 Commits

Author SHA1 Message Date
Chris Lattner
9cfea85b8b Incorporate ConstantMerge.h into IPO.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 19:57:40 +00:00
Chris Lattner
f629309f74 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 18:06:35 +00:00
Chris Lattner
af41a12370 * Remove getPassName implementation
* Register all Passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3015 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 18:06:30 +00:00
Chris Lattner
e9754ef595 * Break the two different behaviors of SimpleStructMutation into two subclasses
* Register the passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 18:03:11 +00:00
Chris Lattner
72c27e2ae5 * Remove lots of dead stuff
* Register Pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 18:01:39 +00:00
Chris Lattner
56d27019e6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:52:38 +00:00
Chris Lattner
5ff62e90d0 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 02:10:13 +00:00
Chris Lattner
5796091dfd Seperate stats for DCE'd functions and vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2961 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 06:40:04 +00:00
Chris Lattner
f0cd4722bf *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 04:43:20 +00:00
Chris Lattner
7f20ea7d7b Only functions with external linkage can be resolved to function declarations.
This change fixes programs that have multiple functions named the same thing,
where are least one of them is static/internal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 03:01:24 +00:00
Chris Lattner
0b5909e6ae * Correctly get prototype for void*malloc(size_t)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2951 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 00:18:01 +00:00
Chris Lattner
11910cf7e3 Disable pool allocation stuff until data structure analysis is sorted back out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2869 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:36:47 +00:00
Chris Lattner
3e009942ed *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2813 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-30 16:25:25 +00:00
Anand Shukla
5ba99bd124 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2792 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 21:07:58 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Chris Lattner
0b12b5f50e MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:21 +00:00
Chris Lattner
9234d03373 Remove DynamicConstantMerge pass, because it did not fit in with the Pass
system correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2772 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 15:55:29 +00:00
Chris Lattner
ce0141ec22 Remove "fixers" for problems in GCC generated code that cannot be generated
anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2771 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 15:55:03 +00:00
Chris Lattner
bd8619d3ef Do not remove type names that contain a .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2747 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-26 20:17:35 +00:00
Chris Lattner
abe6c3d702 Fix "unimplemented features":
test/Regression/Transforms/FunctionResolve/retmismatch[12].ll

This makes it much more useful for running benchmarks that are missing
prototypes for some functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2745 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-24 21:33:26 +00:00
Chris Lattner
22ee3eb802 Split the FunctionResolution pass out of CleanGCCOutput.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2742 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-24 20:42:13 +00:00
Chris Lattner
47e0f3a8a0 Support programs that do not #include <malloc.h> or give a full prototype
for malloc and free.  Lots of crufty benchmarks are using stuff like:
char *malloc();
void free();

to forward declare malloc and free.  Now we recognize and raise these forms


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2740 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-24 20:29:18 +00:00
Chris Lattner
b3abf9d0d8 Convert transforms over to standardize debugging output on -debug option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2714 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-22 17:27:12 +00:00
Chris Lattner
3dec1f2722 Add support for printing out statistics information when -stats is added to
the command line


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2601 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-10 15:38:35 +00:00
Chris Lattner
65e96e57c5 fix comments and documentation in file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2530 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:04:39 +00:00
Chris Lattner
ade686e79b Split ChangeAllocations.cpp into Raise & LowerAllocations.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2529 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:02:48 +00:00
Chris Lattner
c8cc4cb03b Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2523 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:36:35 +00:00
Chris Lattner
497c60c0ed Reduce dependance on TransformInternals.h, instead using the TransformUtils library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2518 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:12:18 +00:00
Chris Lattner
1f8d13c361 Be a little more efficient, do not generate loads and stores with indices in them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2430 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:38:14 +00:00
Chris Lattner
f772f8ef38 Eliminate dead global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2400 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:13:11 +00:00
Chris Lattner
c6f3ae5c66 Eliminate duplicate or unneccesary #include's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2397 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 17:42:12 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
97e52e4336 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2386 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 21:27:06 +00:00
Chris Lattner
31bcdb822f Split ConstantVals.h into Constant.h and Constants.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:55:58 +00:00
Chris Lattner
100d6daca4 Be careful not to make "external" function internal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2363 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:48:34 +00:00
Chris Lattner
dbb1735673 Initial checkin of new "Internalize" pass for GCCLD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2362 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 05:43:27 +00:00
Chris Lattner
483e14ee04 s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 07:27:19 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
f2361c5e5c Changes because the Terminator::getSuccessor function now FAILS if successor
IDX is out of range instead of returning null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2332 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 03:15:45 +00:00
Chris Lattner
8e343330a5 * Change Constant::getNullConstant to Constant::getNullValue
* Add support for pool allocating array allocations of varying size


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2329 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:29:32 +00:00
Chris Lattner
7b5577b371 Programs that actually free memory were broken
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2307 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 22:11:30 +00:00
Chris Lattner
0154505ab7 Add a fixme so that we don't forget this is broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2298 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 18:52:03 +00:00
Chris Lattner
3b87167ac4 Correctly transform dependant arguments, allowing the perimeter bm to work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 14:43:30 +00:00
Chris Lattner
09b9212b6e run an extra pass after a function has been transformed to eliminate
obviously duplicate loads of the pool base.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-15 22:42:23 +00:00
Chris Lattner
3e0e520728 Turn off debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2247 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-14 06:14:41 +00:00
Chris Lattner
441d25a9f6 * Allow datasize to be specified on the commandline
* Build new datatypes correctly
* Transform instructions that return null pointers from functions to return
  a null index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2244 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 23:13:18 +00:00
Chris Lattner
ddcbd34f56 * Give alloca's for pool descriptors better names than "pool<n>".
* Fill in the pool descriptor links in the pool descriptors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2239 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 19:52:54 +00:00
Chris Lattner
027a6755f8 * Add names to the symbol table for pool types and modified types
* Handle more complex structure so that power works almost
* Fix bug with pooldestroy call where we passed in the size of the object
  instead of the pool to destroy.  bisort is now pool allocated successfully!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2238 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 19:25:57 +00:00
Chris Lattner
5146a7ddd4 Implement function rewriting to use offsets instead of pointers in programs.
This now works with treeadd at least, and perhaps other programs as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2233 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-12 20:23:15 +00:00
Chris Lattner
265b083e84 * Add documentation
* Split the CleanGCC pass into two passes, a global pass and an IP pass.
  Before it was just a global pass, but it did illegal things to the
  module, which broke other passes that were being scheduled with it by
  gccld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2224 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-10 20:33:11 +00:00