Commit Graph

16427 Commits

Author SHA1 Message Date
Chris Lattner 223796ccf2 Convert postincrements to more efficient preincrements
llvm-svn: 81
2001-06-27 23:28:02 +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 eed707034c Add more notes
llvm-svn: 78
2001-06-27 23:24:50 +00:00
Chris Lattner f124461c30 Filter out some more stuff
llvm-svn: 77
2001-06-27 23:24:22 +00:00
Chris Lattner 01683cca32 Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable

llvm-svn: 76
2001-06-25 07:33:13 +00:00
Chris Lattner dbdaaef7d5 Implement induction variable injection!
llvm-svn: 75
2001-06-25 07:32:19 +00:00
Chris Lattner 31e23cdeb4 Renamed get.*Operator to create seeing that it would have to be qualified
with the classname anyways.

llvm-svn: 74
2001-06-25 07:31:31 +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 c3a6f546de A silly stupid test of the loop depth calculator was added. REMOVE in the
future.

llvm-svn: 72
2001-06-25 03:55:37 +00:00
Chris Lattner ed59025460 IntervalPartition: recode to use IntervalIterator to do all the work
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.

llvm-svn: 71
2001-06-25 03:55:04 +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 741aaad071 ValueHolder's aren't interseting to me anymore
llvm-svn: 67
2001-06-25 03:51:53 +00:00
Chris Lattner 601012721c New file due to the Intervals.h splitup
llvm-svn: 66
2001-06-24 04:07:44 +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 72bd8ccbac Add a useless phi for testing with InductionVariables stuff
llvm-svn: 64
2001-06-24 04:06:23 +00:00
Chris Lattner f64a8936e5 #include a different header due to Intervals.h splitting up
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner dec727e346 IntervalPartition & IntervalIterator classes have been split out into
their own .h files & .cpp file

llvm-svn: 62
2001-06-24 04:05:21 +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 4c16155c36 Prepare for split between Interval, IntervalIterator, and IntervalIPartition
llvm-svn: 60
2001-06-24 03:25:01 +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 eb717fc873 Added notes
llvm-svn: 58
2001-06-24 02:01:31 +00:00
Chris Lattner 4c4f178723 Implement a lot more functionality. Now loop invariant and linear
induction variables are correctly identified.

llvm-svn: 57
2001-06-22 02:24:38 +00:00
Chris Lattner 34b62a04b6 Interval::HeaderNode is now accessed thorugh an accessor function
llvm-svn: 56
2001-06-22 02:23:39 +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 4b94e23bd0 Add a space to the PHI node output code to make it look nicer
llvm-svn: 53
2001-06-21 05:29:56 +00:00
Chris Lattner b20a15d334 Moved printing code to the Assembly/Writer library.
Code now detects looping intervals

llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner d79faa35af Implement the new Interval::isLoop method
Implement destructor to free memory

llvm-svn: 51
2001-06-21 05:26:15 +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 c3dcb5bced Add a test case: an irreducible flow graph.
llvm-svn: 46
2001-06-21 03:00:25 +00:00
Chris Lattner 778de94723 Get rid of a silly printout that isn't needed right now
llvm-svn: 45
2001-06-20 23:09:39 +00:00
Chris Lattner a83a2cac31 Add note
llvm-svn: 44
2001-06-20 23:09:27 +00:00
Chris Lattner 4f67265ba5 New test case
llvm-svn: 43
2001-06-20 23:05:53 +00:00
Chris Lattner f86e38e452 Add capability to print a derived interval graph
llvm-svn: 42
2001-06-20 22:44:38 +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 28ae5cbcb5 Initial Checking of Interval handling code
llvm-svn: 39
2001-06-20 20:09:55 +00:00
Chris Lattner ac6d4fd1b1 Add stub for induction variable code
llvm-svn: 38
2001-06-20 19:27:34 +00:00
Chris Lattner a6b0157879 Add a more complex test case
llvm-svn: 37
2001-06-20 19:27:18 +00:00
Chris Lattner d286a997d3 Add a test case for interval code
llvm-svn: 36
2001-06-20 19:27:11 +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 f3a34d600b Add a note
llvm-svn: 33
2001-06-20 19:26:00 +00:00
Chris Lattner 901dd7eadd Filter out more stuff I don't want all the time
llvm-svn: 32
2001-06-20 19:25:53 +00:00
Chris Lattner 03d5267ba1 Removed silly test code
llvm-svn: 31
2001-06-13 19:55:50 +00:00
Chris Lattner f284ac55f6 Added options to print out basic blocks in a variety of different orderings
as a testcase for cfg iterators.

llvm-svn: 30
2001-06-13 19:55:41 +00:00
Chris Lattner 5ba5f88c35 Updates to work with new cfg namespace
llvm-svn: 29
2001-06-13 19:55:22 +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 2b82b181a2 Updates to support
* Changes in PHI node structure
* We now run DCE after inlining because it helps clean up LOTS of inlining
  gunk.

llvm-svn: 26
2001-06-11 15:05:02 +00:00
Chris Lattner 874ddadf72 Updates to support
* Changes in PHI node structure

llvm-svn: 25
2001-06-11 15:04:40 +00:00
Chris Lattner 931ef3bf05 Updates to support
* Changes in PHI node structure
* Change to PHI syntax

llvm-svn: 24
2001-06-11 15:04:20 +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 7399a10ad5 Update documentation to reflect:
* Changes in PHI node structure
* Intentions for load instruction to work with structures

llvm-svn: 22
2001-06-11 15:03:43 +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 9d905c95e0 I actually got something done
llvm-svn: 20
2001-06-08 21:29:35 +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 4ddc451fb3 Added a stupid testcase for iterators.
llvm-svn: 17
2001-06-08 00:35:25 +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 7e0d6e05ac Updated to work with new CFG.h file.
llvm-svn: 15
2001-06-07 21:18:45 +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 cc45ae3d49 inlining can change methods a second time, so don't rerun inliner when testing for
differences in optimizations

llvm-svn: 12
2001-06-07 17:00:00 +00:00
Chris Lattner e6c4ea9861 Add extra method to PHI node class
llvm-svn: 11
2001-06-07 16:59:37 +00:00
Chris Lattner d821c2af37 Significant rework. DCE is still not done (see #ifdef'd out parts)
but at least the stuff that is checked in, now works.

llvm-svn: 10
2001-06-07 16:59:26 +00:00
Chris Lattner a2f01878b7 Fixed to print slightly differently. Added use counts for labels
llvm-svn: 9
2001-06-07 16:58:55 +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 2cafe60b3b Extra comments
llvm-svn: 7
2001-06-07 16:58:13 +00:00
Chris Lattner d71f87537c Now does not include instruction files...
llvm-svn: 6
2001-06-06 20:41:51 +00:00
Chris Lattner 2f7c963559 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00