Commit Graph

20070 Commits

Author SHA1 Message Date
Chris Lattner 5f904ea839 Made it not inline
llvm-svn: 174
2001-07-12 23:35:11 +00:00
Chris Lattner 805c1514e4 Add DebugValue global function
llvm-svn: 173
2001-07-12 23:33:53 +00:00
Chris Lattner 875710c4a1 hasSideEffects should be marked virtual
stores and free's have sideeffects

llvm-svn: 170
2001-07-09 19:38:26 +00:00
Chris Lattner 006106973f Fix stupid typo
llvm-svn: 168
2001-07-09 16:54:29 +00:00
Chris Lattner 62ecb4a137 Implementation of Store & GetElementPtr
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner d8bebcd517 Implemented shl, shl, & load instructions
llvm-svn: 161
2001-07-08 21:10:27 +00:00
Chris Lattner 49c643262e Moved Cast from being a Unary instruction to being an "Other" instruction
llvm-svn: 160
2001-07-08 19:03:27 +00:00
Chris Lattner b418152221 Add a new "addOperand" method to User.
llvm-svn: 158
2001-07-08 18:38:18 +00:00
Chris Lattner a682182f64 Neg instruction removed. Cast instruction implemented.
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner 87d478287b Convert BinaryOperand and UnaryOperator to only take instruction types of
the appropriate enum

llvm-svn: 153
2001-07-07 20:17:23 +00:00
Chris Lattner b1ca9cbceb Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType

llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner 48d80e18f9 Devirtualize User::dropAllReferences
llvm-svn: 151
2001-07-07 19:00:36 +00:00
Chris Lattner a999afa182 Remove dtor's that simply call dropAllReferences
llvm-svn: 150
2001-07-07 18:42:52 +00:00
Chris Lattner a073acb22d Changed the fundemental architecture of Operands for Instructions. Now
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before.  Getting an operand no longer requires
a virtual function call.

WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!

llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner a6c8b30e9d New file, includes method to merge exit nodes together
llvm-svn: 141
2001-07-06 16:57:52 +00:00
Chris Lattner 5afd71b109 * Add a DominatorBase base class to maintain root of Dominator info
* Implement post dominator support

llvm-svn: 140
2001-07-06 16:57:21 +00:00
Chris Lattner 719d5b2899 * Added comments
* Made iterators inherit from appropriate iterator base class
* Abstracted out graphs from depth first iterator
* Add "Inverse" traversal of CFG

llvm-svn: 139
2001-07-06 16:56:17 +00:00
Chris Lattner 6bf3e9512b IntervalPartition was changed to inherit from vector<Interval*> instead of
contain it so that it would have full iterator access without much work.

llvm-svn: 132
2001-07-03 15:28:08 +00:00
Chris Lattner f9bd02a89a Checkin of new Analysis result printing header
llvm-svn: 130
2001-07-03 05:37:26 +00:00
Chris Lattner a2bb73e41f Remove code for printing out Analysis data structures. It got moved
llvm-svn: 128
2001-07-03 05:35:52 +00:00
Chris Lattner 7edbdd4485 Update documentation a bit, correct #include guard
llvm-svn: 127
2001-07-03 05:35:23 +00:00
Chris Lattner 6dccb6576c Enable printing of dominator related information.
Theis will eventually be moved!

llvm-svn: 123
2001-07-02 05:45:30 +00:00
Chris Lattner 12393e5c5a Add new anaysis routines for building dominator related information
llvm-svn: 122
2001-07-02 05:45:17 +00:00
Chris Lattner b44c6a4b47 Addition of 'deleter' function.
llvm-svn: 121
2001-07-02 01:09:41 +00:00
Chris Lattner 9dd7120a2a Add prototypes for ADCE pass
llvm-svn: 115
2001-06-30 06:37:16 +00:00
Chris Lattner b0810f37d3 Rename DoSparseConditionalConstantProp to DoSCCP
llvm-svn: 114
2001-06-30 06:37:01 +00:00
Chris Lattner c10245352c Add a new pop_back() method
llvm-svn: 111
2001-06-30 04:35:21 +00:00
Chris Lattner 6f70fda2f0 The ConstRules class got moved to the opt namespace
llvm-svn: 110
2001-06-30 04:35:01 +00:00
Chris Lattner a6e2316d03 Add a reduceApply method
llvm-svn: 109
2001-06-30 04:34:42 +00:00
Chris Lattner 9e497a01f7 Split AllOpts.h into lots of little .h files.
llvm-svn: 108
2001-06-30 04:34:07 +00:00
Chris Lattner 96bb2fb5a2 Added prototype for ConstantFoldTerminator
llvm-svn: 105
2001-06-29 23:56:00 +00:00
Chris Lattner 17556f82d0 Added new removePredecessor method prototype
llvm-svn: 99
2001-06-29 05:21:42 +00:00
Chris Lattner 4cee8d8ffb Miscellaneous cleanups:
* Convert post to pre-increment for for loops
  * Use generic programming more
  * Use new Value::cast* instructions
  * Use new Module, Method, & BasicBlock forwarding methods
  * Use new facilities in STLExtras.h
  * Use new Instruction::isPHINode() method

llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner 7798de1382 * Move stuff around a bit.
* Add reduce_apply_bool

llvm-svn: 88
2001-06-27 23:32:12 +00:00
Chris Lattner 4400f659f1 Add instructions to fold unary and binary instructions.
llvm-svn: 87
2001-06-27 23:31:34 +00:00
Chris Lattner 780cfa5381 * Use the new reduce_apply_bool template
* Expose Constant Pool Merging from ConstantProp.cpp
* Include definitions for SCCP pass
* InstListType is not neccesary anymore

llvm-svn: 86
2001-06-27 23:31:14 +00:00
Chris Lattner a32c04fcb1 getBasicBlocks() is not needed anymore for reading Method data
llvm-svn: 85
2001-06-27 23:30:11 +00:00
Chris Lattner 608fe88627 Added methods to make dealing with switches and branch instructions
more tolerable.

llvm-svn: 84
2001-06-27 23:29:41 +00:00
Chris Lattner c112b3de44 Minor formating changes
llvm-svn: 83
2001-06-27 23:29:21 +00:00
Chris Lattner 8c2076b84e Make a new GenericBinaryInst class, instead of providing lots of silly
little classes.

llvm-svn: 82
2001-06-27 23:28:50 +00:00
Chris Lattner 642a3063da Add a new slew of functions to allow dynamic_cast<> like operation for
upcasting Value's to their subclasses.

llvm-svn: 80
2001-06-27 23:27:42 +00:00
Chris Lattner 0972270aaf Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
and getInstList() are obsolete... except for when modifying those lists.  This
makes code much more succinct and to the point.

llvm-svn: 79
2001-06-27 23:26:41 +00:00
Chris Lattner 7221d33514 * Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder

llvm-svn: 73
2001-06-25 07:31:05 +00:00
Chris Lattner 554c161f1f Add a helper function bind_obj
llvm-svn: 70
2001-06-25 03:54:32 +00:00
Chris Lattner 3fe4504c28 Big changes. Interval*.h is now more or less finalized. IntervalPartition
is recoded to use IntervalIterators.  IntervalIterators can now maintain
their own memory or let an external entity do it.

Loop depth is a new user of IntervalPartition for calculating the loop
nesting depth of a basic block

TODO: add IntervalPartition capability to split intervals between the looping
portion and the "tail" portion.

llvm-svn: 69
2001-06-25 03:54:14 +00:00
Chris Lattner c17f93528b CFG.h: change the iterator tag
Method.h: Add an iterator type.

llvm-svn: 68
2001-06-25 03:52:19 +00:00
Chris Lattner db1d8bdf34 New files due to the Intervals.h splitup
llvm-svn: 65
2001-06-24 04:07:37 +00:00
Chris Lattner 658a50fe1b IntervalPartition & IntervalIterator classes have been split out into
their own .h files

llvm-svn: 61
2001-06-24 04:05:09 +00:00
Chris Lattner 2e2e27a1af Addition of IntervalIterator. Preparing for rename of Intervals.h to
Interval.h, IntervalPartition.h, and IntervalIterator.h

llvm-svn: 59
2001-06-24 03:22:59 +00:00
Chris Lattner 97c3480075 Add comments
Interval::HeaderNode is now accessed thorugh an accessor function

llvm-svn: 55
2001-06-22 02:23:27 +00:00
Chris Lattner dc36e44adc Add accessor methods to binary/unary operators
Add extra helper methods to PHI class

llvm-svn: 54
2001-06-22 02:21:42 +00:00
Chris Lattner d52706daa8 New header file defined with neeto utilities put in one place
llvm-svn: 50
2001-06-21 05:25:51 +00:00
Chris Lattner e3b1bacb6e Modified to use the new reduce_apply algorithm
llvm-svn: 49
2001-06-21 05:25:33 +00:00
Chris Lattner 570f10ad47 * Added capability to print out an interval
llvm-svn: 48
2001-06-21 05:25:09 +00:00
Chris Lattner d893c3300a * Added comments
* Added prototype for new Interval::isLoop method
* Added destructor to free memory
* Added IntervalPartition::isDegeneratePartition method
* Added IntervalPartition::size() method

llvm-svn: 47
2001-06-21 05:24:46 +00:00
Chris Lattner 5035efaeda Add capability to build a derived interval graph
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner 778702f26c Factor the predeclarations of the CFG.h functionality into a seperate, new header
file: CFGdecls.h

This allows the addition of BasicBlock::(pred|succ)_iterator typedefs.

llvm-svn: 40
2001-06-20 22:44:16 +00:00
Chris Lattner acbaaf7bf2 Add an optimization stub
llvm-svn: 35
2001-06-20 19:26:21 +00:00
Chris Lattner 6cc066490b New file: Interval analysis support
llvm-svn: 34
2001-06-20 19:26:12 +00:00
Chris Lattner 62b7632c3c Implement support for writing VCG format output
llvm-svn: 28
2001-06-13 19:55:13 +00:00
Chris Lattner 78f524c613 Move contents to the cfg namespace.
Implement post order and reverse post order iterators

llvm-svn: 27
2001-06-13 19:55:02 +00:00
Chris Lattner a653daaac2 Updates to support
* Changes in PHI node structure
* Fix to Predecessor iterator

llvm-svn: 23
2001-06-11 15:04:06 +00:00
Chris Lattner 5f46e8c9da Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class).

llvm-svn: 21
2001-06-08 21:30:13 +00:00
Chris Lattner f5d87f9e56 Beautify the source a bit.
llvm-svn: 19
2001-06-08 21:07:26 +00:00
Chris Lattner f2ff0eac5b Include support for reverse iteration.
llvm-svn: 18
2001-06-08 20:52:54 +00:00
Chris Lattner 33455b2a23 Added reverse depth first capability, fixed depth first capability
llvm-svn: 16
2001-06-08 00:35:14 +00:00
Chris Lattner fe59ab9828 Moved iterators to the new CFG.h file.
llvm-svn: 14
2001-06-07 21:18:35 +00:00
Chris Lattner b151cb40ac New file
llvm-svn: 13
2001-06-07 21:18:08 +00:00
Chris Lattner e358b22776 Fixes for BB iterators, additional methods added for DCE pass
llvm-svn: 8
2001-06-07 16:58:36 +00:00
Chris Lattner 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00