Commit Graph

970 Commits

Author SHA1 Message Date
Reid Spencer
3ba415a770 Replace use of defunct Type::setName method with SymbolTable::insert.
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14732 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-10 16:37:42 +00:00
Chris Lattner
36002e43ec Remove unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14726 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 16:48:13 +00:00
Chris Lattner
51662c7beb The uid mapping is no more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14708 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 22:31:09 +00:00
Chris Lattner
d6391d7d3b Do not call Type::getUniqueID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 22:09:34 +00:00
Chris Lattner
e14d7e4f9f Eliminate the SignedType and UnsignedType classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14695 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 17:30:07 +00:00
Misha Brukman
cf617ddd98 There is no error message to print out, end sentence with `!'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 21:22:05 +00:00
Reid Spencer
e294753128 Fix for bug 391.
Improve exeception handling around bcreader invocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14674 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 21:01:38 +00:00
Chris Lattner
5c45e6db39 Fix regressions in these testcases:
Regression.Assembler.2002-01-24-BadSymbolTableAssert
 Regression.Assembler.2002-01-24-ValueRefineAbsType

Found through the nightly tester :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14671 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 18:07:46 +00:00
Chris Lattner
c964715a76 The bytecode reader wants to be able to read types that are not quite resolved
yet, then resolve them in it's own sweet time.  We must support this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14666 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:48:27 +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
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
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
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
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
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
Chris Lattner
c5f143b6e7 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
2004-07-02 23:20:17 +00:00
Chris Lattner
4d13294d47 Add much better assertion checking for load and store insts.
Contributed by Vladimir Merzliakov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14546 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-01 20:23:52 +00:00
Chris Lattner
40515dba1b Fold iType into Value::VTy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:38:48 +00:00
Chris Lattner
62372c2ee7 User ctor is now inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14431 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:01:38 +00:00
Chris Lattner
3d4bd5aa8d Instancevar was renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 20:33:39 +00:00
Chris Lattner
fae098a56b Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14426 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 19:40:40 +00:00
Misha Brukman
5b636315a9 * Capitalize `Java'
* Sprinkle hypens liberally
* Fix some grammar in comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14374 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:47:35 +00:00
Misha Brukman
c837dd93cd Linker.h moved to include/llvm/Support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14349 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 17:24:31 +00:00
Misha Brukman
0313e0b44d Use a reference instead of a pointer for the ostream. The pointer was only
there to assist in the development of llvm-tv, and it no longer has a need to
modify the AsmWriter output stream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14304 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:53:56 +00:00
Chris Lattner
c2dfb8bb90 Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client
code.  Patch contributed by Vladimir Prus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14280 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 12:12:12 +00:00
Chris Lattner
697692a009 IntrinsicLowering.cpp now lives in lib/CodeGen/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14269 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20 07:59:27 +00:00
Chris Lattner
3048373748 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20 07:49:54 +00:00
Chris Lattner
fab8596459 compute dominator tree children in a deterministic order that does not depend
on the address of BasicBlock objects in memory.  This eliminates stuff like this:

 Inorder Dominator Tree:
   [1]  %entry
     [2]  %loopentry
-      [3]  %loopexit
       [3]  %no_exit
-        [4]  %endif
         [4]  %then
+        [4]  %endif
+      [3]  %loopexit
       [3]  %return


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 20:13:48 +00:00
Chris Lattner
f6437a3023 Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 20:04:47 +00:00
Chris Lattner
a8abee2136 Fix printing of Argument objects, problem found by Patrick Meredith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14215 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 04:07:20 +00:00
Chris Lattner
f70c22b019 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Chris Lattner
c2616625a3 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14199 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 17:56:54 +00:00
Chris Lattner
4ee623de0b isnan is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:52:58 +00:00
Chris Lattner
be78ac4422 Remove isnan support, correct isunordered support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:42:23 +00:00
Chris Lattner
d1cd328560 Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14181 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:07:32 +00:00
Alkis Evlogimenos
ac700ca926 Make assertions more consistent with the rest of the intrinsic
function verification and make it a requirement that both arguments to
llvm.isunordered are of the same type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14165 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-13 00:55:26 +00:00
Alkis Evlogimenos
9685372062 Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-12 19:19:14 +00:00
Chris Lattner
02348caffc Fix lowering to work correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 02:54:02 +00:00
Chris Lattner
137cc4fc8c I misled Alkis: LLVM should have isnan, not isunordered.
isunordered(X, Y) === isnan(X) | isnan(Y)

Remove isunordered, add isnan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 02:29:43 +00:00
Alkis Evlogimenos
f616f22e81 Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 01:08:18 +00:00
Chris Lattner
1797ce1e24 Share some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-10 01:57:38 +00:00
Chris Lattner
e9e326e2eb Tolerate more errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14104 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-09 22:22:10 +00:00
Chris Lattner
69566459cc Make the asmwriter much more tolerant of errors (which are common when working
on new front-ends and stuff).  Also get rid of some tabs that snuck in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14100 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-09 19:41:19 +00:00
Reid Spencer
fc621e2878 Made it possible for the printInfoComment method to invoke getSlot in
such a way that if the Value being printed is standalone that we don't
assert and abort but just print ":??" for the slot number instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14097 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-09 15:26:53 +00:00