Commit Graph

2550 Commits

Author SHA1 Message Date
Tanya Lattner
5714f44fdf Adding friend MSSchedule for ModuloScheduling pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 18:57:38 +00:00
Chris Lattner
c2df129da9 Fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 18:17:36 +00:00
Chris Lattner
f1fccfd6a8 Expose breakcriticaledges as a functionpass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15370 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 10:02:24 +00:00
Chris Lattner
36c29dbbee New pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15367 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 09:59:14 +00:00
Chris Lattner
f24d879520 Expose some helpful methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 09:59:04 +00:00
Alkis Evlogimenos
e4d32f6cf9 Change signature to take two basic blocks: the target and the one
where the goto will be appended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15361 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 09:37:52 +00:00
Alkis Evlogimenos
0cad9f53b1 Doxygenify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 08:57:27 +00:00
Alkis Evlogimenos
096f58b09a Remove const from iterators passed by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 08:55:23 +00:00
Alkis Evlogimenos
905f7af59c Add declarations for insertGoto and reverseBranchCondition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15358 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 08:52:30 +00:00
Chris Lattner
2441d6a895 Add new M_BARRIER_FLAG flag, and isBarrier() method to TargetInstrInfo
opCode -> Opcode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 02:06:48 +00:00
Chris Lattner
dc4a4922d3 Add some machine CFG related stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-31 01:59:11 +00:00
Misha Brukman
b714fdccdb Enable compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-30 14:33:07 +00:00
Chris Lattner
524d8f1722 Check in some useful helper routines for doing ML-style pattern matching on
the LLVM IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15341 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-30 07:45:00 +00:00
Chris Lattner
ff8c1b3dc6 I demand the ability to say 'if (isa<Value>(V))'!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-30 06:59:15 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Brian Gaeke
3638e9918c Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15318 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 04:22:30 +00:00
Brian Gaeke
b2f30a3792 TargetInstrInfo::hasOperandInterlock() is always true, because it is
never overridden by any target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15308 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-28 19:24:48 +00:00
Brian Gaeke
de0ceb58ba ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its
only user.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 21:43:38 +00:00
Brian Gaeke
1b4aeb5cec As it happens, none of these TargetInstrInfo methods which are only
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15277 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:22 +00:00
Brian Gaeke
96d4bf7aee Make the create...() functions for some of these passes return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15276 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:21 +00:00
Chris Lattner
1c2b1294d3 Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15257 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 04:00:54 +00:00
Chris Lattner
8a1478b6d7 Fix out of date comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15256 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 03:04:30 +00:00
Chris Lattner
558cb5f4a1 New methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15229 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 05:50:09 +00:00
Reid Spencer
641588bb3e Reduce the footprint of the dependent library interface
Document the dependent library interface
Constify the std::string& parameters in the dep lib interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15215 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:28:19 +00:00
Reid Spencer
af8ea13dd6 bug 263:
The necessary changes to module in order to support both target triples and
a list of dependent libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15207 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 17:52:27 +00:00
Reid Spencer
7105f4ae8c bug 402:
A new set of block identifiers has been added for version 1.3 so that the
range of values can fit within 5 bits. This aids in halving the size of
block headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 17:50:00 +00:00
Chris Lattner
f90fcaf572 Add back() and pop_back() methods to SetVector
Move clear to the end of the class
Add assertions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15203 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 11:07:02 +00:00
Chris Lattner
5c88260f70 Add support for free instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 07:57:37 +00:00
Chris Lattner
d3a205eab5 Make a method const, no functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 06:23:01 +00:00
Alkis Evlogimenos
3f86193cd2 Remove implementation of operator= and make it private so that it is
not used accidentally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 18:55:15 +00:00
Alkis Evlogimenos
a1613db62f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15167 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 11:44:15 +00:00
Chris Lattner
62c91fcda5 Provide timeout values to all abstract interpreters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 07:48:50 +00:00
Chris Lattner
de0213b9f5 Add support for killing the program if it executes for too long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15158 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 07:41:31 +00:00
Chris Lattner
4df98e546d Completely eliminate the intervals_ list. instead, the r2iMap_ maintains
ownership of the intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 03:32:06 +00:00
Chris Lattner
0f4c076140 Add a new differingRegisterClasses method
make overlapsAliases take pointers instead of references
fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 02:53:43 +00:00
Chris Lattner
abf295fc6c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 02:52:23 +00:00
Chris Lattner
f35fef7060 More minor changes:
* Inline some functions
 * Eliminate some comparisons from the release build

This is good for another .3 on gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15144 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 21:24:19 +00:00
Chris Lattner
b26c215c05 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15141 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 19:38:44 +00:00
Chris Lattner
e6ad392802 New helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15138 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:39:12 +00:00
Chris Lattner
4dc54ae0d9 Speedup debug builds a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:38:52 +00:00
Chris Lattner
ebd7e6c54d 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 18:13:24 +00:00
Chris Lattner
a3b8b5c0e0 Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 17:56:30 +00:00
Chris Lattner
fb449b9ea5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 17:49:16 +00:00
Chris Lattner
ec2bc64505 Improve comments a bit
Use an explicit LiveRange class to represent ranges instead of an std::pair.
This is a minor cleanup, but is really intended to make a future patch simpler
and less invasive.

Alkis, could you please take a look at LiveInterval::liveAt?  I suspect that
you can add an operator<(unsigned) to LiveRange, allowing us to speed up the
upper_bound call by quite a bit (this would also apply to other callers of
upper/lower_bound).  I would do it myself, but I still don't understand that
crazy liveAt function, despite the comment. :)

Basically I would like to see this:
    LiveRange dummy(index, index+1);
    Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                ranges.end(),
                                                dummy);

Turn into:
    Ranges::const_iterator r = std::upper_bound(ranges.begin(),
                                                ranges.end(),
                                                index);


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 08:24:23 +00:00
Chris Lattner
fe1630b43e Force coallescing of live ranges that have a single definition, even if they
interfere.  Because these intervals have a single definition, and one of them
is a copy instruction, they are always safe to merge even if their lifetimes
interfere.  This slightly reduces the amount of spill code, for example on
252.eon, from:

 12837 spiller               - Number of loads added
  7604 spiller               - Number of stores added
  5842 spiller               - Number of register spills
 18155 liveintervals         - Number of identity moves eliminated after coalescing

to:

  12754 spiller               - Number of loads added
   7585 spiller               - Number of stores added
   5803 spiller               - Number of register spills
  18262 liveintervals         - Number of identity moves eliminated after coalescing

The much much bigger win would be to merge intervals with multiple definitions
(aka phi nodes) but this is not that day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 05:26:05 +00:00
Misha Brukman
e3fa53ee4d * Add a BoolAlignment field to TargetData, default is 1 byte
* Fix spacing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15119 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 01:08:13 +00:00
Chris Lattner
3ede6adf18 New prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15102 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 08:07:30 +00:00
Chris Lattner
b8a31ace2c Clean up reference counting to stop "leaking" alias sets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15099 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 07:58:18 +00:00
Brian Gaeke
7d02766247 Include <iostream> here, because most people using DEBUG() want to use std::cerr too.
This means that users of this file do not also need to include <iostream>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15088 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 20:50:22 +00:00
Alkis Evlogimenos
7b32639362 Add greater_ptr functor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15070 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 08:38:06 +00:00