summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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-121-10/+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-101-3/+9
| | | | | | | 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
* 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
OpenPOWER on IntegriCloud