Commit Graph

72 Commits

Author SHA1 Message Date
Chris Lattner 62b7fd136e Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner a8bef43fbb PATypeHolder is now not a template
llvm-svn: 2106
2002-04-04 19:24:34 +00:00
Chris Lattner 1ec764b309 Allow scalars that point to multiple nodes when building the scalar map.
llvm-svn: 2087
2002-04-01 01:26:53 +00:00
Chris Lattner cf09a2a2cd Add extra case here to avoid getting spurious output
llvm-svn: 2086
2002-04-01 00:45:33 +00:00
Chris Lattner 0dc225cbf6 Add debug output
llvm-svn: 2066
2002-03-31 07:17:46 +00:00
Chris Lattner 847b6e2ee7 * Catch and ignore (for now) return instructions in tranformed functions
* Add more debugging output
* Fix problems refering to wrong versions of various graphs
* Build the pool descriptor map!
* Clear the nodemapping map after building pool descriptor to avoid assert
* Transform the NEw function body, not the old one...
* Matrix.ll now works!

llvm-svn: 2058
2002-03-30 20:53:14 +00:00
Chris Lattner ca9f4d39f3 * Clean up data structures [AllocDSNode -> DSNode]
* TransformFunctionInfo now has call field form field mapping.  May be
  removed in the future.
* Moved the computation of "Scalars" into transformFunctionBody so
  transformFunction didn't have to recompute it.
* Implement the node mapping calculation in preparation to calculate
  PoolDescriptors to pass to transformFunctionBody
* Print out the node mapping [it looks right!]
* Other minor changes

llvm-svn: 2056
2002-03-30 09:12:35 +00:00
Chris Lattner 396d5d7c62 Maintain enough information so that the pools for all of the nodes of
the graph can be passed around.

llvm-svn: 2053
2002-03-30 04:02:31 +00:00
Chris Lattner f32d65d5ca Implement the first batch of transformations to the methods. So far it:
* Converts malloc instructions to poolalloc
 * Converts free instructions to poolfree
 * Convert calls to call the new cloned hacked up versions

Note that this does not modify hacked up stuff yet, just the top level
function

llvm-svn: 2052
2002-03-29 21:25:19 +00:00
Chris Lattner 291a1b1eb2 Correctly clone the function with the extra argument types. Now we need
to modify the function next.

This also properly recycles functions so that we don't get exponential
code blowup in the common case.

llvm-svn: 2049
2002-03-29 19:05:48 +00:00
Chris Lattner f50cffce10 s/Method/Function
llvm-svn: 2048
2002-03-29 19:04:45 +00:00
Chris Lattner 692ad5d9bd Find out which calls in the function we need to transform and how.
Next step is to start hacking functions up.

llvm-svn: 2044
2002-03-29 17:13:46 +00:00
Chris Lattner 15deaa0ab9 s/Method/Function
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner 66df97d436 Modularize code a bit
llvm-svn: 2040
2002-03-29 06:21:38 +00:00
Chris Lattner e0618ca2bd Implement the first step of pool allocation - Creating, initialization, and
destruction of the pools.

llvm-svn: 2039
2002-03-29 05:50:20 +00:00
Chris Lattner 175f37c47b Flesh out a bunch more code, print allocations that are poolable.
llvm-svn: 2031
2002-03-29 03:40:59 +00:00
Chris Lattner ca1500607e s/method/function
llvm-svn: 2030
2002-03-29 03:40:25 +00:00
Chris Lattner 870b1a2799 s/Method/Function/g
llvm-svn: 2029
2002-03-29 03:39:36 +00:00
Chris Lattner 64fd935489 Initial checkin of Noop pass that will be the pool allocator
llvm-svn: 2014
2002-03-28 18:08:31 +00:00
Chris Lattner 57698e2c0b Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner 205373ff74 Remove code designed to compensate for a bug in GCC. The bug has since
been fixed.

llvm-svn: 1881
2002-03-15 20:35:21 +00:00
Chris Lattner 8032732948 Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
llvm-svn: 1820
2002-03-06 17:16:43 +00:00
Chris Lattner 04805fa29c Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.

llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner f20671a6b6 When inlining basic blocks and instructions, give them a name!
llvm-svn: 1796
2002-02-25 00:31:02 +00:00
Chris Lattner ccb9e604de Handle more cases in the linker
llvm-svn: 1771
2002-02-18 19:05:15 +00:00
Chris Lattner 83d485b310 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner d5d56780e2 Convert xforms over to new pass structure.
llvm-svn: 1605
2002-01-31 00:45:11 +00:00
Chris Lattner 4f0f09757d Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
the ChangeAllocations.h header file.

llvm-svn: 1522
2002-01-22 00:13:51 +00:00
Chris Lattner ee965abc36 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.

llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner c940c536ab Rename SwapStructureContents -> IPO/SimpleStructMutation
Move MutateStructTypes.(cpp|h) -> IPO/MutateStructTypes.(cpp|h)

llvm-svn: 1510
2002-01-21 07:52:35 +00:00
Chris Lattner 0686e435d1 Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and
charactaristics.

Convert code to use it.

llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner 11439b2360 The proper prototype for malloc returns a pointer, not an unsized array
llvm-svn: 1463
2001-12-14 16:32:20 +00:00
Chris Lattner 2413b160ec Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner 3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner fb5ae02e1a Split the PHINode class out from the iOther.h file into the iPHINode.h file
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner 5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner 1416a2992e Remove debugging output
llvm-svn: 1383
2001-11-26 19:14:16 +00:00
Chris Lattner 4219baafb5 Support internal linkage
llvm-svn: 1382
2001-11-26 19:14:03 +00:00
Chris Lattner bd422e6686 Implement DCE of global values
llvm-svn: 1360
2001-11-26 18:42:17 +00:00
Chris Lattner 2cc6d418fa Support selectable structure transformations
llvm-svn: 1342
2001-11-26 16:59:10 +00:00
Chris Lattner f80013a917 Support mutation of array indexing
llvm-svn: 1341
2001-11-26 16:58:33 +00:00
Chris Lattner 02c43c8609 -cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
llvm-svn: 1312
2001-11-15 04:34:46 +00:00
Chris Lattner abf40ba6e8 Better heuristics for handling arrays
llvm-svn: 1296
2001-11-14 11:02:49 +00:00
Chris Lattner 1643e8ec7b Fix minor bug
llvm-svn: 1273
2001-11-12 20:13:04 +00:00
Chris Lattner 49ec72411e Initail checking of structure swapper
llvm-svn: 1248
2001-11-10 07:28:25 +00:00
Chris Lattner 5dada09565 Initial checkin of structure mutator
llvm-svn: 1246
2001-11-10 07:26:31 +00:00
Chris Lattner 7e89a616e6 Don't print spurious linking warnings about methods that are never used.
Cleanup ExprTypeConvert a bit.

llvm-svn: 1141
2001-11-05 19:43:10 +00:00
Chris Lattner 3084cb65ff Refactor code to share stuff
llvm-svn: 1127
2001-11-04 23:24:06 +00:00
Chris Lattner eb7b620d58 Fix cast instructions that end up in bad places in GCC output
llvm-svn: 1117
2001-11-04 07:40:51 +00:00