Chris Lattner
85555779de
Various cleanups and simplifications. This speeds up reading a bytecode file
...
Bill gave me from 8.69s to 6.90s.
llvm-svn: 8971
2003-10-08 21:18:57 +00:00
Misha Brukman
b5c59fa16d
Destroy allocated resources on exception.
...
llvm-svn: 8969
2003-10-08 19:55:47 +00:00
Brian Gaeke
82f64531f6
All of our supported operating systems (so far) and FreeBSD technically
...
want you to include <sys/stat.h> for fstat(), struct stat, and friends.
llvm-svn: 8887
2003-10-06 03:30:28 +00:00
Chris Lattner
cc593fb6c6
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
069d6493c9
Transform two methods to return pointers directly instead of returning them
...
as 'by reference' arguments.
llvm-svn: 8849
2003-10-04 20:00:03 +00:00
Chris Lattner
4318c4b549
Use V for values, not D.
...
llvm-svn: 8848
2003-10-04 19:29:21 +00:00
Chris Lattner
a0d15e4d9e
Do not leak the ModuleProvider if releaseModule() throws.
...
llvm-svn: 8847
2003-10-04 19:19:37 +00:00
Chris Lattner
c7caffab32
There is no need for BytecodeParser to be an AbstractTypeUser. Instead, it
...
can just use PATypeHolders
llvm-svn: 8832
2003-10-02 20:26:18 +00:00
Chris Lattner
4437995826
Just rethrow previous exception instead of making a new one
...
llvm-svn: 8718
2003-09-26 14:44:52 +00:00
Chris Lattner
1e9402d93d
Define the instance variable Buffer, not the automatic variable Buffer.
...
This was causing us to munmap random stuff, which is obviously bad.
llvm-svn: 8709
2003-09-25 04:13:53 +00:00
Chris Lattner
ce6feda799
Fix alignment problem
...
llvm-svn: 8707
2003-09-24 22:34:17 +00:00
Misha Brukman
86c8a485d0
Actually assign the string correctly through the std::string pointer.
...
llvm-svn: 8704
2003-09-24 22:10:47 +00:00
Misha Brukman
c3634809e6
* Eliminate BytecodeBufferReader::Length member variable
...
* Kill unused ALIN_PTRS #define
* Set the error string if user passed it in to be compatible with former API
llvm-svn: 8701
2003-09-24 22:04:02 +00:00
John Criswell
89f4dcf5bc
Added code that ensures that we pass the beginning of the data buffer to
...
the parsing routines regardless of whether the buffer is re-aligned or not.
llvm-svn: 8693
2003-09-23 21:19:11 +00:00
Misha Brukman
1a74cffdec
Stop returning bool and pass Instruction by reference;
...
return std::auto_ptr and use exceptions
llvm-svn: 8684
2003-09-23 16:17:50 +00:00
Misha Brukman
0c0a882bc3
Suggestions made by Chris:
...
* Instead of a #define, use inline function
* Fix the name on the #define, errr... now inline function to be more logical:
it doesn't CHECK the alignment, it PERFORMS the alignment
* To get string name of a Type*, use getDescription(), not getName()
llvm-svn: 8683
2003-09-23 16:15:29 +00:00
Misha Brukman
301f7dfa19
* Group class definitions & implementations together
...
* Make sure we align the buffer we're given
* Do not let exceptions propagate when the caller asks for a Module*
* Add doxygenified comments to wrapper functions
llvm-svn: 8682
2003-09-23 16:13:28 +00:00
Misha Brukman
715fe875bb
* Constantify arguments to copy function
...
* Stop using a #define, make it an inline if statement
llvm-svn: 8678
2003-09-23 15:09:26 +00:00
Misha Brukman
3e18bc1518
Removed no longer used member variable.
...
llvm-svn: 8677
2003-09-22 23:58:08 +00:00
Misha Brukman
bafce80ba4
Added file header comment.
...
llvm-svn: 8675
2003-09-22 23:44:46 +00:00
Chris Lattner
df60fe04ab
Update file header for renamed file
...
llvm-svn: 8673
2003-09-22 23:42:00 +00:00
Misha Brukman
6e9a3517f2
* Cleaned up code:
...
- no more passing around a string pointer to set errors
- no more returning booleans and checking for errors, we use C++ exceptions
* Broke functionality into 2 new classes, one reads from file, one from a stream
* Implemented lazy function streaming - the parser can read in a function at-a-time
llvm-svn: 8671
2003-09-22 23:38:23 +00:00
Chris Lattner
af4c95a051
Fix a spello Misha made while fixing one of my appostrifications
...
llvm-svn: 8510
2003-09-15 00:33:20 +00:00
Misha Brukman
acda7df68b
Fixed spelling and grammar.
...
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
0b792b4ed3
Fix bug
...
llvm-svn: 8410
2003-09-08 19:43:46 +00:00
Chris Lattner
9c58cf6d03
Add support for the unwind instruction
...
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
a9083c961e
Read volatile loads/stores
...
llvm-svn: 8401
2003-09-08 18:20:14 +00:00
Chris Lattner
53bd0b24f2
Remove a gross hack that was there to support bytecode files that are over a year old.
...
If you still have these suckers laying around, you have GOT to rebuild them. geeze.
llvm-svn: 8395
2003-09-08 18:04:16 +00:00
Chris Lattner
8e8593a2c4
Add support for writing volatile load/stores
...
llvm-svn: 8394
2003-09-08 17:58:37 +00:00
Chris Lattner
15ad3f07db
Fix reading of invoke instrs
...
llvm-svn: 8365
2003-09-05 18:25:29 +00:00
Chris Lattner
7f8d98776f
Whoa, we were misreading invoke instructions "normal" destinations quite badly.
...
llvm-svn: 8363
2003-09-05 05:27:58 +00:00
Chris Lattner
b4520603a4
Non-functional change
...
llvm-svn: 8352
2003-09-04 23:47:07 +00:00
Chris Lattner
54d85e389f
Avoid printing meaningless numbers
...
llvm-svn: 8342
2003-09-03 20:25:27 +00:00
Chris Lattner
53db94da05
Follow the pattern of all other atu's
...
llvm-svn: 8340
2003-09-03 16:01:54 +00:00
Chris Lattner
55a07adc36
Allow modules to have 'any' pointer size and endianness. Luckily, we had
...
some space for extra flags, so we don't need to bump the revision number.
llvm-svn: 8118
2003-08-24 13:47:36 +00:00
Chris Lattner
6a2b859191
Rename SwitchInst::dest_push_back -> addCase
...
llvm-svn: 8089
2003-08-23 23:14:52 +00:00
Misha Brukman
7eb05a170a
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
f26a8ee580
Remove redundant const qualifiers from cast<> expressions
...
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
c5372125b9
Remove explicit const qualifiers
...
llvm-svn: 7245
2003-07-23 14:54:33 +00:00
Misha Brukman
7fdaab4f68
The word `separate' only has one `e'.
...
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
John Criswell
3ef61afb76
Merged in autoconf branch. This provides configuration via the autoconf
...
system.
llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
8826647168
Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
...
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Chris Lattner
bbd00c12e0
Fix bug: Assembler/2003-06-17-InvokeDisassemble.llx
...
"yes, invoke instructions can have just three arguments"
llvm-svn: 6736
2003-06-17 13:31:10 +00:00
Chris Lattner
4a20791049
Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
...
by emitting the type planes before any constants (which could be constant
expressions involving undefined types!)
llvm-svn: 6285
2003-05-22 18:35:38 +00:00
Chris Lattner
c56bdc5520
Do not assert fail or crash when a bytecode parse fails!
...
llvm-svn: 6284
2003-05-22 18:26:48 +00:00
Chris Lattner
e69a1b9866
Eliminate the uchar typedef, use unsigned char explicitly
...
llvm-svn: 6283
2003-05-22 18:08:30 +00:00
Chris Lattner
09eb76ddfd
Fix Bug: Assembler/2003-05-12-MinIntProblem.llx
...
llvm-svn: 6123
2003-05-12 15:13:52 +00:00
Chris Lattner
f70da10697
Add support for the new va_arg instruction
...
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Misha Brukman
1d6f220a87
Fixed 'prevalent'.
...
llvm-svn: 5860
2003-04-23 02:59:05 +00:00
Chris Lattner
35834a503b
Add support for reading and writing pointersize/endianness to and from bytecode
...
llvm-svn: 5839
2003-04-22 18:15:10 +00:00
Chris Lattner
b672b5607f
Preserve module source information in the ModuleID
...
llvm-svn: 5836
2003-04-22 18:02:52 +00:00
Chris Lattner
bc35e27dfd
Initial support for reading standard .a files
...
llvm-svn: 5820
2003-04-19 21:45:34 +00:00
Chris Lattner
561e0005c5
Add support for reading unaligned bytecode buffers
...
llvm-svn: 5819
2003-04-19 21:45:17 +00:00
Chris Lattner
56d9f7f02a
Fix a big bad bug I checked in yesterday :(
...
llvm-svn: 5807
2003-04-18 04:11:56 +00:00
Chris Lattner
23bf637211
Add support to the bytecode reader/writer for the new linkage types
...
llvm-svn: 5790
2003-04-16 21:16:05 +00:00
Chris Lattner
379a8d2d1c
Add new linkage types to support a real frontend
...
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
428bf5abc9
Changes to the V2 bytecode format:
...
- Null values are implicitly encoded instead of explicitly, this makes
things more compact!
- More compactly represent ConstantPointerRefs
- Bytecode files are represented as:
Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
instead of
Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
which makes a lot of things simpler.
Writer changes:
- We now explictly encode versioning information in the bytecode files.
- This allows new code to read bytecode files produced by old code, but
new bytecode files can have enhancements such as the above. Although this
makes the reader a bit more complex (having to deal with old formats), the
writer only needs to be able to produce the most recent version.
llvm-svn: 5749
2003-03-19 20:56:46 +00:00
Chris Lattner
5db8194ca9
* Bug fixes:
...
- Fix problems where the constant table would not get updated when
resolving constants causes other constants to change.
Changes to the V2 bytecode format
- Null values are implicitly encoded instead of explicitly, this makes
things more compact!
- More compactly represent ConstantPointerRefs
- Bytecode files are represented as:
Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
instead of
Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
which makes a lot of things simpler.
Changes to the reader:
- Function loading code is much simpler. We now no longer make function
PlaceHolderHelper objects to be replaced with real functions.
llvm-svn: 5748
2003-03-19 20:54:26 +00:00
Chris Lattner
1a175715d0
Infrastructure for more compact bytecode files and REAL support for versioning
...
llvm-svn: 5716
2003-03-06 17:55:45 +00:00
Chris Lattner
c8f563bed1
s/Method/Function in variable and method names
...
llvm-svn: 5715
2003-03-06 17:18:14 +00:00
Chris Lattner
3f57f18059
Continue simplifying error handling, s/method/function
...
llvm-svn: 5714
2003-03-06 17:15:19 +00:00
Chris Lattner
21ae41b31b
Cleanup error handling constructs
...
llvm-svn: 5713
2003-03-06 17:03:28 +00:00
Chris Lattner
e373d5a664
Pull common code out
...
llvm-svn: 5712
2003-03-06 16:50:32 +00:00
Chris Lattner
17f8686900
Use the std namespace explicitly
...
llvm-svn: 5708
2003-03-06 16:32:25 +00:00
Chris Lattner
5d96597042
Don't keep track of # big vs #small instructions seperately
...
llvm-svn: 5385
2003-01-21 20:13:49 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
49f4242d2b
- Fix a really nasty bug in the bytecode reader that caused it to fail
...
reading bytecode files with > 255 types in them, but only when optimization
is enabled. This was caused by GCC shrinking an enum to a single byte
instead of a whole word.
llvm-svn: 4266
2002-10-23 00:51:54 +00:00
Chris Lattner
95fcefcb7e
Wow, for some reason, when reading bytecode from stdin, we were only reading
...
4 bytes at a time. Change this to read blocks of 4k
llvm-svn: 4265
2002-10-22 23:55:24 +00:00
Chris Lattner
ca1725d3c8
Clean up code a bit, no functionality changes.
...
llvm-svn: 4162
2002-10-14 03:34:17 +00:00
Chris Lattner
2862d2ec71
There is no way to guarantee that constants are not forward referenced.
...
Handle forward referenced constants in a general way. This fixes bug:
Assembler/2002-10-13-ConstantEncodingProblem.llx and allows the SPEC
197.parser benchmark to be built
llvm-svn: 4161
2002-10-14 03:33:02 +00:00
Chris Lattner
149376dee5
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
69ce8674b5
- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
...
reflect the fact that it's a range being defined.
llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
bf3a099a62
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Anand Shukla
8137896962
Changed uchar to unsigned char in function ParseBytecodeBuffer, because seemingly it affects opt in uncertain ways :)
...
llvm-svn: 3866
2002-09-20 20:57:54 +00:00
Misha Brukman
36698f8670
On the quest of eliminating unnecessary includes.
...
llvm-svn: 3715
2002-09-14 02:18:57 +00:00
Chris Lattner
fc91ee91e8
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner
dfb3a2cd07
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
cd709cbf53
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
dc23308820
Emit an obnoxious warning message for bytecode that includes load/store
...
instructions that use indexing. Convert them transparently into a pair
of instructions.
llvm-svn: 3431
2002-08-21 22:55:27 +00:00
Chris Lattner
243b5751a0
Fix bug: test/Regression/Assembler/2002-08-19-BytecodeReader.llx
...
llvm-svn: 3384
2002-08-19 16:48:21 +00:00
Chris Lattner
6a33371529
Turn off a debugging optimization that just slows bytecode reading down
...
llvm-svn: 3377
2002-08-18 00:38:32 +00:00
Chris Lattner
c8d952ebba
Fix stupid oversight of missing #include.
...
llvm-svn: 3367
2002-08-17 22:02:41 +00:00
Chris Lattner
51fa0ef925
- Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llx
...
- ParseConstantPool was resolving reference to value using the function
slot # instead of the global slot #.
- Bytecode reader changes:
- Remove the failure<> template from Bytecode Reader
- Remove extraneous #includes
- s/method/function/ a bit
- Eliminate the fwdRefs class that just added abstraction where it was not
needed, making things more complex.
- Use a vector instead of a list for function signatures.
llvm-svn: 3366
2002-08-17 22:01:27 +00:00
Chris Lattner
330b7ac76c
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
3cd8c56cbb
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3161
2002-07-30 18:54:25 +00:00
Chris Lattner
a13a2dac7e
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner
64eea749de
*** empty log message ***
...
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner
68c7b71ea6
Break line to fit 80 columns
...
llvm-svn: 3083
2002-07-25 15:40:04 +00:00
Chris Lattner
36d2c7c39b
Register the WriteBytecodePass
...
llvm-svn: 3033
2002-07-23 19:56:44 +00:00
Chris Lattner
a896b08b5c
*** empty log message ***
...
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner
980ddf5854
ConstExpr::getelementptr now takes a vector of Constants not Values
...
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Anand Shukla
f7d7871656
added std:: to pair
...
llvm-svn: 2917
2002-07-16 00:04:57 +00:00
Anand Shukla
09da3b881f
added std:: to vector
...
llvm-svn: 2916
2002-07-16 00:04:15 +00:00
Vikram S. Adve
590bc74ca4
Add support for writing ConstantExpr nodes.
...
llvm-svn: 2899
2002-07-14 23:08:30 +00:00
Vikram S. Adve
c1b6474a60
Write out the plane for types first, since values of primitive types
...
may be constructed by expressions of other types (and so the
contents of the primitive type planes must come after all types).
Use a helper function outputConstantsInPlane in outputConstants to
do this.
llvm-svn: 2898
2002-07-14 23:07:51 +00:00
Vikram S. Adve
827d91f257
Use a helper function outputConstantsInPlane in outputConstants.
...
llvm-svn: 2897
2002-07-14 23:05:53 +00:00
Vikram S. Adve
a336afd5d9
Add support for reading ConstantExpr nodes.
...
Add class ConstantFwdRefs to resolve forward references to constants
and to globals. (Hmm... this class could be renamed I guess.)
llvm-svn: 2896
2002-07-14 23:05:09 +00:00
Vikram S. Adve
16bcca5ee4
Add support for reading ConstantExpr nodes.
...
Add class ConstantFwdRefs to resolve forward references to constants
and to globals (unified old code for globals into this).
llvm-svn: 2895
2002-07-14 23:04:18 +00:00
Chris Lattner
0a30bda280
Convert tabs to spaces
...
llvm-svn: 2805
2002-06-30 16:04:37 +00:00
Anand Shukla
eaa2e7204e
changes to make it compatible with 64bit gcc
...
llvm-svn: 2790
2002-06-25 20:44:04 +00:00
Chris Lattner
7076ff29ed
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
64802e4db8
Fix constness problem
...
llvm-svn: 2759
2002-06-05 17:49:40 +00:00
Chris Lattner
b469cf8361
Fix constness problems now that the cast operators preserve the constness
...
of their argument
llvm-svn: 2758
2002-06-05 17:38:28 +00:00
Chris Lattner
181cc32365
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
02deb39dd3
Remove unneccesary #include
...
llvm-svn: 2352
2002-04-28 04:50:19 +00:00
Chris Lattner
bc1f09299e
Make debugging code not use getStrValue
...
llvm-svn: 2295
2002-04-18 18:14:56 +00:00
Chris Lattner
2e9fa6d101
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
95f65b6f84
s/method/function
...
llvm-svn: 2177
2002-04-08 22:01:15 +00:00
Chris Lattner
d620de69a1
llvm/Assembly/Writer.h is unneccesary except for extreme output
...
isLabelType is obsolete
llvm-svn: 2176
2002-04-08 21:59:36 +00:00
Chris Lattner
6915f8fc3c
* Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
...
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function
llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
62b7fd136e
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
b0df8fdcb8
Enable better debug output. When debugging the type system, print out the
...
type tables after reading a bytecode file to make sure they are ok
llvm-svn: 2126
2002-04-07 06:11:22 +00:00
Chris Lattner
e2f2f54f0c
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
53659e8676
Add debug support
...
llvm-svn: 2105
2002-04-04 19:24:11 +00:00
Chris Lattner
ff87436f48
s/Method/Function
...
llvm-svn: 2035
2002-03-29 03:51:11 +00:00
Chris Lattner
57698e2c0b
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
4e8c4877aa
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Chris Lattner
60a6591d83
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
4f32cf118a
Chuck fixed the GCC problems so this hack is now unneccesary
...
llvm-svn: 1519
2002-01-21 23:17:07 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
b2b1b3d036
Remove unsized array support
...
llvm-svn: 1461
2001-12-14 16:30:51 +00:00
Chris Lattner
f4ba330416
Add pointer indexing support
...
llvm-svn: 1460
2001-12-14 16:30:09 +00:00
Chris Lattner
2413b160ec
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
3462ae3ad7
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
b4c677745e
Move support directory
...
llvm-svn: 1401
2001-11-29 16:32:16 +00:00
Chris Lattner
2263733dcf
Implement internal method support
...
llvm-svn: 1374
2001-11-26 18:56:10 +00:00
Chris Lattner
20faede952
Implement array indexing
...
llvm-svn: 1337
2001-11-26 16:54:55 +00:00
Chris Lattner
7e42584354
Remove debug info :(
...
llvm-svn: 1280
2001-11-12 21:52:57 +00:00
Chris Lattner
7c627e7632
Fix bug in new assertion
...
llvm-svn: 1279
2001-11-12 21:48:38 +00:00
Chris Lattner
f0cd13bc28
Add an assertion check
...
llvm-svn: 1276
2001-11-12 20:30:32 +00:00
Chris Lattner
4a797f461f
I don't know what I was thinking
...
llvm-svn: 1275
2001-11-12 20:30:12 +00:00
Chris Lattner
dc194d54f9
Fix obscure nasty bug with bytecode writing that could cause the last byte to be dropped.
...
llvm-svn: 1123
2001-11-04 21:32:41 +00:00
Chris Lattner
4f1ca018aa
Fix major bugs in type resolution
...
llvm-svn: 1092
2001-11-03 03:27:53 +00:00
Chris Lattner
e3fe1ac4ee
Frivolous cleanups
...
llvm-svn: 973
2001-10-24 06:21:22 +00:00
Chris Lattner
a065a732bf
Dang it, do NOT check in code that enables debugging. Bad chris
...
llvm-svn: 972
2001-10-24 05:14:35 +00:00
Chris Lattner
daebd7508d
Changes to get some meaningful feedback from the bytecode reader. At some point this stuff should all be exception driven, but for now it is not.
...
llvm-svn: 970
2001-10-24 01:15:12 +00:00
Chris Lattner
7540328e46
Oops, didn't mean to check in enabled debugging support. :(
...
llvm-svn: 962
2001-10-23 03:21:42 +00:00
Chris Lattner
b5498aba50
Fixed a LONG standing, SCARY problem with bytecode encoding. It turns out to be an endian problem that only shows up with type 0 instructions in LARGE programs.
...
llvm-svn: 961
2001-10-23 03:21:10 +00:00
Chris Lattner
0557f117dd
Allow unresolved/opaque types to be read and written to bytecode files
...
llvm-svn: 959
2001-10-23 01:53:22 +00:00
Chris Lattner
61b665528e
Fix another annoying bug that took forever to track down. This one involves abstract type resolution at a bad time that broke symbol tables.
...
llvm-svn: 958
2001-10-23 01:53:01 +00:00
Chris Lattner
18e81933c7
Fix problem with a cast instruction that must be expanded to type 0
...
llvm-svn: 929
2001-10-21 00:14:44 +00:00
Chris Lattner
5055730379
Dang, we were losing the Constant bit on globals. Fix this
...
llvm-svn: 885
2001-10-18 06:11:23 +00:00
Chris Lattner
162ed4d6cc
Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
...
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner
01a206b8fd
External methods shouldn't have argument lists
...
llvm-svn: 807
2001-10-14 23:28:41 +00:00
Chris Lattner
81125b6c48
* Use new style casts more
...
* Add real support for global variable addresses initializing constants
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction
llvm-svn: 761
2001-10-13 06:48:38 +00:00
Chris Lattner
fb49fd6642
* Add real support for global variable addresses initializing constants
...
* Add minor optimization to BytecodeParser::refineAbstractType
* MethodType::get now take an explicit isVarArg parameter
* Fix encoding/decoding of VarArgs calls
* Support the Invoke instruction
llvm-svn: 760
2001-10-13 06:47:01 +00:00
Chris Lattner
ad95d1d12f
Rename getNullPointer to getNull
...
llvm-svn: 708
2001-10-03 15:39:24 +00:00
Chris Lattner
7fac070215
* Both Method & GlobalVariable now subclass GlobalValue
...
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion
llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
8f19112923
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
fbdec250b3
Implement constant pointers, and null specifically in the parser, bytecode writer, and
...
bytecode reader.
llvm-svn: 668
2001-09-30 22:46:54 +00:00
Chris Lattner
bb09a10929
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
3779864fcf
Add support for global constants, and for initializers for constants
...
llvm-svn: 598
2001-09-18 04:01:05 +00:00
Chris Lattner
172a5f2911
Fix a bug with not removing method level types after compilation
...
llvm-svn: 582
2001-09-14 22:03:42 +00:00
Chris Lattner
c4b2634574
ModuleTyID doesn't exist anyymore
...
Use correct cast
llvm-svn: 539
2001-09-10 20:09:08 +00:00
Chris Lattner
212c907cf1
getMethodType is now just getType
...
llvm-svn: 538
2001-09-10 20:08:52 +00:00
Chris Lattner
da9755002f
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
b97ef9f4cf
* Emit bytecode using a deque instead of a vector to be faster
...
* Internal rep no longer has a constant pool
* Support emission of recursive types
* Don't output a constant pool for an external method
* The bytecode writer is no longer a module analyzer
llvm-svn: 449
2001-09-07 16:39:41 +00:00
Chris Lattner
1f043cd1ba
* Remove support for internal constant pool
...
* Support globally unique constants
* Support recursive and forward referenced types
* Support abstract types
* Add new BCR_TRACE macro to enable debugging of why the bytecode reader
occasionally refuses to read something
llvm-svn: 448
2001-09-07 16:37:43 +00:00
Chris Lattner
f324dc82a1
* Make sure that the size of the type field can also control the output
...
instruction pattern.
llvm-svn: 324
2001-07-28 17:51:21 +00:00
Chris Lattner
5bdab0f9ad
* Add calls to failure template so that it is actually possible to debug
...
why bytecode parsing is failing. Just put a breakpoint in the failure
templates.
llvm-svn: 323
2001-07-28 17:50:18 +00:00
Chris Lattner
90e0d464ba
Add support for extern varargs methods & varargs method calls
...
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner
0d005997fd
Doh! Wrong accessor. Caused 'can not read bytecode' errors. :(
...
llvm-svn: 282
2001-07-23 18:51:23 +00:00
Chris Lattner
e2472bbf6c
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
4d44c2ba81
Add support to the bytecode writer to recognize floating point constants
...
llvm-svn: 190
2001-07-15 00:17:23 +00:00
Chris Lattner
f435e200b1
Add support to the bytecode reader to recognize floating point constants
...
llvm-svn: 189
2001-07-15 00:17:18 +00:00
Chris Lattner
dbfb7d8042
* The parent of a constant pool is a symtabvalue, not a value.
...
llvm-svn: 181
2001-07-14 06:10:49 +00:00
Chris Lattner
62ecb4a137
Implementation of Store & GetElementPtr
...
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner
d8bebcd517
Implemented shl, shl, & load instructions
...
llvm-svn: 161
2001-07-08 21:10:27 +00:00
Chris Lattner
49c643262e
Moved Cast from being a Unary instruction to being an "Other" instruction
...
llvm-svn: 160
2001-07-08 19:03:27 +00:00
Chris Lattner
a682182f64
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
87d478287b
Convert BinaryOperand and UnaryOperator to only take instruction types of
...
the appropriate enum
llvm-svn: 153
2001-07-07 20:17:23 +00:00
Chris Lattner
b1ca9cbceb
Broad superficial changes:
...
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType
llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner
a073acb22d
Changed the fundemental architecture of Operands for Instructions. Now
...
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before. Getting an operand no longer requires
a virtual function call.
WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!
llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
4cee8d8ffb
Miscellaneous cleanups:
...
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
4c8ba81f21
Convert ugly postincrement to efficient preincrement
...
llvm-svn: 89
2001-06-27 23:34:01 +00:00
Chris Lattner
31e23cdeb4
Renamed get.*Operator to create seeing that it would have to be qualified
...
with the classname anyways.
llvm-svn: 74
2001-06-25 07:31:31 +00:00
Chris Lattner
874ddadf72
Updates to support
...
* Changes in PHI node structure
llvm-svn: 25
2001-06-11 15:04:40 +00:00
Chris Lattner
5f46e8c9da
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
...
to the UnaryOperator class (from the Instruction class).
llvm-svn: 21
2001-06-08 21:30:13 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00