aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
Commit message (Collapse)AuthorAgeFilesLines
* Revert Christopher Lamb's load/store alignment changes.Reid Spencer2007-04-212-48/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for alignment attributes on load/store instructionsChristopher Lamb2007-04-212-8/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8
* Make long line fit in 80 cols.Reid Spencer2007-04-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36183 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the "thread_local" keyword.Lauro Ramos Venancio2007-04-123-10/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35950 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug where calling materializeModule could corrupt the module, readingChris Lattner2007-04-091-9/+8
| | | | | | | multiple copies of the function into the Function*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35831 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1146:Reid Spencer2007-04-096-25/+62
| | | | | | | | | Use ParamAttrsList for writing parameter attributes. Since they are sparse now, we also write them sparsely (saves a few bytes). Unfortunately, this is a bytecode file format change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35811 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that caused alignment information to occasionally get stripped offChris Lattner2007-04-091-2/+11
| | | | | | | of an allocation instruction when writing to bytecode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35796 91177308-0d34-0410-b5e6-96231b3b80d8
* No functional change, this is just easier to read and debug.Reid Spencer2007-04-081-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35782 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid a useless temporary constrution.Reid Spencer2007-04-071-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35747 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another PathWithStatus issue.Reid Spencer2007-04-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35744 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1302:Reid Spencer2007-04-043-6/+6
| | | | | | | Adjust useage of sys::Path::FileType for new enumerator names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35651 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR789:Reid Spencer2007-03-292-2/+8
| | | | | | | | | Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35476 91177308-0d34-0410-b5e6-96231b3b80d8
* the bytecode reader supports dematerializeFunctionChris Lattner2007-03-292-7/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35475 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR789:Reid Spencer2007-03-292-2/+2
| | | | | | | Updates for change in interface of getFileStatus method of sys::Path class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35458 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a simpler constructor for ConstantInt.Reid Spencer2007-03-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34803 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement reading of arbitrary precision integers.Reid Spencer2007-02-281-4/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34718 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement writing of arbitrary precision integers.Reid Spencer2007-02-281-4/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34717 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-152-8/+8
| | | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-153-16/+16
| | | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
* From Dan Gohman:Chris Lattner2007-02-142-2/+2
| | | | | | | | | | | While preparing http://llvm.org/PR1198 I noticed several asserts protecting unprepared code from i128 types that weren't actually failing when they should because they were written as assert("foo") instead of something like assert(0 && "foo"). This patch fixes all the cases that a quick grep found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34267 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a SmallVector to reduce heap traffic. This speeds up bcreader 10%Chris Lattner2007-02-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34231 91177308-0d34-0410-b5e6-96231b3b80d8
* now that we can pass ranges into CallInst ctors, eliminate vector heap trafficChris Lattner2007-02-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34229 91177308-0d34-0410-b5e6-96231b3b80d8
* stop passing vector into ctorsChris Lattner2007-02-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34218 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid creating a temporary string when reading the symbol table for aChris Lattner2007-02-123-9/+26
| | | | | | | module. This speeds up the bcreader 11%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34198 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-123-11/+11
| | | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo the last patch. It slowed down bcwriter by 1.8% but only sped upReid Spencer2007-02-111-67/+5
| | | | | | | the bc reader by 0.8%. Deemed "not worth it" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34169 91177308-0d34-0410-b5e6-96231b3b80d8
* Compaction tables don't exist any more.Reid Spencer2007-02-101-35/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34148 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1194:Reid Spencer2007-02-101-5/+67
| | | | | | | | | | | | | The bcreader counts on "primitive" types being inserted before they are referenced in other types. With recent changes to the bcwriter, this fact became exposed since IntegerType is no longer "primitive". We can no longer count on all IntegerTypes being inserted early. This patch modifies getOrCreateTypeSlot to insert any sub-type that can't possibly recurse before we create the slot for the type. This has the benefit of reducing the number of OpaqueType objects the reader needs to deal with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34147 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment.Reid Spencer2007-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34146 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the table datastructure to be a vector<smallvector>, instead ofChris Lattner2007-02-103-16/+14
| | | | | | | | | | | vector<vector> to avoid allocations. This speeds up bcwriting of 447.dealII from 0.8276 to 0.7637s (8.4%). This concludes this round of proding the bcwriter into submission. Final speedup from 24.4s to 0.7637s (32x). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34142 91177308-0d34-0410-b5e6-96231b3b80d8
* Make BytecodeWriter::outputValueSymbolTable *significantly* less abusiveChris Lattner2007-02-101-3/+4
| | | | | | | | of memory, through a combination of DenseMap and SmallVector. This speeds up bcwriter on 447.dealII from 1.31s to 0.82s (60% faster). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34141 91177308-0d34-0410-b5e6-96231b3b80d8
* make the datastructure used in BytecodeWriter::outputValueSymbolTableChris Lattner2007-02-101-4/+4
| | | | | | | | *slightly* less abusive of memory. This speeds up the bcwriter from 1.83s to 1.32s (39% faster) on 447.dealII. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34140 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch typemap over to DenseMap. No significant speedup.Chris Lattner2007-02-101-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34139 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch NodeMap from an std::map to a DenseMap. This speeds up bcwritingChris Lattner2007-02-101-1/+1
| | | | | | | of 447.dealII from 3.3s to 1.8s (80% faster). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34138 91177308-0d34-0410-b5e6-96231b3b80d8
* use typedefs where appropriateChris Lattner2007-02-102-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34136 91177308-0d34-0410-b5e6-96231b3b80d8
* The ModuleLevel vector is often quite sparse. Switch it to a DenseMap. ThisChris Lattner2007-02-102-18/+24
| | | | | | | speeds up bcwriting of 447.dealII by 40%, from 4.63s to 3.32s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34135 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the ModuleLevel datastructure more sane. When a function-local valueChris Lattner2007-02-102-33/+19
| | | | | | | | | is inserted into the table, it remembers that the value needs to be popped off. This makes purgeFunction much faster, speeding up bcwriting of 447.dealII from 6.8->4.6s (47%). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34133 91177308-0d34-0410-b5e6-96231b3b80d8
* Only compute the module levels info once per module, instead of onceChris Lattner2007-02-101-15/+7
| | | | | | | | per function. This speeds up bcwriting on 447.dealII from 10.16s to 6.81s (49%). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34132 91177308-0d34-0410-b5e6-96231b3b80d8
* Clone and specialize CreateSlotIfNeeded into CreateFunctionValueSlot to handleChris Lattner2007-02-102-63/+101
| | | | | | | | function-local values. This speeds up bcwriting a small 2.2% (10.384->10.156s on 447.dealII), but paves the way for more important changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34131 91177308-0d34-0410-b5e6-96231b3b80d8
* make getSlot/getTypeSlot inlineChris Lattner2007-02-102-14/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34130 91177308-0d34-0410-b5e6-96231b3b80d8
* getTypeSlot can never failChris Lattner2007-02-103-62/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34129 91177308-0d34-0410-b5e6-96231b3b80d8
* getSlot can never fail. Make it assert internally, eliminate checks inChris Lattner2007-02-103-63/+32
| | | | | | | clients. Same for getTypeSlot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34128 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify getOrCreateTypeSlot, eliminat doInsertType. Eliminate post-order ↵Chris Lattner2007-02-102-32/+10
| | | | | | iteration stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34127 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify and speed up recursive type processing.Chris Lattner2007-02-101-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34126 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getOrCreateSlot -> CreateSlotIfNeeded. Noone cares about the retvalChris Lattner2007-02-102-23/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34125 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor callers of insertType. inline insertType into its one remaining ↵Chris Lattner2007-02-102-23/+11
| | | | | | caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34124 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code.Chris Lattner2007-02-102-33/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34123 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some logic, reduce nestingChris Lattner2007-02-101-25/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34122 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead ctorChris Lattner2007-02-102-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34121 91177308-0d34-0410-b5e6-96231b3b80d8
* ModuleContainsAllFunctionConstants is always trueChris Lattner2007-02-102-39/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34120 91177308-0d34-0410-b5e6-96231b3b80d8