Chris Lattner
4107bfcf9b
Fix a latent bug exposed by my recent changes
...
llvm-svn: 15498
2004-08-04 18:50:09 +00:00
Chris Lattner
586734c438
Fix a major regression in my previous checkin
...
llvm-svn: 15486
2004-08-04 08:30:43 +00:00
Alkis Evlogimenos
bdd0467a1e
Stop using getValues().
...
llvm-svn: 15485
2004-08-04 08:08:13 +00:00
Alkis Evlogimenos
72232b4a01
Stop using getValues().
...
llvm-svn: 15482
2004-08-04 08:02:59 +00:00
Chris Lattner
3f4d9ffde5
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. :)
llvm-svn: 15480
2004-08-04 07:44:58 +00:00
Chris Lattner
f140ae0851
I swear I compiled this, really I did.
...
llvm-svn: 15467
2004-08-04 07:28:06 +00:00
Chris Lattner
5cc9a6fda7
Factor some code out, no substantial change.
...
llvm-svn: 15466
2004-08-04 07:05:54 +00:00
Chris Lattner
4a2f261fab
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.
llvm-svn: 15465
2004-08-04 06:05:47 +00:00
Chris Lattner
100d0875ba
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.
llvm-svn: 15463
2004-08-04 04:48:01 +00:00
Chris Lattner
8eda57f392
Add a cast
...
llvm-svn: 15457
2004-08-04 02:27:17 +00:00
Chris Lattner
71bbf1ea00
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.
llvm-svn: 15455
2004-08-04 00:37:31 +00:00
Misha Brukman
58104df77b
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Misha Brukman
8346db7afe
Fix #includes of i*.h files => Instructions.h as per PR403
...
llvm-svn: 15327
2004-07-29 16:53:53 +00:00
Alkis Evlogimenos
09d3f2533c
Merge i*.cpp definitions into Instructions.cpp as part of bug403.
...
llvm-svn: 15326
2004-07-29 12:33:25 +00:00
Alkis Evlogimenos
fb27f702ca
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
687d568cf1
alloca void makes no sense
...
llvm-svn: 15262
2004-07-27 07:30:02 +00:00
Reid Spencer
a23e595275
Avoid use of size(), which counts, in favor of other mechanisms.
...
llvm-svn: 15221
2004-07-25 21:44:54 +00:00
Reid Spencer
07e3e1c29b
Adjust to new Module.h interface for dependent libraries
...
Only write the target triple and deplibs if they are non-empty.
llvm-svn: 15216
2004-07-25 21:29:43 +00:00
Reid Spencer
11fc1457c0
bug 263:
...
Ensure the list of libraries is cleared.
llvm-svn: 15212
2004-07-25 18:08:57 +00:00
Reid Spencer
9077f12bb0
bug 263:
...
Add ability to write target triple and dependent libraries information.
llvm-svn: 15211
2004-07-25 18:08:18 +00:00
Alkis Evlogimenos
d4ef731684
Use name.empty() instead of testing against equality with the empty
...
string.
llvm-svn: 15191
2004-07-25 06:16:52 +00:00
Alkis Evlogimenos
d5f5b018e9
Disallow creation of named values of type void.
...
llvm-svn: 15190
2004-07-25 06:07:15 +00:00
Brian Gaeke
bdab8e50cd
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.
llvm-svn: 15140
2004-07-23 19:35:50 +00:00
Chris Lattner
59c0771263
Updates to gc intrinsics, contributed by Tobias Nurmiranta
...
llvm-svn: 15096
2004-07-22 05:50:01 +00:00
Chris Lattner
6dbdddfa28
classof implementations are now inlined
...
llvm-svn: 14987
2004-07-19 00:59:10 +00:00
Chris Lattner
1353dd5917
Method now returns null, dtor is inlined
...
llvm-svn: 14983
2004-07-19 00:55:35 +00:00
Chris Lattner
80105701f5
Fix infinite loop gccld'ing povray
...
llvm-svn: 14962
2004-07-18 08:12:57 +00:00
Reid Spencer
78477eb62b
Shrink some code.
...
llvm-svn: 14956
2004-07-18 01:04:19 +00:00
Reid Spencer
4a586ee919
bug 122:
...
- Move these functions from other places
- Provide implementations of Constant class overrides in GlobalValue
llvm-svn: 14936
2004-07-18 00:06:26 +00:00
Reid Spencer
ad3ee0e6bb
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Replace tabs.
llvm-svn: 14935
2004-07-18 00:03:48 +00:00
Reid Spencer
873e776581
bug 122:
...
- Correct an assert to not have redundant isa<GlobalValue>
llvm-svn: 14934
2004-07-18 00:02:41 +00:00
Reid Spencer
27b74ad249
bug 122:
...
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14933
2004-07-18 00:01:50 +00:00
Reid Spencer
4005f11ca3
bug 122:
...
- Correct isa<Constant> for GlobalValue subclass
- Fix some tabs and indentation.
llvm-svn: 14932
2004-07-17 23:57:36 +00:00
Reid Spencer
d83e76d112
bug 122:
...
- Module doesn't need to manage ConstantPointerRefs any more.
llvm-svn: 14931
2004-07-17 23:53:23 +00:00
Reid Spencer
0e268122cc
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14930
2004-07-17 23:50:57 +00:00
Reid Spencer
daba673c69
bug 122:
...
- Move GlobalValue and GlobalVariable implementations to Globals.cpp
llvm-svn: 14929
2004-07-17 23:50:19 +00:00
Reid Spencer
56e2bed436
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Delete ConstantPointerRef member function implementations
llvm-svn: 14928
2004-07-17 23:48:33 +00:00
Reid Spencer
bc38cd572f
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14927
2004-07-17 23:47:01 +00:00
Alkis Evlogimenos
ddd1db50f9
Add convinience constructor for function calls with two args.
...
llvm-svn: 14885
2004-07-16 12:04:28 +00:00
Chris Lattner
9b03d18729
IA64 compat
...
llvm-svn: 14867
2004-07-16 00:08:28 +00:00
Chris Lattner
94212f7102
Fixes for PR341
...
llvm-svn: 14847
2004-07-15 02:51:31 +00:00
Chris Lattner
d1b726d18f
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.
llvm-svn: 14837
2004-07-15 01:16:59 +00:00
Chris Lattner
74bd192fba
Implement new helper methods for creating two-index GEP instructions
...
llvm-svn: 14821
2004-07-14 18:14:33 +00:00
Chris Lattner
183766f21e
Make Argument::print more resilient to non-verifiable IR
...
llvm-svn: 14801
2004-07-13 23:14:34 +00:00
Chris Lattner
1a1afa3566
Catch aggregates passed by value sooner rather than later.
...
llvm-svn: 14800
2004-07-13 20:09:51 +00:00
Chris Lattner
3f023d6df9
implement new helper method
...
llvm-svn: 14776
2004-07-12 20:35:11 +00:00
Chris Lattner
d581590c73
Fix a really nasty logic error that VC noticed.
...
Reid, this might matter to you :)
llvm-svn: 14774
2004-07-12 20:27:31 +00:00
Chris Lattner
b704df8365
Implement new method
...
llvm-svn: 14767
2004-07-12 01:17:34 +00:00
Reid Spencer
d45c27da89
Replace use of defunct Type::setName method with SymbolTable::insert.
...
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!
llvm-svn: 14732
2004-07-10 16:37:42 +00:00
Chris Lattner
d3f73edc53
Remove unused method
...
llvm-svn: 14726
2004-07-09 16:48:13 +00:00
Chris Lattner
ef1e8119ec
The uid mapping is no more
...
llvm-svn: 14708
2004-07-08 22:31:09 +00:00
Chris Lattner
77a943eb4c
Eliminate the SignedType and UnsignedType classes.
...
llvm-svn: 14695
2004-07-08 17:30:07 +00:00
Misha Brukman
f7987f7c2a
There is no error message to print out, end sentence with `!'
...
llvm-svn: 14678
2004-07-07 21:22:05 +00:00
Reid Spencer
ff9f74082f
Fix for bug 391.
...
Improve exeception handling around bcreader invocations.
llvm-svn: 14674
2004-07-07 21:01:38 +00:00
Chris Lattner
6c5e26142c
Fix regressions in these testcases:
...
Regression.Assembler.2002-01-24-BadSymbolTableAssert
Regression.Assembler.2002-01-24-ValueRefineAbsType
Found through the nightly tester :)
llvm-svn: 14671
2004-07-07 18:07:46 +00:00
Chris Lattner
ab994ac49a
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.
llvm-svn: 14666
2004-07-07 06:48:27 +00:00
Chris Lattner
006aea24ff
When folding constant expr gep's, don't force the use of long indices.
...
llvm-svn: 14658
2004-07-07 04:45:13 +00:00
Chris Lattner
b9f3b677ae
Make sure people don't make functiontypes with an invalid return type
...
llvm-svn: 14654
2004-07-06 23:25:19 +00:00
Chris Lattner
5c1abfecfe
Find bugs sooner rather than later. In this case, don't allow the creation
...
of instructions that don't have a first-class or void type.
llvm-svn: 14646
2004-07-06 17:44:17 +00:00
Reid Spencer
bfacdee814
Correct syntax typo .. ; -> :
...
llvm-svn: 14619
2004-07-04 12:15:11 +00:00
Reid Spencer
8a9a34f7ff
- Changes for bug 122
...
- Remove Tabs
- Add inserters needed since Value doesn't implement them any more
- Move some functions here to avoid cyclic header file dependencies.
llvm-svn: 14618
2004-07-04 12:14:17 +00:00
Reid Spencer
d02e1dc90d
- #include <iostream> since its not in Value.h any more.
...
llvm-svn: 14617
2004-07-04 11:55:37 +00:00
Reid Spencer
d242724126
Constify SymbolTable's use of Type* so that it never modifies them.
...
llvm-svn: 14616
2004-07-04 11:55:08 +00:00
Reid Spencer
64a2a1c92b
- #include <iostream> since its not in Value.h any more.
...
- constify use of Type* returned from symbol table.
llvm-svn: 14615
2004-07-04 11:52:49 +00:00
Reid Spencer
abf33934d2
#include <iostream> since its not in Value.h any more.
...
llvm-svn: 14614
2004-07-04 11:51:24 +00:00
Reid Spencer
93c3d80eb4
Adjust the slot machine to handle Types separately from Values. This was
...
done by doubling up the data structures so that Type based equivalents are
used. A consequence of this is overloading of function members that take a
Type* instead of a Value*. Various other cleanups related to Type != Value
(bug 122) were also implemented.
llvm-svn: 14613
2004-07-04 11:50:43 +00:00
Chris Lattner
f0af72ac49
Fix Type::isSized() to realize that "{ opaque }" is not sized
...
llvm-svn: 14585
2004-07-02 23:20:17 +00:00
Chris Lattner
f3e46315fb
Add much better assertion checking for load and store insts.
...
Contributed by Vladimir Merzliakov!
llvm-svn: 14546
2004-07-01 20:23:52 +00:00
Chris Lattner
3d1c32ce27
Fold iType into Value::VTy
...
llvm-svn: 14435
2004-06-27 18:38:48 +00:00
Chris Lattner
56d4c0c8b2
User ctor is now inline
...
llvm-svn: 14431
2004-06-27 18:01:38 +00:00
Chris Lattner
476eace8f4
Instancevar was renamed
...
llvm-svn: 14428
2004-06-26 20:33:39 +00:00
Chris Lattner
ed76ea9025
Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :)
...
llvm-svn: 14426
2004-06-26 19:40:40 +00:00
Misha Brukman
da2521c04f
* Capitalize `Java'
...
* Sprinkle hypens liberally
* Fix some grammar in comments
llvm-svn: 14374
2004-06-24 21:47:35 +00:00
Misha Brukman
8a1352d1b3
Linker.h moved to include/llvm/Support
...
llvm-svn: 14349
2004-06-23 17:24:31 +00:00
Misha Brukman
cf1f753730
Moved to lib/VMCore
...
llvm-svn: 14348
2004-06-23 17:21:17 +00:00
Misha Brukman
f12181a902
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.
llvm-svn: 14304
2004-06-21 21:53:56 +00:00
Chris Lattner
3a8e3bce6c
Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client
...
code. Patch contributed by Vladimir Prus.
llvm-svn: 14280
2004-06-21 12:12:12 +00:00
Chris Lattner
fb800c656c
IntrinsicLowering.cpp now lives in lib/CodeGen/
...
llvm-svn: 14269
2004-06-20 07:59:27 +00:00
Chris Lattner
cc465361d9
Move the IntrinsicLowering header into the CodeGen directory, as per PR346
...
llvm-svn: 14266
2004-06-20 07:49:54 +00:00
Chris Lattner
a1d29e1b15
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
llvm-svn: 14253
2004-06-19 20:13:48 +00:00
Chris Lattner
ba131c993e
Print out immediate dominators in program order, not in random order based on the address
...
of BasicBlock objects
llvm-svn: 14252
2004-06-19 20:04:47 +00:00
Chris Lattner
3c61b2dd70
Fix printing of Argument objects, problem found by Patrick Meredith
...
llvm-svn: 14215
2004-06-18 04:07:20 +00:00
Chris Lattner
0cd29ae2cd
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
18f8ae4e3e
Minor cleanup
...
llvm-svn: 14199
2004-06-17 17:56:54 +00:00
Chris Lattner
7c3600a50e
isnan is dead
...
llvm-svn: 14191
2004-06-15 21:52:58 +00:00
Chris Lattner
c9a6116586
Remove isnan support, correct isunordered support
...
llvm-svn: 14187
2004-06-15 21:42:23 +00:00
Chris Lattner
8ca8002f88
Do not dereference end iterators. It's really bad for the asmwriter's health.
...
This possibly fixes PR370
llvm-svn: 14181
2004-06-15 21:07:32 +00:00
Alkis Evlogimenos
173e9e832c
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.
llvm-svn: 14165
2004-06-13 00:55:26 +00:00
Alkis Evlogimenos
9b28aef6cb
Add the isunordered intrinsic.
...
llvm-svn: 14159
2004-06-12 19:19:14 +00:00
Chris Lattner
94a66c3038
Fix lowering to work correctly
...
llvm-svn: 14134
2004-06-11 02:54:02 +00:00
Chris Lattner
b07bf147cd
I misled Alkis: LLVM should have isnan, not isunordered.
...
isunordered(X, Y) === isnan(X) | isnan(Y)
Remove isunordered, add isnan.
llvm-svn: 14132
2004-06-11 02:29:43 +00:00
Alkis Evlogimenos
1ae8b4e7c4
Add the isunordered intrinsic.
...
llvm-svn: 14127
2004-06-11 01:08:18 +00:00
Chris Lattner
2c6bea32de
Share some code
...
llvm-svn: 14106
2004-06-10 01:57:38 +00:00
Chris Lattner
75e5aa4d22
Tolerate more errors
...
llvm-svn: 14104
2004-06-09 22:22:10 +00:00
Chris Lattner
3aa77d0e5e
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.
llvm-svn: 14100
2004-06-09 19:41:19 +00:00
Reid Spencer
a07033fecd
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.
llvm-svn: 14097
2004-06-09 15:26:53 +00:00
Chris Lattner
6a6148fda0
Workaround or a VS miscompilation bug
...
llvm-svn: 14078
2004-06-08 23:21:39 +00:00
Chris Lattner
4996a6e7cb
Fix a link error using VS8.0
...
llvm-svn: 14071
2004-06-08 17:53:24 +00:00
Chris Lattner
a1c9755c7c
Fix PR361.
...
Dominance properties don't hold in unreachable code
llvm-svn: 14053
2004-06-07 23:07:33 +00:00
Chris Lattner
6e63236846
Fix GCC warning
...
llvm-svn: 14045
2004-06-05 17:44:48 +00:00
Chris Lattner
dfca9d7f7b
Fix GCC warnings
...
llvm-svn: 14044
2004-06-05 17:43:52 +00:00
Chris Lattner
c0f5e68d4d
Remove an unused variable.
...
Work around for bogus errors: no those static functions don't need to
be executed to be initialized!
llvm-svn: 14040
2004-06-05 01:05:19 +00:00
Chris Lattner
c107a4d1c5
Add missing #include
...
llvm-svn: 14037
2004-06-05 00:24:59 +00:00
Chris Lattner
678cafb8a9
Work around VS bug
...
llvm-svn: 14036
2004-06-05 00:22:04 +00:00
Chris Lattner
6e6ab3888b
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. :(
llvm-svn: 14034
2004-06-05 00:11:27 +00:00
Chris Lattner
cf111f5951
Remove unused var
...
llvm-svn: 14033
2004-06-05 00:03:27 +00:00
Chris Lattner
f609ec6329
Squelch a warning
...
llvm-svn: 14032
2004-06-04 23:53:20 +00:00
Chris Lattner
f6950439d6
Delete some unreachable code
...
llvm-svn: 14031
2004-06-04 23:52:36 +00:00
Misha Brukman
99137fd27a
* 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
llvm-svn: 14030
2004-06-04 21:11:51 +00:00
Chris Lattner
871a5eb37c
Ugh, apparently there is no common ground here.
...
llvm-svn: 14026
2004-06-04 20:48:51 +00:00
Chris Lattner
4bd463c15e
Squish a warning
...
llvm-svn: 14020
2004-06-04 20:14:29 +00:00
Chris Lattner
e78fedecf2
* Verify function prototypes, not just functions with bodies.
...
* Verify that functions do not take aggregates as arguments.
llvm-svn: 13984
2004-06-03 06:38:43 +00:00
John Criswell
1a6863e08b
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.
llvm-svn: 13915
2004-06-01 14:54:08 +00:00
Reid Spencer
d98738fe4d
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.
llvm-svn: 13902
2004-05-30 01:19:48 +00:00
Reid Spencer
00aca582a2
Moved this file to lib/Bytecode/Writer because its used there only.
...
llvm-svn: 13900
2004-05-30 00:09:32 +00:00
Chris Lattner
9bf4cbeb4b
Don't use size() when you mean empty()
...
llvm-svn: 13876
2004-05-28 05:40:19 +00:00
Reid Spencer
0030dfe486
Clean up a comment.
...
llvm-svn: 13860
2004-05-27 22:04:46 +00:00
Reid Spencer
693dcc2f89
Fix for bug 348.
...
The SymbolTable changes caused this one too.
llvm-svn: 13859
2004-05-27 21:58:13 +00:00
Alkis Evlogimenos
2c463a8a99
Add constructors that take a BasicBlock to append to, to the rest of
...
the llvm::Instruction hierarchy.
llvm-svn: 13800
2004-05-27 00:15:23 +00:00
Alkis Evlogimenos
bf27c54995
Inline trivial constructors.
...
llvm-svn: 13797
2004-05-26 22:07:18 +00:00
Reid Spencer
b7b1b9d4b2
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).
llvm-svn: 13796
2004-05-26 21:56:09 +00:00
Alkis Evlogimenos
edff018f18
Refactor common initialization code in private init() functions.
...
This is a first step in supplying append to basic block constructors
for all instruction types.
llvm-svn: 13793
2004-05-26 21:41:09 +00:00
Reid Spencer
dccf1747a1
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).
llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Reid Spencer
58bad426cc
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.
llvm-svn: 13784
2004-05-26 07:18:52 +00:00
Reid Spencer
756f392365
Document a couple functions.
...
llvm-svn: 13761
2004-05-25 18:14:38 +00:00
Reid Spencer
2791d48685
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.
llvm-svn: 13755
2004-05-25 15:20:47 +00:00
Reid Spencer
fec48b0d9d
Convert to SymbolTable's new iteration interface.
...
llvm-svn: 13754
2004-05-25 08:53:40 +00:00
Reid Spencer
e6cf613d2a
Convert to SymbolTable's new iteration interface. Remove tabs.
...
llvm-svn: 13753
2004-05-25 08:53:29 +00:00
Reid Spencer
e6e0da0b9f
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.
llvm-svn: 13752
2004-05-25 08:52:42 +00:00
Reid Spencer
08e75b22a5
Convert to SymbolTable's new lookup and iteration interfaces.
...
llvm-svn: 13751
2004-05-25 08:52:20 +00:00
Chris Lattner
84431acbf1
Implement some helpers
...
llvm-svn: 13738
2004-05-25 05:32:43 +00:00
Chris Lattner
5f65590915
Recognize and verify the new GC intrinsics.
...
llvm-svn: 13687
2004-05-23 21:16:51 +00:00
Chris Lattner
30cc4edfc3
Fix for PR340: Verifier misses malformed switch instruction
...
llvm-svn: 13618
2004-05-21 16:47:21 +00:00
Brian Gaeke
5d639ac9f3
Fold two assertions with backwards error messages into one with a
...
correct error message.
llvm-svn: 13590
2004-05-17 21:15:18 +00:00
Chris Lattner
da4ac5d876
Implement the AddPrototypes method
...
llvm-svn: 13432
2004-05-09 04:29:57 +00:00
John Criswell
ec6d378d21
Don't call getForwardedType() twice, as recommended by Chris.
...
llvm-svn: 13391
2004-05-06 22:15:47 +00:00
John Criswell
2d7c5ae892
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.
llvm-svn: 13386
2004-05-06 21:18:08 +00:00
John Criswell
b51e979c2c
Fixed inconsistent indentation.
...
llvm-svn: 13363
2004-05-04 21:46:05 +00:00
Misha Brukman
5f5f6ca775
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
llvm-svn: 13247
2004-04-28 19:24:28 +00:00
Misha Brukman
d408a510b8
* Add ability to print out type as symbolic
...
* Add Module accessor to AssemblyWriter
llvm-svn: 13227
2004-04-28 15:31:21 +00:00
Chris Lattner
02c65b5395
Changes to fix up the inst_iterator to pass to boost iterator checks. This
...
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Misha Brukman
7d2413f9ec
I'm allergic to the word `stuff'.
...
llvm-svn: 13096
2004-04-21 18:27:56 +00:00
Misha Brukman
cb5de6bca6
Fix retriving parent Function.
...
llvm-svn: 13001
2004-04-16 17:37:12 +00:00
Misha Brukman
aadcd46d25
Assert if deleting BasicBlock before removing it from Function.
...
llvm-svn: 12983
2004-04-16 15:47:21 +00:00
Chris Lattner
644ad23b21
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.
llvm-svn: 12979
2004-04-16 05:51:47 +00:00
John Criswell
bed6463449
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.
llvm-svn: 12945
2004-04-14 15:06:48 +00:00
John Criswell
e00ecd7e84
Added code to verify that llvm.readio's pointer argument returns something
...
that matches its return type.
llvm-svn: 12944
2004-04-14 14:49:36 +00:00
John Criswell
11f7f60028
Finish adding the llvm.readio and llvm.writeio intrinsics.
...
Sorry these didn't get in yesterday.
llvm-svn: 12942
2004-04-14 13:46:52 +00:00
Chris Lattner
226ea8166e
Add a missing break, which caused a crash in an obscure situation
...
llvm-svn: 12825
2004-04-11 01:29:30 +00:00
John Criswell
c9c191c41b
Reversed the order of the llvm.writeport() operands so that the value
...
is listed first and the address is listed second.
llvm-svn: 12795
2004-04-09 19:09:14 +00:00
John Criswell
07c581695d
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.
llvm-svn: 12781
2004-04-08 20:27:38 +00:00
Chris Lattner
9236135e8f
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.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
eb1caeca2a
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
0d20ff2e86
Make the verifier API more complete and useful.
...
Patch contributed by Reid Spencer
llvm-svn: 12609
2004-04-02 15:45:08 +00:00
Chris Lattner
5a789b5e06
Add support for constant expr casts
...
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
1d78eb6094
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
...
llvm-svn: 12562
2004-03-30 22:51:03 +00:00
Chris Lattner
50dc89f874
Handle -0.0 correctly
...
llvm-svn: 12530
2004-03-29 19:51:24 +00:00
Chris Lattner
7f5d56b43a
Add a bunch of methods that should have been added a long time ago.
...
llvm-svn: 12526
2004-03-29 02:37:53 +00:00
Chris Lattner
27cbe8d690
Add another check
...
llvm-svn: 12525
2004-03-29 00:29:36 +00:00
Chris Lattner
44acd09520
Fix an assertion
...
Contributed by Reid Spencer
llvm-svn: 12524
2004-03-29 00:17:20 +00:00
Chris Lattner
b34cfff038
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
...
llvm-svn: 12522
2004-03-26 21:43:22 +00:00
Chris Lattner
f943b487c5
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.
llvm-svn: 12379
2004-03-14 03:23:54 +00:00
Chris Lattner
17042ee9ad
verifyFunction has been broken for a long time now. Fix it.
...
llvm-svn: 12377
2004-03-14 03:16:15 +00:00
Chris Lattner
f7bc6fd913
Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
...
Intrinsic::va*. This avoid conflicting with macros in the stdlib.h file.
llvm-svn: 12356
2004-03-13 00:24:00 +00:00
Misha Brukman
6eb48bab7b
Keep transitively-required passes alive for queries to work after the initial
...
user pass is destroyed.
llvm-svn: 12332
2004-03-12 06:16:28 +00:00
Chris Lattner
b53ea9f895
Add support for checking the select instruction
...
llvm-svn: 12325
2004-03-12 05:54:31 +00:00
Chris Lattner
a5cc2410f3
Know the opcode name of the select instruction
...
llvm-svn: 12324
2004-03-12 05:54:20 +00:00
Chris Lattner
c84ec93d3e
Add support for select constant expressions. Use reserve a bit more to avoid
...
memory wasteage.
llvm-svn: 12323
2004-03-12 05:54:04 +00:00
Chris Lattner
9ca4f0776f
Add new function
...
llvm-svn: 12322
2004-03-12 05:53:41 +00:00
Chris Lattner
f0a39f27e0
Teach the constant folder how to do select instructions
...
llvm-svn: 12321
2004-03-12 05:53:32 +00:00
Chris Lattner
aa815619b4
Print select instructions correctly
...
llvm-svn: 12320
2004-03-12 05:53:14 +00:00
Misha Brukman
8eac0e432a
Fix indentation.
...
llvm-svn: 12298
2004-03-11 23:53:51 +00:00
Chris Lattner
94d2b3a524
Adjust to new interface
...
llvm-svn: 12231
2004-03-08 18:51:45 +00:00
Chris Lattner
38c2e1d1df
Implement test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx
...
llvm-svn: 12218
2004-03-08 06:17:35 +00:00
Chris Lattner
23980d3a7c
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!
llvm-svn: 12216
2004-03-08 06:16:10 +00:00
Chris Lattner
aa5d8cb72f
Eliminate nightmarish API
...
llvm-svn: 12214
2004-03-08 06:11:10 +00:00
Misha Brukman
754f11778f
Doxygenify comments.
...
llvm-svn: 12071
2004-03-02 00:22:19 +00:00
Misha Brukman
d9ed820702
* If a badref has a name, print it out for ease of debugging
...
* Doxygenify (some) comments
llvm-svn: 12057
2004-03-01 19:48:13 +00:00
Chris Lattner
6728dfdfe8
Fix -debug-pass=Executions, which relied on Function, Module, and BasicBlock
...
being annotable
llvm-svn: 12013
2004-02-29 22:37:04 +00:00
Brian Gaeke
d551a8b5fe
Fix typo in comment
...
llvm-svn: 11966
2004-02-28 21:55:18 +00:00
Chris Lattner
644af802c9
Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll
...
llvm-svn: 11913
2004-02-27 17:28:25 +00:00
Chris Lattner
aa6f7cb4e4
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.
llvm-svn: 11871
2004-02-26 07:24:18 +00:00
Chris Lattner
57ee51ae0b
Make the verifier a little more explicit about this problem.
...
llvm-svn: 11811
2004-02-24 22:06:07 +00:00
Chris Lattner
727748b382
Get all instruction definitions
...
llvm-svn: 11706
2004-02-22 06:25:38 +00:00
Chris Lattner
28ab65caf2
Adjust to recent changes
...
llvm-svn: 11514
2004-02-17 03:03:47 +00:00
Chris Lattner
11c0e5b684
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
llvm-svn: 11505
2004-02-16 20:46:13 +00:00
Chris Lattner
b5914223b8
By default, llvm.setjmp/llvm.longjmp intrinsics get lowered to their libc counterparts
...
llvm-svn: 11483
2004-02-15 22:24:51 +00:00
Chris Lattner
ded1ad2846
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.
llvm-svn: 11481
2004-02-15 22:16:39 +00:00
Chris Lattner
28131460da
Adjustments to support the new ConstantAggregateZero class
...
llvm-svn: 11474
2004-02-15 05:55:15 +00:00
Chris Lattner
363cd9e4b8
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.
llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner
0f819b9523
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.
llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner
52cc69f39e
Remove dependence on return type of ConstantStruct::get
...
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
3fd2b573f1
Remove dependence on the return type of ConstantArray::get
...
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
c8d0942108
Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
...
from 16.57 -> 13.46s on 129.compress.
llvm-svn: 11462
2004-02-15 02:46:46 +00:00
Chris Lattner
a25668bd6d
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.
llvm-svn: 11444
2004-02-14 04:52:06 +00:00
Chris Lattner
cdfcb976c7
Add llvm.memset/frameaddress/returnaddress intrinsics.
...
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Chris Lattner
c908f6b738
Add support for the llvm.memmove intrinsic
...
Patch graciously contributed by Reid Spencer!
llvm-svn: 11355
2004-02-12 18:11:20 +00:00
Chris Lattner
0d988a0d14
Implement the llvm.memcpy intrinsic
...
llvm-svn: 11349
2004-02-12 17:01:09 +00:00
Chris Lattner
43553da3a0
Remove obsolete method
...
llvm-svn: 11302
2004-02-11 01:17:33 +00:00
Chris Lattner
ef4a05f780
Remove the statistics
...
llvm-svn: 11243
2004-02-09 21:01:23 +00:00
Chris Lattner
6deb7ad03b
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.
llvm-svn: 11242
2004-02-09 20:23:44 +00:00
Chris Lattner
f7f7d11eac
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.
llvm-svn: 11237
2004-02-09 18:32:40 +00:00
Chris Lattner
57a6b877ba
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.
llvm-svn: 11232
2004-02-09 16:35:14 +00:00
Chris Lattner
f231cb60f4
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.
llvm-svn: 11230
2004-02-09 05:40:24 +00:00
Chris Lattner
16690fad3d
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a1757d1d91
Start using the new and improve interface to FunctionType arguments
...
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
b771939ef3
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.
llvm-svn: 11214
2004-02-09 00:59:07 +00:00
Chris Lattner
9523c4de75
Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
...
Have I ever mentioned how much I _hate_ constantpointerrefs?
llvm-svn: 11212
2004-02-09 00:15:41 +00:00
Chris Lattner
a9a34f9d82
vi failed me again. :)
...
llvm-svn: 11206
2004-02-08 21:52:30 +00:00
Chris Lattner
2878b11cfc
Rename the invoke 'except' destination to the 'unwind' destination
...
llvm-svn: 11205
2004-02-08 21:52:04 +00:00
Chris Lattner
68fdb35576
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
...
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner
223ffefd1f
Adjust to the new BB ctor
...
llvm-svn: 11113
2004-02-04 03:57:50 +00:00
Chris Lattner
840109cd9c
When splitting a basic block, insert the new half immediately after the first
...
half.
llvm-svn: 11110
2004-02-04 03:21:31 +00:00
Chris Lattner
7f1e6f16c5
If changing a parent, don't add then remove the object from the leak detector
...
llvm-svn: 11106
2004-02-04 01:06:38 +00:00
Chris Lattner
1404b61b62
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. :)
llvm-svn: 11105
2004-02-03 23:11:21 +00:00
Chris Lattner
0e438dc219
Floating point negates are -0.0 - X, not 0.0 - X
...
llvm-svn: 11084
2004-02-02 20:21:29 +00:00
Chris Lattner
a61cda01c2
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.
llvm-svn: 11064
2004-02-01 22:49:04 +00:00
Chris Lattner
831561989c
Fix a crasher bug in my constant folding rewrite
...
llvm-svn: 11044
2004-02-01 01:23:19 +00:00
Chris Lattner
317a6fec82
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
llvm-svn: 10967
2004-01-23 00:55:21 +00:00
Misha Brukman
87ca68c2ff
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.
llvm-svn: 10943
2004-01-21 22:54:50 +00:00
Chris Lattner
781ed02fce
SlotCalculator.h moved
...
llvm-svn: 10931
2004-01-20 19:50:34 +00:00
Chris Lattner
7f7b7be528
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.
llvm-svn: 10922
2004-01-20 00:57:32 +00:00
Chris Lattner
30009bbba7
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.
llvm-svn: 10913
2004-01-18 21:07:07 +00:00
Chris Lattner
95c8aa8570
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.
llvm-svn: 10911
2004-01-18 21:03:06 +00:00
Chris Lattner
630c3ddea0
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.
llvm-svn: 10908
2004-01-17 23:25:43 +00:00
Chris Lattner
6e293222c3
Cleanups & efficiency improvements
...
llvm-svn: 10888
2004-01-15 20:24:09 +00:00
Chris Lattner
ba62115c2d
The bcwriter does not want ConstantPointerRef's to be indexed, and the asmwriter never did!
...
llvm-svn: 10885
2004-01-15 18:47:15 +00:00
Chris Lattner
e360d84c48
When emitting bytecode, handle strings specially. Do not add the characters
...
that make up the strings to the slotcalculator.
llvm-svn: 10862
2004-01-14 23:34:39 +00:00
Chris Lattner
c33ebd6588
Hrm, apparently I missed lowering this intrinsic. :(
...
llvm-svn: 10858
2004-01-14 20:41:29 +00:00
Chris Lattner
8767bd75e4
Fix bug in previous checkin: Demorgan would be ashamed of me, I need to
...
lay off the crack.
llvm-svn: 10855
2004-01-14 17:51:53 +00:00
Chris Lattner
a991025919
Implement ConstantArray::isString
...
llvm-svn: 10851
2004-01-14 17:06:38 +00:00
Chris Lattner
13a3f4eaeb
Fix check. PHI nodes must be handled specially, of course.
...
llvm-svn: 10842
2004-01-14 05:42:52 +00:00
Chris Lattner
e12d9fd9a7
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)
llvm-svn: 10841
2004-01-14 04:25:59 +00:00
Chris Lattner
bcd7372d19
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.
llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Chris Lattner
807e401607
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. :)
llvm-svn: 10812
2004-01-13 05:51:55 +00:00
Chris Lattner
4ec6589a6e
Implement new Instruction::isRelational method
...
llvm-svn: 10810
2004-01-12 23:18:25 +00:00
Chris Lattner
3e9e5b7db4
Rearrange and comment code better. No functionality changes
...
llvm-svn: 10808
2004-01-12 22:07:24 +00:00
Chris Lattner
b4e121c364
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.
llvm-svn: 10807
2004-01-12 21:13:12 +00:00
Chris Lattner
7285258cc0
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.
llvm-svn: 10806
2004-01-12 21:02:29 +00:00
Chris Lattner
d757923e11
Move ConstantHandling.h into lib/VMCore and out of include/llvm
...
llvm-svn: 10805
2004-01-12 20:48:11 +00:00
Chris Lattner
f6f9aafee4
Move this file to lib/VMCore
...
llvm-svn: 10804
2004-01-12 20:47:29 +00:00
Chris Lattner
abdd592bb1
Eliminate usage of the wierd overloaded operator constant folders
...
llvm-svn: 10802
2004-01-12 20:41:05 +00:00
Chris Lattner
b420886171
Eliminate ConstantFoldShiftInstruction reference
...
llvm-svn: 10801
2004-01-12 20:40:42 +00:00
Chris Lattner
35771f4fd2
Fix out of date comment, remove use of ConstantExpr::getShift
...
llvm-svn: 10794
2004-01-12 19:12:58 +00:00
Chris Lattner
52759f5c5e
Make ConstantExpr::get work for shifts as well
...
llvm-svn: 10790
2004-01-12 19:04:55 +00:00
Chris Lattner
e6b9c1001b
Move llvm::ConstantFoldInstruction from here to Transforms/Utils
...
llvm-svn: 10784
2004-01-12 18:25:03 +00:00
Chris Lattner
a4f199b80c
Implement: Assembler/2004-01-11-getelementptrfolding.llx
...
llvm-svn: 10759
2004-01-11 23:56:33 +00:00
Chris Lattner
1e781891a5
Urg, remove testing code.
...
llvm-svn: 10757
2004-01-11 23:30:03 +00:00
Chris Lattner
7fb38d32a0
Fix a regression that I introduced yesterday. :(
...
llvm-svn: 10756
2004-01-11 23:29:26 +00:00
Chris Lattner
734c9747df
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. :(
llvm-svn: 10754
2004-01-10 23:46:13 +00:00
Chris Lattner
12a46c4d00
Hrm, another minor cleanup, which I missed before
...
llvm-svn: 10753
2004-01-10 21:42:24 +00:00
Chris Lattner
95db39508d
Minor cleanup
...
llvm-svn: 10752
2004-01-10 21:40:29 +00:00
Chris Lattner
8b4be63e6e
Add support for new intrinsic
...
llvm-svn: 10701
2004-01-06 05:33:02 +00:00
Chris Lattner
6093fdd5e3
Add VMCore and code generator support for debugging intrinsics. By default
...
code generators completely ignore them.
llvm-svn: 10691
2004-01-05 05:36:30 +00:00
Chris Lattner
cfd07c0971
Add some comments, add new getGlobalVariable method
...
llvm-svn: 10671
2003-12-31 08:43:01 +00:00
Chris Lattner
3f6af8506e
* Make Module::getTypeName const
...
* Add new Module::getTypeByName method
* Group methods in Module.cpp better
llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Chris Lattner
24a9176b66
Make the lookup method const.
...
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
df22b39818
Fix PR198
...
llvm-svn: 10659
2003-12-31 03:19:37 +00:00
Chris Lattner
726d13c4d1
Add comments
...
llvm-svn: 10658
2003-12-31 02:50:02 +00:00
Chris Lattner
c37577eb9f
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Chris Lattner
068ac4236d
Move into the VMCore library
...
llvm-svn: 10623
2003-12-28 08:30:20 +00:00
Chris Lattner
d4abe8d28a
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.
llvm-svn: 10302
2003-12-07 00:55:32 +00:00
Chris Lattner
9eeb35760f
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.
llvm-svn: 10301
2003-12-07 00:38:08 +00:00
Chris Lattner
626abbe58b
Fix const correctness
...
llvm-svn: 10229
2003-11-25 21:28:00 +00:00
Chris Lattner
96d8d9990b
Relax constrains on GEP type indexes
...
llvm-svn: 10228
2003-11-25 21:21:46 +00:00
Chris Lattner
f987c67a53
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Chris Lattner
1901b23d5d
Fix problem Reid was having with external globals and nonexternal linkage
...
llvm-svn: 10133
2003-11-21 20:33:27 +00:00
Chris Lattner
a1da49a55c
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
797e88aee9
Fix some problems with assertions printing
...
llvm-svn: 10129
2003-11-21 17:35:51 +00:00
Chris Lattner
acd028d92a
improve error message
...
llvm-svn: 10128
2003-11-21 17:06:29 +00:00
Chris Lattner
2b7309dd1c
Minor cleanups and simplifications
...
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
Chris Lattner
feeb3261f2
Start using the nicer terminator auto-insertion API
...
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Chris Lattner
310dac2b01
Somehow I forgot poor little UnwindInst
...
*sniff*
llvm-svn: 10108
2003-11-20 18:11:56 +00:00
Chris Lattner
3aaa812969
* 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.
llvm-svn: 10107
2003-11-20 17:45:12 +00:00
Chris Lattner
5ac68ed1bf
Don't crash if we are printing an orphaned basic block!
...
llvm-svn: 10100
2003-11-20 00:09:43 +00:00
Chris Lattner
072ae8be8f
Really, there was a reason for me factoring that out
...
llvm-svn: 10089
2003-11-19 19:20:20 +00:00
Chris Lattner
54a3f2b134
*** 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
llvm-svn: 10088
2003-11-19 19:10:23 +00:00
Chris Lattner
9ac58534a0
Finegrainify namespacification
...
llvm-svn: 10080
2003-11-19 06:14:38 +00:00
Chris Lattner
4bdd0d5d93
Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
...
llvm-svn: 10075
2003-11-19 01:02:52 +00:00
Chris Lattner
7c9bfad92c
Implement == and != correctly. Before they would incorrectly return !=
...
for some constant exprs when they could really be the same value
llvm-svn: 10058
2003-11-17 20:19:35 +00:00
Chris Lattner
1f762c7571
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
Chris Lattner
3bbeca259c
No REALLY, get rid of ConstantPointer references
...
llvm-svn: 10054
2003-11-17 19:21:04 +00:00
Chris Lattner
dc40851a23
Eliminate use of the ConstantPointer class
...
llvm-svn: 10053
2003-11-17 19:19:32 +00:00
Chris Lattner
daee0fa51f
Constant folding shalt not be built on annotations
...
llvm-svn: 10052
2003-11-17 19:05:17 +00:00
Chris Lattner
31a03e3207
Be a bit more tolerant of broken code
...
llvm-svn: 10050
2003-11-17 01:17:04 +00:00
Brian Gaeke
675cab8d52
When you hand WriteAsOperand a type, it now prints out its symbolic name.
...
llvm-svn: 10042
2003-11-16 23:08:27 +00:00
Brian Gaeke
5db96ead48
When failing a Verifier assertion, use WriteAsOperand to print out the
...
offending types and/or values.
llvm-svn: 10041
2003-11-16 23:07:42 +00:00
Chris Lattner
21c40d8641
Don't print 'No predecessors!' on the entry block
...
llvm-svn: 10038
2003-11-16 22:59:57 +00:00
Chris Lattner
34b44fd809
Expose the verifier to opt
...
llvm-svn: 9984
2003-11-13 19:47:29 +00:00
Chris Lattner
e72202b5b8
Detect problems with PHI node operands!
...
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
f40566184d
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
...
and wrote it up. Thanks!!
llvm-svn: 9832
2003-11-09 19:39:48 +00:00
Chris Lattner
95e79d0097
Add an assertion
...
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Chris Lattner
352ad83271
Add support for constant expr shifts
...
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Chris Lattner
530eb1ffb5
If we're not checking, don't check!
...
llvm-svn: 9732
2003-11-05 19:09:40 +00:00
Chris Lattner
e0249593df
Make code gcc 3.4 clean
...
llvm-svn: 9719
2003-11-05 05:15:42 +00:00
Chris Lattner
8a01e11594
Fix InstCombine/2003-11-03-VarargsCallBug.ll
...
llvm-svn: 9681
2003-11-03 18:44:58 +00:00
Chris Lattner
78b09155e1
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Chris Lattner
18283ea9f0
Constant pointer refs are causing these to fail unnecessarily, which is causing
...
a lot of code to be pessimized. I hate CPRs. :(
llvm-svn: 9635
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
006108d3b6
Use already existing classes for post order iterator.
...
llvm-svn: 9629
2003-10-31 03:02:34 +00:00
Chris Lattner
c49a7fd37d
Make use of the new AssemblyAnnotationWriter interface
...
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Alkis Evlogimenos
30f4eb0dc0
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.
llvm-svn: 9615
2003-10-30 21:04:44 +00:00
Chris Lattner
f24ae5a0ed
Print the names of more opaque types
...
llvm-svn: 9598
2003-10-30 00:22:33 +00:00
Chris Lattner
a2fcab56e3
Make sure to print opaque types names if they are available.
...
llvm-svn: 9597
2003-10-30 00:12:51 +00:00
Alkis Evlogimenos
81ad09e0ab
Add more debugging info to help tracing the SlotCalculator.
...
llvm-svn: 9575
2003-10-29 03:12:12 +00:00
Chris Lattner
4347464e2a
Fix bug: instcombine/2003-10-23-InstcombineNullFail.ll
...
llvm-svn: 9403
2003-10-23 05:21:48 +00:00
Chris Lattner
5f4ed13cb9
Make sure to add a type for va_next operands, which may not other wise
...
occur in the module
llvm-svn: 9336
2003-10-21 17:40:54 +00:00
Chris Lattner
53d92d23b0
Fix problem which effected linking apache
...
llvm-svn: 9335
2003-10-21 17:39:59 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
d26c1d63f6
"Function"[0] == 'F', not 'M'
...
llvm-svn: 9297
2003-10-20 19:10:06 +00:00
Chris Lattner
87843f87b8
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
...
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
29825508f0
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Misha Brukman
a35a69da97
Chris says it's better to assert that TheModule is valid than silently return 0.
...
llvm-svn: 9212
2003-10-17 21:59:57 +00:00
Misha Brukman
d32cfacbc7
Return the Module that we just materialized.
...
llvm-svn: 9201
2003-10-17 18:27:13 +00:00
Alkis Evlogimenos
5a1f705c88
Eliminate some extraneous code in SlotCalculator::insertVal().
...
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().
llvm-svn: 9190
2003-10-17 02:02:40 +00:00
Chris Lattner
f46c45682a
Add support for 'weak' linkage.
...
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
09ef1749f7
Completely rewrite support for the Value::use_* list. Now, all operations on
...
this list (except use_size()) are constant time. Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.
This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:
176.gcc: 77.07s -> 37.38s
177.mesa: 7.59s -> 5.57s
252.eon: 21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap: 7.25s -> 7.42s
252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.
llvm-svn: 9160
2003-10-16 16:53:07 +00:00
Misha Brukman
1d9479ba78
Enabling incremental bytecode loading in the JIT:
...
* FunctionPassManager ctor now takes in a ModuleProvider
* run() materializes function before running passes on it
llvm-svn: 9126
2003-10-14 21:38:42 +00:00
Chris Lattner
c39d256841
Stop using "reverse depth first" order
...
llvm-svn: 9081
2003-10-13 15:21:58 +00:00
Chris Lattner
20cebd6ccb
Speed up TypesEqual by specializing it for all of the derived types, avoiding
...
a lot of virtual method dispatch overhead.
llvm-svn: 9078
2003-10-13 14:55:56 +00:00
Chris Lattner
bc7c13c803
Avoid creating lots of pointless opaque types, with short lifetimes
...
llvm-svn: 9076
2003-10-13 14:03:36 +00:00
Chris Lattner
1a43c990a8
This is a header file, hear me roar
...
llvm-svn: 9075
2003-10-13 05:34:24 +00:00
Chris Lattner
34b8bc6716
* Remove extraneous #includes
...
* Fix a nasty initializer ordering bug. Any only-CFG passes which registered
themselves before the CFGOnlyAnalysis vector initialized got forgotten and
thus got invalidated and recomputed.
In particular, in my compiled version of gccas, the Loop information pass was
being recomputed unnecessarily.
llvm-svn: 9074
2003-10-13 05:33:01 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
bfffd3052d
Rename method
...
llvm-svn: 9055
2003-10-12 18:52:12 +00:00
Brian Gaeke
a3f850a182
Don't include Config/stdio.h or <stdio.h>.
...
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman
c59161ff84
Fix spelling/grammar.
...
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner
bd123c6e51
Add a sanity check for constant expression casts
...
llvm-svn: 8951
2003-10-07 22:19:19 +00:00
Chris Lattner
6f939cc824
Users can never be null
...
llvm-svn: 8895
2003-10-06 17:33:39 +00:00
Chris Lattner
e2a7875d26
Be more careful handling PHI nodes, which might be of potentially high degree.
...
This reduces the time to verify a function from eon with a large number of
large PHI nodes from 22996s (6.38 hours) to 10.5499s
llvm-svn: 8866
2003-10-05 17:44:18 +00:00
Chris Lattner
b5f0d32b91
Type tables are now AbstractTypeUsers. This allows them to merge together
...
constants as necessary due to type resolution. With this change, the
following spec benchmarks now link: 176.gcc, 177.mesa, 252.eon,
253.perlbmk, & 300.twolf. IOW, all SPEC INT and FP benchmarks now link.
llvm-svn: 8853
2003-10-05 00:17:43 +00:00
Chris Lattner
def80d731a
Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,
...
and because, while the class used by the interface is abstract, the actual
concept is not.
llvm-svn: 8850
2003-10-04 20:14:59 +00:00
Chris Lattner
06dbcc0540
Minor random speedup: make Constant::getNullValue only call ConstantFOO::get
...
once!
llvm-svn: 8845
2003-10-03 19:34:51 +00:00
Chris Lattner
f66ac75a94
Explicit copy ctors are no longer needed
...
llvm-svn: 8844
2003-10-03 19:02:41 +00:00
Chris Lattner
a2c1509b21
Minor cleanups
...
llvm-svn: 8843
2003-10-03 18:57:54 +00:00
Chris Lattner
18c3f42894
This checkin basically amounts to a complete rewrite of the type-resolution
...
machinery. This dramatically simplifies how things works, removes irritating
little corner cases, and overall improves speed and reliability.
Highlights of this change are:
1. The exponential algorithm built into the code is now gone. For example
the time to disassemble one bytecode file from the mesa benchmark went
from taking 12.5s to taking 0.16s.
2. The linker bugs should be dramatically reduced. The one remaining bug
has to do with constant handling, which I actually introduced in
"union-find" checkins.
3. The code is much easier to follow, as a result of fewer special cases.
It's probably also smaller. yaay.
llvm-svn: 8842
2003-10-03 18:46:24 +00:00
Chris Lattner
101d5058cb
These methods are dead, remove them. Because the bodies will soon be
...
ressurected, just ifdef them out for now.
llvm-svn: 8840
2003-10-03 18:39:57 +00:00
Chris Lattner
85444d1dbd
Dramatically simplify DerivedType::refineAbstractTypeToInternal
...
This makes use of the new PATypeHolder's to keep types from being deleted
prematurely, instead of the wierd "self reference" garbage. This is easier
to understand and more efficient as well.
llvm-svn: 8834
2003-10-03 04:48:21 +00:00
Chris Lattner
b217f24289
Make the PATypeHolder use a simple union-find implementation to handle
...
merging of types. This makes it MUCH more efficient than before, also
making things simpler.
llvm-svn: 8833
2003-10-02 23:35:57 +00:00
Chris Lattner
83856d0df1
There is no reason for Value to be an AbstractTypeUser. This just makes things
...
significantly more complete. Instead, just make DerivedType's AbstractTypeUser's,
and make Value contain a PATypeHolder.
llvm-svn: 8828
2003-10-02 19:44:40 +00:00
Chris Lattner
d950f19834
Do not use BasicBlock::succ_iterator
...
llvm-svn: 8700
2003-09-24 22:03:22 +00:00
Misha Brukman
78cf1f07b6
* No longer initialize the module, a subclass is more suitable to do this
...
because it can add a module ID which we do not have at this time.
* Check to see if the module has been initialized when materializing it.
llvm-svn: 8674
2003-09-22 23:44:13 +00:00
Chris Lattner
d4de2760aa
Rename Function::getEntryNode -> getEntryBlock
...
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
92030f5a29
Reject "llvm." as a function name
...
llvm-svn: 8608
2003-09-19 19:31:41 +00:00
Misha Brukman
7d55b875eb
Minimal implementation of the abstract ModuleProvider interface.
...
llvm-svn: 8594
2003-09-18 16:17:06 +00:00
Chris Lattner
3df1f4b6a5
Change the semancics of the dropallrefs method
...
llvm-svn: 8572
2003-09-17 04:58:59 +00:00
Chris Lattner
3d39abeeb7
Renamed DominatorTree::Node::getNode() -> getBlock()
...
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Chris Lattner
ebf6d5c622
Rework dominator interfaces to handle changes in the post-dominance
...
construction. Now there may be multiple root blocks, and null is a
special node used to mark the "virtual" exit node of a CFG.
llvm-svn: 8461
2003-09-10 20:37:51 +00:00
Brian Gaeke
7eaecc239a
Make createVerifierPass return a FunctionPass *.
...
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
58d4183a25
Fix spell-o's
...
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
John Criswell
6b94d6a603
Reverting back to the previous revision.
...
We want to check for length 5 because we might get the "llvm." string as the
name. That string is in the LLVM namespace and should be checked as such.
We also don't have to worry about garbage data because (I believe) the string
class will return a valid value. So, the switch statement will work and we
don't have to worry about the code wandering into segfault land.
llvm-svn: 8419
2003-09-09 16:58:41 +00:00
John Criswell
0641f1fad7
Modified the check for intrinsic functions. All intrinsic functions have to
...
be at least 6 characters, since something must follow the "llvm." string in the
function name.
This seems to fix an assertion failure with the SingleSource tests, too.
llvm-svn: 8418
2003-09-09 16:36:09 +00:00
Chris Lattner
e8ae7bf114
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
c3c2809235
Add support for unwind
...
llvm-svn: 8407
2003-09-08 18:54:36 +00:00
Chris Lattner
2916eafa42
Add support for volatile loads/stores
...
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Misha Brukman
993b605832
Spell `occurrence' correctly.
...
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
Chris Lattner
67dfb06d9c
Add asserts, move code around. This gets the dropAllTypeUses partially implemented
...
llvm-svn: 8361
2003-09-05 05:10:04 +00:00
Chris Lattner
71ed17fe2e
Move functionality preserving changes.
...
Inline containsEquivalent
Remove some //'s
llvm-svn: 8358
2003-09-05 02:39:52 +00:00
Chris Lattner
6a4cb9b0e9
Refactor what has effectively become copy-and-pasted code
...
llvm-svn: 8357
2003-09-05 02:30:47 +00:00
Chris Lattner
d62bda202e
Check in a bunch of minor fixes, plus a whole lot of #if 0'd out code, which will hopefully be enabled in the near future
...
This does not make any functionality changes
llvm-svn: 8355
2003-09-05 02:21:39 +00:00
Chris Lattner
a0c99153e0
containsEquivalent never returns its argument
...
llvm-svn: 8353
2003-09-04 23:49:53 +00:00
Chris Lattner
652d585600
Remove needless usage of getDescription()
...
llvm-svn: 8351
2003-09-04 23:46:03 +00:00
Chris Lattner
706576a0cc
Inline method
...
llvm-svn: 8350
2003-09-04 23:43:40 +00:00
Chris Lattner
3835c2fdd1
Don't try to be sneaky, breaking recursive types in the process
...
llvm-svn: 8348
2003-09-04 23:41:03 +00:00
Chris Lattner
0382bf2e98
This is now unnecessary
...
llvm-svn: 8347
2003-09-04 23:38:22 +00:00
Chris Lattner
2fe8fac4e0
Fix bug where we couldn't print a function without a name
...
llvm-svn: 8341
2003-09-03 17:56:43 +00:00
Chris Lattner
2c028515e6
No need to rescan types when they are created.
...
llvm-svn: 8339
2003-09-03 14:44:53 +00:00
Chris Lattner
4a96f4593e
Another small speedup, this one to: 2.42s
...
llvm-svn: 8335
2003-09-02 22:52:49 +00:00
Chris Lattner
0cfd2b85b8
Don't return bogus references, and don't add an entry to the Concrete map
...
unless it's not empty!
llvm-svn: 8334
2003-09-02 22:50:02 +00:00
Chris Lattner
398d8a539c
Another optimization, speed up the testcase to 2.7s
...
llvm-svn: 8333
2003-09-02 22:15:15 +00:00
Chris Lattner
e4adff8157
Removal of explicit stack, which requires the method to be a member (so it can
...
call setAbstract). Now that we just compute abstractness we can also return
the computed value by value instead of as an argument.
llvm-svn: 8332
2003-09-02 21:56:34 +00:00
Chris Lattner
05eecdb7de
Remove the "recursive bit", not only is it unused by anyone, it was also
...
not correctly calculated, and calculating it wrong for fun seems rather
pointless. This also speeds up my favorite testcase by .25 seconds.
llvm-svn: 8330
2003-09-02 21:41:05 +00:00
Chris Lattner
590606e4c4
Don't bother doing an exhaustive recursive walk if we are at the limit of what
...
we need to know anyway. This reduces the 2002-07-08-HugePerformanceProblem.llx
down to 3.210u:0.010s, which is back in the acceptable range again
llvm-svn: 8323
2003-09-02 20:06:29 +00:00
Chris Lattner
06d8aac065
Ugh, fix bugs. Ok, so the last fix wasn't as great as I thought it was.
...
Now we're back to: 131.730u, 0.330s, which is still quite an improvement,
but still quite unacceptable
llvm-svn: 8322
2003-09-02 19:14:12 +00:00
Chris Lattner
fb0b83a27b
Further simplifications
...
llvm-svn: 8321
2003-09-02 16:46:41 +00:00
Chris Lattner
dda7669997
Change the code to no longer compute the "type description" immediately when
...
the type is analyzed. Instead, only compute it when requested (with
getDescription), and cached for reuse later.
This dramatically speeds up LLVM in general because these descriptions almost
_never_ need to be constructed. The only time they are used is when a type is
<<'d. Printing of modules by themselves uses other code to print symbolic
types when possible, so these descriptions are really only used for debugging.
Also, this fixes the particularly bad case when lots of types get resolved to
each other, such as during linking of large programs. In these cases, the type
descriptions would be repeatedly recomputed and discarded even though: A. noone
reads the description before it gets resolved, and B. many many resolutions
happen at intermediate steps, causing a HUGE waste of time.
Overall, this makes the getTypeDesc function much more light-weight, and fixes
bug: Assembler/2002-07-08-HugePerformanceProblem.llx, which went from taking
1048.770u/19.150s (which is 17.5 MINUTES, on apoc), to taking 0.020u/0.000s,
which is a nice little speedup. :)
llvm-svn: 8320
2003-09-02 16:35:17 +00:00
Brian Gaeke
5a8d15dfa1
Remove assertion which is never reached.
...
llvm-svn: 8318
2003-09-02 06:45:34 +00:00
Chris Lattner
d7b6cc98db
Implement new method
...
llvm-svn: 8238
2003-08-31 00:19:28 +00:00
Chris Lattner
b60bfd904c
Fix bug: Linker/2003-08-28-TypeResolvesGlobal3.ll
...
Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated
llvm-svn: 8210
2003-08-29 05:37:22 +00:00
Chris Lattner
286e92a9ef
Implement "unsafe" replaceAllUsesWWith stuff for use during type resolution.
...
llvm-svn: 8209
2003-08-29 05:36:46 +00:00
Chris Lattner
055944e9d3
Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll
...
llvm-svn: 8206
2003-08-29 05:11:34 +00:00
Chris Lattner
a2a7b891e5
Refactor code to make it useful outside of Constants.cpp
...
llvm-svn: 8205
2003-08-29 05:09:37 +00:00
Chris Lattner
f104b6e6ad
Fix bug: Linker/2003-08-28-TypeResolvesGlobal.ll
...
llvm-svn: 8202
2003-08-29 04:49:54 +00:00
Chris Lattner
e7a3a51c77
As it turns out, things will be simpler than I first expected. We no longer
...
need any exception handling intrinsics beyond llvm.unwind. (yaay)
llvm-svn: 8145
2003-08-25 22:35:01 +00:00
Chris Lattner
91cdd5dbc9
Support new 'any' support for pointer size and endianness
...
llvm-svn: 8119
2003-08-24 13:48:48 +00:00
Chris Lattner
376a94de26
rethrow is really the language independent primitive here. "throw" can be written
...
in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.
llvm-svn: 8110
2003-08-24 12:24:08 +00:00
Chris Lattner
b73f54b336
Fix copy-and-paste-o
...
llvm-svn: 8104
2003-08-24 06:57:53 +00:00
Chris Lattner
6fe728600d
Initial support for recognizing LLVM exception handling intrinsics
...
llvm-svn: 8102
2003-08-24 05:30:29 +00:00
Chris Lattner
851a6f8d37
Allow specifying the name for the newly split basic block
...
llvm-svn: 8097
2003-08-24 03:41:39 +00:00
Chris Lattner
367cef7b75
Rename SwitchInst::dest_push_back -> addCase
...
Add new removeCase method
llvm-svn: 8088
2003-08-23 23:14:37 +00:00
Chris Lattner
7cdcd38942
If an "LLVM name" has wierd characters in it, print it out in double quotes instead of prefixing it with %
...
llvm-svn: 8049
2003-08-22 05:40:38 +00:00
Misha Brukman
cda7f97dbb
The word dependent' has no
a'.
...
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner
fb677f7e87
Implement Assembler/2003-08-21-ConstantExprCast-Fold.llx
...
llvm-svn: 8015
2003-08-21 19:45:55 +00:00
Chris Lattner
6c9f00c920
Implement testcase: Assembler/2003-08-20-ConstantExprGEP-Fold.llx
...
llvm-svn: 7983
2003-08-20 16:11:27 +00:00
Chris Lattner
9f1ec93145
Do not even attempt to compute dominator information for unreachable blocks
...
llvm-svn: 7963
2003-08-18 22:11:16 +00:00
Chris Lattner
9fed232059
Fix linking bug in xboard
...
llvm-svn: 7952
2003-08-18 16:54:48 +00:00
Chris Lattner
2c6666efc6
Add intrinsics for the llvm.sig(set|long)jmp functions
...
llvm-svn: 7949
2003-08-18 15:41:24 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00