summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/Writer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove the old bc writerChris Lattner2007-05-061-1266/+0
| | | | llvm-svn: 36881
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-1/+1
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+1
| | | | llvm-svn: 36632
* Implement protected visibility. This partly implements PR1363. LinkerAnton Korobeynikov2007-04-291-2/+3
| | | | | | should be taught to deal with protected symbols. llvm-svn: 36565
* Implement review feedback. Aliasees can be either GlobalValue's orAnton Korobeynikov2007-04-281-5/+6
| | | | | | bitcasts of them. llvm-svn: 36537
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-1/+26
| | | | | | will follow. llvm-svn: 36435
* PR400 work phase 1. Add attributed load/store instructions for ↵Christopher Lamb2007-04-221-6/+35
| | | | | | volatile/align to LLVM. llvm-svn: 36349
* Revert Christopher Lamb's load/store alignment changes.Reid Spencer2007-04-211-27/+5
| | | | llvm-svn: 36309
* add support for alignment attributes on load/store instructionsChristopher Lamb2007-04-211-5/+27
| | | | llvm-svn: 36301
* Make long line fit in 80 cols.Reid Spencer2007-04-161-1/+1
| | | | llvm-svn: 36183
* Implement the "thread_local" keyword.Lauro Ramos Venancio2007-04-121-5/+6
| | | | llvm-svn: 35950
* For PR1146:Reid Spencer2007-04-091-13/+27
| | | | | | | | 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. llvm-svn: 35811
* 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. llvm-svn: 35796
* Implement writing of arbitrary precision integers.Reid Spencer2007-02-281-4/+14
| | | | llvm-svn: 34717
* For PR1195:Reid Spencer2007-02-151-4/+4
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* From Dan Gohman:Chris Lattner2007-02-141-1/+1
| | | | | | | | | | 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. llvm-svn: 34267
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-9/+6
| | | | | | | | | 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%. llvm-svn: 34193
* Change the table datastructure to be a vector<smallvector>, instead ofChris Lattner2007-02-101-8/+9
| | | | | | | | | | 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). llvm-svn: 34142
* 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). llvm-svn: 34141
* 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. llvm-svn: 34140
* getTypeSlot can never failChris Lattner2007-02-101-59/+23
| | | | llvm-svn: 34129
* getSlot can never fail. Make it assert internally, eliminate checks inChris Lattner2007-02-101-50/+23
| | | | | | clients. Same for getTypeSlot. llvm-svn: 34128
* rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlotChris Lattner2007-02-101-19/+19
| | | | | | for types. llvm-svn: 34113
* Use int32_t and uint32_t to hopefully help weak compilers (cygwin) notReid Spencer2007-02-091-3/+3
| | | | | | generate errors about being unable to resolve overloaded type. llvm-svn: 34103
* remove dead code, the outputConstants function is now only called at module ↵Chris Lattner2007-02-091-13/+5
| | | | | | scope. llvm-svn: 34085
* 1. constants can never occur in the symbol table.Chris Lattner2007-02-091-2/+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-8/+18
| | | | | | | | | | 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
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-5/+5
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Bye, Bye Compaction Tables. The benefit compaction tables provides doesn'tReid Spencer2007-01-301-77/+1
| | | | | | | | | | | | | | | | | | | 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
* For PR761:Reid Spencer2007-01-261-11/+5
| | | | | | | Remove the Endianness and PointerSize fields from the ModuleHeader and replace it with the DataLayout field. llvm-svn: 33529
* Back out last changes for dataLayout. Much more work is needed.Reid Spencer2007-01-191-3/+0
| | | | llvm-svn: 33347
* For PR761:Reid Spencer2007-01-181-0/+3
| | | | | | Implement reading and writing of the Module's data layout string. llvm-svn: 33346
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-1/+1
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* Make sure that GEP indices are only 32 or 64 bits. We're not ready forReid Spencer2007-01-131-6/+10
| | | | | | indices with other bit sizes yet. llvm-svn: 33167
* remove unneeded special case for boolChris Lattner2007-01-121-6/+1
| | | | llvm-svn: 33156
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-121-5/+17
| | | | | | | | * PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) llvm-svn: 33136
* For PR1064:Reid Spencer2007-01-121-29/+33
| | | | | | | | | | | | | | | | | | | | | | | 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
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-1/+1
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-1/+1
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR411:Reid Spencer2007-01-061-11/+24
| | | | | | | | | 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-21/+14
| | | | | | | | | | | | | | 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
* switch statistics over to not use static ctors.Chris Lattner2006-12-191-2/+2
| | | | llvm-svn: 32709
* This snuck in. Reverted.Bill Wendling2006-12-171-2/+0
| | | | llvm-svn: 32638
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-171-0/+2
| | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. llvm-svn: 32636
* Packed StructuresAndrew Lenharth2006-12-081-3/+5
| | | | llvm-svn: 32361
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-6/+6
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-1/+1
| | | | | | is 'unsigned'. llvm-svn: 32279
* Fix a CmpInst writing bug by removing merge cruft that I *know* I've removedReid Spencer2006-12-061-9/+4
| | | | | | | before. Also, make sure we write the predicate value for Cmp instructions using instruction format 0. llvm-svn: 32253
OpenPOWER on IntegriCloud