aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
Commit message (Collapse)AuthorAgeFilesLines
* Implement support for a new LLVM 1.3 bytecode format, which uses uint'sChris Lattner2004-04-056-87/+191
| | | | | | | | to index into structure types and allows arbitrary 32- and 64-bit integer types to index into sequential types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12651 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch of cruft that was used to be backwards compatible with the lastChris Lattner2004-04-033-92/+23
| | | | | | | | prerelease format for LLVM bytecode files. Now we only are compatible with LLVM 1.0+. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12643 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the true, decoded name of the archive member in getObjectType.Brian Gaeke2004-03-312-14/+20
| | | | | | | | In ReadArchiveBuffer, make sure that MemberName is set in the case where getObjectType would want to return SVR4LongFilename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12567 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading constantexpr select instructionsChris Lattner2004-03-311-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12563 91177308-0d34-0410-b5e6-96231b3b80d8
* Make error message a bit nicer.Chris Lattner2004-03-291-1/+1
| | | | | | | Contributed by Reid Spencer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12523 91177308-0d34-0410-b5e6-96231b3b80d8
* Write select instructions to bytecodeChris Lattner2004-03-121-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12315 91177308-0d34-0410-b5e6-96231b3b80d8
* Read select instrs from bytecodeChris Lattner2004-03-121-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12314 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjustments to support the new ConstantAggregateZero classChris Lattner2004-02-151-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
* This debugging hook is no longer needed.Chris Lattner2004-02-091-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11233 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-092-6/+6
| | | | | | getElementTypes() is gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-093-26/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11224 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefsChris Lattner2004-02-091-0/+2
| | | | | | | Have I ever mentioned how much I _hate_ constantpointerrefs? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11212 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all of the annoying statistics now that I'm finished (for the nearChris Lattner2004-02-013-89/+0
| | | | | | | term) working on bytecode size stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11046 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement ModuleProvider::materializeModule() by only materializing functionsMisha Brukman2004-01-211-0/+10
| | | | | | | that are still left in the lazy reader map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10944 91177308-0d34-0410-b5e6-96231b3b80d8
* SlotCalculator.h movedChris Lattner2004-01-202-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10931 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SlotCalculator.h from include/llvm to include/llvm/AnalysisChris Lattner2004-01-201-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10930 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR212 - Bytecode reader misreads 'long -9223372036854775808'!Chris Lattner2004-01-201-3/+7
| | | | | | | Fix testcase test/Regression/Assembler/2004-01-20-MaxLongLong.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10928 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bogus warning and simplify codeChris Lattner2004-01-201-11/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10924 91177308-0d34-0410-b5e6-96231b3b80d8
* Major changes. Now we only compactify individual type planes if it is inChris Lattner2004-01-201-50/+196
| | | | | | | | | | | | | | | fact "profitable" to do so. This makes compactification "free" for small programs (ie, it is completely disabled) and even helps large programs by not having to encode pointless compactification planes. On 176.gcc, this saves 50K from the bytecode file, which is, alas only a couple percent. This concludes my head bashing against the bytecode format, at least for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10922 91177308-0d34-0410-b5e6-96231b3b80d8
* add a method proto, make a method not inlineChris Lattner2004-01-201-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10921 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugfixes for dealing with partially compactified functionsChris Lattner2004-01-202-14/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10920 91177308-0d34-0410-b5e6-96231b3b80d8
* Save another 30K from 176.gcc by encoding the compaction table a bit moreChris Lattner2004-01-182-7/+32
| | | | | | | intelligently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10918 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -debug outputChris Lattner2004-01-181-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10917 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for writing bytecode files with compactiontables for bytecode files.Chris Lattner2004-01-184-36/+73
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10915 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading bytecode files with compactiontables for bytecode files.Chris Lattner2004-01-183-41/+186
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10914 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for building the compactiontable for bytecode files. This shrinksChris Lattner2004-01-181-54/+221
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10913 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for representing the "compaction table"Chris Lattner2004-01-181-5/+40
| | | | | | | Change protected members to private. Nothing should subclass SlotCalculator git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10912 91177308-0d34-0410-b5e6-96231b3b80d8
* Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitiveChris Lattner2004-01-174-12/+33
| | | | | | | | type planes. This saves about 5k on 176.gcc, and is needed for a subsequent patch of mine I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10908 91177308-0d34-0410-b5e6-96231b3b80d8
* If these blocks are empty, there is no reason to even emit the bytecode blocks.Chris Lattner2004-01-152-8/+24
| | | | | | | This saves about 15K in 176.gcc, coupled with another patch that I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10889 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanups & efficiency improvementsChris Lattner2004-01-151-18/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10888 91177308-0d34-0410-b5e6-96231b3b80d8
* The bcwriter does not want ConstantPointerRef's to be indexed, and the ↵Chris Lattner2004-01-151-5/+14
| | | | | | asmwriter never did! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10885 91177308-0d34-0410-b5e6-96231b3b80d8
* 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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10884 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow bytecode files to refer directly to global values as constants, insteadChris Lattner2004-01-151-2/+6
| | | | | | | | | of forcing them to go through ConstantPointerRef's. This allows bytecode files to mirror .ll files, allows more efficient encoding, and makes it easier to eventually eliminate CPR's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10883 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more breakage with string change.Chris Lattner2004-01-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10882 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR73: bytecode format inconsistentChris Lattner2004-01-151-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10876 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR73Chris Lattner2004-01-152-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10875 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix brokenness in my last checkingChris Lattner2004-01-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10874 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all of the bytecode reader primitives to throw exceptions instead ofChris Lattner2004-01-155-244/+131
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10871 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.Chris Lattner2004-01-151-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10870 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve comments, add support for remembering the constants strings thatChris Lattner2004-01-141-14/+27
| | | | | | | are to be emitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10866 91177308-0d34-0410-b5e6-96231b3b80d8
* The new bytecode format supports emitting strings a special case. This isChris Lattner2004-01-143-21/+63
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10864 91177308-0d34-0410-b5e6-96231b3b80d8
* Version 1.2 now supports encoding strings as a special case, to avoid havingChris Lattner2004-01-143-2/+47
| | | | | | | to emit all of those sbyte constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10863 91177308-0d34-0410-b5e6-96231b3b80d8
* When emitting bytecode, handle strings specially. Do not add the charactersChris Lattner2004-01-141-9/+52
| | | | | | | that make up the strings to the slotcalculator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10862 91177308-0d34-0410-b5e6-96231b3b80d8
* Like output_data, it's obvious that input_data was only used with 1 characterChris Lattner2004-01-141-9/+1
| | | | | | | data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10861 91177308-0d34-0410-b5e6-96231b3b80d8
* It is obvious that this has never been used for outputing more than a singleChris Lattner2004-01-141-10/+1
| | | | | | | byte, it's totally endian incorrect! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10857 91177308-0d34-0410-b5e6-96231b3b80d8
* Be const correctChris Lattner2004-01-141-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10856 91177308-0d34-0410-b5e6-96231b3b80d8
* Ok, I can't handle it. This is a temporary checkin of a ton of statistics thatChris Lattner2004-01-143-9/+100
| | | | | | | | i'm using in my work to reduce the bytecode file sizes. These will eventually be removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10849 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for the pre-1.0 bytecode version #1. This will becomeChris Lattner2004-01-142-60/+34
| | | | | | | the bytecode revision generated by LLVM 1.2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10848 91177308-0d34-0410-b5e6-96231b3b80d8
* Toggle sense of flagChris Lattner2004-01-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10838 91177308-0d34-0410-b5e6-96231b3b80d8
* The only clients of the slot calculator are now the asmwriter and bcwriter.Chris Lattner2004-01-142-14/+19
| | | | | | | | | Since this really only makes sense for these two, change hte instance variable to reflect whether we are writing a bytecode file or not. This makes it reasonable to add bcwriter specific stuff to it as necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10837 91177308-0d34-0410-b5e6-96231b3b80d8