Commit Graph

836 Commits

Author SHA1 Message Date
Chris Lattner
68e3dbc493 Major changes. Now we only compactify individual type planes if it is in
fact "profitable" to do so.  This makes compactification "free" for small
programs (ie, it is completely disabled) and even helps large programs by
not having to encode pointless compactification planes.

On 176.gcc, this saves 50K from the bytecode file, which is, alas only
a couple percent.

This concludes my head bashing against the bytecode format, at least for
now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10922 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 00:57:32 +00:00
Chris Lattner
614cdcd002 Add support for building the compactiontable for bytecode files. This shrinks
the bytecode file for 176.gcc by about 200K (10%), and 254.gap by about 167K,
a 25% reduction.  There is still a lot of room for improvement in the encoding
of the compaction table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-18 21:07:07 +00:00
Chris Lattner
2ff95b6b4e Eliminate special case handling for CPR's
Fix some problem cases where I was building the slot calculator in bytecode
writer mode instead of asmwriter mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-18 21:03:06 +00:00
Chris Lattner
80b97343ec Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitive
type planes.  This saves about 5k on 176.gcc, and is needed for a subsequent
patch of mine I'm working on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10908 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-17 23:25:43 +00:00
Chris Lattner
d5c59d5c84 Cleanups & efficiency improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10888 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-15 20:24:09 +00:00
Chris Lattner
8c202cdbda The bcwriter does not want ConstantPointerRef's to be indexed, and the asmwriter never did!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-15 18:47:15 +00:00
Chris Lattner
dcea63026f When emitting bytecode, handle strings specially. Do not add the characters
that make up the strings to the slotcalculator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 23:34:39 +00:00
Chris Lattner
f907bac068 Hrm, apparently I missed lowering this intrinsic. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10858 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 20:41:29 +00:00
Chris Lattner
7aa162b29b Fix bug in previous checkin: Demorgan would be ashamed of me, I need to
lay off the crack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 17:51:53 +00:00
Chris Lattner
13cfdea1ef Implement ConstantArray::isString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10851 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 17:06:38 +00:00
Chris Lattner
c9b0702a89 Fix check. PHI nodes must be handled specially, of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 05:42:52 +00:00
Chris Lattner
30768ac3c2 Tighten up verifier checks. The result of an invoke instruction only
dominates the normal destination, not the exceptional dest (ie, the result
of a call is undefined on an exception)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 04:25:59 +00:00
Chris Lattner
8ce750145d The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10837 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 02:49:34 +00:00
Chris Lattner
504e8fb74e Implement a bunch of symbolic constant folding opportunities. This implements
testcase test/Regression/Assembler/ConstantExprFold.llx

Note that these kinds of things only rarely show up in source code, but are
exceedingly common in the intermediate stages of algorithms like SCCP.  By
folding things (especially relational operators) that use symbolic constants,
we are able to speculatively fold more conditional branches, which can
lead to some big simplifications.

It would be easy to add a lot more special cases here, so if you notice
SCCP missing anything "obvious", you know what to make smarter.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10812 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-13 05:51:55 +00:00
Chris Lattner
3a534f200a Implement new Instruction::isRelational method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10810 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 23:18:25 +00:00
Chris Lattner
eab20b58b1 Rearrange and comment code better. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10808 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 22:07:24 +00:00
Chris Lattner
cbfd406541 Rename ConstantHandling.* -> ConstantFolding.*
Move a bunch of (now) private stuff from ConstantFolding.h into
ConstantFolding.cpp.

This _finally_ gets us to a place where we have a sane constant folder.  The
rules are:

1. LLVM clients now use ConstantExpr::get* methods to fold constants.  If they
   cannot be folded, a constantexpr is created, so these methods always return
   valid Constant*'s.
2. The implementation of ConstantExpr::get* uses the functions exposed by
   ConstantFolding.h to try to fold constants.  If they cannot be folded,
   they should return a null pointer.
3. The implementation of ConstantFolding can do whatever it wants, and only
   has one client (Constants.cpp)

This cuts down on the wierd dependencies, and eliminates the two interfaces.
The old constanthandling interface was especially bad for clients to use
because almost none of them took the failure condition into consideration,
thus leading to obscure problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10807 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 21:13:12 +00:00
Chris Lattner
8b0f0cb908 Remove a whole bunch more ugliness. This is actually getting to the point of
this whole refactoring: allow constant folding methods to return something
other than predefined classes, allow them to return generic Constant*'s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10806 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 21:02:29 +00:00
Chris Lattner
6b7b91ab03 Move ConstantHandling.h into lib/VMCore and out of include/llvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 20:48:11 +00:00
Chris Lattner
731ba7f032 Eliminate a lot of out-of-date comments, and all of the wierd overloaded
operator constant folding stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10803 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 20:43:44 +00:00
Chris Lattner
4a0ecc8c0c Eliminate usage of the wierd overloaded operator constant folders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10802 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 20:41:05 +00:00
Chris Lattner
d4403b4c3a Eliminate ConstantFoldShiftInstruction reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 20:40:42 +00:00
Chris Lattner
67bb7603ea Remove use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10800 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 20:13:04 +00:00
Chris Lattner
69b9e892b6 Fix out of date comment, remove use of ConstantExpr::getShift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:12:58 +00:00
Chris Lattner
c6646ebdb9 Remove use of ConstantExpr::getShift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:10:58 +00:00
Chris Lattner
3edd3979e1 Make ConstantExpr::get work for shifts as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10790 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:04:55 +00:00
Chris Lattner
c4a1509829 Move prototype of llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:25:44 +00:00
Chris Lattner
28aabc34f7 Move llvm::ConstantFoldInstruction from here to Transforms/Utils
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:25:03 +00:00
Chris Lattner
952454dbff Implement: Assembler/2004-01-11-getelementptrfolding.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:56:33 +00:00
Chris Lattner
92fa44c1cf Urg, remove testing code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:30:03 +00:00
Chris Lattner
9380297bc0 Fix a regression that I introduced yesterday. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:29:26 +00:00
Chris Lattner
a14b0d441d Check in two changes:
The first change (which is disabled) compactifies all of the function constant
pools into the global constant pool, in an attempt to reduce the amount of
duplication and overhead.  Unfortunately, as the comment indicates, this is
not yet a win, so it is disabled.

The second change sorts the typeid's so that those types that can be used
by instructions in the program appear earlier in the table than those that
cannot (such as structures and arrays).  This causes the instructions to
be able to use the dense encoding more often, saving about 5K on 254.gap.
This is only a .65% savings though, unfortunately. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 23:46:13 +00:00
Chris Lattner
91d7efbf4b Hrm, another minor cleanup, which I missed before
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 21:42:24 +00:00
Chris Lattner
9a0817971a Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10752 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 21:40:29 +00:00
Chris Lattner
f7703df496 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10727 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-09 06:12:26 +00:00
Chris Lattner
90ab32f9f0 Add support for new intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10701 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-06 05:33:02 +00:00
Chris Lattner
77b1330ece Add VMCore and code generator support for debugging intrinsics. By default
code generators completely ignore them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05 05:36:30 +00:00
Chris Lattner
60837821e2 Add some comments, add new getGlobalVariable method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10671 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 08:43:01 +00:00
Chris Lattner
6d28a268c3 * Make Module::getTypeName const
* Add new Module::getTypeByName method
* Group methods in Module.cpp better


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10668 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 07:09:33 +00:00
Chris Lattner
69284b03d1 Make the lookup method const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10667 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 07:08:19 +00:00
Chris Lattner
3b41e0e6f4 Fix PR198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 03:19:37 +00:00
Chris Lattner
4b1be101fb Add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 02:50:02 +00:00
Chris Lattner
f70e0c216c Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 21:23:38 +00:00
Chris Lattner
42450d8a5f Move into the VMCore library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10623 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 08:30:20 +00:00
Chris Lattner
3b66ecb05f Implement the default implementation of the intrinsic lowering class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 08:19:41 +00:00
Chris Lattner
2cdd21c2e4 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 21:35:53 +00:00
Chris Lattner
eae45cf44b The recalclulate method was a nasty hack that was once used by the -cee pass,
which never worked itself.  The cee pass still doesn't work, but it doesn't use
this method anymore anyway, so eliminate the method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:55:32 +00:00
Chris Lattner
16addf87bf Completely rewrite domset, idom, and domtree implementation. Now it is based
on the algorithm for directly computing immediate dominators presented in this
paper:

  A Fast Algorithm for Finding Dominators in a Flowgraph
  T. Lengauer & R. Tarjan, ACM TOPLAS July 1979, pgs 121-141.

This _substantially_ speeds up construction of all dominator related information.
Post-dominators to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:38:08 +00:00
Chris Lattner
d85cbe8f69 Fix const correctness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10229 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:28:00 +00:00
Chris Lattner
b9da9c137d Relax constrains on GEP type indexes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10228 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 21:21:46 +00:00
Chris Lattner
c282f5a380 Check return types of functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10146 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 22:32:23 +00:00
Chris Lattner
afd0b4b24a Fix problem Reid was having with external globals and nonexternal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10133 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 20:33:27 +00:00
Chris Lattner
31f8499e83 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 20:23:48 +00:00
Chris Lattner
15e8752e8f Fix some problems with assertions printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10129 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 17:35:51 +00:00
Chris Lattner
7334f2e3da improve error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10128 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 17:06:29 +00:00
Chris Lattner
108e4ab159 Minor cleanups and simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 16:52:05 +00:00
Chris Lattner
f8485c6434 Start using the nicer terminator auto-insertion API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:25:24 +00:00
Chris Lattner
adbc0b5287 Spew symbolic types!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10110 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:23:14 +00:00
Chris Lattner
593ba8f560 Somehow I forgot poor little UnwindInst
*sniff*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10108 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:11:56 +00:00
Chris Lattner
4b74c83334 * Finegrainify namespacification
* Add new constructors to allow insertion of terminator instructions at the
  end of basic blocks.
* Move a ReturnInst method out-of-line, so that the vtable and type info don't
  need to be emitted to every translation unit that uses the class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10107 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 17:45:12 +00:00
Chris Lattner
4e4d8624c5 Don't crash if we are printing an orphaned basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10100 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 00:09:43 +00:00
Chris Lattner
bb4a15ca57 Really, there was a reason for me factoring that out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10089 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 19:20:20 +00:00
Chris Lattner
542d991451 *** Significantly speed up type resultion
This change speeds up type resolution by checking to see if a type is
  recursive, and if it's not, using a more efficient algorithm.

  This dramatically reduces bytecode loading time of kc++, reducing time-to-jit
  kc++ --version to 17s from 33s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10088 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 19:10:23 +00:00
Chris Lattner
f2586d13d5 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10080 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 06:14:38 +00:00
Chris Lattner
7dadaa2785 Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10075 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 01:02:52 +00:00
Chris Lattner
5d5a714b24 Implement == and != correctly. Before they would incorrectly return !=
for some constant exprs when they could really be the same value


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10058 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 20:19:35 +00:00
Chris Lattner
48babfa60d The ConstantPointer class is now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:47:21 +00:00
Chris Lattner
a83a6e4276 No REALLY, get rid of ConstantPointer references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:21:04 +00:00
Chris Lattner
cf09f51bb9 Eliminate use of the ConstantPointer class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10053 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:19:32 +00:00
Chris Lattner
0dc396909e Constant folding shalt not be built on annotations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 19:05:17 +00:00
Chris Lattner
41495a21f9 Be a bit more tolerant of broken code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10050 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-17 01:17:04 +00:00
Brian Gaeke
cd4a398c25 When you hand WriteAsOperand a type, it now prints out its symbolic name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10042 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:08:27 +00:00
Brian Gaeke
9cebe2d83b When failing a Verifier assertion, use WriteAsOperand to print out the
offending types and/or values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10041 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:42 +00:00
Chris Lattner
40efcec8e8 Don't print 'No predecessors!' on the entry block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10038 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 22:59:57 +00:00
Chris Lattner
8b70b78ba4 Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 20:21:15 +00:00
Chris Lattner
5158aaf20e Expose the verifier to opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9984 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 19:47:29 +00:00
Chris Lattner
579de71d08 Detect problems with PHI node operands!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9916 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 07:13:37 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
d5b1245e8c Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9832 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:39:48 +00:00
Chris Lattner
54baafd286 Add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9831 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 15:51:07 +00:00
Chris Lattner
d981f8af79 Further fixes for PR93
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 20:37:01 +00:00
Chris Lattner
29e3b2ba77 Add support for constant expr shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9735 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:53:03 +00:00
Chris Lattner
c4856f37f0 If we're not checking, don't check!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9732 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:09:40 +00:00
Chris Lattner
e860e0d69c Make code gcc 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9719 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:15:42 +00:00
Chris Lattner
d5e4918fa7 Fix spello
Add negate overload


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9709 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:37:40 +00:00
John Criswell
700867bb69 Checking in Chris's suggestions:
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9693 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 15:22:26 +00:00
Chris Lattner
5bc3e31c54 Fix InstCombine/2003-11-03-VarargsCallBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9681 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 18:44:58 +00:00
Chris Lattner
bc539434c5 Did I mention that I _HATE_ CPRs?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 18:38:06 +00:00
Chris Lattner
b10bed8a63 Constant pointer refs are causing these to fail unnecessarily, which is causing
a lot of code to be pessimized.  I hate CPRs.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
088eb45cf4 Use already existing classes for post order iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 03:02:34 +00:00
Chris Lattner
95e5a2cc3f Make use of the new AssemblyAnnotationWriter interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:41:03 +00:00
Alkis Evlogimenos
74fa84fcef Output types in reverse postorder. This will allow the ByteCode/Reader
to create the minimum number of opaque types for each type with a
cycle in its type graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9615 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:04:44 +00:00
Chris Lattner
88c1738064 Print the names of more opaque types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9598 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 00:22:33 +00:00
Chris Lattner
daf2a492a7 Make sure to print opaque types names if they are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 00:12:51 +00:00
Alkis Evlogimenos
5d1bdcd6f6 Add more debugging info to help tracing the SlotCalculator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9575 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 03:12:12 +00:00
Chris Lattner
35956558e2 Fix test: Linker/2003-10-27-LinkOncePromote.ll
Fix PR58


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 16:39:39 +00:00
Chris Lattner
653de272c2 Fix bug: instcombine/2003-10-23-InstcombineNullFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9403 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 05:21:48 +00:00
Chris Lattner
aeb18ce9c0 Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9357 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 22:46:38 +00:00
Chris Lattner
f85770c9a6 Fix message to make more sense and confuse Chris less
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9354 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 21:52:20 +00:00
Chris Lattner
2765c41c98 Make sure to add a type for va_next operands, which may not other wise
occur in the module


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9336 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 17:40:54 +00:00