summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/Reader.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some extra checks. Opaque types don't have a null marker.Chris Lattner2005-05-051-4/+10
| | | | llvm-svn: 21700
* Remove trailing whitespaceMisha Brukman2005-04-211-114/+114
| | | | llvm-svn: 21417
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-1/+1
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* second argument to Value::setName is now gone.Chris Lattner2005-03-051-1/+1
| | | | llvm-svn: 20463
* use more specific cast.Chris Lattner2005-02-241-1/+1
| | | | llvm-svn: 20297
* Make sure to clear the LazyFunctionLoadMap after we ParseAllFunctionBodies.Chris Lattner2005-02-131-1/+2
| | | | | | | | | Otherwise, clients who call ParseAllFunctionBodies will attempt to parse the function bodies twice, which is (uh) very very bad (tm). This fixes gccld on python. llvm-svn: 20152
* Fix the regressions my User changes introduced. Apparently some parts ofChris Lattner2005-01-311-1/+4
| | | | | | | LLVM make the very reasonable assumption that constant expressions will have at least one operand! :) llvm-svn: 19943
* Adjust to changes in User class and minor changes in instruction ctors.Chris Lattner2005-01-291-13/+12
| | | | llvm-svn: 19894
* Fix problems uncovered by VC++ (first time compiled by VC++)Jeff Cohen2004-12-201-1/+2
| | | | llvm-svn: 19056
* Remove a dead field, make the map go to integer type ID to hash better andChris Lattner2004-12-091-15/+10
| | | | | | avoid a getType. llvm-svn: 18691
* Remove #include inadvertently addedChris Lattner2004-12-091-2/+0
| | | | llvm-svn: 18686
* Eliminate this ugly hack. This was put back in when replaceAllUsesOf usedChris Lattner2004-12-091-30/+6
| | | | | | | | | | | | a different algorithm that was extremely inefficient for instructions with many operands. This reduces the time of this code snippet from .23s for 176.gcc to 0.03s in a debug build, which speeds up total llvm-dis time just barely. It's more of a code cleanup than a speedup. llvm-svn: 18685
* Provide more information in the error message that occurs when there areReid Spencer2004-12-041-2/+10
| | | | | | unresolved constants remaining. llvm-svn: 18502
* Do not allow bytecode files with unresolved references to be read. DoingChris Lattner2004-12-041-1/+7
| | | | | | | so lets wierd ConstantPlaceholder objects sneak into the system which confuses it greatly. llvm-svn: 18487
* RevisionNum is read by error(), initialize it early.Chris Lattner2004-11-301-0/+1
| | | | llvm-svn: 18386
* Add note that this is for old bytecode files.Chris Lattner2004-11-191-1/+1
| | | | llvm-svn: 17991
* Use a per-function flag bit to indicate whether or not there is a functionChris Lattner2004-11-151-3/+6
| | | | | | body for the function. llvm-svn: 17858
* Make *SURE* to null out the pointer before throwing an exception, otherwiseChris Lattner2004-11-151-2/+6
| | | | | | the dtor for the BytecodeReader class will try to free it again! llvm-svn: 17856
* Make functions default to having external linkage if they have noChris Lattner2004-11-151-2/+2
| | | | | | FunctionBlock. llvm-svn: 17853
* Simplify decompression code by using the high level interface to the CompressorReid Spencer2004-11-141-57/+11
| | | | llvm-svn: 17768
* Mark an unmaterialized function as having GhostLinkageMisha Brukman2004-11-141-0/+4
| | | | llvm-svn: 17748
* * Comments & cleanup per CL code review.Reid Spencer2004-11-071-22/+56
| | | | | | * Accept 'llvc' as signature for compressed bytecode llvm-svn: 17579
* Add support for compressed bytecodeReid Spencer2004-11-061-3/+40
| | | | llvm-svn: 17535
* Do not erroneously accept revision 6 bytecode files when the format hasn'tChris Lattner2004-10-161-5/+2
| | | | | | been defined yet! llvm-svn: 17063
* Add support for undef, unreachable, and function flagsChris Lattner2004-10-161-19/+67
| | | | llvm-svn: 17054
* Fit in 80 columnsChris Lattner2004-10-141-13/+14
| | | | llvm-svn: 16962
* Fix doxygen commentMisha Brukman2004-09-281-1/+1
| | | | llvm-svn: 16542
* The system ranlib on darwin occasionally adds two extra newlines to theChris Lattner2004-09-271-2/+8
| | | | | | | | end of files, breaking the CFE build. As a gross hack around this, ignore any trailing garbage on bytecode files. Thanks to Brian for digging in and identifying the problem. llvm-svn: 16525
* Convert code to compile with vc7.1.Reid Spencer2004-09-151-3/+3
| | | | | | Patch contributed by Paolo Invernizzi. Thanks Paolo! llvm-svn: 16368
* Fixes to make LLVM compile with vc7.1.Alkis Evlogimenos2004-09-031-0/+1
| | | | | | Patch contributed by Paolo Invernizzi! llvm-svn: 16152
* Changes For Bug 352Reid Spencer2004-09-011-4/+10
| | | | | | | | 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
* Get rid of an extraneous local variable.Reid Spencer2004-08-211-1/+0
| | | | llvm-svn: 15984
* Bytecode Reader Cleanup:Reid Spencer2004-08-211-38/+66
| | | | | | | | | | | | | | | - provide the correct conversion for ModuleBlockID in read_block (a potential bug but not actually exploited because reading module block ids doesn't use read_block). - install support for handleTypeList handler - install support for handleDependentLibrary handler - install support for handleTargetTriple handler - clean up comments, output strings, - ensure that processing function arguments doesn't SIGSEGV if one of the arguments is a null pointer (yeah, it happened .. weird) - prepare for version 5 bytecode by documenting what will change. llvm-svn: 15981
* Packed types, brought to you by Brad JonesBrian Gaeke2004-08-201-0/+20
| | | | llvm-svn: 15938
* Bytecode File Format Changes:Reid Spencer2004-08-171-6/+17
| | | | | | | | - File format version number bumped to 4 - Writer will now align nothing - Reader now only expects alignment for version 3 or earlier llvm-svn: 15875
* Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to getReid Spencer2004-08-041-1/+2
| | | | | | rid of compilation warnings on some platforms. llvm-svn: 15512
* Make getGlobalTableValue not use getTypeSlot, this speeds up the bc readerChris Lattner2004-08-041-23/+28
| | | | | | by 5% on eon llvm-svn: 15452
* Do not do a linear std::find to reconstruct information we had, but later threwChris Lattner2004-08-031-17/+10
| | | | | | away. This speeds up by .bc reader by 30% in a profile build on 252.eon. llvm-svn: 15450
* Simplify code and silence warningChris Lattner2004-07-271-6/+4
| | | | llvm-svn: 15255
* Fix a serious bug in the double constant reader. In particular, becauseChris Lattner2004-07-251-1/+2
| | | | | | | | (At[3] << 24) is an int type and it is being coerced to uint64_t, it was getting sign extended, causing us to get FFFFFFFFxxxxxxxx constants all of the time. llvm-svn: 15224
* Always write FP values correctly.Reid Spencer2004-07-251-35/+21
| | | | | | | Adjust for new Module.h interface for dependent libraries. Excise unused backwards compatibility flag. llvm-svn: 15220
* bug 263:Reid Spencer2004-07-251-28/+136
| | | | | | | | | | | | | | | | - encode/decode target triple and dependent libraries bug 401: - fix encoding/decoding of FP values to be little-endian only bug 402: - initial (compatible) cut at 24-bit types instead of 32-bit - reduce size of block headers by 50% Other: - cleanup Writer by consolidating to one compilation unit, rem. other files - use a std::vector instead of std::deque so the buffer can be allocated in multiples of 64KByte chunks rather than in multiples of some smaller (default) number. llvm-svn: 15210
* bug 122:Reid Spencer2004-07-181-9/+5
| | | | | | | - Replace ConstantPointerRef usage with GlobalValue usage - Correct isa<Constant> for GlobalValue subclass llvm-svn: 14939
* Actually set the endian/pointersize flags on the module being read in!Brian Gaeke2004-07-141-0/+3
| | | | llvm-svn: 14826
* Fix warning on SparcV9, where sizeof (int) != sizeof (void *).Brian Gaeke2004-07-131-1/+1
| | | | llvm-svn: 14786
* Various cleanups:Reid Spencer2004-07-111-153/+193
| | | | | | | | | | | | | | | | - Remove tabs - Standardize use of space around ( and ). - Consolidate the ConstantPlaceHolder class - Rename two methods to be more meaningful (ParseType, ParseTypes) - Correct indentation of blocks - Add documentation - Convert input dependent asserts to error(...) so it throws instead. Provide placeholder implementations of read_float and read_double that still read in platform-specific endianess. When I figure out how to do this without knowing the endianess of the platform, it will get implemented correctly. llvm-svn: 14765
* Error Handling Cleanup:Reid Spencer2004-07-091-121/+127
| | | | | | | | | | - get rid of PARSE_ERROR macro - add error(std::string) function - use error(std::string) for all errors - make input dependent asserts call error(std::string) instead - ensure asserts are only for logic bugs, not input discrepancies. llvm-svn: 14729
* Fix a backwards compatibility bug found by Tanya. In version 1.2, theReid Spencer2004-07-091-0/+5
| | | | | | | | | global type plane starts with a length and the TypeTyID value to identify the type plane has having type definitions. This doesn't happen in 1.3 because the types are read from a known position in the file. However, the TypeTyID must be read in (and ignored) if its a 1.2 bytecode file. llvm-svn: 14728
* Finalize bytecode dumping. The "handleFinish" method was getting calledReid Spencer2004-07-051-6/+13
| | | | | | | | too soon so the function data was not getting dumped (it was generated after the call handleFinish). Also cleaned up the output format for proper indentation. llvm-svn: 14627
* - Don't use macros to call the BytecodeHandlerReid Spencer2004-07-041-278/+434
| | | | | | | | | | | - Don't use PARSE_ERROR macro unnecessarily (for simple strings) - Add comments before each function - Convert for bug 122 (Type != Value) - Handle new value range on Type::PrimitiveTypeId enumeration by augmenting the reader with a new read_typeid method and sanitizeTypeId method. - Remove BytecodeHandler's default method implementations to header file. llvm-svn: 14604
OpenPOWER on IntegriCloud