summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
AgeCommit message (Collapse)Author
2009-08-05Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson
contexts through a number of APIs. llvm-svn: 78258
2009-08-04Use separate ValueList for metadata.Devang Patel
This fixes PR4666. llvm-svn: 78056
2009-07-31Move the metadata constructors back to 2.5 syntax.Owen Anderson
llvm-svn: 77733
2009-07-31Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson
change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
2009-07-30Move more code back to 2.5 APIs.Owen Anderson
llvm-svn: 77635
2009-07-29Read and write NamedMDNode.Devang Patel
llvm-svn: 77517
2009-07-29Move types back to the 2.5 API.Owen Anderson
llvm-svn: 77516
2009-07-29Move ConstantExpr to 2.5 API.Owen Anderson
llvm-svn: 77494
2009-07-28Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel
New name is Metadata.h. llvm-svn: 77370
2009-07-28Return ConstantVector to 2.5 API.Owen Anderson
llvm-svn: 77366
2009-07-28Change ConstantArray to 2.5 API.Owen Anderson
llvm-svn: 77347
2009-07-27Move ConstantStruct back to 2.5 API.Owen Anderson
llvm-svn: 77266
2009-07-27Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman
LangRef.html changes for details. llvm-svn: 77259
2009-07-27Move ConstantFP construction back to the 2.5-ish API.Owen Anderson
llvm-svn: 77247
2009-07-26Remove Value::setName(const char*, unsigned).Daniel Dunbar
llvm-svn: 77100
2009-07-25Finish migrating VMCore to StringRef/Twine based APIs.Daniel Dunbar
llvm-svn: 77051
2009-07-25Move ExtractElementInst to ::Create instead of new. Update all uses.Eric Christopher
llvm-svn: 77044
2009-07-24Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson
thanks to contexts-on-types. More to come. llvm-svn: 77011
2009-07-23MDStringDevang Patel
- Rename member function size(). New name is length(). - Store string beginning and length. Earlier it used to store string end. llvm-svn: 76841
2009-07-23Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel
METADATA_BLOCK in bitcode file. llvm-svn: 76834
2009-07-22Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel
Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. llvm-svn: 76759
2009-07-20Assembly and Bitcode support for unsigned/signed overflow flags andDan Gohman
exact sdiv flags. llvm-svn: 76475
2009-07-20Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling
"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
2009-07-15Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson
AllocaInst and MallocInst. llvm-svn: 75863
2009-07-14Move EVER MORE stuff over to LLVMContext.Owen Anderson
llvm-svn: 75703
2009-07-09This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson
the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
2009-07-08Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson
module is required. llvm-svn: 75025
2009-07-08Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky
these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
2009-07-08Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson
llvm-svn: 74985
2009-07-07LLVMContext-ify the bitcode reader.Owen Anderson
llvm-svn: 74942
2009-07-06!"i" is a valid MDString.Devang Patel
llvm-svn: 74881
2009-07-01Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson
the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
2009-07-01Hold the LLVMContext by reference rather than by pointer.Owen Anderson
llvm-svn: 74640
2009-07-01Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson
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
2009-06-16Fix PR4336: Iterating over use-def chains doesn't seem to be deterministic.Chris Lattner
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
2009-06-04Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman
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
2009-06-01Update the bitcode reader to support reading .bc files where the embeddedNick Lewycky
metadata references non-Constant values such as instructions. llvm-svn: 72685
2009-05-31Fix typo in error message.Nick Lewycky
llvm-svn: 72659
2009-05-30Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky
llvm-svn: 72610
2009-05-10Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky
Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
2009-04-26Make a major API change to BitstreamReader: split all the readingChris Lattner
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
2009-04-13Add a new "available_externally" linkage type. This is intendedChris Lattner
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
2009-04-06Teach llvm-bcanalyzer to skip over the header we use on LLVM IR files.Chris Lattner
llvm-svn: 68458
2009-04-04Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky
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
2009-04-01fix a serious regression I introduced in my previous patch.Chris Lattner
llvm-svn: 68173
2009-03-31reimplement BitcodeReaderValueList in terms of WeakVH instead of makingChris Lattner
it be an LLVM IR User object. llvm-svn: 68156
2009-03-23Fix internal representation of fp80 to be theDale Johannesen
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
2009-03-11It makes no sense to have a ODR version of commonDuncan Sands
linkage, so remove it. llvm-svn: 66690
2009-03-11Remove the one-definition-rule version of extern_weakDuncan Sands
linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
2009-03-07Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands
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