summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
Commit message (Collapse)AuthorAge
...
* Serializer no longer automatically emits a root-level block in the bitstream.Ted Kremenek2007-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43784 91177308-0d34-0410-b5e6-96231b3b80d8
* Augmented ReadPtr and ReadOwnedPtr to control whether or not a pointer is ↵Ted Kremenek2007-11-06
| | | | | | | | | allowed to be backpatched or can be registered with the deserializer to backpatch other pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43783 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed "Flush()" to "FlushRecord()".Ted Kremenek2007-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43772 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for processing abbreviations in the Deserializer.Ted Kremenek2007-11-06
| | | | | | | Added some #ifdef-controlled messages for debugging backpatching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43771 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support in serializer and deserializer to create arbitrary blocks.Ted Kremenek2007-11-05
| | | | | | | Added detection of end-of-stream in deserializer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43736 91177308-0d34-0410-b5e6-96231b3b80d8
* Added default creation of root-level block by bitstream serializer.Ted Kremenek2007-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43732 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug where tombstone key and empty key for DenseMap used forTed Kremenek2007-11-05
| | | | | | | | pointer backpatching in deserializer were improperly created and resulted in an assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43721 91177308-0d34-0410-b5e6-96231b3b80d8
* Added overloaded version of Deserializer::ReadOwnedPtr which allowsTed Kremenek2007-11-02
| | | | | | | | | the target pointer to be passed by reference. This can result in less typing, as the object to be deserialized can be inferred from the argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43647 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed ReadVal from SerializeTrait<T>, and also removed it fromTed Kremenek2007-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deserializer. There were issues with Visual C++ barfing when instantiating SerializeTrait<T> when "T" was an abstract class AND SerializeTrait<T>::ReadVal was *never* called: template <typename T> struct SerializeTrait { <SNIP> static inline T ReadVal(Deserializer& D) { T::ReadVal(D); } <SNIP> }; Visual C++ would complain about "T" being an abstract class, even though ReadVal was never instantiated (although one of the other member functions were). Removing this from the trait is not a big deal. It was used hardly ever, and users who want "read-by-value" deserialization can simply call the appropriate methods directly instead of relying on trait-based-dispatch. The trait dispatch for serialization/deserialization is simply sugar in many cases (like this one). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43624 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrote backpatcher. Backpatcher now stores the "has final pointer"Ted Kremenek2007-11-01
| | | | | | | | | | | | flag in the **key** of the backpatch map, as opposed to the mapped value which contains either the final pointer, or a pointer to a chain of pointers that need to be backpatched. The bit flag was moved to the key because we were erroneously assuming that the backpatched pointers would be at an alignment of >= 2 bytes, which obviously doesn't work for character strings. Now we just steal the bit from the key. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43595 91177308-0d34-0410-b5e6-96231b3b80d8
* constified several pointer arguments for methods in the Deserializer.Ted Kremenek2007-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43583 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented deserialization of references. References are handledTed Kremenek2007-10-31
| | | | | | | | | | | | | | just like pointers, except that they cannot be backpatched. This means that references are essentially non-owning pointers where the referred object must be deserialized prior to the reference being deserialized. Because of the nature of references, this ordering of objects is always possible. Fixed a bug in backpatching code (returning the backpatched pointer would accidentally include a bit flag). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43570 91177308-0d34-0410-b5e6-96231b3b80d8
* Added Serializer::EmitRef to deal with emitting arbitrary references.Ted Kremenek2007-10-31
| | | | | | | Modified Serializer::EmitPtr to handle const pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43565 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated backpatching logic during object deserialization to performTed Kremenek2007-10-28
| | | | | | | | | eager backpatching instead of waithing until all objects have been deserialized. This allows us to reduce the memory footprint needed for backpatching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43422 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug where default SerializeTrait<>::Materialize would not return the ↵Ted Kremenek2007-10-26
| | | | | | materialized object pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43413 91177308-0d34-0410-b5e6-96231b3b80d8
* Added default implementation of SerializeTrait<> that dispatches toTed Kremenek2007-10-26
| | | | | | | | | | | calling member functions of the target type to perform type-specific serialization. Added version of ReadPtr that allows passing references to uintptr_t (useful for smart pointers). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43396 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated backpatching during object deserialization to support "smart"Ted Kremenek2007-10-25
| | | | | | | pointers that employ unused bits in a pointer to store extra data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43373 91177308-0d34-0410-b5e6-96231b3b80d8
* Added special treatment of serializing NULL pointers.Ted Kremenek2007-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43357 91177308-0d34-0410-b5e6-96231b3b80d8
* Created header file to include minimal forward references needed forTed Kremenek2007-10-25
| | | | | | | object serialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43352 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented prototype serialization of pointers, including supportTed Kremenek2007-10-25
| | | | | | | | | for backpatching. Added Deserialize::ReadVal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43319 91177308-0d34-0410-b5e6-96231b3b80d8
* Split Serialization.h into separate headers: Serialize.h andTed Kremenek2007-10-24
| | | | | | | | Deserialize.h Serialization.h now includes trait speciailizations for unsigned long, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43307 91177308-0d34-0410-b5e6-96231b3b80d8
* Silenced a VC++ warning.Hartmut Kaiser2007-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43276 91177308-0d34-0410-b5e6-96231b3b80d8
* Added "ReadEnum" and "WriteEnum" to serialization classes.Ted Kremenek2007-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43265 91177308-0d34-0410-b5e6-96231b3b80d8
* Added preliminary implementation of generic object serialization to bitcode.Ted Kremenek2007-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43261 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2007-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42747 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix minor doxygen nits.Reid Spencer2007-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40854 91177308-0d34-0410-b5e6-96231b3b80d8
* Long double, part 1 of N. Support in IR.Dale Johannesen2007-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40774 91177308-0d34-0410-b5e6-96231b3b80d8
* finishing touches of bytecode -> bitcode changes. also unbreak WindowsGabor Greif2007-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37950 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate residual cruft related to recognizing bytecodeGabor Greif2007-07-06
| | | | | | | | files. bitcode files are the only LLVM format left. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37945 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* update comments, no functionality changeChris Lattner2007-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36929 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this here from Bytecode/Archive.hChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36865 91177308-0d34-0410-b5e6-96231b3b80d8
* allow zero-length arraysChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36863 91177308-0d34-0410-b5e6-96231b3b80d8
* we aren't at the end of stream until we've consumed all the bytes AND allChris Lattner2007-05-06
| | | | | | | the bits in those bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36861 91177308-0d34-0410-b5e6-96231b3b80d8
* Make code more 64-bit aware.Jeff Cohen2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36833 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++.Jeff Cohen2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36831 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new CreateBitcodeWriterPass method, which creates a bitcode writer asChris Lattner2007-05-06
| | | | | | | a pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36828 91177308-0d34-0410-b5e6-96231b3b80d8
* add inline asm codeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36826 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle bug that prevented round-tripping 470.lbmChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36825 91177308-0d34-0410-b5e6-96231b3b80d8
* add a denser encoding for null terminated strings, add a 6-bit abbrev asChris Lattner2007-05-06
| | | | | | | well. This shrinks kc++ from 2724088 to 2717360 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the 'string constant' optimization. This shrinks kc.bit fromChris Lattner2007-05-06
| | | | | | | 2878544 to 2815788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36818 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bug I introduced when I merged some code togetherChris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36813 91177308-0d34-0410-b5e6-96231b3b80d8
* minor bugfixChris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36777 91177308-0d34-0410-b5e6-96231b3b80d8
* add a 6-bit encoding type for strings.Chris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36770 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for globally associating abbrevs with block IDs, whichChris Lattner2007-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relieves us from having to emit the abbrevs into each instance of the block. This shrinks kc.bit from 3368K to 3333K, but will be a more significant win once instructions are abbreviated. The VST went from: Block ID #14 (VALUE_SYMTAB): Num Instances: 2345 Total Size: 1.29508e+07b/1.61885e+06B/404713W Average Size: 5522.73b/690.342B/172.585W % of file: 48.0645 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 7035/3 Tot/Avg Records: 120924/51.5667 % Abbrev Recs: 100 to: Block ID #14 (VALUE_SYMTAB): Num Instances: 2345 Total Size: 1.26713e+07b/1.58391e+06B/395978W Average Size: 5403.53b/675.442B/168.86W % of file: 47.5198 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 0/0 Tot/Avg Records: 120924/51.5667 % Abbrev Recs: 100 because we didn't emit the same 3 abbrevs 2345 times :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36767 91177308-0d34-0410-b5e6-96231b3b80d8
* use a template to eliminate manual code duplicationChris Lattner2007-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36757 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for array abbreviations.Chris Lattner2007-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36754 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate lengths from record bodiesChris Lattner2007-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36751 91177308-0d34-0410-b5e6-96231b3b80d8
* minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCKChris Lattner2007-05-04
| | | | | | | block type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36748 91177308-0d34-0410-b5e6-96231b3b80d8
* refcount BitCodeAbbrev objectsChris Lattner2007-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36747 91177308-0d34-0410-b5e6-96231b3b80d8