summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-8/+8
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-4/+1
| | | | | | | | 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-21/+18
| | | | | | | | | | | | | | | | | | | | | | 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 getHandlerNames to getMDKindNames, simplify its interfaceChris Lattner2009-12-281-21/+16
| | | | | | and simplify all the clients that use it. llvm-svn: 92224
* change the strange MetadataContext::getMDs function to expose lessChris Lattner2009-12-281-1/+1
| | | | | | irrelevant internal implementation details to clients. llvm-svn: 92210
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-2/+1
| | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-311-1/+2
| | | | | | | | | | | | block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). llvm-svn: 85678
* bitcode writer support for blockaddress.Chris Lattner2009-10-281-0/+7
| | | | llvm-svn: 85376
* Previously, all operands to Constant were themselves constant.Chris Lattner2009-10-281-3/+4
| | | | | | | | | In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. llvm-svn: 85375
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-2/+2
| | | | llvm-svn: 85351
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-1/+8
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | llvm-svn: 85254
* Remove FreeInst.Victor Hernandez2009-10-261-5/+0
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Fix getMDs() interface such that it does not expose implementation details.Devang Patel2009-10-221-4/+6
| | | | llvm-svn: 84885
* Using TrackingVH instead of WeakVH or WeakMetadataVH.Devang Patel2009-10-221-7/+5
| | | | llvm-svn: 84884
* Fix getHandlerNames() interface. Now it populate clinet supplied small ↵Devang Patel2009-10-221-5/+7
| | | | | | vector with handler names. llvm-svn: 84820
* Rename msasm to alignstack per review.Dale Johannesen2009-10-211-1/+1
| | | | llvm-svn: 84795
* simplify.Chris Lattner2009-10-191-3/+1
| | | | llvm-svn: 84465
* Remove MallocInst from LLVM Instructions.Victor Hernandez2009-10-171-7/+0
| | | | llvm-svn: 84299
* Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen2009-10-131-1/+2
| | | | | | | A little ugliness is accepted to keep the binary file format compatible. No functional change yet. llvm-svn: 84020
* Do not write empty METADATA_ATTACHMENT record.Devang Patel2009-10-131-5/+7
| | | | llvm-svn: 84006
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-5/+3
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-5/+5
| | | | llvm-svn: 83019
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-137/+137
| | | | llvm-svn: 82355
* Write and read metadata attachments.Devang Patel2009-09-181-2/+74
| | | | llvm-svn: 82259
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-031-2/+2
| | | | | | buildbot's stage 2 configure llvm-svn: 80871
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-031-2/+2
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* eliminate the std::ostream forms of the bitcode writing APIs.Chris Lattner2009-08-231-11/+0
| | | | llvm-svn: 79840
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-4/+4
| | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. llvm-svn: 79539
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-5/+7
| | | | llvm-svn: 78948
* revert r78048, it isn't worth using assertingvh here.Chris Lattner2009-08-041-1/+1
| | | | llvm-svn: 78119
* Use separate ValueList for metadata.Devang Patel2009-08-041-3/+1
| | | | | | This fixes PR4666. llvm-svn: 78056
* Revert recent bitcode writer patches.Devang Patel2009-08-041-84/+94
| | | | llvm-svn: 78053
* switch ValueMap to using AssertingVH. This is an old patch I had layingChris Lattner2009-08-041-1/+1
| | | | | | around in a tree I forgot about. llvm-svn: 78048
* Remove dead code.Devang Patel2009-08-041-2/+0
| | | | llvm-svn: 78035
* Fix MDString Abbrev setup.Devang Patel2009-08-041-4/+2
| | | | llvm-svn: 78034
* Constants and Metadata share ValueList. This means they must be emitted ↵Devang Patel2009-08-041-91/+85
| | | | | | interleaved (using appropriate BLOCK_IDs) otherwise ValuePtrs index gets out of sync. llvm-svn: 78033
* Do not use abbrev while writing NamedMDNode name.Devang Patel2009-07-301-9/+4
| | | | llvm-svn: 77637
* Read and write NamedMDNode.Devang Patel2009-07-291-1/+29
| | | | llvm-svn: 77517
* Refactor. Fix indentation.Devang Patel2009-07-291-38/+44
| | | | llvm-svn: 77482
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
* Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman2009-07-271-0/+4
| | | | | | LangRef.html changes for details. llvm-svn: 77259
* 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-20/+26
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Fix indentation.Devang Patel2009-07-221-6/+6
| | | | llvm-svn: 76787
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-221-26/+42
| | | | | | | 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-0/+38
| | | | | | exact sdiv flags. llvm-svn: 76475
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-13/+14
| | | | | | | | | "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
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-20/+20
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-20/+21
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
OpenPOWER on IntegriCloud