Brian Gaeke
f9c3f6178a
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.
llvm-svn: 14648
2004-07-06 19:24:47 +00:00
Brian Gaeke
ef192b1a19
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.)
llvm-svn: 14647
2004-07-06 18:15:39 +00:00
Chris Lattner
5c1abfecfe
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.
llvm-svn: 14646
2004-07-06 17:44:17 +00:00
Reid Spencer
e63894ba81
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".
llvm-svn: 14645
2004-07-06 17:04:09 +00:00
Alkis Evlogimenos
e0c8d140a9
Do not crash when joining two intervals of registers of different
...
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!
llvm-svn: 14644
2004-07-06 16:03:21 +00:00
Misha Brukman
0b6de12a84
* 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
llvm-svn: 14643
2004-07-06 15:32:44 +00:00
Chris Lattner
560992669f
Implement rem.ll:test3
...
llvm-svn: 14640
2004-07-06 07:38:18 +00:00
Chris Lattner
1b45db9389
New testcase
...
llvm-svn: 14639
2004-07-06 07:38:00 +00:00
Chris Lattner
97ebe25e6c
Fix a minor bug where we would go into infinite loops on some constants
...
llvm-svn: 14638
2004-07-06 07:11:42 +00:00
Chris Lattner
4d6c479f08
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.
llvm-svn: 14637
2004-07-06 07:01:22 +00:00
Chris Lattner
4486506985
New testcase
...
llvm-svn: 14636
2004-07-06 07:00:11 +00:00
Chris Lattner
d450ccbc91
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.
llvm-svn: 14635
2004-07-06 06:36:11 +00:00
Reid Spencer
3e8a01d80f
Remove definition and use of OtherVal enumerator. This just fixes a thinko.
...
llvm-svn: 14634
2004-07-06 01:30:36 +00:00
Reid Spencer
4889b22e02
First draft completed. All sections written.
...
llvm-svn: 14633
2004-07-05 22:28:02 +00:00
Reid Spencer
d8b190bcf0
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!
llvm-svn: 14632
2004-07-05 19:09:32 +00:00
Reid Spencer
45466bff9d
Added sections for Constant Pool, Module Global Info, and Compaction
...
Tables. Two more sections to go.
llvm-svn: 14631
2004-07-05 19:04:27 +00:00
Chris Lattner
0da46096b3
Add a missing "terminator" :)
...
llvm-svn: 14630
2004-07-05 18:05:48 +00:00
Chris Lattner
dd4054ee31
Structures allow only uint
...
arrays allow int/uint/long/ulong
llvm-svn: 14629
2004-07-05 17:55:28 +00:00
Reid Spencer
f847cbddab
- 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!
llvm-svn: 14628
2004-07-05 08:18:07 +00:00
Reid Spencer
4d7e02d657
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.
llvm-svn: 14627
2004-07-05 00:57:50 +00:00
Alkis Evlogimenos
69ea68d4b6
Correctly compute the ration of iterations/#intervals.
...
llvm-svn: 14626
2004-07-04 17:23:35 +00:00
Chris Lattner
8d61e9ad98
Add #includes
...
llvm-svn: 14625
2004-07-04 17:19:21 +00:00
Reid Spencer
720b54cf9d
Add #include <iostream> since Value.h doesn't include it any more.
...
llvm-svn: 14624
2004-07-04 12:22:14 +00:00
Reid Spencer
6d8b0985d1
Add #include <iostream> since Value.h does not include it any more.
...
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Reid Spencer
50ec3f9325
Add #include <iostream> since Value.h does not #include it any more.
...
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Reid Spencer
d5ed7fb8fb
- 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.
llvm-svn: 14621
2004-07-04 12:19:05 +00:00
Reid Spencer
172bb5ee88
Remove use of Type::TypeTy which is no longer defined. This change needed
...
for bug 122 since the "Type Type" concept is gone now.
llvm-svn: 14620
2004-07-04 12:17:44 +00:00
Reid Spencer
bfacdee814
Correct syntax typo .. ; -> :
...
llvm-svn: 14619
2004-07-04 12:15:11 +00:00
Reid Spencer
8a9a34f7ff
- 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.
llvm-svn: 14618
2004-07-04 12:14:17 +00:00
Reid Spencer
d02e1dc90d
- #include <iostream> since its not in Value.h any more.
...
llvm-svn: 14617
2004-07-04 11:55:37 +00:00
Reid Spencer
d242724126
Constify SymbolTable's use of Type* so that it never modifies them.
...
llvm-svn: 14616
2004-07-04 11:55:08 +00:00
Reid Spencer
64a2a1c92b
- #include <iostream> since its not in Value.h any more.
...
- constify use of Type* returned from symbol table.
llvm-svn: 14615
2004-07-04 11:52:49 +00:00
Reid Spencer
abf33934d2
#include <iostream> since its not in Value.h any more.
...
llvm-svn: 14614
2004-07-04 11:51:24 +00:00
Reid Spencer
93c3d80eb4
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.
llvm-svn: 14613
2004-07-04 11:50:43 +00:00
Reid Spencer
373ae97a58
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.
llvm-svn: 14612
2004-07-04 11:47:22 +00:00
Reid Spencer
3c5a47177e
Remove Tabs.
...
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
bd058052d9
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.
llvm-svn: 14610
2004-07-04 11:45:47 +00:00
Reid Spencer
ae9ac3dcc5
Add new methods outputTypes and outputCompactionTypes for handling Types
...
separately from Values. This needed for bug 122.
llvm-svn: 14609
2004-07-04 11:44:27 +00:00
Reid Spencer
f15d7739d1
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.
llvm-svn: 14608
2004-07-04 11:42:49 +00:00
Reid Spencer
50fc2ffa25
- Type::TypeTyID doesn't exist any more (bug 122)
...
- Types don't have names any more, just write them on ostream directly
llvm-svn: 14606
2004-07-04 11:37:54 +00:00
Reid Spencer
37b31cbcba
Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
...
that needs it after the Type != Value changes (bug 122).
llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Reid Spencer
58d99835c3
- 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.
llvm-svn: 14604
2004-07-04 11:33:49 +00:00
Reid Spencer
725398ad54
Make all the virtual function (except destructor) inline so there are
...
default implementations without taking up a ton of space in a .cpp file.
llvm-svn: 14603
2004-07-04 11:29:56 +00:00
Reid Spencer
1ed71ecc7c
- 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.
llvm-svn: 14602
2004-07-04 11:04:56 +00:00
Reid Spencer
1b40b59651
Remove tabs. Move function declaration to Reader.h where it belongs.
...
llvm-svn: 14601
2004-07-04 11:03:03 +00:00
Reid Spencer
b342d41159
Add #include <iostream> which is needed now that Value.h doesn't include it
...
llvm-svn: 14600
2004-07-04 11:01:27 +00:00
Reid Spencer
43f703a636
Excise tabs.
...
llvm-svn: 14599
2004-07-04 11:00:39 +00:00
Reid Spencer
a53681ae93
Add a new, compatible, interface function for writing types as operands.
...
This is necessary because Types are no longer Values.
llvm-svn: 14598
2004-07-04 10:59:05 +00:00
Reid Spencer
925f7fd54c
Added #include <iostream> since this header is no longer picked up from
...
the Value.h header.
llvm-svn: 14597
2004-07-04 10:58:20 +00:00
Reid Spencer
678b551d2b
- 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.
llvm-svn: 14596
2004-07-04 10:52:28 +00:00