Commit Graph

1233 Commits

Author SHA1 Message Date
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
1390103887 Add an assert to cature null Operands. It is better to catch it here than
to SIGSEGV in the bowels of isa<...> later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16098 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:37:59 +00:00
Reid Spencer
1f079267dc Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16032 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:52:35 +00:00
Chris Lattner
72cf7df6a3 Fix a nasty bug that Nate ran into. In particular, instead of emitting a 2+MB
error message, print out:

llvm-link: error linking in 'g.2.rbc': Global Variable Collision on
' %struct.D_Reduction* %d_reduction_10_gram' - External linkage globals have
different initializers

That's a bit more concise, huh?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15958 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 00:50:59 +00:00
Reid Spencer
5527c0b6d1 Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll
Packed types need to be allowed in type statements too.

Patch provided by Brad Jones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 15:37:30 +00:00
Brian Gaeke
715c90ba52 Packed types, brought to you by Brad Jones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 06:00:58 +00:00
Chris Lattner
91b362bba9 Check constant expression validity more strictly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 17:28:46 +00:00
Chris Lattner
97f3e37f00 Allow an arbitrary prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:06:54 +00:00
Reid Spencer
28531c71cd Fix PR422.
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15818 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 07:46:33 +00:00
Alkis Evlogimenos
8fabb621b1 Split assertion to two in order to give better assertion messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15543 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-06 14:33:37 +00:00
Alkis Evlogimenos
8243976b69 Make GlobalVariable constructor assert when an initializer is of
incorrect type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15519 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-05 11:28:34 +00:00
Chris Lattner
aad2deb17c Fix another minor problem that exists if you ahve multiple functions with
nonunifiable types but the same name.  Down with PR411!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15511 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 22:39:54 +00:00
Chris Lattner
82b5b219dd Fix a typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15510 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 22:29:05 +00:00
Chris Lattner
d2da229ce3 Add a hack to work around a problem my changes exposed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15509 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 22:26:13 +00:00
Chris Lattner
c3d12f0823 Fix a latent bug exposed by my recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 18:50:09 +00:00
Chris Lattner
868bbf35b0 Fix a major regression in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15486 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:30:43 +00:00
Alkis Evlogimenos
cc7ba49d85 Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15485 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:08:13 +00:00
Alkis Evlogimenos
9e4c681354 Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:02:59 +00:00
Chris Lattner
5a837defff FindGlobalNamed used to take 2.92s out of 8.39s running a profile build of
gccld -disable-opt on 252.eon.

This patch deletes it and replaces it with a map.  The proper fix for this
is to fix PR411, but this will do in the short term.

gccld on eon now takes 5.51s, which is 50% faster than before this patch. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15480 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:44:58 +00:00
Chris Lattner
7b0c84dcf5 I swear I compiled this, really I did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15467 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:28:06 +00:00
Chris Lattner
c003628a61 Factor some code out, no substantial change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:05:54 +00:00
Chris Lattner
fe41069070 Concisify some code
Do not call FindGlobalNamed when we know we will ignore the result (because
we are not going to link a static symbol anyway).  This speeds up
gccld -disable-opt on 252.eon from 8.63s to 8.39s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15465 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 06:05:47 +00:00
Chris Lattner
6823c9f9ff Implement a FIXME, by not searching linearly through a map to remove an
element.  This speeds up the bytecode reader from 12.86s to 8.72s on 252.eon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 04:48:01 +00:00
Chris Lattner
07d7c9d9c5 Add a cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15457 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 02:27:17 +00:00
Chris Lattner
1c06891186 Change SymbolTable::insertEntry to be more careful about how many map
lookups it does.  This shaves another 5% off of bcreading 252.eon.  Note that
the proper solution to this problem is to fix PR411, but that will have to
wait until later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15455 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 00:37:31 +00:00
Misha Brukman
47b14a4a6a Fix #includes of i*.h => Instructions.h as per PR403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:30:56 +00:00
Misha Brukman
44336292fc Fix #includes of i*.h files => Instructions.h as per PR403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15327 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 16:53:53 +00:00
Alkis Evlogimenos
91366a8541 Merge i*.cpp definitions into Instructions.cpp as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15326 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:33:25 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Chris Lattner
70c7d03d1c alloca void makes no sense
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15262 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 07:30:02 +00:00
Reid Spencer
cddc86f27c Avoid use of size(), which counts, in favor of other mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15221 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:44:54 +00:00
Reid Spencer
c9a1f0dcdd Adjust to new Module.h interface for dependent libraries
Only write the target triple and deplibs if they are non-empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15216 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 21:29:43 +00:00
Reid Spencer
801db47373 bug 263:
Ensure the list of libraries is cleared.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 18:08:57 +00:00
Reid Spencer
83f6a77c8f bug 263:
Add ability to write target triple and dependent libraries information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15211 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 18:08:18 +00:00
Alkis Evlogimenos
89756ea109 Use name.empty() instead of testing against equality with the empty
string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 06:16:52 +00:00
Alkis Evlogimenos
83949fcf7c Disallow creation of named values of type void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15190 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 06:07:15 +00:00
Brian Gaeke
7ff4006f82 Fix problem with inserting FunctionPasses that depend on ImmutablePasses
(e.g., LICM) into FunctionPassManagers. The problem is that we were
using a C-style cast to cast required analysis passes to PassClass*, but
if it's a FunctionPassManager, and the required analysis pass is an
ImmutablePass, the types aren't really compatible, so the C-style cast
causes a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15140 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 19:35:50 +00:00
Chris Lattner
9545a1797b Updates to gc intrinsics, contributed by Tobias Nurmiranta
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15096 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 05:50:01 +00:00
Chris Lattner
ab4c19ec3e classof implementations are now inlined
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:59:10 +00:00
Chris Lattner
f8083b7f20 Method now returns null, dtor is inlined
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 00:55:35 +00:00
Chris Lattner
da6cdfa9e8 Fix infinite loop gccld'ing povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 08:12:57 +00:00
Reid Spencer
acc928042d Shrink some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14956 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 01:04:19 +00:00
Reid Spencer
e253cf60fd bug 122:
- Move these functions from other places
- Provide implementations of Constant class overrides in GlobalValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14936 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:06:26 +00:00
Reid Spencer
a31fdda275 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Replace tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14935 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:03:48 +00:00
Reid Spencer
38696d2f2b bug 122:
- Correct an assert to not have redundant isa<GlobalValue>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14934 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:02:41 +00:00
Reid Spencer
4ec2e4c578 bug 122:
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:01:50 +00:00
Reid Spencer
ffe77d36eb bug 122:
- Correct isa<Constant> for GlobalValue subclass
- Fix some tabs and indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14932 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:57:36 +00:00
Reid Spencer
0f7eea5d04 bug 122:
- Module doesn't need to manage ConstantPointerRefs any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:53:23 +00:00
Reid Spencer
00dc479613 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:50:57 +00:00
Reid Spencer
bb9051531c bug 122:
- Move GlobalValue and GlobalVariable implementations to Globals.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:50:19 +00:00
Reid Spencer
1c9c8e64d2 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Delete ConstantPointerRef member function implementations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14928 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:48:33 +00:00
Reid Spencer
7970396014 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:47:01 +00:00
Alkis Evlogimenos
8e9b219b67 Add convinience constructor for function calls with two args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 12:04:28 +00:00
Chris Lattner
4d143ee019 IA64 compat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:08:28 +00:00
Chris Lattner
0a8e8e1a4e Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:31 +00:00
Chris Lattner
ce36d55cf8 Bug fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 01:29:12 +00:00
Chris Lattner
dd68469382 Implement folding of expressions like 'uint cast (int* getelementptr (int*
null, uint 1) to uint)' to a constant integer.  We can only do this with
primitive LLVM types, because other types have target-specific sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14837 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 01:16:59 +00:00
Chris Lattner
33af23d902 Implement new helper methods for creating two-index GEP instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14821 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 18:14:33 +00:00
Chris Lattner
144d9baf5e Make Argument::print more resilient to non-verifiable IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 23:14:34 +00:00
Chris Lattner
b4091e548e Catch aggregates passed by value sooner rather than later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14800 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 20:09:51 +00:00
Chris Lattner
b370c7a41a implement new helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14776 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:35:11 +00:00
Chris Lattner
88e2b780cb Fix a really nasty logic error that VC noticed.
Reid, this might matter to you :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:27:31 +00:00
Chris Lattner
1c2fe31483 Implement new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14767 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 01:17:34 +00:00
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
Chris Lattner
2a5020150c Workaround or a VS miscompilation bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-08 23:21:39 +00:00
Chris Lattner
82d55902c6 Fix a link error using VS8.0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-08 17:53:24 +00:00
Chris Lattner
40416e4e85 Fix PR361.
Dominance properties don't hold in unreachable code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14053 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-07 23:07:33 +00:00
Chris Lattner
c70a5092bf Fix GCC warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 17:44:48 +00:00
Chris Lattner
9bf2a926cb Fix GCC warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 17:43:52 +00:00
Chris Lattner
f0a3e6c21c Remove an unused variable.
Work around for bogus errors: no those static functions don't need to
be executed to be initialized!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14040 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 01:05:19 +00:00
Chris Lattner
8e72749fc0 Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14037 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 00:24:59 +00:00
Chris Lattner
ed965e901c Work around VS bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14036 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 00:22:04 +00:00
Chris Lattner
f878218c97 As much as I dislike doing this, it's the only fix for VC8.0 that I can come
up with, even though it's perfectly conformant code.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14034 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 00:11:27 +00:00
Chris Lattner
e1cacce400 Remove unused var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14033 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 00:03:27 +00:00
Chris Lattner
54e3e8fd37 Squelch a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14032 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 23:53:20 +00:00
Chris Lattner
20924bc3dd Delete some unreachable code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 23:52:36 +00:00
Misha Brukman
40c732cc52 * No more CachedWriter::setStream()
* ostream is back to being a reference instead of a pointer
* Output single characters as chars, not as length-1 strings


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 21:11:51 +00:00
Chris Lattner
d9a98de5c8 Ugh, apparently there is no common ground here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 20:48:51 +00:00
Chris Lattner
071f2f13b6 Squish a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 20:14:29 +00:00
Chris Lattner
7c277b3a64 * Verify function prototypes, not just functions with bodies.
* Verify that functions do not take aggregates as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-03 06:38:43 +00:00
John Criswell
4ff620a867 Modified calcTypeName() so that it does not allocate a std::string for
every recursive call.
This makes it more robust for deeply nested, unnamed types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13915 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-01 14:54:08 +00:00
Reid Spencer
3ee239bd40 Fix a bug that Chris asserts emphatically is a bug. The changed clause
would always return false because the Type of a type value is always
Type::TypeTY and can never be a floating point type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13902 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-30 01:19:48 +00:00
Reid Spencer
3c82aa3623 Moved this file to lib/Bytecode/Writer because its used there only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13900 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-30 00:09:32 +00:00
Chris Lattner
c3fcaea8ac Don't use size() when you mean empty()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:40:19 +00:00
Reid Spencer
73b7495a96 Clean up a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13860 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 22:04:46 +00:00
Reid Spencer
5dff158858 Fix for bug 348.
The SymbolTable changes caused this one too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13859 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:58:13 +00:00
Alkis Evlogimenos
75dbe8eafa Add constructors that take a BasicBlock to append to, to the rest of
the llvm::Instruction hierarchy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13800 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 00:15:23 +00:00
Alkis Evlogimenos
f6e8cb4954 Inline trivial constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 22:07:18 +00:00
Reid Spencer
b03de0c780 Several clean ups suggested by Chris: remove tabs, make SlotMachine do lazy
initialization so we don't scan large Modules/Functions needlessly, tighten
up restrictions on what can be put in SlotMachine (no Constants that aren't
GlobalValues).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13796 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:56:09 +00:00
Alkis Evlogimenos
e5828f1fa7 Refactor common initialization code in private init() functions.
This is a first step in supplying append to basic block constructors
for all instruction types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:41:09 +00:00
Reid Spencer
798ff64328 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:37:11 +00:00
Reid Spencer
0d1b77e282 Part of bug 122. Removed dependency of AsmWriter on SlotCalculator by
incorporating a significantly simpler "SlotMachine" into this file. The
SlotMachine is tailored for use by only the AsmWriter whose requirements
for slot numbers are vastly different than from the Bytecode/Writer. Code
change passes all Feature and Regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13784 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:18:52 +00:00
Reid Spencer
fa452c0550 Document a couple functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13761 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 18:14:38 +00:00
Reid Spencer
875510805f Made it illegal to pass a Type* through one of the Value* interfaces. The
SymbolTable will now assert if this is done. This didn't find any incorrect
usage of SymbolTable but will prevent future mistakes until Type != Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 15:20:47 +00:00
Reid Spencer
9231ac8b6f Convert to SymbolTable's new iteration interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:40 +00:00
Reid Spencer
af90b0d8b8 Convert to SymbolTable's new iteration interface. Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:29 +00:00
Reid Spencer
b870c5f7c5 Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13752 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:52:42 +00:00
Reid Spencer
567bc2cc1e Convert to SymbolTable's new lookup and iteration interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13751 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:52:20 +00:00
Chris Lattner
c971025b01 Implement some helpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13738 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 05:32:43 +00:00
Chris Lattner
e899705c27 Recognize and verify the new GC intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:16:51 +00:00
Chris Lattner
0f9e9d0ad2 Fix for PR340: Verifier misses malformed switch instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13618 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-21 16:47:21 +00:00
Brian Gaeke
2fea9ade55 Fold two assertions with backwards error messages into one with a
correct error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13590 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-17 21:15:18 +00:00
Chris Lattner
0979ca7e3e Implement the AddPrototypes method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:29:57 +00:00
John Criswell
8cb23dad20 Don't call getForwardedType() twice, as recommended by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:15:47 +00:00
John Criswell
7775c1f136 Fix for PR#330.
When looking at getelementptr instructions, make sure to use a forwarded
type.  We want to do this because a DerivedType may drop its uses and then
refine its users, who may then use another user who hasn't been refined yet.
By getting the forwarded type, we always ensure that we're looking at a
Type that isn't in a halfway refined state.

Now, I should be able to put this stuff in PATypeHandle, but it doesn't work
for some reason.  This should do for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 21:18:08 +00:00
John Criswell
4a9c90446d Fixed inconsistent indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13363 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:46:05 +00:00
Misha Brukman
e5242def97 class AssemblyWriter:
* Make contained ostream pointer, not reference
* Allow setting of that ostream via setStream()

class CachedWriter:
* setStream() in turn calls setStream() on the AssemblyWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13247 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 19:24:28 +00:00
Misha Brukman
5cf1acff3c * Add ability to print out type as symbolic
* Add Module accessor to AssemblyWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13227 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 15:31:21 +00:00
Chris Lattner
6ffe551f65 Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-27 15:13:33 +00:00
Misha Brukman
af76cfb0fb I'm allergic to the word `stuff'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13096 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-21 18:27:56 +00:00
Misha Brukman
ea51deb18a Fix retriving parent Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-16 17:37:12 +00:00
Misha Brukman
98eb6264d4 Assert if deleting BasicBlock before removing it from Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-16 15:47:21 +00:00
Chris Lattner
e1f0cf179f Make sure to check for a very bad class of errors: an instruction
that does not dominate all of its users, but is in the same basic block as
its users.  This class of error is what caused the mysterious CBE only
failures last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12979 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-16 05:51:47 +00:00
John Criswell
71c887d688 Remove the return type check for llvm.readio. This check is done for all
functions and is not needed here.
Simplify the pointer type check per Chris's suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12945 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-14 15:06:48 +00:00
John Criswell
17f64258cf Added code to verify that llvm.readio's pointer argument returns something
that matches its return type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12944 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-14 14:49:36 +00:00
John Criswell
994a765e5c Finish adding the llvm.readio and llvm.writeio intrinsics.
Sorry these didn't get in yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-14 13:46:52 +00:00
Chris Lattner
a0ae8196a1 Add a missing break, which caused a crash in an obscure situation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 01:29:30 +00:00
John Criswell
6d804f408a Reversed the order of the llvm.writeport() operands so that the value
is listed first and the address is listed second.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12795 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-09 19:09:14 +00:00
John Criswell
9570301ee8 Added the llvm.readport and llvm.writeport intrinsics.
The Verifier ensures that their parameters are of integral types and have
the correct sign, but it does not enforce any size restrictions because
such restrictions are platform dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 20:27:38 +00:00
Chris Lattner
6e40e1d15c Do not mangle intrinsics in any way!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12673 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 20:17:53 +00:00
Chris Lattner
28977af72a Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 01:30:19 +00:00
Chris Lattner
d144f42a5a Add ConstantExpr::get(Sign|Zero)Extend methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12648 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-04 23:20:30 +00:00
Chris Lattner
fdc38c4ad3 Make the verifier API more complete and useful.
Patch contributed by Reid Spencer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 15:45:08 +00:00
Chris Lattner
1438102576 Fix linking of constant expr casts due to type resolution changes. With
this and the other patches 253.perlbmk links again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 02:58:28 +00:00
Chris Lattner
4b2f08a3a9 Add support for constant expr casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 02:56:11 +00:00
Chris Lattner
92e84229e1 Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12562 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-30 22:51:03 +00:00
Chris Lattner
fc33d30446 Add some new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12539 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-30 00:20:08 +00:00
Chris Lattner
db81395452 Adjust to new itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12534 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 20:42:49 +00:00
Chris Lattner
d25e3ecb3c Handle -0.0 correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12530 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 19:51:24 +00:00
Chris Lattner
4dcb5401e4 Add a bunch of methods that should have been added a long time ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12526 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 02:37:53 +00:00
Chris Lattner
944cfafe76 Add another check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12525 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 00:29:36 +00:00
Chris Lattner
e83593b2d3 Fix an assertion
Contributed by Reid Spencer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-29 00:17:20 +00:00
Chris Lattner
e3651f00e8 Add two methods which have been needed for a long time: Type::get(Un)signedVersion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12522 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-26 21:43:22 +00:00
Chris Lattner
59c3569b14 Catch some more cases of broken code. The loop extractor seems to be creating
situations where there is a branch that goes to a block in another function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12379 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 03:23:54 +00:00
Chris Lattner
2eff85941f verifyFunction has been broken for a long time now. Fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 03:16:15 +00:00
Chris Lattner
317201d773 Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 00:24:00 +00:00
Misha Brukman
4230f40add Keep transitively-required passes alive for queries to work after the initial
user pass is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 06:16:28 +00:00
Chris Lattner
230c1a7222 Add support for checking the select instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:54:31 +00:00
Chris Lattner
b4f4880eba Know the opcode name of the select instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12324 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:54:20 +00:00
Chris Lattner
08a45cc2ff Add support for select constant expressions. Use reserve a bit more to avoid
memory wasteage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12323 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:54:04 +00:00
Chris Lattner
647f82be07 Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12322 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:53:41 +00:00
Chris Lattner
e97148628f Teach the constant folder how to do select instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12321 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:53:32 +00:00
Chris Lattner
cfdd148972 Print select instructions correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12320 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:53:14 +00:00
Misha Brukman
ec85af16a0 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12298 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:53:51 +00:00
Chris Lattner
9f717ef279 Adjust to new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12231 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:51:45 +00:00
Chris Lattner
802b5ab844 Implement test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12218 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 06:17:35 +00:00
Chris Lattner
2c56b55cf0 Remove Module::mutateConstantPointerRef, which is now thankfully dead!
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12216 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 06:16:10 +00:00
Chris Lattner
2296ec0ce9 Eliminate nightmarish API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 06:11:10 +00:00
Misha Brukman
ab5c6003d2 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-02 00:22:19 +00:00
Misha Brukman
9d0802e7dd * If a badref has a name, print it out for ease of debugging
* Doxygenify (some) comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12057 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 19:48:13 +00:00
Chris Lattner
cbee990a29 Fix -debug-pass=Executions, which relied on Function, Module, and BasicBlock
being annotable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12013 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 22:37:04 +00:00
Brian Gaeke
f822ee999f Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 21:55:18 +00:00
Chris Lattner
08092533b1 Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 17:28:25 +00:00
Chris Lattner
1cd4c7294c Make sure that at least one virtual method is defined in a .cpp file to avoid
having the compiler emit RTTI and vtables to EVERY translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 07:24:18 +00:00
Chris Lattner
2a11653fa9 Make the verifier a little more explicit about this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11811 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 22:06:07 +00:00
Chris Lattner
b228f9c86b Get all instruction definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 06:25:38 +00:00
Chris Lattner
57cb9883aa Fix PR245: Linking weak and strong global variables is dependent on link order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 21:56:04 +00:00
Chris Lattner
ac89164fa2 Adjust to recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 03:03:47 +00:00
Chris Lattner
2e9bb1a88e Move the folding of gep null, 0, 0, 0 to a place where it can be shared and
enjoyed by all, fixing a fixme.  Add an assert


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11505 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-16 20:46:13 +00:00
Chris Lattner
8709927af8 Fix a bug in the recent rewrite of the leakdetector that caused all of the
nightly tests to be really messed up.  The problem was that the new leakdetector
was depending on undefined behavior: the order of destruction of static objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11488 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 23:33:48 +00:00
Chris Lattner
9b700f7951 By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:24:51 +00:00
Chris Lattner
588e72db75 Refactor code. Now the intrinsic lowering pass tries to recycle preexisting
prototypes, even if they don't precisely match what it would prefer to use.
This fixes: CBackend/2004-02-15-PreexistingExternals.llx compiling it into:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_30 = memcpy(((int *)l27_A), ((unsigned )(long)l27_B), ((int )123u));

instead of:

  ltmp_0_30 = memcpy(l14_C, 4u, 17);
  ltmp_1_27 = l43_memcpy(l27_A, l27_B, 123u);

Which does the wrong thing as you could imagine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11481 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:16:39 +00:00
Chris Lattner
de512b5b2e Adjustments to support the new ConstantAggregateZero class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:55:15 +00:00
Chris Lattner
40bbeb5d07 Add a new ConstantAggregateZero class, to fix PR239. This makes zero
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements.  This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:53:04 +00:00
Chris Lattner
ca705fa31d ConstantArray::get and ConstantStruct::get now just return pointers to
'Constant', instead of specific subclass pointers.  In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11467 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:14:47 +00:00
Chris Lattner
04d1fb6df9 Remove dependence on return type of ConstantStruct::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:07:32 +00:00
Chris Lattner
371064481a Remove dependence on the return type of ConstantArray::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 04:05:58 +00:00
Chris Lattner
aab54da21c Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
from 16.57 -> 13.46s on 129.compress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11462 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 02:46:46 +00:00
Alkis Evlogimenos
b663d76f86 Modularize implementation of LeakDetector into a typed template
implementation class. This makes the code simpler and allows for more
types to be added easily. It also implements caching for generic
objects (it was only available for llvm objects).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 23:33:39 +00:00
Chris Lattner
cc42d2c3cc A target that doesn't support these intrinsics will still meet spec (the
intrinsic will always produce zero), but it will behave unexpectedly, so
warn like GCC does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 04:52:06 +00:00
Chris Lattner
cf89908381 Add llvm.memset/frameaddress/returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11431 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 02:47:17 +00:00
Chris Lattner
a6acb4f5fd Fix the logic in the name mangler. If there are two symbols named 'X', and one
is external, make sure to mangle the *internal* one, not external one


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11424 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 00:30:23 +00:00
Chris Lattner
2751e76a70 Add support for the llvm.memmove intrinsic
Patch graciously contributed by Reid Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:11:20 +00:00
Chris Lattner
5fe51cc2c4 Implement the llvm.memcpy intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11349 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 17:01:09 +00:00
Chris Lattner
82a5ff4c54 Initialize the count instance variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 03:29:16 +00:00
Chris Lattner
b171942441 Remove obsolete method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 01:17:33 +00:00
Chris Lattner
a44fb0d362 Remove the statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11243 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 21:01:23 +00:00
Chris Lattner
c3b5849e92 Speed up type resolution some more. On the testcase in PR224, for example,
this speeds up a release llvm-as from 21.95s to 11.21s, because before it
would do an expensive traversal of the type-graph of every type resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11242 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 20:23:44 +00:00
Chris Lattner
0cdaf94a5e Implement the hashing scheme in an attempt to speed up the "slow" case in
type resolution.  Unfortunately it doesn't help.

Also delete some dead debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11237 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 18:32:40 +00:00
Chris Lattner
2729540896 Code cleanup in preparation for later changes. Now that ContainedTy's are
consistent across the various type classes, we can factor out a LOT more
almost-identical code.  Also, add a couple of temporary statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11232 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 16:35:14 +00:00
Chris Lattner
f32f56862a Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 05:40:24 +00:00
Chris Lattner
d21cd809b6 Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:37:31 +00:00
Chris Lattner
d5d8996720 Start using the new and improve interface to FunctionType arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11224 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:14:01 +00:00
Chris Lattner
e21f68d1e8 Two problems with these lines of code:
1. The "work" was not in the assert, so it was punishing the optimized release
 2. getNamedFunction is _very_ expensive in large programs.  It is not designed
    to be used like this, and was taking 7% of the execution time of the code
    generator on perlbmk.

Since the assert "can never fail", I'm just killing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 00:59:07 +00:00
Chris Lattner
71151aee60 Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Have I ever mentioned how much I _hate_ constantpointerrefs?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 00:15:41 +00:00
Chris Lattner
a306d3720a vi failed me again. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:52:30 +00:00
Chris Lattner
f37a4268d8 Rename the invoke 'except' destination to the 'unwind' destination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11205 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:52:04 +00:00
Chris Lattner
aeb2a1d708 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:44:31 +00:00
Chris Lattner
4f05611ed9 Adjust to the new BB ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:57:50 +00:00
Chris Lattner
c6aa017eae When splitting a basic block, insert the new half immediately after the first
half.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11110 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 03:21:31 +00:00
Chris Lattner
786993c01e If changing a parent, don't add then remove the object from the leak detector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 01:06:38 +00:00
Chris Lattner
f2c3106866 In BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
instead of a loop that is really inefficient with large basic blocks.

This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s
which still isn't exactly speedy, but is a lot better.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11105 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-03 23:11:21 +00:00
Chris Lattner
84a102a780 Floating point negates are -0.0 - X, not 0.0 - X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11084 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 20:21:29 +00:00
Chris Lattner
cfdf2419bc Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values.  This is likely to
make the map search be faster anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 22:49:04 +00:00
Chris Lattner
b97e2788ff Fix a crasher bug in my constant folding rewrite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 01:23:19 +00:00
Chris Lattner
90fb19ed2c Fix a problem brian ran into with the bytecode reader asserting. It turns
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it.  This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 00:55:21 +00:00
Misha Brukman
ce218c6492 Let subclasses implement ModuleProvider::materializeModule() which is based on
their implementation of book-keeping for which functions need to be materialized
and which don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10943 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-21 22:54:50 +00:00
Chris Lattner
f2d577b27a SlotCalculator.h moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 19:50:34 +00:00
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