summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/ConstantReader.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-4/+4
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Add support for reading bytecode files with compactiontables for bytecode files.Chris Lattner2004-01-181-6/+3
| | | | | | | | 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: 10914
* Fix more breakage with string change.Chris Lattner2004-01-151-2/+2
| | | | llvm-svn: 10882
* Fix brokenness in my last checkingChris Lattner2004-01-151-1/+1
| | | | llvm-svn: 10874
* Change all of the bytecode reader primitives to throw exceptions instead ofChris Lattner2004-01-151-60/+35
| | | | | | | | | | returning error codes. Because they don't return an error code, they can return the value read, which simplifies the code and makes the reader more efficient (yaay!). Also eliminate the special case code for little endian machines. llvm-svn: 10871
* Version 1.2 now supports encoding strings as a special case, to avoid havingChris Lattner2004-01-141-0/+39
| | | | | | to emit all of those sbyte constants. llvm-svn: 10863
* Don't use ConstantExpr::getShift anymoreChris Lattner2004-01-121-2/+0
| | | | llvm-svn: 10791
* minor cleanupsChris Lattner2003-12-261-7/+6
| | | | llvm-svn: 10612
* In the future, these slabs can be null...Chris Lattner2003-11-191-1/+2
| | | | llvm-svn: 10083
* Minor efficiency improvements all over. Finegrainify NamespacificationChris Lattner2003-11-191-37/+14
| | | | llvm-svn: 10082
* Minor speedup to do less linear time searches of information we already have.Chris Lattner2003-11-191-7/+5
| | | | | | 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
* Add support for constant expr shiftsChris Lattner2003-11-051-0/+2
| | | | llvm-svn: 9735
* 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
* * New revised variable argument handling supportChris Lattner2003-10-181-54/+37
| | | | | | | * 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-1/+1
| | | | llvm-svn: 9077
* Change getConstantValue to throw an exception on error, not return nullChris Lattner2003-10-091-9/+3
| | | | llvm-svn: 8988
* Major refactoring of the bytecode reader. This includes the followingChris Lattner2003-10-091-22/+10
| | | | | | | | | | | | | | | 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
* Transform two methods to return pointers directly instead of returning themChris Lattner2003-10-041-37/+20
| | | | | | as 'by reference' arguments. llvm-svn: 8849
* There is no need for BytecodeParser to be an AbstractTypeUser. Instead, itChris Lattner2003-10-021-20/+1
| | | | | | can just use PATypeHolders llvm-svn: 8832
* * Cleaned up code:Misha Brukman2003-09-221-47/+48
| | | | | | | | | - 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-4/+4
| | | | llvm-svn: 8489
* Avoid printing meaningless numbersChris Lattner2003-09-031-4/+1
| | | | llvm-svn: 8342
* Follow the pattern of all other atu'sChris Lattner2003-09-031-6/+2
| | | | llvm-svn: 8340
* Remove redundant const qualifiers from cast<> expressionsChris Lattner2003-07-231-2/+2
| | | | llvm-svn: 7253
* The word `separate' only has one `e'.Misha Brukman2003-07-141-1/+1
| | | | llvm-svn: 7173
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-181-1/+1
| | | | | | 'Type'. llvm-svn: 6774
* Eliminate the uchar typedef, use unsigned char explicitlyChris Lattner2003-05-221-6/+10
| | | | llvm-svn: 6283
* Fix Bug: Assembler/2003-05-12-MinIntProblem.llxChris Lattner2003-05-121-9/+3
| | | | llvm-svn: 6123
* Add new linkage types to support a real frontendChris Lattner2003-04-161-1/+2
| | | | llvm-svn: 5786
* * Bug fixes:Chris Lattner2003-03-191-13/+26
| | | | | | | | | | | | | | | | | | | | | - 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
* s/Method/Function in variable and method namesChris Lattner2003-03-061-3/+3
| | | | llvm-svn: 5715
* Use the std namespace explicitlyChris Lattner2003-03-061-4/+2
| | | | llvm-svn: 5708
* There is no way to guarantee that constants are not forward referenced.Chris Lattner2002-10-141-29/+8
| | | | | | | | 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
* Fix bug: test/Regression/Assembler/2002-08-19-BytecodeReader.llxChris Lattner2002-08-191-1/+2
| | | | llvm-svn: 3384
* Fix stupid oversight of missing #include.Chris Lattner2002-08-171-0/+1
| | | | llvm-svn: 3367
* - Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llxChris Lattner2002-08-171-55/+90
| | | | | | | | | | | | | | - 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
* Remove support for Not ConstantExpr. This simplifies the unary case to onlyChris Lattner2002-08-141-1/+2
| | | | | | have to support the cast instruction, so the function is renamed to getCast. llvm-svn: 3328
* Cleanup ConstantExpr handling:Chris Lattner2002-07-301-22/+22
| | | | | | | | | | | | | | * 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
* Break line to fit 80 columnsChris Lattner2002-07-251-1/+2
| | | | llvm-svn: 3083
* ConstExpr::getelementptr now takes a vector of Constants not ValuesChris Lattner2002-07-181-2/+2
| | | | llvm-svn: 2948
* added std:: to vectorAnand Shukla2002-07-161-2/+2
| | | | llvm-svn: 2916
* Add support for reading ConstantExpr nodes.Vikram S. Adve2002-07-141-25/+59
| | | | | | | Add class ConstantFwdRefs to resolve forward references to constants and to globals. (Hmm... this class could be renamed I guess.) llvm-svn: 2896
* Convert tabs to spacesChris Lattner2002-06-301-4/+4
| | | | llvm-svn: 2805
* changes to make it compatible with 64bit gccAnand Shukla2002-06-251-6/+7
| | | | llvm-svn: 2790
* Fix constness problems now that the cast operators preserve the constnessChris Lattner2002-06-051-1/+1
| | | | | | of their argument llvm-svn: 2758
* Eliminate duplicate or unneccesary #include'sChris Lattner2002-04-291-1/+0
| | | | llvm-svn: 2397
* Split ConstantVals.h into Constant.h and Constants.hChris Lattner2002-04-281-1/+1
| | | | llvm-svn: 2378
* Enable better debug output. When debugging the type system, print out theChris Lattner2002-04-071-1/+3
| | | | | | type tables after reading a bytecode file to make sure they are ok llvm-svn: 2126
* s/Method/FunctionChris Lattner2002-03-291-2/+2
| | | | llvm-svn: 2035
OpenPOWER on IntegriCloud