summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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" llvm-svn: 34169
* 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. llvm-svn: 34147
* Fix a comment.Reid Spencer2007-02-101-1/+1
| | | | llvm-svn: 34146
* use typedefs where appropriateChris Lattner2007-02-101-1/+1
| | | | llvm-svn: 34136
* The ModuleLevel vector is often quite sparse. Switch it to a DenseMap. ThisChris Lattner2007-02-101-16/+13
| | | | | | speeds up bcwriting of 447.dealII by 40%, from 4.63s to 3.32s. llvm-svn: 34135
* Make the ModuleLevel datastructure more sane. When a function-local valueChris Lattner2007-02-101-23/+18
| | | | | | | | 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%). llvm-svn: 34133
* 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%). llvm-svn: 34132
* Clone and specialize CreateSlotIfNeeded into CreateFunctionValueSlot to handleChris Lattner2007-02-101-63/+100
| | | | | | | 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. llvm-svn: 34131
* make getSlot/getTypeSlot inlineChris Lattner2007-02-101-12/+0
| | | | llvm-svn: 34130
* getTypeSlot can never failChris Lattner2007-02-101-2/+2
| | | | llvm-svn: 34129
* getSlot can never fail. Make it assert internally, eliminate checks inChris Lattner2007-02-101-12/+8
| | | | | | clients. Same for getTypeSlot. llvm-svn: 34128
* simplify getOrCreateTypeSlot, eliminat doInsertType. Eliminate post-order ↵Chris Lattner2007-02-101-29/+10
| | | | | | iteration stuff. llvm-svn: 34127
* simplify and speed up recursive type processing.Chris Lattner2007-02-101-4/+2
| | | | llvm-svn: 34126
* rename getOrCreateSlot -> CreateSlotIfNeeded. Noone cares about the retvalChris Lattner2007-02-101-18/+13
| | | | llvm-svn: 34125
* refactor callers of insertType. inline insertType into its one remaining ↵Chris Lattner2007-02-101-17/+11
| | | | | | caller. llvm-svn: 34124
* simplify code.Chris Lattner2007-02-101-30/+10
| | | | llvm-svn: 34123
* simplify some logic, reduce nestingChris Lattner2007-02-101-25/+20
| | | | llvm-svn: 34122
* Remove dead ctorChris Lattner2007-02-101-11/+0
| | | | llvm-svn: 34121
* ModuleContainsAllFunctionConstants is always trueChris Lattner2007-02-101-34/+10
| | | | llvm-svn: 34120
* only one client of getOrCreateSlot can pass a void typed value. Check typeChris Lattner2007-02-101-2/+3
| | | | | | there. llvm-svn: 34119
* inline hasNullValue, rename some variables, simplify some code.Chris Lattner2007-02-101-29/+24
| | | | llvm-svn: 34118
* merge insertValue into its single caller, eliminate some redundant checks.Chris Lattner2007-02-101-12/+1
| | | | llvm-svn: 34117
* merge doInsertValue into insertValueChris Lattner2007-02-101-53/+43
| | | | llvm-svn: 34116
* insertvalue's second operand is always falseChris Lattner2007-02-101-10/+6
| | | | llvm-svn: 34115
* remove dead 'dontIgnore' flag for insertTypeChris Lattner2007-02-101-11/+11
| | | | llvm-svn: 34114
* rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlotChris Lattner2007-02-101-21/+22
| | | | | | for types. llvm-svn: 34113
* Make SlotCalculator::getPlane an inline function. It is used inside loops.Reid Spencer2007-02-091-8/+0
| | | | llvm-svn: 34091
* 1. constants can never occur in the symbol table.Chris Lattner2007-02-091-18/+0
| | | | | | | | | | | 2. All function-level constants are now incorporated into the module-level constant pool, since the compaction table was removed. Eliminate extra work to check for them. This speeds up the bcwriter from 24.4s to 13.1s on 447.dealII and .73 -> .56s on kc++ in a release build. llvm-svn: 34084
* For PR411:Reid Spencer2007-02-051-17/+12
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* Bye, Bye Compaction Tables. The benefit compaction tables provides doesn'tReid Spencer2007-01-301-367/+12
| | | | | | | | | | | | | | | | | | | outweight its computational costs. This patch removes all compaction table handling from the bcreader and bcwriter. For the record, here's the difference betweeen having and not having compaction tables for some tests: Test With Without Size Chg Olden/mst 5,602 5,598 +0.1% viterbi 18,026 17,795 +1.3% obsequi 162,133 166,663 -2.8% burg 224,090 228,148 -1.8% kimwitu++ 4,933,263 5,121,159 -3.8% 176.gcc 8,470,424 9,141,539 -7.3% It seems that it is more beneficial to larger files, but even on the largest test case we have (176.gcc) it only amounts ot an I/O saving of 7.3%. llvm-svn: 33661
* Eliminate a log(n) lookupChris Lattner2007-01-121-3/+3
| | | | llvm-svn: 33155
* For PR1064:Reid Spencer2007-01-121-27/+48
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* For PR411:Reid Spencer2007-01-061-21/+15
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* For PR950:Reid Spencer2006-12-311-2/+1
| | | | | | | | | | | | | | Update for signless integer types and parameter attribute implementation. Of significant note: 1. This changes the bytecode format yet again. 2. There are 1/2 as many integer type planes (this is a good thing) 3. GEP indices now use only 1 bit to identify their type which means more GEP instructions won't be relegated to format 0 (size win) 4. Parameter attributes are implemented but currently being stored verbosely for each function type. Some other day this needs to be optimized for size. llvm-svn: 32783
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-1/+1
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-291-3/+3
| | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. llvm-svn: 31990
* Fix a bug where the types for inlineasm nodes were not properly entered intoChris Lattner2006-06-071-2/+2
| | | | | | | the compaction table for a function. This broke compilation of hexxagon on darwin/x86 with recent changes. llvm-svn: 28717
* add bc reader/writer support for inline asmChris Lattner2006-01-251-13/+12
| | | | llvm-svn: 25621
* core changes for varargsAndrew Lenharth2005-06-181-6/+0
| | | | llvm-svn: 22254
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-051-1/+0
| | | | llvm-svn: 21704
* add support for undef values of opaque type, addressing PR541Chris Lattner2005-05-051-9/+10
| | | | llvm-svn: 21701
* Convert tabs to spacesMisha Brukman2005-04-221-1/+1
| | | | llvm-svn: 21439
* * Remove trailing whitespaceMisha Brukman2005-04-211-31/+31
| | | | | | * Convert tabs to spaces llvm-svn: 21418
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-4/+4
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Check in some patches for better assertionsChris Lattner2004-12-041-0/+3
| | | | llvm-svn: 18500
* Fix the previous bug the correct way. This fixes ptrdist/bcChris Lattner2004-10-241-2/+2
| | | | llvm-svn: 17201
* Fix a bug that Brian brought to my attention. This corrects:Chris Lattner2004-10-231-1/+2
| | | | | | Assembler/2004-10-22-BCWriterUndefBug.llx llvm-svn: 17177
* Changes For Bug 352Reid Spencer2004-09-011-2/+2
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Add the CompactionTableIsEmpty function so that we can determine if aReid Spencer2004-08-261-0/+26
| | | | | | | CompactionTable really needs to be emitted. This is not a straight forward computation, hence the need for a member function here. llvm-svn: 16062
* Merge i*.h headers into Instructions.h as part of bug403.Alkis Evlogimenos2004-07-291-1/+1
| | | | llvm-svn: 15325
OpenPOWER on IntegriCloud