Commit Graph

13 Commits

Author SHA1 Message Date
Chris Lattner cf972ff7cb Fix typeo
llvm-svn: 17938
2004-11-18 04:31:10 +00:00
Chris Lattner cb0c9655bf Add ability to give hints to the overlaps routines.
llvm-svn: 17934
2004-11-18 03:47:34 +00:00
Chris Lattner 0624f95175 Add new advanceTo method
llvm-svn: 17932
2004-11-18 02:37:31 +00:00
Chris Lattner 7d92fc7e89 Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
llvm-svn: 17931
2004-11-18 01:34:44 +00:00
Chris Lattner a51f5eeac1 Rename some methods, use 'begin' instead of 'start', add new LiveInterval
iterator/begin/end members.

llvm-svn: 17930
2004-11-18 01:29:39 +00:00
Chris Lattner c8002d49e3 Make a method const, no functionality changes
llvm-svn: 15193
2004-07-25 06:23:01 +00:00
Alkis Evlogimenos e0ab16fe54 Remove implementation of operator= and make it private so that it is
not used accidentally.

llvm-svn: 15172
2004-07-24 18:55:15 +00:00
Alkis Evlogimenos cf72e7f854 Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.

llvm-svn: 15167
2004-07-24 11:44:15 +00:00
Chris Lattner 038747f5c0 Little stuff:
* Fix comment typeo
* add dump() methods
* add a few new methods like getLiveRangeContaining, removeRange & joinable
  (which is currently the same as overlaps)
* Remove the unused operator==

Bigger change:

* In LiveInterval, instead of using a boolean isDefinedOnce to keep track of
  if there are > 1 definitions in a particular interval, keep a counter,
  NumValues to keep track of exactly how many there are.
* In LiveRange, add a new ValId element to indicate which of the numbered
  values each LiveRange belongs to.   We now no longer merge LiveRanges if
  they are of differing value ID's even if they are neighbors.

llvm-svn: 15152
2004-07-24 02:52:23 +00:00
Chris Lattner b4acba49b1 Change addRange and join to be a little bit smarter. In particular, we don't
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.

Instead, if the inserted interval overlaps, just start merging.  The only time
we insert into the middle of the vector is when we don't overlap at all.  Also
delete blocks of live ranges if we overlap with many of them.

This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.

llvm-svn: 15141
2004-07-23 19:38:44 +00:00
Chris Lattner 60babd0431 New helper method
llvm-svn: 15138
2004-07-23 18:39:12 +00:00
Chris Lattner c96d299569 Instead of searching for a live interval pair, search for a location. This gives
a very modest speedup of .3 seconds compiling 176.gcc (out of 20s).

llvm-svn: 15136
2004-07-23 18:13:24 +00:00
Chris Lattner 78f62e37f3 Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
will soon be renamed) into their own file.  The new file should not emit
DEBUG output or have other side effects.  The LiveInterval class also now
doesn't know whether its working on registers or some other thing.

In the future we will want to use the LiveInterval class and friends to do
stack packing.  In addition to a code simplification, this will allow us to
do it more easily.

llvm-svn: 15134
2004-07-23 17:49:16 +00:00