Chris Lattner
22ca3df5b1
Fix a memory leak. We leaked the vector holding the entries in switch tables.
...
llvm-svn: 13023
2004-04-17 23:49:15 +00:00
Chris Lattner
f78d930837
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.
Auto-upgrade .ll files that use ubytes to index into structures to use uint's.
llvm-svn: 12652
2004-04-05 01:30:04 +00:00
Chris Lattner
6ea8b0176c
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
...
llvm-svn: 12566
2004-03-31 03:49:47 +00:00
Chris Lattner
d265077f6d
Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx
...
llvm-svn: 12551
2004-03-30 20:58:25 +00:00
Chris Lattner
f3867b270c
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
...
it was "reachable". Cute.
llvm-svn: 12515
2004-03-19 23:34:33 +00:00
Chris Lattner
81df059f63
Allow parsing select instruction and constant expr
...
llvm-svn: 12313
2004-03-12 05:51:36 +00:00
Chris Lattner
e44cc1372e
Insert functions into the module promptly, not lazily. This fixes a bug
...
I introduced last night. Note to self: test the *correct* tree...
llvm-svn: 12220
2004-03-08 16:14:19 +00:00
Chris Lattner
df5ebdc8b1
Eliminate a REALLY HORRIBLE API: mutateReferences, which is gross gross gross.
...
llvm-svn: 12212
2004-03-08 06:09:57 +00:00
Chris Lattner
034a264a99
It turns out that the two dimensional vectors were causing big slowdowns
...
in this for programs with lots of types (like the testcase in PR224).
The problem was that the type ID that the outer vector was using was not
very dense (as many types are getting resolved), so the vector is large
and gets reallocated a lot.
Since there are a lot of values in the program (the .ll file is 10M),
each reallocation has to copy the subvectors, which is also quite slow
(this wouldn't be a problem if C++ supported move semantics, but it
doesn't, at least not yet :(
Changing the outer data structure to a map speeds a release build of
llvm-as up from 11.21s to 5.13s on the testcase in PR224.
llvm-svn: 11244
2004-02-09 21:03:38 +00:00
Chris Lattner
7eb118e4f7
When resolving upreferences, if multiple uprefs will be resolved to the same
...
type at the same time, resolve the upreferences to each other before resolving
it to the outer type. This shaves off some time from the testcase in PR224, from
25.41s -> 21.72s.
llvm-svn: 11241
2004-02-09 18:53:54 +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
2b3eaf045b
This #include is not needed, it should have been removed with the last patch
...
llvm-svn: 11222
2004-02-09 03:22:32 +00:00
Chris Lattner
76292e7fcc
Instead of searching the entire type graph for a type to determine if it
...
contains the type we are looking for, just search the immediately used types.
We can only do this because we keep the "current" type in the nesting level
as we decrement upreferences.
This change speeds up the testcase in PR224 from 50.4s to 22.08s, not
too shabby.
llvm-svn: 11221
2004-02-09 03:19:29 +00:00
Chris Lattner
645f8fb4e5
Upreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
...
type from containing one. This speeds up the asmparser on the testcase in PR224 from
61->50s.
llvm-svn: 11220
2004-02-09 03:03:10 +00:00
Chris Lattner
2e51b50de1
Change the 'exception' destination to the 'unwind' destination. We will always
...
allow 'except' instead of 'unwind' here though.
llvm-svn: 11203
2004-02-08 21:48:25 +00:00
Chris Lattner
758109ce2e
Don't use ConstantExpr::getShift anymore
...
llvm-svn: 10791
2004-01-12 19:08:43 +00:00
Chris Lattner
fe95ceadaf
Minor code cleanups. The only bugfix is to the UR_DEBUG stuff which didn't
...
compile when enabled.
llvm-svn: 10657
2003-12-31 02:18:11 +00:00
Chris Lattner
c09a6f0621
Right, fix the problem with invoke instructions, not just call instructions
...
llvm-svn: 10599
2003-12-23 22:18:36 +00:00
Chris Lattner
c1dd02538a
Do not delete the type holder until after the call instruction has been
...
constructed!
llvm-svn: 10598
2003-12-23 20:39:17 +00:00
Chris Lattner
defd9ccd73
Minor cleanups, plug a minor memory leak
...
llvm-svn: 10596
2003-12-23 20:05:15 +00:00
Chris Lattner
fe5dac5c16
To not barf when an error occurs.
...
llvm-svn: 10236
2003-11-26 07:24:58 +00:00
Chris Lattner
59f92a51f1
Fix PR147
...
llvm-svn: 10204
2003-11-25 03:54:16 +00:00
Chris Lattner
f987c67a53
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Chris Lattner
70c6fff394
Don't crash on bogus source value
...
llvm-svn: 10132
2003-11-21 20:27:35 +00:00
Chris Lattner
be56c11ccc
Fix bug PR107, patch contributed by Reid Spencer!
...
llvm-svn: 9911
2003-11-12 04:40:30 +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
034bfaddf0
Make sure that PHI node operands are first class types
...
llvm-svn: 9607
2003-10-30 01:38:18 +00:00
Misha Brukman
6ace5e86b1
* Eliminate `using' directive
...
* Order #includes as per style guide
llvm-svn: 9429
2003-10-23 18:00:34 +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
7a4e225f37
Eliminate unused class
...
llvm-svn: 9270
2003-10-19 21:39:41 +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
d0e3a15a9e
New revised variable argument handling support
...
llvm-svn: 9219
2003-10-18 05:53:13 +00:00
Chris Lattner
17f8f2e317
Tighten up handling of checks for shift instructions
...
llvm-svn: 9191
2003-10-17 05:11:44 +00:00
Chris Lattner
39b976aed8
Minor cleanups
...
llvm-svn: 9177
2003-10-16 20:12:13 +00:00
Chris Lattner
f46c45682a
Add support for 'weak' linkage.
...
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
f2ed60c0b7
Decrease usage of use_size()
...
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Brian Gaeke
b4b2fa9060
Include <cctype> and <cstdlib> instead of <ctype.h> and "Config/stdlib.h".
...
llvm-svn: 9036
2003-10-10 19:12:08 +00:00
Chris Lattner
1d18ef00c3
Reserve space for PHI operands
...
llvm-svn: 9007
2003-10-10 16:34:58 +00:00
Chris Lattner
269b0c1d79
Accept 'weak' as a linkage type. For now, just turn it into linkonce linkage
...
llvm-svn: 8998
2003-10-10 04:54:02 +00:00
Chris Lattner
e4012123b6
Add better checking
...
llvm-svn: 8996
2003-10-10 03:56:01 +00:00
Chris Lattner
9f5802fac5
The objects mapped are really PATypeHolders, not PATypeHandles
...
llvm-svn: 8822
2003-10-02 19:00:34 +00:00
Misha Brukman
643183413a
Uppercase the acronym ASCII.
...
llvm-svn: 8676
2003-09-22 23:50:25 +00:00
Chris Lattner
d44cb48b44
Oops, look at the VOLATILE marker, not the opcode
...
llvm-svn: 8413
2003-09-08 20:29:46 +00:00
Chris Lattner
4ad8720f91
Add support for the unwind instruction
...
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
56bbe63aa3
Parse volatile loads/stores
...
llvm-svn: 8402
2003-09-08 18:20:29 +00:00
Chris Lattner
4252e57c90
Remove gross old hacky code that was in there for backwards compatibility
...
1 year is plenty of migration time!
llvm-svn: 8282
2003-09-01 16:31:28 +00:00