oota-llvm.git
19 years agoMove all of the DSA headers into the Analysis/DataStructure subdir.
Chris Lattner [Wed, 7 Jul 2004 06:32:21 +0000 (06:32 +0000)]
Move all of the DSA headers into the Analysis/DataStructure subdir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14663 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMove DSA headers into Analysis/DataStructure to make it more obvious
Chris Lattner [Wed, 7 Jul 2004 06:29:26 +0000 (06:29 +0000)]
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

19 years agoMoving headers
Chris Lattner [Wed, 7 Jul 2004 06:22:54 +0000 (06:22 +0000)]
Moving headers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14661 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAs much as I hate to say it, the whole setNode interface for DSNodeHandles
Chris Lattner [Wed, 7 Jul 2004 06:12:52 +0000 (06:12 +0000)]
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

19 years agoWhen folding constant expr gep's, don't force the use of long indices.
Chris Lattner [Wed, 7 Jul 2004 04:45:13 +0000 (04:45 +0000)]
When folding constant expr gep's, don't force the use of long indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14658 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBug fixed
Chris Lattner [Wed, 7 Jul 2004 02:25:24 +0000 (02:25 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14657 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase for PR396
Chris Lattner [Wed, 7 Jul 2004 02:20:02 +0000 (02:20 +0000)]
New testcase for PR396

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14656 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDisable coalescing.
Alkis Evlogimenos [Wed, 7 Jul 2004 02:03:12 +0000 (02:03 +0000)]
Disable coalescing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14655 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake sure people don't make functiontypes with an invalid return type
Chris Lattner [Tue, 6 Jul 2004 23:25:19 +0000 (23:25 +0000)]
Make sure people don't make functiontypes with an invalid return type

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14654 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Add support for calling vararg functions (must pass doubles in int regs too)
Misha Brukman [Tue, 6 Jul 2004 22:51:53 +0000 (22:51 +0000)]
* Add support for calling vararg functions (must pass doubles in int regs too)
* Make visitSetCondInst() share condition-generating code with EmitComparison()
* There are 13 FPRs for function-passing arguments, not 8
* Do not rely on registers being sequential, use an array lookup
* In unimplemented switch cases, send an error and abort instead of silent
  fall-through
* Add doInitialization() for adding function prototypes for external math fns
* Minor changes: fix indentation, spacing, code clarity

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14653 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUse the more compact `bl' instead of cryptic (but equivalent) `bcl 20,31'
Misha Brukman [Tue, 6 Jul 2004 22:40:34 +0000 (22:40 +0000)]
Use the more compact `bl' instead of cryptic (but equivalent) `bcl 20,31'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14652 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWork around apparent Apple compiler bug which was making all mangled
Brian Gaeke [Tue, 6 Jul 2004 20:29:05 +0000 (20:29 +0000)]
Work around apparent Apple compiler bug which was making all mangled
names start with l0_.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14651 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPunctuate
Chris Lattner [Tue, 6 Jul 2004 19:58:54 +0000 (19:58 +0000)]
Punctuate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14650 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCheck to make sure types are sized before calling getTypeSize on them.
Chris Lattner [Tue, 6 Jul 2004 19:28:42 +0000 (19:28 +0000)]
Check to make sure types are sized before calling getTypeSize on them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14649 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoIt doesn't matter what the 2nd operand is; if the GEP has 2 operands and
Brian Gaeke [Tue, 6 Jul 2004 19:24:47 +0000 (19:24 +0000)]
It doesn't matter what the 2nd operand is; if the GEP has 2 operands and
the first is a zero, we should leave it alone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14648 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd helper function.
Brian Gaeke [Tue, 6 Jul 2004 18:15:39 +0000 (18:15 +0000)]
Add helper function.
Don't touch GEPs for which DecomposeArrayRef is not going to do anything
special (e.g., < 2 indices, or 2 indices and the last one is a constant.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14647 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFind bugs sooner rather than later. In this case, don't allow the creation
Chris Lattner [Tue, 6 Jul 2004 17:44:17 +0000 (17:44 +0000)]
Find bugs sooner rather than later.  In this case, don't allow the creation
of instructions that don't have a first-class or void type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14646 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoChange the "rotate by 90" xtics specification to just "rotate" which is
Reid Spencer [Tue, 6 Jul 2004 17:04:09 +0000 (17:04 +0000)]
Change the "rotate by 90" xtics specification to just "rotate" which is
equivalent. The "by <angle>" syntax is not acceptable for all output
devices. Apparently the Sparc and x86 output devices (no color) don't
accept this, but should accept the plain "rotate".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14645 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDo not crash when joining two intervals of registers of different
Alkis Evlogimenos [Tue, 6 Jul 2004 16:03:21 +0000 (16:03 +0000)]
Do not crash when joining two intervals of registers of different
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14644 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
Misha Brukman [Tue, 6 Jul 2004 15:32:44 +0000 (15:32 +0000)]
* Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
* If SetCondInst is folded into BranchInst (and it is the only user), do not
  emit code for SetCondInst
* Fix assembly opcodes in comments in visitSetCondInst()
* Fix codegen of conditional branches

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14643 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement rem.ll:test3
Chris Lattner [Tue, 6 Jul 2004 07:38:18 +0000 (07:38 +0000)]
Implement rem.ll:test3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14640 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase
Chris Lattner [Tue, 6 Jul 2004 07:38:00 +0000 (07:38 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14639 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a minor bug where we would go into infinite loops on some constants
Chris Lattner [Tue, 6 Jul 2004 07:11:42 +0000 (07:11 +0000)]
Fix a minor bug where we would go into infinite loops on some constants

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14638 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement InstCombine/sub.ll:test15: X % -Y === X % Y
Chris Lattner [Tue, 6 Jul 2004 07:01:22 +0000 (07:01 +0000)]
Implement InstCombine/sub.ll:test15:  X % -Y === X % Y

Also, remove X % -1 = 0, because it's not true for unsigneds, and the
signed case is superceeded by this new handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14637 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase
Chris Lattner [Tue, 6 Jul 2004 07:00:11 +0000 (07:00 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14636 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a bug in the unreachable block elim pass. Dropping all references on a
Chris Lattner [Tue, 6 Jul 2004 06:36:11 +0000 (06:36 +0000)]
Fix a bug in the unreachable block elim pass.  Dropping all references on a
basic block clear()'s all of the operands lists, including phis.  This
caused removePredecessor to get confused later.  Because of this, we just
nuke (without prejudice) PHI nodes in unreachable blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14635 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRemove definition and use of OtherVal enumerator. This just fixes a thinko.
Reid Spencer [Tue, 6 Jul 2004 01:30:36 +0000 (01:30 +0000)]
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

19 years agoFirst draft completed. All sections written.
Reid Spencer [Mon, 5 Jul 2004 22:28:02 +0000 (22:28 +0000)]
First draft completed. All sections written.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14633 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCaused the labels on the small plots to be drawn vertically instead of
Reid Spencer [Mon, 5 Jul 2004 19:09:32 +0000 (19:09 +0000)]
Caused the labels on the small plots to be drawn vertically instead of
horizontally so they no longer overlap.

This eye-strain-lessening patch contributed by Vladimir Merzliakov. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14632 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdded sections for Constant Pool, Module Global Info, and Compaction
Reid Spencer [Mon, 5 Jul 2004 19:04:27 +0000 (19:04 +0000)]
Added sections for Constant Pool, Module Global Info, and Compaction
Tables. Two more sections to go.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14631 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a missing "terminator" :)
Chris Lattner [Mon, 5 Jul 2004 18:05:48 +0000 (18:05 +0000)]
Add a missing "terminator" :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14630 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoStructures allow only uint
Chris Lattner [Mon, 5 Jul 2004 17:55:28 +0000 (17:55 +0000)]
Structures allow only uint
arrays allow int/uint/long/ulong

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14629 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago- Reorganized the document contents
Reid Spencer [Mon, 5 Jul 2004 08:18:07 +0000 (08:18 +0000)]
- Reorganized the document contents
- Provided a "General Layout" section that currently covers just the block
  structure of the bytecode file.
- Wrote the section on the Global Type Pool
- Wrote the section on differences between LLVM file format versions.

Only five sections left to write!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14628 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFinalize bytecode dumping. The "handleFinish" method was getting called
Reid Spencer [Mon, 5 Jul 2004 00:57:50 +0000 (00:57 +0000)]
Finalize bytecode dumping. The "handleFinish" method was getting called
too soon so the function data was not getting dumped (it was generated
after the call handleFinish). Also cleaned up the output format for
proper indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14627 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCorrectly compute the ration of iterations/#intervals.
Alkis Evlogimenos [Sun, 4 Jul 2004 17:23:35 +0000 (17:23 +0000)]
Correctly compute the ration of iterations/#intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14626 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd #includes
Chris Lattner [Sun, 4 Jul 2004 17:19:21 +0000 (17:19 +0000)]
Add #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14625 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd #include <iostream> since Value.h doesn't include it any more.
Reid Spencer [Sun, 4 Jul 2004 12:22:14 +0000 (12:22 +0000)]
Add #include <iostream> since Value.h doesn't include it any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14624 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd #include <iostream> since Value.h does not include it any more.
Reid Spencer [Sun, 4 Jul 2004 12:20:55 +0000 (12:20 +0000)]
Add #include <iostream> since Value.h does not include it any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14623 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd #include <iostream> since Value.h does not #include it any more.
Reid Spencer [Sun, 4 Jul 2004 12:19:56 +0000 (12:19 +0000)]
Add #include <iostream> since Value.h does not #include it any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago- remove use of isa<Type>(Val) since there's no inheritance relationship
Reid Spencer [Sun, 4 Jul 2004 12:19:05 +0000 (12:19 +0000)]
- remove use of isa<Type>(Val) since there's no inheritance relationship
  any more. Needed for bug 122
- #include <iostream> since Value.h doesn't include it any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14621 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove use of Type::TypeTy which is no longer defined. This change needed
Reid Spencer [Sun, 4 Jul 2004 12:17:44 +0000 (12:17 +0000)]
Remove use of Type::TypeTy which is no longer defined. This change needed
for bug 122 since the "Type Type" concept is gone now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14620 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCorrect syntax typo .. ; -> :
Reid Spencer [Sun, 4 Jul 2004 12:15:11 +0000 (12:15 +0000)]
Correct syntax typo .. ; -> :

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14619 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago- Changes for bug 122
Reid Spencer [Sun, 4 Jul 2004 12:14:17 +0000 (12:14 +0000)]
- Changes for bug 122
- Remove Tabs
- Add inserters  needed since Value doesn't implement them any more
- Move some functions here to avoid cyclic header file dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14618 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago- #include <iostream> since its not in Value.h any more.
Reid Spencer [Sun, 4 Jul 2004 11:55:37 +0000 (11:55 +0000)]
- #include <iostream> since its not in Value.h any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14617 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConstify SymbolTable's use of Type* so that it never modifies them.
Reid Spencer [Sun, 4 Jul 2004 11:55:08 +0000 (11:55 +0000)]
Constify SymbolTable's use of Type* so that it never modifies them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14616 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago- #include <iostream> since its not in Value.h any more.
Reid Spencer [Sun, 4 Jul 2004 11:52:49 +0000 (11:52 +0000)]
- #include <iostream> since its not in Value.h any more.
- constify use of Type* returned from symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14615 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago#include <iostream> since its not in Value.h any more.
Reid Spencer [Sun, 4 Jul 2004 11:51:24 +0000 (11:51 +0000)]
#include <iostream> since its not in Value.h any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14614 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdjust the slot machine to handle Types separately from Values. This was
Reid Spencer [Sun, 4 Jul 2004 11:50:43 +0000 (11:50 +0000)]
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

20 years agoImplementation of SlotTable went into header file. Note that this header
Reid Spencer [Sun, 4 Jul 2004 11:47:22 +0000 (11:47 +0000)]
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

20 years agoRemove Tabs.
Reid Spencer [Sun, 4 Jul 2004 11:46:15 +0000 (11:46 +0000)]
Remove Tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14611 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement new output functions for types and compacted type planes. Also
Reid Spencer [Sun, 4 Jul 2004 11:45:47 +0000 (11:45 +0000)]
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

20 years agoAdd new methods outputTypes and outputCompactionTypes for handling Types
Reid Spencer [Sun, 4 Jul 2004 11:44:27 +0000 (11:44 +0000)]
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

20 years agoFor bug 122:
Reid Spencer [Sun, 4 Jul 2004 11:42:49 +0000 (11:42 +0000)]
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

20 years ago- Type::TypeTyID doesn't exist any more (bug 122)
Reid Spencer [Sun, 4 Jul 2004 11:37:54 +0000 (11:37 +0000)]
- 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

20 years agoMove SlotCalculator.h to lib/Bytecode/Writer since that is the only place
Reid Spencer [Sun, 4 Jul 2004 11:36:31 +0000 (11:36 +0000)]
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

20 years ago- Don't use macros to call the BytecodeHandler
Reid Spencer [Sun, 4 Jul 2004 11:33:49 +0000 (11:33 +0000)]
- 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

20 years agoMake all the virtual function (except destructor) inline so there are
Reid Spencer [Sun, 4 Jul 2004 11:29:56 +0000 (11:29 +0000)]
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

20 years ago- Make ValueList an "OtherVal" user of Values to ensure it doesn't get
Reid Spencer [Sun, 4 Jul 2004 11:04:56 +0000 (11:04 +0000)]
- 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

20 years agoRemove tabs. Move function declaration to Reader.h where it belongs.
Reid Spencer [Sun, 4 Jul 2004 11:03:03 +0000 (11:03 +0000)]
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

20 years agoAdd #include <iostream> which is needed now that Value.h doesn't include it
Reid Spencer [Sun, 4 Jul 2004 11:01:27 +0000 (11:01 +0000)]
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

20 years agoExcise tabs.
Reid Spencer [Sun, 4 Jul 2004 11:00:39 +0000 (11:00 +0000)]
Excise tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14599 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a new, compatible, interface function for writing types as operands.
Reid Spencer [Sun, 4 Jul 2004 10:59:05 +0000 (10:59 +0000)]
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

20 years agoAdded #include <iostream> since this header is no longer picked up from
Reid Spencer [Sun, 4 Jul 2004 10:58:20 +0000 (10:58 +0000)]
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

20 years ago- Remove enumerator TypeVal since Values can't be types any more
Reid Spencer [Sun, 4 Jul 2004 10:52:28 +0000 (10:52 +0000)]
- 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

20 years agoThere is no longer a "Type" primitive type because Values and Types are
Reid Spencer [Sun, 4 Jul 2004 10:50:43 +0000 (10:50 +0000)]
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

20 years agoConstify usage of Type* on the interface to ensure SymbolTable doesn't
Reid Spencer [Sun, 4 Jul 2004 10:49:41 +0000 (10:49 +0000)]
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

20 years agoRemove all of the classof(const Value*) methods of the derived types since
Reid Spencer [Sun, 4 Jul 2004 10:48:27 +0000 (10:48 +0000)]
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

20 years agoMake Type have no base classes. Previously it inherited Value. Also
Reid Spencer [Sun, 4 Jul 2004 10:46:49 +0000 (10:46 +0000)]
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

20 years agoAdd efficiency statistic.
Alkis Evlogimenos [Sun, 4 Jul 2004 07:59:06 +0000 (07:59 +0000)]
Add efficiency statistic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14590 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd more operators.
Alkis Evlogimenos [Sun, 4 Jul 2004 01:30:54 +0000 (01:30 +0000)]
Add more operators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14589 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix compilation on internix
Chris Lattner [Sat, 3 Jul 2004 01:21:05 +0000 (01:21 +0000)]
Fix compilation on internix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14588 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement add.ll:test22, a common case in MSIL files
Chris Lattner [Sat, 3 Jul 2004 00:26:11 +0000 (00:26 +0000)]
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

20 years agoAdd a new testcase for folding an add into a switch
Chris Lattner [Sat, 3 Jul 2004 00:25:31 +0000 (00:25 +0000)]
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

20 years agoFix Type::isSized() to realize that "{ opaque }" is not sized
Chris Lattner [Fri, 2 Jul 2004 23:20:17 +0000 (23:20 +0000)]
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

20 years agoDo not call getTypeSize on a type that has no size
Chris Lattner [Fri, 2 Jul 2004 22:55:47 +0000 (22:55 +0000)]
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

20 years agoModernize example, so that you can paste it right into llvm-as
Brian Gaeke [Fri, 2 Jul 2004 21:08:14 +0000 (21:08 +0000)]
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

20 years agoSince we are in the department of redundancy department, at least be correct
Chris Lattner [Fri, 2 Jul 2004 18:41:18 +0000 (18:41 +0000)]
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

20 years agoAdd FIXME notes for spilling int/fp regs (need to calculate stack space).
Misha Brukman [Fri, 2 Jul 2004 17:54:38 +0000 (17:54 +0000)]
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

20 years ago* Wrap long lines
Misha Brukman [Fri, 2 Jul 2004 16:23:17 +0000 (16:23 +0000)]
* 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

20 years ago* Standardize manpage output: program name bold, options italic/emphasized
Misha Brukman [Fri, 2 Jul 2004 16:06:19 +0000 (16:06 +0000)]
* 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

20 years agoThe HTML documentation is now automatically generated from POD source.
Misha Brukman [Fri, 2 Jul 2004 15:48:33 +0000 (15:48 +0000)]
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

20 years ago* Link to the POD-generated HTML documentation
Misha Brukman [Fri, 2 Jul 2004 15:46:55 +0000 (15:46 +0000)]
* 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

20 years agoMake `args' stand out as bold, delete confusing elipsis at the end of cmdline.
Misha Brukman [Fri, 2 Jul 2004 15:42:20 +0000 (15:42 +0000)]
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

20 years agoHTML links in PODs must be absolute.
Misha Brukman [Fri, 2 Jul 2004 15:37:53 +0000 (15:37 +0000)]
HTML links in PODs must be absolute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14575 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSimplify wording: `the bugpoint tool' can just become `bugpoint'.
Misha Brukman [Fri, 2 Jul 2004 15:36:29 +0000 (15:36 +0000)]
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

20 years agollvm-abcd has become llvm-bcanalyzer
Misha Brukman [Fri, 2 Jul 2004 15:32:49 +0000 (15:32 +0000)]
llvm-abcd has become llvm-bcanalyzer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14573 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix use-before-def thinko
Brian Gaeke [Fri, 2 Jul 2004 07:01:31 +0000 (07:01 +0000)]
Fix use-before-def thinko

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14570 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a note about implementing interprocedural register allocation.
Reid Spencer [Fri, 2 Jul 2004 06:27:12 +0000 (06:27 +0000)]
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

20 years agoBuild llvm-bcanalyzer
Brian Gaeke [Fri, 2 Jul 2004 05:59:20 +0000 (05:59 +0000)]
Build llvm-bcanalyzer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14568 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRevert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
Chris Lattner [Fri, 2 Jul 2004 05:52:23 +0000 (05:52 +0000)]
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

20 years agoFix potential problems with unreachable basic blocks.
Chris Lattner [Fri, 2 Jul 2004 05:49:11 +0000 (05:49 +0000)]
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

20 years agoFix all of those problems that the PPC backend has running 176.gcc :)
Chris Lattner [Fri, 2 Jul 2004 05:48:42 +0000 (05:48 +0000)]
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

20 years agoRemove dead blocks
Chris Lattner [Fri, 2 Jul 2004 05:46:41 +0000 (05:46 +0000)]
Remove dead blocks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14564 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a trivially simple pass to delete unreachable blocks from the CFG. This
Chris Lattner [Fri, 2 Jul 2004 05:46:10 +0000 (05:46 +0000)]
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

20 years agoAdd a new pass for code generators to use
Chris Lattner [Fri, 2 Jul 2004 05:44:13 +0000 (05:44 +0000)]
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

20 years agoMake this testcase more interesting
Chris Lattner [Fri, 2 Jul 2004 05:43:51 +0000 (05:43 +0000)]
Make this testcase more interesting

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14561 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGet rid of a dead variable, and fix a typo in a comment.
Brian Gaeke [Fri, 2 Jul 2004 05:30:01 +0000 (05:30 +0000)]
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

20 years agoAdd M_TERMINATOR_FLAG to terminator instructions (branches and returns).
Brian Gaeke [Fri, 2 Jul 2004 04:57:37 +0000 (04:57 +0000)]
Add M_TERMINATOR_FLAG to terminator instructions (branches and returns).
Also, the RETURN instructions are not used in the sparcv9 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14559 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRETURN instructions are not used in the sparc backend.
Brian Gaeke [Fri, 2 Jul 2004 04:57:35 +0000 (04:57 +0000)]
RETURN instructions are not used in the sparc backend.
When in doubt, stamp it out!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14558 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agollvm-abcd tool name changed to llvm-bcanalyzer: see llvm-bcanalyzer.pod.
Reid Spencer [Fri, 2 Jul 2004 03:45:32 +0000 (03:45 +0000)]
llvm-abcd tool name changed to llvm-bcanalyzer: see llvm-bcanalyzer.pod.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14557 91177308-0d34-0410-b5e6-96231b3b80d8