summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
Commit message (Collapse)AuthorAgeFilesLines
...
* Make labels work in asm blocks; allow labels asDale Johannesen2007-11-051-1/+4
| | | | | | | parameters. Rename ValueRefList to ParamList in AsmParser, since its only use is for parameters. llvm-svn: 43734
* Added default creation of root-level block by bitstream serializer.Ted Kremenek2007-11-051-3/+22
| | | | llvm-svn: 43732
* Removed ReadVal from SerializeTrait<T>, and also removed it fromTed Kremenek2007-11-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). llvm-svn: 43624
* Rewrote backpatcher. Backpatcher now stores the "has final pointer"Ted Kremenek2007-11-011-21/+19
| | | | | | | | | | | 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. llvm-svn: 43595
* constified several pointer arguments for methods in the Deserializer.Ted Kremenek2007-10-311-3/+3
| | | | llvm-svn: 43583
* Implemented deserialization of references. References are handledTed Kremenek2007-10-311-1/+13
| | | | | | | | | | | | | 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). llvm-svn: 43570
* Fixed warning concerning implicit conversion from a NULL pointerTed Kremenek2007-10-291-1/+1
| | | | | | constant to an unsigned int. We now just directly assign the literal 0. llvm-svn: 43459
* Fixed assertion in Deserializer::~Deserializer that checks forTed Kremenek2007-10-281-2/+6
| | | | | | pointers that were not backpatched (previously checked the wrong invariant). llvm-svn: 43425
* Updated backpatching logic during object deserialization to performTed Kremenek2007-10-281-24/+38
| | | | | | | | eager backpatching instead of waithing until all objects have been deserialized. This allows us to reduce the memory footprint needed for backpatching. llvm-svn: 43422
* Added serialization support for APInt.Ted Kremenek2007-10-261-0/+33
| | | | llvm-svn: 43405
* Updated backpatching during object deserialization to support "smart"Ted Kremenek2007-10-251-1/+3
| | | | | | pointers that employ unused bits in a pointer to store extra data. llvm-svn: 43373
* Disambiguated variable name to comply with VC++'s archaic variable scoping ↵Hartmut Kaiser2007-10-251-5/+5
| | | | | | rules. llvm-svn: 43369
* Added special treatment of serializing NULL pointers.Ted Kremenek2007-10-251-0/+5
| | | | llvm-svn: 43357
* Implemented prototype serialization of pointers, including supportTed Kremenek2007-10-251-2/+52
| | | | | | | | for backpatching. Added Deserialize::ReadVal. llvm-svn: 43319
* Split Serialization.h into separate headers: Serialize.h andTed Kremenek2007-10-241-17/+26
| | | | | | | Deserialize.h Serialization.h now includes trait speciailizations for unsigned long, etc. llvm-svn: 43307
* Added preliminary implementation of generic object serialization to bitcode.Ted Kremenek2007-10-231-0/+83
| | | | llvm-svn: 43261
* Next PPC long double bits. First cut at constants.Dale Johannesen2007-10-111-2/+2
| | | | | | | | | No compile-time support for constant operations yet, just format transformations. Make readers and writers work. Split constants into 2 doubles in Legalize. llvm-svn: 42865
* Revise previous patch per review comments.Dale Johannesen2007-09-121-1/+0
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-5/+6
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Revert previous change to IR.Dale Johannesen2007-09-071-1/+1
| | | | llvm-svn: 41769
* Next round of APFloat changes.Dale Johannesen2007-09-061-6/+9
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-1/+1
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-1/+1
| | | | llvm-svn: 41506
* Patch 10 for long double. Doing constants right needs expanding ConstantFPDale Johannesen2007-08-091-0/+4
| | | | | | | | | | | | to handle values bigger than double. If we assume host==target and host long double works correctly, this is not too bad, but we don't want to have that limitation longterm. I could implement accepting double constants as long double or something like that, which would lead to incorrect codegen with no errors; the more I think about that the worse it seems. Rather than do such a hack that would be backed out later, I'm settling for giving reasonable error messages, for now. llvm-svn: 40974
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-042-0/+44
| | | | | | | | LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported. llvm-svn: 40807
* Long double, part 1 of N. Support in IR.Dale Johannesen2007-08-031-0/+9
| | | | llvm-svn: 40774
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-1/+1
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-3/+3
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* Fix PR1434 and test/Linker/link-archive.ll, this is a regression from 1.9.Chris Lattner2007-05-182-54/+91
| | | | llvm-svn: 37204
* implement the ModuleProvider::dematerializeFunction hookChris Lattner2007-05-152-9/+21
| | | | llvm-svn: 37080
* Make a preemptive bitcode format change to support PR1146. This lets us doChris Lattner2007-05-081-16/+25
| | | | | | | pr1146 in llvm 2.1 without ugly code to emulate old behavior. This should be merged into the 2.0 release branch. llvm-svn: 36928
* fix off-by-one that caused the llvm2cpp test to failChris Lattner2007-05-061-2/+4
| | | | llvm-svn: 36880
* Allow structs with zero fields.Chris Lattner2007-05-061-1/+1
| | | | llvm-svn: 36862
* add a missing checkChris Lattner2007-05-061-0/+1
| | | | llvm-svn: 36859
* Keep header file free of 'possible loss of data' warnings.Jeff Cohen2007-05-061-3/+3
| | | | llvm-svn: 36832
* implement reading/writing of inlineasm objectsChris Lattner2007-05-061-0/+21
| | | | llvm-svn: 36827
* add a denser encoding for null terminated strings, add a 6-bit abbrev asChris Lattner2007-05-061-0/+14
| | | | | | well. This shrinks kc++ from 2724088 to 2717360 bytes. llvm-svn: 36821
* implement the 'string constant' optimization. This shrinks kc.bit fromChris Lattner2007-05-061-0/+14
| | | | | | 2878544 to 2815788 llvm-svn: 36818
* further reduce the redundancy of types in the instruction encoding. ThisChris Lattner2007-05-061-64/+65
| | | | | | shrinks function bodies in kc++ from 891913B to 884073B llvm-svn: 36817
* stop encoding type/value pairs when the type is implied by the value.Chris Lattner2007-05-062-75/+97
| | | | | | This shrinks the function block of kc++ from 1055K to 906K llvm-svn: 36816
* add support for BLOCKINFO records at the module level. This fixes the readerChris Lattner2007-05-051-0/+4
| | | | | | issues reid noticed last night. llvm-svn: 36785
* Implement support for globally associating abbrevs with block IDs, whichChris Lattner2007-05-051-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 :) llvm-svn: 36767
* eliminate internal length fields from record. Records already know theirChris Lattner2007-05-041-37/+36
| | | | | | total length llvm-svn: 36752
* storeinst ctor takes isvolatile before alignment. With this, 176.gcc roundtripsChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36738
* fix a misplaced errorChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36736
* encode and read param attrs along with function type. WE can now roundtrip ↵Chris Lattner2007-05-041-7/+6
| | | | | | Olden/voronoi loslessly llvm-svn: 36735
* add support for reading the param attrs blockChris Lattner2007-05-042-0/+82
| | | | llvm-svn: 36731
* remove dead codeChris Lattner2007-05-041-6/+0
| | | | llvm-svn: 36728
* Allow this to compile with gcc 4.0.XReid Spencer2007-05-041-2/+4
| | | | llvm-svn: 36723
* Encoding calling conv info in call/invoke instrs, tree add now round trips ↵Chris Lattner2007-05-031-16/+21
| | | | | | completely llvm-svn: 36707
OpenPOWER on IntegriCloud