summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
Commit message (Collapse)AuthorAgeFilesLines
...
* zap dead code.Chris Lattner2010-09-041-2/+1
| | | | llvm-svn: 113073
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-14/+0
| | | | | | being actively maintained, improved, or extended. llvm-svn: 112356
* Add a FIXME comment.Dan Gohman2010-08-251-0/+3
| | | | llvm-svn: 112083
* Fix the bitcode reader to clear out function-specific stateDan Gohman2010-08-251-0/+2
| | | | | | | from MDValueList between each function, now that the bitcode writer is reusing the index space for function-local metadata. llvm-svn: 112082
* Fix a bug found by inspection.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112081
* Add a comment.Dan Gohman2010-08-251-0/+1
| | | | llvm-svn: 112080
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-201-0/+1
| | | | | | | | | | | It's similar to "linker_private_weak", but it's known that the address of the object is not taken. For instance, functions that had an inline definition, but the compiler decided not to inline it. Note, unlike linker_private and linker_private_weak, linker_private_weak_def_auto may have only default visibility. The symbols are removed by the linker from the final linked image (executable or dynamic library). llvm-svn: 111684
* Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman2010-08-201-3/+3
| | | | | | | | not part of the IR, are not uniqued, and may be safely RAUW'd. This replaces a variety of alternate mechanisms for achieving the same effect. llvm-svn: 111681
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-151-2/+2
| | | | llvm-svn: 111102
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-141-2/+2
| | | | llvm-svn: 111082
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-5/+2
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Disallow null as a named metadata operand.Dan Gohman2010-07-211-4/+0
| | | | | | | | | | | Make MDNode::destroy private. Fix the one thing that used MDNode::destroy, outside of MDNode itself. One should never delete or destroy an MDNode explicitly. MDNodes implicitly go away when there are no references to them (implementation details aside). llvm-svn: 109028
* Add support for remapping metadata kind IDs when reading in aDan Gohman2010-07-202-4/+11
| | | | | | | | | | | | | bitcode file, so that two bitcode files where the same metadata kind name happens to have been assigned a different ID can still be linked together. Eliminate the restriction that metadata kind IDs can't be 0. Change MD_dbg from 1 to 0, because we can now, and because it's less mysterious that way. llvm-svn: 108939
* Add support for empty metadata nodes: !{}.Dan Gohman2010-07-131-2/+3
| | | | llvm-svn: 108259
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107979
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. llvm-svn: 107433
* Revert r107205 and r107207.Bill Wendling2010-06-291-1/+0
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-0/+1
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* Bitcode support for allocas with arbitrary array size types.Dan Gohman2010-05-281-5/+10
| | | | llvm-svn: 104915
* Add special case bitcode support for DebugLoc. This avoidsChris Lattner2010-04-031-2/+42
| | | | | | | | | | | | having the bitcode writer materialize mdnodes for all the debug location tuples when writing out the bc file and stores the information in a more compact form. For example, the -O0 -g bc file for combine.c in 176.gcc shrinks from 739392 to 512096 bytes. This concludes my planned short-term debug info work. llvm-svn: 100261
* If the bitcode reader input stream isn't a multiple of 4 bytes, it's moreDan Gohman2010-04-021-3/+7
| | | | | | | likely not a bitcode file at all, rather than being a bitcode file which is truncated. Check for this case and issue a more relevant error message. llvm-svn: 100156
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-161-0/+7
| | | | | | handling constant unions. llvm-svn: 98680
* Revert r98656, its breaking all over the place.Daniel Dunbar2010-03-161-7/+0
| | | | llvm-svn: 98662
* improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner2010-03-161-0/+7
| | | | llvm-svn: 98656
* Add Module functions in place of module providers.Erick Tryzelaar2010-03-021-14/+32
| | | | llvm-svn: 97608
* Make the side-numbering of instructions used by metadata (which is needed toNick Lewycky2010-02-251-0/+1
| | | | | | | | | keep track of instructions that return void) per-function. This fixes PR5278. This breaks backwards compatibility with the metadata format. That's okay because we haven't released the metadata bitcode yet. llvm-svn: 97132
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-6/+6
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Simplify.Daniel Dunbar2010-02-151-23/+4
| | | | llvm-svn: 96269
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-7/+7
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-121-0/+7
| | | | llvm-svn: 96011
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-273-92/+86
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the caseDan Gohman2010-01-251-3/+3
| | | | | | of a forward-reference, which doesn't use an "abbrev" encoding. llvm-svn: 94454
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Fix a crasher trying to fold each element in a comparison between two vectorsNick Lewycky2010-01-211-1/+1
| | | | | | | | | | if one of the vectors didn't have elements (such as undef). Fixes PR 6096. Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would have <2 x i1> type if constant folding was successful and i1 type if it wasn't. This exposed a related issue in the bitcode reader. llvm-svn: 94069
* Parse function-local metadata inside function blocksVictor Hernandez2010-01-131-0/+3
| | | | llvm-svn: 93337
* s/NextValueNo/NextMDValueNo while processing metadata.Devang Patel2010-01-111-5/+4
| | | | llvm-svn: 93165
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-101-1/+7
| | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-13/+14
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* clean up this code, add a fixme.Chris Lattner2010-01-091-7/+7
| | | | llvm-svn: 93042
* NamedMDNode element is either null or MDNode. Otherwise this is a malformed ↵Devang Patel2010-01-091-1/+3
| | | | | | NamedMDNode record. llvm-svn: 93037
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-051-3/+7
| | | | llvm-svn: 92783
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-3/+3
| | | | llvm-svn: 92761
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-2/+2
| | | | | | dereference the type pointer. llvm-svn: 92726
* Remove derelict serialization code. Ted Kremenek2009-12-314-511/+1
| | | | llvm-svn: 92374
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-292-3/+2
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-11/+4
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* Change errs() to dbgs().David Greene2009-12-231-3/+3
| | | | llvm-svn: 92091
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-1/+1
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
OpenPOWER on IntegriCloud