Chris Lattner
98c6bdf251
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
7fd5f0745a
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
520df8464b
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
987e503e2e
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
02b6708e01
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
21b3a5b0de
Correctly compute the ration of iterations/#intervals.
...
llvm-svn: 14626
2004-07-04 17:23:35 +00:00
Chris Lattner
0969646d6e
Add #includes
...
llvm-svn: 14625
2004-07-04 17:19:21 +00:00
Reid Spencer
eb04d9bcb4
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
832fa92ab6
- 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
e258e94af7
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
e484cc1925
Correct syntax typo .. ; -> :
...
llvm-svn: 14619
2004-07-04 12:15:11 +00:00
Reid Spencer
1e8005d013
- 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
8baf8e270a
- #include <iostream> since its not in Value.h any more.
...
llvm-svn: 14617
2004-07-04 11:55:37 +00:00
Reid Spencer
c107d6ff87
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
dbe02b7b1d
- #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
cf394bf2d5
#include <iostream> since its not in Value.h any more.
...
llvm-svn: 14614
2004-07-04 11:51:24 +00:00
Reid Spencer
58d30f24bb
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
bf2bce3f74
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
2fa95bcd68
Remove Tabs.
...
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
a52b0009ea
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
3cdb4e88e5
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
88f3e0731e
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
25319569fb
- 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
5ef4237089
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
bc70f74825
- 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
e6c95490a0
- 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
0421e6c843
Remove tabs. Move function declaration to Reader.h where it belongs.
...
llvm-svn: 14601
2004-07-04 11:03:03 +00:00
Reid Spencer
646f829e33
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
6eecc40b2d
Excise tabs.
...
llvm-svn: 14599
2004-07-04 11:00:39 +00:00
Alkis Evlogimenos
8f3cc0316c
Add efficiency statistic.
...
llvm-svn: 14590
2004-07-04 07:59:06 +00:00
Chris Lattner
d3ecc61840
Fix compilation on internix
...
llvm-svn: 14588
2004-07-03 01:21:05 +00:00
Chris Lattner
4c9c20af28
Implement add.ll:test22, a common case in MSIL files
...
llvm-svn: 14587
2004-07-03 00:26:11 +00:00
Chris Lattner
971bbcb43a
Fix Type::isSized() to realize that "{ opaque }" is not sized
...
llvm-svn: 14585
2004-07-02 23:20:17 +00:00
Chris Lattner
49df6cefa5
Do not call getTypeSize on a type that has no size
...
llvm-svn: 14584
2004-07-02 22:55:47 +00:00
Misha Brukman
4308baa0f1
Add FIXME notes for spilling int/fp regs (need to calculate stack space).
...
llvm-svn: 14581
2004-07-02 17:54:38 +00:00
Brian Gaeke
f6d2471c5d
Fix use-before-def thinko
...
llvm-svn: 14570
2004-07-02 07:01:31 +00:00
Chris Lattner
a65b4eac3b
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.
llvm-svn: 14567
2004-07-02 05:52:23 +00:00
Chris Lattner
55256dbf9b
Fix potential problems with unreachable basic blocks.
...
Also, while noone's looking, add support for constant expressions. Wait,
I said not to look!
llvm-svn: 14566
2004-07-02 05:49:11 +00:00
Chris Lattner
3594324248
Fix all of those problems that the PPC backend has running 176.gcc :)
...
llvm-svn: 14565
2004-07-02 05:48:42 +00:00
Chris Lattner
6c322ecc31
Remove dead blocks
...
llvm-svn: 14564
2004-07-02 05:46:41 +00:00
Chris Lattner
693244fb33
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.
llvm-svn: 14563
2004-07-02 05:46:10 +00:00
Brian Gaeke
e1a136fb4b
Get rid of a dead variable, and fix a typo in a comment.
...
llvm-svn: 14560
2004-07-02 05:30:01 +00:00
Brian Gaeke
186e3d1098
Add M_TERMINATOR_FLAG to terminator instructions (branches and returns).
...
Also, the RETURN instructions are not used in the sparcv9 backend.
llvm-svn: 14559
2004-07-02 04:57:37 +00:00
Brian Gaeke
fb894bd864
RETURN instructions are not used in the sparc backend.
...
When in doubt, stamp it out!!
llvm-svn: 14558
2004-07-02 04:57:35 +00:00
Misha Brukman
24a0371791
* Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
...
* Also leave space for spilling integer registers (this should be calculated)
llvm-svn: 14554
2004-07-01 21:35:00 +00:00
Misha Brukman
d028593c6e
* Get rid of constant-expr handling code: we use the ConstantExpr lowering pass
...
* Use the SetCC handling code in the format of Brian's V8
* Add FIXMEs where calls to functions are being made without adding them to the
Module first... they cause missing symbols at assembly-time.
llvm-svn: 14553
2004-07-01 21:34:10 +00:00
Misha Brukman
1f3a7f0255
Wrap long line
...
llvm-svn: 14552
2004-07-01 21:27:59 +00:00
Misha Brukman
d575287551
* Do not allocate r0 as we use it indiscriminantly in the instr selector.
...
* Do not define CR register class because we don't (yet) have the i4 type
llvm-svn: 14551
2004-07-01 21:24:50 +00:00
Misha Brukman
fcc59bd0e0
Check if operand has an allocated reg before requesting it.
...
llvm-svn: 14550
2004-07-01 21:09:12 +00:00
Chris Lattner
5b20870830
Add much better assertion checking for load and store insts.
...
Contributed by Vladimir Merzliakov!
llvm-svn: 14546
2004-07-01 20:23:52 +00:00