Commit Graph

12806 Commits

Author SHA1 Message Date
Reid Spencer
0e25e1cdcf Adjust the slot machine to handle Types separately from Values. This was
done by doubling up the data structures so that Type based equivalents are
used. A consequence of this is overloading of function members that take a
Type* instead of a Value*. Various other cleanups related to Type != Value
(bug 122) were also implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14613 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:50:43 +00:00
Reid Spencer
d57da4b27d Implementation of SlotTable went into header file. Note that this header
is currently not being used but is retained because it will be the basis
for a clean up of the SlotCalculator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14612 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:47:22 +00:00
Reid Spencer
0852c80e38 Remove Tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14611 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:46:15 +00:00
Reid Spencer
cb3595c3d1 Implement new output functions for types and compacted type planes. Also
remove use of Type::TypeTyID and Type::TypeTy since Type no longer inherits
Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14610 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:45:47 +00:00
Reid Spencer
d1fb1b7440 Add new methods outputTypes and outputCompactionTypes for handling Types
separately from Values. This needed for bug 122.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:44:27 +00:00
Reid Spencer
24ab28f1e5 For bug 122:
Separate Types from Values because Type no longer inherits from Value. The
changes for this are too numerous to list. In essence, any data structure
that contained a Value was doubled so that Types could be contained
similarly. New members include Types, TypeMap, CompactionTypes, and
CompactionTypeMap. Functions taking a Value* were overloaded with a variant
that takes a Type* that acts on the new data structures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:42:49 +00:00
Reid Spencer
5e394ff01b - Type::TypeTyID doesn't exist any more (bug 122)
- Types don't have names any more, just write them on ostream directly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14606 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:37:54 +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
04cde2ce59 - Don't use macros to call the BytecodeHandler
- Don't use PARSE_ERROR macro unnecessarily (for simple strings)
- Add comments before each function
- Convert for bug 122 (Type != Value)
- Handle new value range on Type::PrimitiveTypeId enumeration by augmenting
  the reader with a new read_typeid method and sanitizeTypeId method.
- Remove BytecodeHandler's default method implementations to header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14604 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:33:49 +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
a86159cd4b - Make ValueList an "OtherVal" user of Values to ensure it doesn't get
mistaken for anything else.
- Move function descriptions to Reader.cpp file per Chris.
- Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14602 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:04:56 +00:00
Reid Spencer
97c7d74d04 Remove tabs. Move function declaration to Reader.h where it belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:03:03 +00:00
Reid Spencer
77cf296c5d Add #include <iostream> which is needed now that Value.h doesn't include it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14600 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:01:27 +00:00
Reid Spencer
b61cdb7f10 Excise tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14599 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:00:39 +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
d55b2b1067 Add efficiency statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14590 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 07:59:06 +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
5114004110 Fix compilation on internix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14588 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-03 01:21:05 +00:00
Chris Lattner
46238a6150 Implement add.ll:test22, a common case in MSIL files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14587 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-03 00:26:11 +00:00
Chris Lattner
80fc86a0b2 Add a new testcase for folding an add into a switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14586 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-03 00:25:31 +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
cf27afb64e Do not call getTypeSize on a type that has no size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14584 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 22:55:47 +00:00
Brian Gaeke
7283e7c056 Modernize example, so that you can paste it right into llvm-as
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14583 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 21:08:14 +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
Misha Brukman
68a9b04e77 Add FIXME notes for spilling int/fp regs (need to calculate stack space).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14581 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 17:54:38 +00:00
Misha Brukman
0d4b67c67f * Wrap long lines
* Mention the HTML/man page output from single POD source file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14580 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 16:23:17 +00:00
Misha Brukman
c08937aee7 * Standardize manpage output: program name bold, options italic/emphasized
* Make links in SEE ALSO section of manpages short without "the ... manpage"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14579 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 16:06:19 +00:00
Misha Brukman
693464c57a The HTML documentation is now automatically generated from POD source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14578 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:48:33 +00:00
Misha Brukman
66a72ef15a * Link to the POD-generated HTML documentation
* Updated llvm-abcd to llvm-bcanalyzer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14577 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:46:55 +00:00
Misha Brukman
a856f5b4bb Make `args' stand out as bold, delete confusing elipsis at the end of cmdline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14576 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:42:20 +00:00
Misha Brukman
d7c41c2e3d HTML links in PODs must be absolute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14575 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:37:53 +00:00
Misha Brukman
595d32e93b Simplify wording: the bugpoint tool' can just become bugpoint'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14574 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:36:29 +00:00
Misha Brukman
c3e0434102 llvm-abcd has become llvm-bcanalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14573 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 15:32:49 +00:00
Brian Gaeke
e0e3589949 Fix use-before-def thinko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14570 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 07:01:31 +00:00
Reid Spencer
750c425d76 Add a note about implementing interprocedural register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14569 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 06:27:12 +00:00
Brian Gaeke
db67ecd49d Build llvm-bcanalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14568 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:59:20 +00:00
Chris Lattner
230b4fb8a0 Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
don't exist, we don't have to pretend to handle them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:52:23 +00:00
Chris Lattner
a9a582fbb6 Fix potential problems with unreachable basic blocks.
Also, while noone's looking, add support for constant expressions.  Wait,
I said not to look!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14566 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:49:11 +00:00
Chris Lattner
fab96f0b69 Fix all of those problems that the PPC backend has running 176.gcc :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:48:42 +00:00
Chris Lattner
9a9ca0f06b Remove dead blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:46:41 +00:00
Chris Lattner
fc3c82a804 Add a trivially simple pass to delete unreachable blocks from the CFG. This
pass is required to paper over problems in the code generator (primarily
live variables and its clients) which doesn't really have any well defined
semantics for unreachable code.

The proper solution to this problem is to have instruction selectors not
select blocks that are unreachable.  Until we have a instruction selection
framework available for use, however, we can't expect all instruction
selector writers to do this.  Until then, this pass should be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14563 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:46:10 +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
Chris Lattner
c95f3b8822 Make this testcase more interesting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14561 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:43:51 +00:00
Brian Gaeke
1c4b6de4e7 Get rid of a dead variable, and fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14560 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:30:01 +00:00