summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/ReaderInternals.h
Commit message (Collapse)AuthorAgeFilesLines
* * New revised variable argument handling supportChris Lattner2003-10-181-4/+7
| | | | | | | * More dense bytecode encoding for varargs calls (like printf) * Eliminated the extremely old bytecode format. rev #0 is now 1.0 llvm-svn: 9220
* Avoid calling getTypeSlot moreChris Lattner2003-10-131-0/+1
| | | | llvm-svn: 9077
* This is a header file, thus it needs a -*-C++-*-Chris Lattner2003-10-131-1/+1
| | | | llvm-svn: 9072
* Regularize header file commentsChris Lattner2003-10-131-1/+1
| | | | llvm-svn: 9071
* Pass a vector around to reduce dynamic allocationChris Lattner2003-10-091-1/+2
| | | | | | Throw the RawInst class in an anon namespace llvm-svn: 8990
* Major refactoring of the bytecode reader. This includes the followingChris Lattner2003-10-091-20/+3
| | | | | | | | | | | | | | | changes: * BytecodeReader::getType(...) used to return a null pointer on error. This was only checked about half the time. Now we convert it to throw an exception, and delete the half that checked for error. This was checked in before, but psmith crashed and lost the change :( * insertValue no longer returns -1 on error, so callers don't need to check for it. * Substantial rewrite of InstructionReader.cpp, to use more efficient, simpler, data structures. This provides another 5% speedup. This also makes the code much easier to read and understand. llvm-svn: 8984
* Significantly clean up parsing of instructions. This exceptionizes andChris Lattner2003-10-091-2/+2
| | | | | | | simplifies the control flow a bit. This provides a small (~3%) speedup, but it's primarily a cleanup exercise. llvm-svn: 8983
* Eliminate the instruction placeholder. Simplify a bunch of code.Chris Lattner2003-10-091-14/+0
| | | | | | This results in no significant speedup, but does provide simpler code llvm-svn: 8980
* Eliminate the old LateResolveValues data structure, replacing it with aChris Lattner2003-10-091-2/+2
| | | | | | | | | | | | | new, simpler, ForwardReferences data structure. This is just the first simple replacement, subsequent changes will improve the code more. This simple change improves the performance of loading a file from HDF5 (contributed by Bill) from 2.36s to 1.93s, a 22% improvement. This presumably has to do with the fact that we only create ONE placeholder for a particular forward referenced values, and also may be because the data structure is much simpler. llvm-svn: 8979
* Remove a dead methodChris Lattner2003-10-091-1/+0
| | | | llvm-svn: 8978
* This patch substantially simplifies and cleans up handling of basic blocksChris Lattner2003-10-081-18/+10
| | | | | | | | | | | | | in the bytecode parser. Before we tried to shoehorn basic blocks into the "getValue" code path with other types of values. For a variety of reasons this was a bad idea, so this patch separates it out into its own data structure. This simplifies the code, makes it fit in 80 columns, and is also much faster. In a testcase provided by Bill, which has lots of PHI nodes, this patch speeds up bytecode parsing from taking 6.9s to taking 2.32s. More speedups to follow later. llvm-svn: 8977
* Inline the postResolveValues method. It was poorly named anywayChris Lattner2003-10-081-5/+2
| | | | llvm-svn: 8976
* Various cleanups and simplifications. This speeds up reading a bytecode fileChris Lattner2003-10-081-0/+1
| | | | | | Bill gave me from 8.69s to 6.90s. llvm-svn: 8971
* Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,Chris Lattner2003-10-041-1/+1
| | | | | | | and because, while the class used by the interface is abstract, the actual concept is not. llvm-svn: 8850
* Transform two methods to return pointers directly instead of returning themChris Lattner2003-10-041-3/+4
| | | | | | as 'by reference' arguments. llvm-svn: 8849
* There is no need for BytecodeParser to be an AbstractTypeUser. Instead, itChris Lattner2003-10-021-8/+2
| | | | | | can just use PATypeHolders llvm-svn: 8832
* Stop returning bool and pass Instruction by reference;Misha Brukman2003-09-231-2/+2
| | | | | | return std::auto_ptr and use exceptions llvm-svn: 8684
* Removed no longer used member variable.Misha Brukman2003-09-221-4/+1
| | | | llvm-svn: 8677
* * Cleaned up code:Misha Brukman2003-09-221-31/+64
| | | | | | | | | - 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
* Remove a gross hack that was there to support bytecode files that are over a ↵Chris Lattner2003-09-081-1/+1
| | | | | | | | year old. If you still have these suckers laying around, you have GOT to rebuild them. geeze. llvm-svn: 8395
* Non-functional changeChris Lattner2003-09-041-1/+1
| | | | llvm-svn: 8352
* Allow modules to have 'any' pointer size and endianness. Luckily, we hadChris Lattner2003-08-241-1/+0
| | | | | | some space for extra flags, so we don't need to bump the revision number. llvm-svn: 8118
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-181-1/+1
| | | | | | 'Type'. llvm-svn: 6774
* Do not assert fail or crash when a bytecode parse fails!Chris Lattner2003-05-221-0/+3
| | | | llvm-svn: 6284
* Eliminate the uchar typedef, use unsigned char explicitlyChris Lattner2003-05-221-19/+23
| | | | llvm-svn: 6283
* Preserve module source information in the ModuleIDChris Lattner2003-04-221-1/+2
| | | | llvm-svn: 5836
* Add support to the bytecode reader/writer for the new linkage typesChris Lattner2003-04-161-0/+1
| | | | llvm-svn: 5790
* * Bug fixes:Chris Lattner2003-03-191-20/+48
| | | | | | | | | | | | | | | | | | | | | - 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
* Infrastructure for more compact bytecode files and REAL support for versioningChris Lattner2003-03-061-3/+7
| | | | llvm-svn: 5716
* s/Method/Function in variable and method namesChris Lattner2003-03-061-2/+2
| | | | llvm-svn: 5715
* Continue simplifying error handling, s/method/functionChris Lattner2003-03-061-3/+3
| | | | llvm-svn: 5714
* There is no way to guarantee that constants are not forward referenced.Chris Lattner2002-10-141-0/+1
| | | | | | | | 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
* Emit an obnoxious warning message for bytecode that includes load/storeChris Lattner2002-08-211-1/+2
| | | | | | | instructions that use indexing. Convert them transparently into a pair of instructions. llvm-svn: 3431
* - Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llxChris Lattner2002-08-171-70/+33
| | | | | | | | | | | | | | - 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
* Add support for reading ConstantExpr nodes.Vikram S. Adve2002-07-141-13/+53
| | | | | | | Add class ConstantFwdRefs to resolve forward references to constants and to globals. (Hmm... this class could be renamed I guess.) llvm-svn: 2896
* changes to make it compatible with 64bit gccAnand Shukla2002-06-251-3/+4
| | | | llvm-svn: 2790
* Remove unneccesary #includeChris Lattner2002-04-281-1/+0
| | | | llvm-svn: 2352
* llvm/Assembly/Writer.h is unneccesary except for extreme outputChris Lattner2002-04-081-2/+1
| | | | | | isLabelType is obsolete llvm-svn: 2176
* Add debug supportChris Lattner2002-04-041-0/+4
| | | | llvm-svn: 2105
* s/Method/FunctionChris Lattner2002-03-291-6/+6
| | | | llvm-svn: 2035
* Rename Method to FunctionChris Lattner2002-03-231-6/+0
| | | | llvm-svn: 1957
* Method.h no longer includes BasicBlock.hChris Lattner2002-02-121-0/+1
| | | | | | | 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
* Changes to build successfully with GCC 3.02Chris Lattner2002-01-201-13/+13
| | | | llvm-svn: 1503
* Rename ConstPoolVal -> ConstantChris Lattner2001-12-031-3/+3
| | | | | | | Rename ConstPool* -> Constant* Rename ConstPoolVals.h -> ConstantVals.h llvm-svn: 1407
* Split the PHINode class out from the iOther.h file into the iPHINode.h fileChris Lattner2001-12-031-0/+1
| | | | llvm-svn: 1405
* Implement internal method supportChris Lattner2001-11-261-1/+1
| | | | llvm-svn: 1374
* Dang it, do NOT check in code that enables debugging. Bad chrisChris Lattner2001-10-241-1/+1
| | | | llvm-svn: 972
* Changes to get some meaningful feedback from the bytecode reader. At some ↵Chris Lattner2001-10-241-1/+5
| | | | | | point this stuff should all be exception driven, but for now it is not. llvm-svn: 970
* Oops, didn't mean to check in enabled debugging support. :(Chris Lattner2001-10-231-1/+1
| | | | llvm-svn: 962
* Fixed a LONG standing, SCARY problem with bytecode encoding. It turns out ↵Chris Lattner2001-10-231-1/+1
| | | | | | to be an endian problem that only shows up with type 0 instructions in LARGE programs. llvm-svn: 961
OpenPOWER on IntegriCloud