Commit Graph

12855 Commits

Author SHA1 Message Date
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
4dabb2c6f3 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
2004-07-07 06:32:21 +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
eaef5685b8 Moving headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14661 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:22:54 +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
Chris Lattner
d340867964 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
2004-07-07 04:45:13 +00:00
Chris Lattner
5171eb5283 Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14657 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 02:25:24 +00:00
Chris Lattner
b50eaea407 New testcase for PR396
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14656 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 02:20:02 +00:00
Alkis Evlogimenos
3877652e68 Disable coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 02:03:12 +00:00
Chris Lattner
edfc49de13 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
2004-07-06 23:25:19 +00:00
Misha Brukman
d18a31d2fa * 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
2004-07-06 22:51:53 +00:00
Misha Brukman
4cf5112500 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
2004-07-06 22:40:34 +00:00
Brian Gaeke
a4c7c414ef 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
2004-07-06 20:29:05 +00:00
Chris Lattner
f4ddea69ba Punctuate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14650 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 19:58:54 +00:00
Chris Lattner
fae1010218 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
2004-07-06 19:28:42 +00:00
Brian Gaeke
08cc64ebfe 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
2004-07-06 19:24:47 +00:00
Brian Gaeke
10585d92da 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
2004-07-06 18:15:39 +00:00
Chris Lattner
a9e7781b3b 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
2004-07-06 17:44:17 +00:00
Reid Spencer
ebeebecad2 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
2004-07-06 17:04:09 +00:00
Alkis Evlogimenos
5de868b0b2 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
2004-07-06 16:03:21 +00:00
Misha Brukman
e9c6551fed * 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
2004-07-06 15:32:44 +00:00
Chris Lattner
3571b72606 Implement rem.ll:test3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14640 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 07:38:18 +00:00
Chris Lattner
970c17889a New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14639 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 07:38:00 +00:00
Chris Lattner
1e3564ef05 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
2004-07-06 07:11:42 +00:00
Chris Lattner
5b73c08896 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
2004-07-06 07:01:22 +00:00
Chris Lattner
f77afbb275 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14636 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-06 07:00:11 +00:00
Chris Lattner
7f0566c123 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
2004-07-06 06:36:11 +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
51f31e07f6 First draft completed. All sections written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-05 22:28:02 +00:00
Reid Spencer
7cccb2dcdb 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
2004-07-05 19:09:32 +00:00
Reid Spencer
2cc361555b 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
2004-07-05 19:04:27 +00:00
Chris Lattner
1cc070c707 Add a missing "terminator" :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14630 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-05 18:05:48 +00:00
Chris Lattner
7c66ab3747 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
2004-07-05 17:55:28 +00:00
Reid Spencer
1ab929cbd5 - 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
2004-07-05 08:18:07 +00:00
Reid Spencer
5c15fe5cf8 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
2004-07-05 00:57:50 +00:00
Alkis Evlogimenos
c156095b17 Correctly compute the ration of iterations/#intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 17:23:35 +00:00
Chris Lattner
38343f6cfe Add #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14625 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 17:19:21 +00:00
Reid Spencer
321f8319da 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
2004-07-04 12:22:14 +00:00
Reid Spencer
86f42bdad9 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
2004-07-04 12:20:55 +00:00
Reid Spencer
954da37bb4 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
2004-07-04 12:19:56 +00:00
Reid Spencer
8ce1da781e - 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
2004-07-04 12:19:05 +00:00
Reid Spencer
77f4d868d7 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
2004-07-04 12:17:44 +00:00
Reid Spencer
7474d03578 Correct syntax typo .. ; -> :
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14619 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:15:11 +00:00
Reid Spencer
6e885d0dd5 - 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
2004-07-04 12:14:17 +00:00
Reid Spencer
e2fac77ad3 - #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
2004-07-04 11:55:37 +00:00
Reid Spencer
db8e515b43 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
2004-07-04 11:55:08 +00:00
Reid Spencer
c28a224c68 - #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
2004-07-04 11:52:49 +00:00
Reid Spencer
57f6efc095 #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
2004-07-04 11:51:24 +00:00
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