summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* bug 263:Reid Spencer2004-07-251-220/+0
| | | | | | | | | | | | | | | | - encode/decode target triple and dependent libraries bug 401: - fix encoding/decoding of FP values to be little-endian only bug 402: - initial (compatible) cut at 24-bit types instead of 32-bit - reduce size of block headers by 50% Other: - cleanup Writer by consolidating to one compilation unit, rem. other files - use a std::vector instead of std::deque so the buffer can be allocated in multiples of 64KByte chunks rather than in multiples of some smaller (default) number. llvm-svn: 15210
* Fix for PR341Chris Lattner2004-07-151-1/+1
| | | | llvm-svn: 14845
* Prepare the writer for a non-broken implementation of writing floatingReid Spencer2004-07-111-2/+2
| | | | | | | point values. This will be fixed when I figure out how to do it correctly without depending on knowing the endianess of a platform. llvm-svn: 14762
* - Type::TypeTyID doesn't exist any more (bug 122)Reid Spencer2004-07-041-5/+1
| | | | | | - Types don't have names any more, just write them on ostream directly llvm-svn: 14606
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-171-5/+5
| | | | llvm-svn: 14201
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-2/+2
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-091-4/+4
| | | | llvm-svn: 11224
* Remove all of the annoying statistics now that I'm finished (for the nearChris Lattner2004-02-011-21/+0
| | | | | | term) working on bytecode size stuff. llvm-svn: 11046
* Add support for writing bytecode files with compactiontables for bytecode files.Chris Lattner2004-01-181-8/+0
| | | | | | | | 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: 10915
* ConstantPointerRef's are no longer emitted. This saves 20028 bytes in theChris Lattner2004-01-151-7/+3
| | | | | | | | bytecode files when compiling 176.gcc, but more importantly will make it easier to eliminate CPR's in the future (no new .bc revision will be required to support them) llvm-svn: 10884
* The new bytecode format supports emitting strings a special case. This isChris Lattner2004-01-141-8/+45
| | | | | | | | | | | | intended to save size (and does on small programs), but on big programs it actually increases the size of the program slightly. The deal is that many functions end up using the characters that the string contained, and the characters are no longer in the global constant table, so they have to be emitted in function specific constant pools. This pessimization will be fixed in subsequent patches. llvm-svn: 10864
* Ok, I can't handle it. This is a temporary checkin of a ton of statistics thatChris Lattner2004-01-141-4/+21
| | | | | | | i'm using in my work to reduce the bytecode file sizes. These will eventually be removed. llvm-svn: 10849
* Finegrainify namespacificationChris Lattner2004-01-101-4/+1
| | | | llvm-svn: 10737
* Remove usage of ConstantPointerChris Lattner2003-11-171-3/+1
| | | | llvm-svn: 10051
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* Explicitly cast type, so we aren't passing output_vbr a size_t.Brian Gaeke2003-10-291-1/+1
| | | | llvm-svn: 9590
* 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
* Eliminate some extraneous code in SlotCalculator::insertVal().Alkis Evlogimenos2003-10-171-10/+10
| | | | | | | | | Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(), SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(), SlotCalculator::insertVal() to SlotCalculator::insertValue(), and SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue(). llvm-svn: 9190
* Regularize header file commentsChris Lattner2003-10-131-5/+1
| | | | llvm-svn: 9071
* Remove explicit const qualifiersChris Lattner2003-07-231-10/+10
| | | | llvm-svn: 7245
* Changes to the V2 bytecode format:Chris Lattner2003-03-191-20/+14
| | | | | | | | | | | | | | | | | | | | - 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
* Cleanup ConstantExpr handling:Chris Lattner2002-07-301-3/+4
| | | | | | | | | | | | | | * 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
* Add support for writing ConstantExpr nodes.Vikram S. Adve2002-07-141-1/+23
| | | | llvm-svn: 2899
* Split ConstantVals.h into Constant.h and Constants.hChris Lattner2002-04-281-1/+1
| | | | llvm-svn: 2378
* s/Method/FunctionChris Lattner2002-03-291-3/+3
| | | | llvm-svn: 2035
* Changes to build successfully with GCC 3.02Chris Lattner2002-01-201-1/+3
| | | | llvm-svn: 1503
* Remove unsized array supportChris Lattner2001-12-141-3/+1
| | | | llvm-svn: 1461
* Renamed inst_const_iterator -> const_inst_iteratorChris Lattner2001-12-041-1/+1
| | | | | | | Renamed op_const_iterator -> const_op_iterator Renamed PointerType::getValueType() -> PointerType::getElementType() llvm-svn: 1408
* Rename ConstPoolVal -> ConstantChris Lattner2001-12-031-15/+15
| | | | | | | Rename ConstPool* -> Constant* Rename ConstPoolVals.h -> ConstantVals.h llvm-svn: 1407
* Allow unresolved/opaque types to be read and written to bytecode filesChris Lattner2001-10-231-0/+5
| | | | llvm-svn: 959
* Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get ↵Chris Lattner2001-10-151-2/+2
| | | | | | tired typing that much llvm-svn: 822
* * Use new style casts moreChris Lattner2001-10-131-7/+18
| | | | | | | | * Add real support for global variable addresses initializing constants * Fix encoding/decoding of VarArgs calls * Support the Invoke instruction llvm-svn: 761
* Commit more code over to new cast styleChris Lattner2001-10-021-5/+5
| | | | llvm-svn: 697
* Implement constant pointers, and null specifically in the parser, bytecode ↵Chris Lattner2001-09-301-0/+5
| | | | | | | | writer, and bytecode reader. llvm-svn: 668
* ModuleTyID doesn't exist anyymoreChris Lattner2001-09-101-1/+0
| | | | | | Use correct cast llvm-svn: 539
* * Emit bytecode using a deque instead of a vector to be fasterChris Lattner2001-09-071-4/+4
| | | | | | | | | * 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
* Add support for extern varargs methods & varargs method callsChris Lattner2001-07-251-2/+6
| | | | llvm-svn: 297
* Add support to the bytecode writer to recognize floating point constantsChris Lattner2001-07-151-4/+10
| | | | llvm-svn: 190
* Changed the fundemental architecture of Operands for Instructions. NowChris Lattner2001-07-071-1/+1
| | | | | | | | | | | 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
* Convert ugly postincrement to efficient preincrementChris Lattner2001-06-271-2/+2
| | | | llvm-svn: 89
* Initial revisionChris Lattner2001-06-061-0/+154
llvm-svn: 2
OpenPOWER on IntegriCloud