summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
Commit message (Collapse)AuthorAgeFilesLines
* Work around a dangling pointer dereference when enumerating NamedMDNodes.Benjamin Kramer2009-07-311-0/+3
| | | | llvm-svn: 77675
* Do not use abbrev while writing NamedMDNode name.Devang Patel2009-07-301-9/+4
| | | | llvm-svn: 77637
* Enumerate NamedMDNode elements first.Devang Patel2009-07-301-4/+0
| | | | llvm-svn: 77636
* Read and write NamedMDNode.Devang Patel2009-07-292-1/+41
| | | | 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-282-2/+2
| | | | | | 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-232-33/+41
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Fix indentation.Devang Patel2009-07-221-6/+6
| | | | llvm-svn: 76787
* Use isa<> instead of dyn_cast<>.Devang Patel2009-07-221-1/+1
| | | | llvm-svn: 76767
* Fixed build warning. No functionality change.Sanjiv Gupta2009-07-221-1/+1
| | | | llvm-svn: 76761
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-222-29/+49
| | | | | | | 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
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-19/+3
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Don't remove aggregate-typed module level constants before encoding functionsNick Lewycky2009-06-123-31/+0
| | | | | | since functions may contain aggregate constants too. llvm-svn: 73220
* 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
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-0/+1
| | | | llvm-svn: 72610
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-102-3/+27
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* 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
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-041-0/+31
| | | | | | | | 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 internal representation of fp80 to be theDale Johannesen2009-03-231-2/+3
| | | | | | | | | | 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
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp llvm-svn: 66953
* Second installment of "BasicBlock operands to the back"Gabor Greif2009-03-131-2/+2
| | | | | | | | | | | | | | | | | | changes. For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end(). This patch introduces some temporary uglyness in CallSite. Next I'll bring CallInst up to a similar scheme and then the uglyness will magically vanish. This patch also exposes all the reliance of the libraries on InvokeInst's operand ordering. I am thinking of taking care of that too. llvm-svn: 66920
* 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/+10
| | | | | | | | equal to the type of the vectors being shuffled. llvm-svn: 64401
* use precise gettersGabor Greif2009-01-301-5/+8
| | | | llvm-svn: 63403
* use specialized accessor instead of plain getOperand(0)Gabor Greif2009-01-161-4/+5
| | | | llvm-svn: 62330
* 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 to functionally equivalent formulationGabor Greif2009-01-071-1/+1
| | | | llvm-svn: 61895
* use the obvious gettersGabor Greif2009-01-071-3/+3
| | | | llvm-svn: 61893
* Add support for writing LLVM IR to a specified BitstreamWriter.Chris Lattner2008-12-191-12/+17
| | | | | | Patch by Lukasz Janyst! llvm-svn: 61251
* Commit missed files from nocapture change.Nick Lewycky2008-12-191-1/+11
| | | | llvm-svn: 61240
* Temporarily revert r61019, r61030, and r61040. These were breaking LLVM ReleaseBill Wendling2008-12-161-11/+1
| | | | | | builds. llvm-svn: 61094
* It turns out that "align 1" and unaligned are different. Add a bias to theNick Lewycky2008-12-151-1/+2
| | | | | | | | | | alignment attribute such that 0 means unaligned. This will probably require a rebuild of llvm-gcc because of the change to Attributes.h. If you see many test failures on "make check", please rebuild your llvm-gcc. llvm-svn: 61030
* Introducing nocapture, a parameter attribute for pointers to indicate that theNick Lewycky2008-12-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | 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
* Make sure to set stdout to binary when writing bitcode files viaDaniel Dunbar2008-10-231-0/+3
| | | | | | std::ostream API. llvm-svn: 58042
* Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass.Daniel Dunbar2008-10-222-5/+26
| | | | | | | - The old versions are still hanging around, but should be migrated away from. llvm-svn: 57989
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-092-4/+4
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Large mechanical patch.Devang Patel2008-09-253-26/+26
| | | | | | | | | | | | | | | 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
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-1/+1
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+1
| | | | llvm-svn: 56513
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-1/+0
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+9
| | | | llvm-svn: 56419
OpenPOWER on IntegriCloud