summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
Commit message (Collapse)AuthorAgeFilesLines
* Finish migrating VMCore to StringRef/Twine based APIs.Daniel Dunbar2009-07-251-2/+1
| | | | llvm-svn: 77051
* Move ExtractElementInst to ::Create instead of new. Update all uses.Eric Christopher2009-07-251-1/+1
| | | | llvm-svn: 77044
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-5/+6
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* MDStringDevang Patel2009-07-231-1/+1
| | | | | | | - Rename member function size(). New name is length(). - Store string beginning and length. Earlier it used to store string end. llvm-svn: 76841
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-231-16/+17
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-222-9/+55
| | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. llvm-svn: 76759
* Assembly and Bitcode support for unsigned/signed overflow flags andDan Gohman2009-07-201-4/+23
| | | | | | exact sdiv flags. llvm-svn: 76475
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-10/+11
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-4/+2
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-2/+4
| | | | llvm-svn: 75703
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-2/+2
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-1/+1
| | | | | | module is required. llvm-svn: 75025
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-28/+10
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-1/+1
| | | | llvm-svn: 74985
* LLVMContext-ify the bitcode reader.Owen Anderson2009-07-072-57/+65
| | | | llvm-svn: 74942
* !"i" is a valid MDString.Devang Patel2009-07-061-1/+0
| | | | llvm-svn: 74881
* Ack, missed one incompatibility.Owen Anderson2009-07-021-1/+0
| | | | llvm-svn: 74695
* Restore other bits of the C API that I tore up. All pre-existing APIs ↵Owen Anderson2009-07-021-2/+37
| | | | | | | | | | default to using the default global context, while new *InContext() APIs have been added that take a LLVMContextRef parameter. Apologies to anyone affected by this breakage. llvm-svn: 74694
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-012-4/+4
| | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-013-6/+6
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-013-9/+17
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Fix PR4336: Iterating over use-def chains doesn't seem to be deterministic.Chris Lattner2009-06-161-6/+5
| | | | | | | | | | | | | The problem was that BitcodeReader::materializeModule would read functions from the bc file in densemap pointer key order (doubly non-deterministic!), which would cause the use-def chains to be set up for globals in non-determinstic order. Non-determinstic use/def chains can cause nondeterminism in many places down-stream. Many thanks to Julien Lerouge for putting together the pass in the PR that shows the issue! llvm-svn: 73470
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-3/+6
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Update the bitcode reader to support reading .bc files where the embeddedNick Lewycky2009-06-011-1/+1
| | | | | | metadata references non-Constant values such as instructions. llvm-svn: 72685
* Fix typo in error message.Nick Lewycky2009-05-311-1/+1
| | | | llvm-svn: 72659
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-0/+3
| | | | llvm-svn: 72610
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-101-6/+10
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* Make a major API change to BitstreamReader: split all the readingChris Lattner2009-04-263-3/+5
| | | | | | | | | state out of the BitstreamReader class into a BitstreamCursor class. Doing this allows the client to have multiple cursors into the same file, each with potentially different live block stacks and abbreviation records. llvm-svn: 70157
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+1
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.Chris Lattner2009-04-061-45/+2
| | | | llvm-svn: 68458
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-041-2/+27
| | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. llvm-svn: 68420
* fix a serious regression I introduced in my previous patch.Chris Lattner2009-04-011-1/+2
| | | | llvm-svn: 68173
* reimplement BitcodeReaderValueList in terms of WeakVH instead of makingChris Lattner2009-03-312-94/+56
| | | | | | it be an LLVM IR User object. llvm-svn: 68156
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-3/+7
| | | | | | | | | | same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. llvm-svn: 67562
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-2/+1
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-2/+1
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-4/+8
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add suppport for ConstantExprs of shufflevectors whose result type is not ↵Nate Begeman2009-02-121-1/+13
| | | | | | | | equal to the type of the vectors being shuffled. llvm-svn: 64401
* fix a bitcode reader bug where it can't handle extractelement correctly:Chris Lattner2009-02-031-2/+1
| | | | | | the index of the value being extracted is always an i32. This fixes PR3465 llvm-svn: 63597
* Add the private linkage.Rafael Espindola2009-01-151-0/+1
| | | | llvm-svn: 62279
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-091-2/+2
| | | | llvm-svn: 61991
* revert r61368.Zhongxing Xu2008-12-231-1/+1
| | | | llvm-svn: 61369
* Remove dead code.Zhongxing Xu2008-12-231-1/+1
| | | | llvm-svn: 61368
* Commit missed files from nocapture change.Nick Lewycky2008-12-191-0/+14
| | | | llvm-svn: 61240
* Temporarily revert r61019, r61030, and r61040. These were breaking LLVM ReleaseBill Wendling2008-12-161-14/+0
| | | | | | builds. llvm-svn: 61094
* Introducing nocapture, a parameter attribute for pointers to indicate that theNick Lewycky2008-12-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | callee will not introduce any new aliases of that pointer. The attributes had all bits allocated already, so I decided to collapse alignment. Alignment was previously stored as a 16-bit integer from bits 16 to 32 of the attribute, but it was required to be a power of 2. Now it's stored in log2 encoded form in five bits from 16 to 21. That gives us 11 more bits of space. You may have already noticed that you only need four bits to encode a 16-bit power of two, so why five bits? Because the AsmParser accepted 32-bit alignments, even though we couldn't store them (they were silently discarded). Now we can store them in memory, but not in the bitcode. The bitcode format was already storing these as 64-bit VBR integers. So, the bitcode format stays the same, keeping the alignment values stored as 16 bit raw values. There's some hideous code in the reader and writer that deals with this, waiting to be ripped out the moment we run out of bits again and have to replace the parameter attributes table encoding. llvm-svn: 61019
* Added support for the following definition of shufflevector Mon P Wang2008-11-101-6/+2
| | | | | | <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> llvm-svn: 58964
* make the autoupgrade code for ret attributes dramatically simpler Chris Lattner2008-10-051-30/+22
| | | | | | and actually work. We can now read the llvm 2.3 bc file from PR2849 llvm-svn: 57122
* Now Attributes are divided in three groupsDevang Patel2008-09-262-8/+49
| | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. llvm-svn: 56704
* Large mechanical patch.Devang Patel2008-09-252-20/+20
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
OpenPOWER on IntegriCloud