summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
AgeCommit message (Collapse)Author
2010-03-22Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif
we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
2010-03-19back out r98957, it broke ↵Gabor Greif
http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
2010-03-19Recommit r80858 again (which has been backed out in r80871).Gabor Greif
This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). llvm-svn: 98957
2010-03-16reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner
handling constant unions. llvm-svn: 98680
2010-03-16Revert r98656, its breaking all over the place.Daniel Dunbar
llvm-svn: 98662
2010-03-16improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner
llvm-svn: 98656
2010-02-12Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner
llvm-svn: 96011
2010-02-12Also recognize armv6t2-* and armv5te-* triplets.Evan Cheng
llvm-svn: 96008
2010-02-12Add ARM bitcode file magic.Evan Cheng
llvm-svn: 96006
2010-01-29We were not writing bitcode for function-local metadata whose operands have ↵Victor Hernandez
been erased (making it not have any more function-local operands) llvm-svn: 94842
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin
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
2010-01-14Avoid modifying ValueEnumerator's MD ValueList by choosing which ↵Victor Hernandez
function-local MD to write based on the function currently being written llvm-svn: 93441
2010-01-14In WriteFunction(), write function-local metadata before we write the ↵Victor Hernandez
instructions, so instruction's references to metadata are fully resolved by the time they get written. llvm-svn: 93403
2010-01-13Fix comment typoVictor Hernandez
llvm-svn: 93355
2010-01-13Write function-local metadata as a metadata subblock of a funciton blockVictor Hernandez
llvm-svn: 93339
2010-01-13Revert 93270 pending investigation of how stray non-constant values end up ↵Victor Hernandez
in ValueEnumerator's ValueList during WriteConstants() llvm-svn: 93289
2010-01-12Make WriteConstants() more robust against stray values in ValueEnumerator's ↵Victor Hernandez
ValueList llvm-svn: 93270
2010-01-10Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez
getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
2010-01-07Use separate namespace for named metadata.Devang Patel
llvm-svn: 92931
2010-01-05Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel
llvm-svn: 92783
2009-12-31rename "elements" of metadata to "operands". "Elements" areChris Lattner
things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
2009-12-29Final step in the metadata API restructuring: move the Chris Lattner
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
2009-12-28This is a major cleanup of the instruction metadata interfaces thatChris Lattner
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
2009-12-28rename getHandlerNames to getMDKindNames, simplify its interfaceChris Lattner
and simplify all the clients that use it. llvm-svn: 92224
2009-12-28change the strange MetadataContext::getMDs function to expose lessChris Lattner
irrelevant internal implementation details to clients. llvm-svn: 92210
2009-11-01Revert 85678/85680. The decision is to stay with the current form of Chris Lattner
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
2009-10-31Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner
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
2009-10-28bitcode writer support for blockaddress.Chris Lattner
llvm-svn: 85376
2009-10-28Previously, all operands to Constant were themselves constant.Chris Lattner
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
2009-10-28rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner
llvm-svn: 85351
2009-10-27add enough support for indirect branch for the feature test to passChris Lattner
(assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
2009-10-27Type.h doesn't need to #include LLVMContext.hChris Lattner
llvm-svn: 85254
2009-10-26Remove FreeInst.Victor Hernandez
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
2009-10-22Fix getMDs() interface such that it does not expose implementation details.Devang Patel
llvm-svn: 84885
2009-10-22Using TrackingVH instead of WeakVH or WeakMetadataVH.Devang Patel
llvm-svn: 84884
2009-10-22Fix getHandlerNames() interface. Now it populate clinet supplied small ↵Devang Patel
vector with handler names. llvm-svn: 84820
2009-10-21Rename msasm to alignstack per review.Dale Johannesen
llvm-svn: 84795
2009-10-19simplify.Chris Lattner
llvm-svn: 84465
2009-10-17Remove MallocInst from LLVM Instructions.Victor Hernandez
llvm-svn: 84299
2009-10-13Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen
A little ugliness is accepted to keep the binary file format compatible. No functional change yet. llvm-svn: 84020
2009-10-13Do not write empty METADATA_ATTACHMENT record.Devang Patel
llvm-svn: 84006
2009-10-05strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner
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
2009-09-28s/class Metadata/class MetadataContext/gDevang Patel
llvm-svn: 83019
2009-09-20Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar
llvm-svn: 82355
2009-09-18Write and read metadata attachments.Devang Patel
llvm-svn: 82259
2009-09-03back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif
buildbot's stage 2 configure llvm-svn: 80871
2009-09-03re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif
this time. I'll back out if needed... llvm-svn: 80858
2009-08-23eliminate the std::ostream forms of the bitcode writing APIs.Chris Lattner
llvm-svn: 79840
2009-08-20Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman
and hasNoSignedWrap, for consistency with the nuw and nsw properties. llvm-svn: 79539
2009-08-13Push LLVMContexts through the IntegerType APIs.Owen Anderson
llvm-svn: 78948