aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant const qualifiers from cast<> expressionsChris Lattner2003-07-232-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove explicit const qualifiersChris Lattner2003-07-231-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7245 91177308-0d34-0410-b5e6-96231b3b80d8
* The word `separate' only has one `e'.Misha Brukman2003-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged in autoconf branch. This provides configuration via the autoconfJohn Criswell2003-06-304-12/+12
| | | | | | | system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-182-2/+2
| | | | | | 'Type'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Assembler/2003-06-17-InvokeDisassemble.llxChris Lattner2003-06-171-10/+14
| | | | | | | "yes, invoke instructions can have just three arguments" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6736 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llxChris Lattner2003-05-221-16/+25
| | | | | | | | by emitting the type planes before any constants (which could be constant expressions involving undefined types!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6285 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not assert fail or crash when a bytecode parse fails!Chris Lattner2003-05-222-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6284 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the uchar typedef, use unsigned char explicitlyChris Lattner2003-05-224-38/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6283 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Bug: Assembler/2003-05-12-MinIntProblem.llxChris Lattner2003-05-121-9/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6123 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new va_arg instructionChris Lattner2003-05-082-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6029 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed 'prevalent'.Misha Brukman2003-04-232-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5860 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading and writing pointersize/endianness to and from bytecodeChris Lattner2003-04-222-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5839 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve module source information in the ModuleIDChris Lattner2003-04-224-13/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5836 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for reading standard .a filesChris Lattner2003-04-192-0/+332
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5820 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading unaligned bytecode buffersChris Lattner2003-04-191-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5819 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a big bad bug I checked in yesterday :(Chris Lattner2003-04-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the bytecode reader/writer for the new linkage typesChris Lattner2003-04-163-20/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5790 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new linkage types to support a real frontendChris Lattner2003-04-162-4/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
* * Change the order that globals and constants are processed inChris Lattner2003-03-191-36/+45
| | | | | | | * Add support for implicit zero initializers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5750 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to the V2 bytecode format:Chris Lattner2003-03-193-48/+54
| | | | | | | | | | | | | | | | | | | | | - Null values are implicitly encoded instead of explicitly, this makes things more compact! - More compactly represent ConstantPointerRefs - Bytecode files are represented as: Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab instead of Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab which makes a lot of things simpler. Writer changes: - We now explictly encode versioning information in the bytecode files. - This allows new code to read bytecode files produced by old code, but new bytecode files can have enhancements such as the above. Although this makes the reader a bit more complex (having to deal with old formats), the writer only needs to be able to produce the most recent version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5749 91177308-0d34-0410-b5e6-96231b3b80d8
* * Bug fixes:Chris Lattner2003-03-193-172/+207
| | | | | | | | | | | | | | | | | | | | | | - Fix problems where the constant table would not get updated when resolving constants causes other constants to change. Changes to the V2 bytecode format - Null values are implicitly encoded instead of explicitly, this makes things more compact! - More compactly represent ConstantPointerRefs - Bytecode files are represented as: Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab instead of Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab which makes a lot of things simpler. Changes to the reader: - Function loading code is much simpler. We now no longer make function PlaceHolderHelper objects to be replaced with real functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5748 91177308-0d34-0410-b5e6-96231b3b80d8
* Infrastructure for more compact bytecode files and REAL support for versioningChris Lattner2003-03-062-9/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5716 91177308-0d34-0410-b5e6-96231b3b80d8
* s/Method/Function in variable and method namesChris Lattner2003-03-063-16/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5715 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue simplifying error handling, s/method/functionChris Lattner2003-03-062-60/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5714 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup error handling constructsChris Lattner2003-03-061-37/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5713 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull common code outChris Lattner2003-03-061-16/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5712 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the std namespace explicitlyChris Lattner2003-03-063-47/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5708 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't keep track of # big vs #small instructions seperatelyChris Lattner2003-01-211-8/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5385 91177308-0d34-0410-b5e6-96231b3b80d8
* - Eliminated the deferred symbol table stuff in Module & Function, it reallyChris Lattner2002-11-203-12/+9
| | | | | | | wasn't an optimization and it was causing lots of bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fix a really nasty bug in the bytecode reader that caused it to failChris Lattner2002-10-231-10/+11
| | | | | | | | | reading bytecode files with > 255 types in them, but only when optimization is enabled. This was caused by GCC shrinking an enum to a single byte instead of a whole word. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4266 91177308-0d34-0410-b5e6-96231b3b80d8
* Wow, for some reason, when reading bytecode from stdin, we were only readingChris Lattner2002-10-221-1/+1
| | | | | | | 4 bytes at a time. Change this to read blocks of 4k git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4265 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up code a bit, no functionality changes.Chris Lattner2002-10-141-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4162 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no way to guarantee that constants are not forward referenced.Chris Lattner2002-10-143-29/+37
| | | | | | | | | Handle forward referenced constants in a general way. This fixes bug: Assembler/2002-10-13-ConstantEncodingProblem.llx and allows the SPEC 197.parser benchmark to be built git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4161 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups, no changes to functionalityChris Lattner2002-10-141-9/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4157 91177308-0d34-0410-b5e6-96231b3b80d8
* - Change Function's so that their argument list is populated when they areChris Lattner2002-10-131-8/+3
| | | | | | | | constructed. Before, external functions would have an empty argument list, now a Function ALWAYS has a populated argument list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4149 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd toChris Lattner2002-10-131-2/+2
| | | | | | | reflect the fact that it's a range being defined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4147 91177308-0d34-0410-b5e6-96231b3b80d8
* Updates to work with recent Statistic's changes:Chris Lattner2002-10-012-5/+5
| | | | | | | | | | | | | * Renamed StatisticReporter.h/cpp to Statistic.h/cpp * Broke constructor to take two const char * arguments instead of one, so that indendation can be taken care of automatically. * Sort the list by pass name when printing * Make sure to print all statistics as a group, instead of randomly when the statistics dtors are called. * Updated ProgrammersManual with new semantics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4002 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed uchar to unsigned char in function ParseBytecodeBuffer, because ↵Anand Shukla2002-09-201-1/+1
| | | | | | seemingly it affects opt in uncertain ways :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3866 91177308-0d34-0410-b5e6-96231b3b80d8
* On the quest of eliminating unnecessary includes.Misha Brukman2002-09-141-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3715 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the MallocInst & AllocaInst ctors to take the allocated type, not theChris Lattner2002-09-131-2/+8
| | | | | | | pointer type returned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3711 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminated the MemAccessInst class, folding contents into GEP class.Chris Lattner2002-08-221-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3487 91177308-0d34-0410-b5e6-96231b3b80d8
* Load & StoreInst no longer derive from MemAccessInst, so we don't haveChris Lattner2002-08-221-1/+1
| | | | | | | to handle indexing anymore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3485 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit an obnoxious warning message for bytecode that includes load/storeChris Lattner2002-08-213-10/+34
| | | | | | | | instructions that use indexing. Convert them transparently into a pair of instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3431 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Assembler/2002-08-19-BytecodeReader.llxChris Lattner2002-08-191-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3384 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off a debugging optimization that just slows bytecode reading downChris Lattner2002-08-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3377 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stupid oversight of missing #include.Chris Lattner2002-08-171-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3367 91177308-0d34-0410-b5e6-96231b3b80d8
* - Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llxChris Lattner2002-08-174-378/+292
| | | | | | | | | | | | | | | - ParseConstantPool was resolving reference to value using the function slot # instead of the global slot #. - Bytecode reader changes: - Remove the failure<> template from Bytecode Reader - Remove extraneous #includes - s/method/function/ a bit - Eliminate the fwdRefs class that just added abstraction where it was not needed, making things more complex. - Use a vector instead of a list for function signatures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3366 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for Not ConstantExpr. This simplifies the unary case to onlyChris Lattner2002-08-142-8/+4
| | | | | | | have to support the cast instruction, so the function is renamed to getCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3328 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup ConstantExpr handling:Chris Lattner2002-07-301-3/+4
| | | | | | | | | | | | | | | * Correctly delete TypeHandles in AsmParser. In addition to not leaking memory, this prevents a bug that could have occurred when a type got resolved that the constexpr was using * Check for errors in the AsmParser instead of hitting assertion failures deep in the code * Simplify the interface to the ConstantExpr class, removing unneccesary parameters to the ::get* methods. * Rename the 'getelementptr' version of ConstantExpr::get to ConstantExpr::getGetElementPtr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3161 91177308-0d34-0410-b5e6-96231b3b80d8