Commit Graph

2680 Commits

Author SHA1 Message Date
Chris Lattner
800ade1e19 Add missing \t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:48:34 +00:00
Chris Lattner
46d6126e66 Add some hooks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:36:27 +00:00
Chris Lattner
2c2475296d Allow an arbitrary prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:06:37 +00:00
Chris Lattner
af2bf0ab30 We now allow targets to use any prefix they want for global symbols. Lets
hear it for ".".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:06:19 +00:00
Chris Lattner
f1cb795394 Some asmweriters want an _ prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 02:28:12 +00:00
Chris Lattner
a80ba71efe Initial implementation of the asmprinter base class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 23:15:22 +00:00
Chris Lattner
2fcd451a5e Fit into 80 lines, add a gross hack for MachineFunctionInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15832 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 22:35:26 +00:00
Chris Lattner
5a6074053d These files now live in lib/Target/SparcV9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15831 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 21:56:15 +00:00
Reid Spencer
d771c5340a Back out include/llvm/System changes until a satisfactory solution can
be determined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15817 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 07:10:09 +00:00
Chris Lattner
303603f758 Flags and TSFlags were (thankfully) never used, so remove them. But wait,
not so fast, add some fields for spill slot size and alignment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15803 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 01:07:53 +00:00
Chris Lattner
f02b37da6f Add new TargetRegisterClass::contains method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:19:38 +00:00
Chris Lattner
da34645b2b Implement a long overdue FIXME, by changing these methods to return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15778 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:14:19 +00:00
Chris Lattner
913cbd65dc Remove helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15776 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:02:36 +00:00
Chris Lattner
ed6655920f Eliminate the RegisterClass argument, since it can easily be derived from
the regno


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 21:55:29 +00:00
Alkis Evlogimenos
8c9b4de574 Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15766 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 09:18:55 +00:00
Reid Spencer
d5cda87995 First version of a class to represent the notion of an operating system
path to a file or directory and some rudimentary operations on them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15762 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 08:13:01 +00:00
Reid Spencer
da5f2abcb7 First version of a class to represent operating system and lib/System
error codes in a platform independent way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15761 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 08:12:14 +00:00
Nate Begeman
5de0f7aa14 Elminiate MachineFunction& argument from eliminateFrameIndex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15736 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-14 22:00:10 +00:00
Reid Spencer
1e13fd23d3 Allow any cl::opt to use the method getPosition() to retrieve the option's
absolute position on the command line. Similarly allow any cl::list to
use the method getPosition(n) to retrieve the absolute position of the nth
option in the list. This provides support for two things: (a) options like
-l that are actually positional and their order of occurrence matters when
they are intermixed with positional arguments like "a.o"; and (b) options
like -x LANG which affect only the positional arguments that come after
the option. In both cases, knowing the absolute position of a given option
helps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15725 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-13 19:47:30 +00:00
Chris Lattner
45df557348 Add a pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15713 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-13 03:03:44 +00:00
Chris Lattner
09431e187f Allow targets to specify particular stack slots that certain physregs must
be spilled into.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15702 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 19:01:55 +00:00
Chris Lattner
28690ea285 Remove dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15698 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 18:37:15 +00:00
Chris Lattner
484577a870 Remove dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 17:58:27 +00:00
Misha Brukman
80b90cd191 Add new constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15632 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 23:10:21 +00:00
Chris Lattner
af8a42445c Add standard print/dump methods to CallGraph classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15569 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-08 03:27:49 +00:00
Chris Lattner
ff4c183790 Move method out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15497 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 18:49:52 +00:00
Alkis Evlogimenos
706515727c Clean up whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 09:46:56 +00:00
Alkis Evlogimenos
1a8ea01f01 Convert indentation to 2 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 09:46:26 +00:00
Alkis Evlogimenos
3e0ef89279 Remove uneeded getValues() functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15488 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:47:21 +00:00
Brian Gaeke
93ad2cf910 getResultPos() is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15484 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:06:30 +00:00
Brian Gaeke
826b19b4ec These headers have been moved/merged into other files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15477 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:37:56 +00:00
Chris Lattner
b6197611d5 New methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 04:45:42 +00:00
Chris Lattner
7c136c3f8b Minor efficiency improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15461 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 04:45:29 +00:00
Chris Lattner
13b03586d2 Now that ConstantPointerRef is gone, it is the case that all operands of constants
are themselves constants.  This should allow us to reduce a significant amount
of casting in the sourcebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 02:43:00 +00:00
Chris Lattner
0f42ba6777 Add a special version of getType for ConstantPointerNull, exposing the fact
that all Null pointers have pointer type


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15458 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 02:42:17 +00:00
Chris Lattner
064e9a9ef8 The Type* is redundant with the TypeSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 00:18:37 +00:00
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
Alkis Evlogimenos
910d0d6066 Add Iterative scan register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15068 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 08:24:35 +00:00
Chris Lattner
877ad7d80b Add a bunch of new functionality, primarily to do with removing aliasing
pointers from an AST.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15065 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 07:03:57 +00:00
Chris Lattner
12c1155403 Make the AST interface a bit richer by returning whether an insertion caused
an insertion or not (because the pointer set already existed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 05:18:04 +00:00
Brian Gaeke
d59a64797b Regenerated with autoconf/autoheader 2.57
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:33:58 +00:00
Brian Gaeke
a7d03b466a Add prototypes for platform-independent wrappers for isinf().
Patch contributed by Bill Wendling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15055 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:15:14 +00:00
Brian Gaeke
c64d41e706 Regenerated with autoheader-2.57.
Patch contributed by Bill Wendling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:15:02 +00:00
Misha Brukman
c5f9d8c630 Use C++-style <cstdio> instead of C-style <stdio.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15042 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-20 16:14:06 +00:00
Misha Brukman
913e1b4bdd Dump the old-fashioned C-style <ctype.h> in favor of new `C++'-style <cctype>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-20 02:18:25 +00:00
Misha Brukman
497b52f381 isupper() and tolower() are declared in <ctype.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15016 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-20 00:52:16 +00:00
Misha Brukman
a32355bb8e Tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15010 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 21:22:02 +00:00
Misha Brukman
049c48f1ad Convert tabs to spaces; fix name of function in assert() description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 21:11:45 +00:00
John Criswell
7ed43ad3ab Added support for stdint.h. It is now automatically included by
DataTypes.h.  So far, it doesn't seem to break Linux, Solaris, or MacOS X.
This should automatically include it for those people who need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 16:12:29 +00:00
Chris Lattner
1c5c0444f1 Split joinIntervals into two methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 14:08:10 +00:00
Chris Lattner
c49c872a1a Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 13:28:39 +00:00
Chris Lattner
81e26ce1da Delete 4 methods, make clients use hte mark* methods directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14999 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 07:52:25 +00:00
Chris Lattner
74de8b1b26 There is no need to store the MBB along with the MI any more, we can now
ask instructions for their parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 07:04:55 +00:00
Chris Lattner
472405e0dc Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:55:21 +00:00
Chris Lattner
73d4adfb1e Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14996 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:26:50 +00:00
Chris Lattner
6b92906010 fill comment to 80 cols
remove map that is not needed


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14988 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 02:13:59 +00:00
Chris Lattner
52eb13c58e inline classof implementations, eliminate use of virtual methods.
classof<ConstantXXX> is now MUCH faster than it used to be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:58:47 +00:00
Chris Lattner
9344063f5f eliminate isConstantExpr, changes to isa<Constant> implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:58:02 +00:00
Chris Lattner
66a434692b Add new enum entries for ConstantAggregateZeroVal/ConstantExprVal and
rename ConstantVal to SimpleConstantVal


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:57:40 +00:00
Chris Lattner
f962ac798a Change method to return void. Inline dtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:55:19 +00:00
Chris Lattner
e30ab88209 Remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14981 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 23:44:15 +00:00
Reid Spencer
b0104d07ee Add a missing space to align comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:56:58 +00:00
Reid Spencer
8cf4c8cd05 Fix typeos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:55:49 +00:00
Reid Spencer
31c0da4483 bug 122:
remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14926 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:36:58 +00:00
Reid Spencer
1488b34be5 bug 122:
- Add ValueListTy to TypeTy so that the bcreader can have its own User
  category that won't get factored into any optimizations or cleanup.
- Correct an isa_impl to correctly include GlobalValue now that it isa
  Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14925 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:34:47 +00:00
Reid Spencer
e3d19aac69 bug 122:
Remove redundancy in User::classof(Value*); GlobalValue isa Constant now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14924 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:32:11 +00:00
Reid Spencer
3e7bb400bf Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14923 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:30:45 +00:00
Reid Spencer
c6c981d643 bug 122:
We don't need to keep track of CPRs any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14922 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:30:11 +00:00
Reid Spencer
efd5dd80c9 bug 122:
Now that GlobalVariable is a constant (via derivation from GlobalValue),
override the replaceUsesOfWithOnConstant method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14921 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:29:46 +00:00
Reid Spencer
118c091fd7 bug 122:
- derive from Constant
- declare needed overrides from Constant class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14920 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:28:28 +00:00
Reid Spencer
355b0d88cb ****** ABOLISH ConstantPointerRef *****
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:26:57 +00:00
Reid Spencer
e2643aa9df Extend constructor so that it can support GlobalValue's (with names).
Make GlobalValue a "classof" Constant
Fix the classof(Value*) to include GlobalValue's


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14918 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:26:12 +00:00
Reid Spencer
d25e6cd128 Constant value not needed after CPR's disappear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14917 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:23:30 +00:00
Reid Spencer
8b67f54767 Added a README to point users to the documentation on the design of this
library which is a prerequisite for maintaining the library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14909 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 08:39:53 +00:00
Chris Lattner
bc10c3b6c3 link.h causes problems on some platforms and is not needed on solaris, where
the comment came from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14905 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 03:09:12 +00:00
Alkis Evlogimenos
8e9b219b67 Add convinience constructor for function calls with two args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 12:04:28 +00:00
Chris Lattner
dcb115bc82 Add a new macro to be used for the end of enum lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:01:05 +00:00
Chris Lattner
5e87754250 Give SetVector range support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 08:18:31 +00:00
Chris Lattner
80d94b88e1 Final fix for PR341: eliminate operator<<(ostream, Value*). Clients should
now send references to ostreams instead of pointers.  Sending pointers to
ostreams will print their addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:54:36 +00:00
Chris Lattner
0a8e8e1a4e Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:31 +00:00
Chris Lattner
94009a5954 Fix for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14846 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:50:38 +00:00
Chris Lattner
654b710527 Yeah, how about those 'primative' types huh?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14836 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 01:15:53 +00:00
Chris Lattner
ec90d8f80d Make PATypeHolder and friends return non-const pointers to the types they
hold.  Because types are basically immutable anyway, they should not be
referenced as "const Type*" everywhere.  Just "Type*" should suffice!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14824 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 20:10:26 +00:00
Chris Lattner
b757f160fc * Change code to use a static_cast instead of reinterpret_cast
* Add comments
* Add two new gep ctors for the very common case of creating a two operand
  GEP instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14820 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 18:13:54 +00:00
Chris Lattner
c78631f0e2 Add a helper method. The StructType element is completely redundant in most
cases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14777 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:36:08 +00:00
Chris Lattner
268f2583b9 Add a missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:25:33 +00:00
Chris Lattner
85e4eb6dc0 Fix warning compiling with VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14772 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:25:04 +00:00
Chris Lattner
bbd913bb6d Implement a new method useful for things like the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14768 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 01:17:52 +00:00
Chris Lattner
2845ece825 Add a new listener class for things that want to be informed about new
targets that are loaded


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14758 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 06:02:59 +00:00
Chris Lattner
635ffcdf58 Delete the allocate*TargetMachine functions. Move options to a header file
that makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:15:52 +00:00
Chris Lattner
cbc74123d8 Add a new TargetNameParser class, which is useful for parsing options.
Add two methods which are useful for autoselecting targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 03:59:46 +00:00
Chris Lattner
6a4dd24a99 Provide better support for pointer-valued command line arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14746 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 03:18:30 +00:00
Chris Lattner
9f27ede92d First cut at TargetMachineRegistry and RegisterTarget classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14742 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:43:43 +00:00
Chris Lattner
a51e273a76 Add two new "virtual static" methods to the TargetMachine class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14741 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:43:07 +00:00
Chris Lattner
170d3af552 Add a new header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14737 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 01:03:57 +00:00
Chris Lattner
20d20fc77d Removed unneeded forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14727 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 17:02:57 +00:00
Chris Lattner
36002e43ec Remove unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14726 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 16:48:13 +00:00
Chris Lattner
57cd1ff463 Eliminate the UID field in the Type class, bringing it down to 28 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14709 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 22:31:37 +00:00
Chris Lattner
ddc49d6121 Add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14705 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 22:09:07 +00:00
Reid Spencer
800473c8df Get rid of some cruft in the insert method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14704 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 21:50:33 +00:00
Reid Spencer
4bb2867bc1 First version of a vector with uniqueness constraints (or a set with
deterministic, insertion-order iteration).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14702 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 19:36:21 +00:00
Misha Brukman
0f54f19f29 Fix spelling of `equivalent'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14697 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 17:45:18 +00:00
Chris Lattner
e1d6799661 isSigned/isUnsigned/isInteger methods do not need to be virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14694 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 17:29:36 +00:00
Chris Lattner
c29af0084f Update comment.
Remove unused forward decl of Value.h
Make Type 32 bytes instead of 36 bytes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14692 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 16:09:38 +00:00
Chris Lattner
e2b4ae9d93 This file uses the Value class without a forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 15:54:29 +00:00
Alkis Evlogimenos
71bf404e9b Add viewCFG() and viewCFGOnly() APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14679 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 00:47:58 +00:00
Chris Lattner
8adbec89ce Headers moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:35:22 +00:00
Chris Lattner
7ff5daa0b6 All of these now live in the DataStructure directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14664 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:32:53 +00:00
Chris Lattner
6c49989b3e Move DSA headers into Analysis/DataStructure to make it more obvious
what is implemented by the DataStructure library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14662 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:29:26 +00:00
Chris Lattner
efffdc9408 As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken.  The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.

As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call.  This fixes some obscure bugs
handling non-forwarded node handles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14660 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:12:52 +00:00
Reid Spencer
ba466362c4 Remove definition and use of OtherVal enumerator. This just fixes a thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14634 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 01:30:36 +00:00
Reid Spencer
e0bc0c1822 Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
that needs it after the Type != Value changes (bug 122).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14605 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:36:31 +00:00
Reid Spencer
1847444e0c Make all the virtual function (except destructor) inline so there are
default implementations without taking up a ton of space in a .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14603 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:29:56 +00:00
Reid Spencer
ed3d16e443 Add a new, compatible, interface function for writing types as operands.
This is necessary because Types are no longer Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:59:05 +00:00
Reid Spencer
2d59de545a Added #include <iostream> since this header is no longer picked up from
the Value.h header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:58:20 +00:00
Reid Spencer
da8440a6ae - Remove enumerator TypeVal since Values can't be types any more
- Remove isa_impl relationship between Types and Values
- Add OtherVal so "other" users can interact with Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14596 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:52:28 +00:00
Reid Spencer
88bdcd5d56 There is no longer a "Type" primitive type because Values and Types are
now distinct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14595 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:50:43 +00:00
Reid Spencer
9d625274ea Constify usage of Type* on the interface to ensure SymbolTable doesn't
modify types (it never should). Clean up some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14594 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:49:41 +00:00
Reid Spencer
69e9abbb03 Remove all of the classof(const Value*) methods of the derived types since
the Type base class no longer derives from Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14593 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:48:27 +00:00
Reid Spencer
e753e3b329 Make Type have no base classes. Previously it inherited Value. Also
removed the TypeTyID and TypeTy members so that the notion of the
"Type Type" is no longer present in LLVM. Various other adjustments
resulting from these changes were also made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14592 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:46:49 +00:00
Alkis Evlogimenos
3b94a5142c Add more operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 01:30:54 +00:00
Chris Lattner
c5f143b6e7 Fix Type::isSized() to realize that "{ opaque }" is not sized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14585 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 23:20:17 +00:00
Chris Lattner
683ade38a9 Since we are in the department of redundancy department, at least be correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14582 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 18:41:18 +00:00
Chris Lattner
8b708e4752 Add a new pass for code generators to use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14562 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:44:13 +00:00
Misha Brukman
992dce13ec * Doxygenify comments
* Tabs-to-spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14549 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 20:42:00 +00:00
Chris Lattner
cf3290b04a Move init methods out of line to enable better assertions, contributed
by Vladimir Merzliakov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14545 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 20:22:31 +00:00
Chris Lattner
61e4cb3605 Now that we have happy mappings from MBBs->numbers, use them instead of keeping
a LV private map


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14522 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:14:57 +00:00
Chris Lattner
25d8039bd6 Change the implementation of the autonumbering for MBB's a bit to provide
the reverse mapping as well as the mapping from MBB->unsigned


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14519 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 06:01:36 +00:00
Reid Spencer
78b763b2ad Provide support for the BytecodeHandler interface which will be called by
the bcreader if one is supplied to the bytecode reader's interface
functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:20:03 +00:00
Reid Spencer
9c1e05fe75 Fix include guard
Adjust comments
Make handlers for constants provide useful information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14488 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:18:52 +00:00
Reid Spencer
39e6af456b Adjust comments to match code.
Allow analysis to return the module created by the bcreader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14487 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:17:34 +00:00
Chris Lattner
15fde2eb83 Add new header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14461 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 06:31:26 +00:00
Chris Lattner
c347dfb767 Remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:46:54 +00:00
Chris Lattner
c755307412 Remove two dead passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14456 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:43:25 +00:00
Chris Lattner
c3f44c082f Move file to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:40:43 +00:00
Chris Lattner
1ffa817210 Moved to lib/analysis/datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:30:29 +00:00
Chris Lattner
ae7502cb5f Moved to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14449 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:27:34 +00:00
Chris Lattner
e1ba478cd6 Moved to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:20:39 +00:00
Chris Lattner
ce8158d1d6 Now that the SparcV9 specific MachineCodeForInstruction class uses it's own
map on the side, Instruction no longer has to be Annotable.  This reduces
the size of the Instruction class by another 4 bytes (on a 32-bit system).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14439 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:57:34 +00:00
Chris Lattner
ea104df2b1 This class is no longer an annotation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14437 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:50:49 +00:00
Chris Lattner
4aa5b2affb Add a map of MachineCodeForInstruction objects to MachineFunctionInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:50:30 +00:00
Chris Lattner
7da38ec915 Eliminate the Instruction::iType field, folding it into the Value::VTy field.
This reduces the size of the instruction class by 4 bytes, and means that
isa<CallInst>(V) (for example) only needs to do one load from memory instead
of two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14434 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:38:24 +00:00
Chris Lattner
6b5f30f365 Get rid of Annotable's vtable. If anyone deletes an object through an Annotable*,
they get what they deserve.

This reduces the size of Instruction & Function by 4 bytes each.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:36:39 +00:00
Chris Lattner
159286d60d Make it obvious that this file is bad bad bad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:21:20 +00:00
Chris Lattner
38ab9267c9 Make ctor inline, change ValueTy ->unsigned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14430 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:01:15 +00:00
Chris Lattner
0b0863778f Consider anything with a ValueType that is >= Instruction to be an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14429 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 20:51:50 +00:00
Chris Lattner
f6b7844101 Rearrange some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14427 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 20:33:27 +00:00
Chris Lattner
98ebce1a6f Hey, why not just make 'new ReturnInst(BB)' DTRT?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 23:10:30 +00:00
Chris Lattner
e056f5c8e2 new ReturnInst(BB) does not "do the right thing". Add an assert to catch it
sooner rather than later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14421 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 23:06:57 +00:00
Chris Lattner
288c92c16b Prototype for new ConstantExpr lowering pass, contributed by Vladimir Prus!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 07:41:06 +00:00
Reid Spencer
e5c9df6880 - Changed Handler.h -> BytecodeHandler.h
- Fixed some small coding standard compliance issues in BytecodeHandler.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14393 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 02:32:27 +00:00