summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/Reader.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Minor speedup to do less linear time searches of information we already have.Chris Lattner2003-11-191-2/+3
| | | | | | speeds up disassembly of kc++ by .6s llvm-svn: 10079
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Fix warningChris Lattner2003-10-181-0/+1
| | | | llvm-svn: 9236
* add support for new linkage typesChris Lattner2003-10-181-4/+14
| | | | llvm-svn: 9228
* * New revised variable argument handling supportChris Lattner2003-10-181-33/+30
| | | | | | | * More dense bytecode encoding for varargs calls (like printf) * Eliminated the extremely old bytecode format. rev #0 is now 1.0 llvm-svn: 9220
* Add support for 'weak' linkage.Chris Lattner2003-10-161-2/+12
| | | | | | | | For now, we translate linkonce into weak linkage in the bytecode format because we don't have enough bits to represent it. We will rev the bytecode version soon anyways, so this will be fixed in the near future. llvm-svn: 9170
* Minor cleanupsChris Lattner2003-10-131-2/+2
| | | | llvm-svn: 9079
* Avoid calling getTypeSlot moreChris Lattner2003-10-131-3/+7
| | | | llvm-svn: 9077
* Ok, the "fix" for this is to do a real associative container. Symbol tablesChris Lattner2003-10-101-15/+11
| | | | | | | are ordered by name, not by slot, so the previous solution wasn't any good. On a large testcase, this reduces time to parse from 2.17s to 1.58s. llvm-svn: 9002
* Another 10% performance improvement by not using replaceAllUsesWithChris Lattner2003-10-091-13/+20
| | | | llvm-svn: 8994
* Use the version of getValue that takes the type plane instead of the typeChris Lattner2003-10-091-1/+2
| | | | | | if possible. This provides a consistent 8.5% speedup. llvm-svn: 8991
* Pass a vector around to reduce dynamic allocationChris Lattner2003-10-091-1/+2
| | | | | | Throw the RawInst class in an anon namespace llvm-svn: 8990
* Change getConstantValue to throw an exception on error, not return nullChris Lattner2003-10-091-1/+4
| | | | llvm-svn: 8988
* Remove potentially N^2 algorithm from symbol table reader. No speedupChris Lattner2003-10-091-5/+13
| | | | | | in practice though llvm-svn: 8985
* Major refactoring of the bytecode reader. This includes the followingChris Lattner2003-10-091-31/+18
| | | | | | | | | | | | | | | 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-4/+1
| | | | | | | 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-1/+1
| | | | | | 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-23/+25
| | | | | | | | | | | | | 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-11/+0
| | | | llvm-svn: 8978
* This patch substantially simplifies and cleans up handling of basic blocksChris Lattner2003-10-081-22/+57
| | | | | | | | | | | | | 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-29/+24
| | | | llvm-svn: 8976
* Various cleanups and simplifications. This speeds up reading a bytecode fileChris Lattner2003-10-081-43/+38
| | | | | | Bill gave me from 8.69s to 6.90s. llvm-svn: 8971
* Transform two methods to return pointers directly instead of returning themChris Lattner2003-10-041-26/+18
| | | | | | as 'by reference' arguments. llvm-svn: 8849
* Use V for values, not D.Chris Lattner2003-10-041-16/+15
| | | | llvm-svn: 8848
* Just rethrow previous exception instead of making a new oneChris Lattner2003-09-261-1/+1
| | | | llvm-svn: 8718
* Suggestions made by Chris:Misha Brukman2003-09-231-10/+14
| | | | | | | | | * 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
* * Cleaned up code:Misha Brukman2003-09-221-262/+161
| | | | | | | | | - 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
* Fixed spelling and grammar.Misha Brukman2003-09-111-1/+1
| | | | llvm-svn: 8489
* 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
* Allow modules to have 'any' pointer size and endianness. Luckily, we hadChris Lattner2003-08-241-11/+20
| | | | | | some space for extra flags, so we don't need to bump the revision number. llvm-svn: 8118
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | llvm-svn: 7944
* Merged in autoconf branch. This provides configuration via the autoconfJohn Criswell2003-06-301-5/+5
| | | | | | system. llvm-svn: 7014
* Do not assert fail or crash when a bytecode parse fails!Chris Lattner2003-05-221-0/+1
| | | | llvm-svn: 6284
* Eliminate the uchar typedef, use unsigned char explicitlyChris Lattner2003-05-221-11/+19
| | | | llvm-svn: 6283
* Add support for reading and writing pointersize/endianness to and from bytecodeChris Lattner2003-04-221-0/+5
| | | | llvm-svn: 5839
* Preserve module source information in the ModuleIDChris Lattner2003-04-221-6/+7
| | | | llvm-svn: 5836
* Add support for reading unaligned bytecode buffersChris Lattner2003-04-191-0/+11
| | | | llvm-svn: 5819
* Fix a big bad bug I checked in yesterday :(Chris Lattner2003-04-181-1/+1
| | | | llvm-svn: 5807
* Add support to the bytecode reader/writer for the new linkage typesChris Lattner2003-04-161-14/+41
| | | | llvm-svn: 5790
* Add new linkage types to support a real frontendChris Lattner2003-04-161-3/+10
| | | | llvm-svn: 5786
* * Bug fixes:Chris Lattner2003-03-191-139/+133
| | | | | | | | | | | | | | | | | | | | | - 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-6/+40
| | | | llvm-svn: 5716
* s/Method/Function in variable and method namesChris Lattner2003-03-061-11/+11
| | | | llvm-svn: 5715
* Continue simplifying error handling, s/method/functionChris Lattner2003-03-061-57/+45
| | | | llvm-svn: 5714
* Cleanup error handling constructsChris Lattner2003-03-061-37/+47
| | | | llvm-svn: 5713
* Pull common code outChris Lattner2003-03-061-16/+14
| | | | llvm-svn: 5712
* Use the std namespace explicitlyChris Lattner2003-03-061-12/+10
| | | | llvm-svn: 5708
* - Eliminated the deferred symbol table stuff in Module & Function, it reallyChris Lattner2002-11-201-2/+2
| | | | | | wasn't an optimization and it was causing lots of bugs. llvm-svn: 4779
* - Fix a really nasty bug in the bytecode reader that caused it to failChris Lattner2002-10-231-10/+11
| | | | | | | | 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
OpenPOWER on IntegriCloud