summaryrefslogtreecommitdiff
path: root/lib/Bitcode
Commit message (Collapse)AuthorAge
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-28
| | | | | | | being actively maintained, improved, or extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a FIXME comment.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112083 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the bitcode reader to clear out function-specific stateDan Gohman2010-08-25
| | | | | | | | from MDValueList between each function, now that the bitcode writer is reusing the index space for function-local metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112082 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug found by inspection.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112081 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112080 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear FunctionLocalMDs in purgeFunction along with the rest of theDan Gohman2010-08-25
| | | | | | | function-specific state. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112058 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112056 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate an unnecessary cast.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112055 91177308-0d34-0410-b5e6-96231b3b80d8
* Add braces to fix dangling else.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111896 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend function-local metadata to be usable as attachments.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111895 91177308-0d34-0410-b5e6-96231b3b80d8
* When we know we have an MDValue or MDString, call EnumerateMetadataDan Gohman2010-08-24
| | | | | | | directly instead of going through EnumerateValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111894 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code. NamedMDNode operands are MDNodes.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111892 91177308-0d34-0410-b5e6-96231b3b80d8
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-20
| | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111684 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman2010-08-20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111681 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111102 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111082 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid undefined behavior negating minint.Chris Lattner2010-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110117 91177308-0d34-0410-b5e6-96231b3b80d8
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-21
| | | | | | | for creating and populating NamedMDNodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some debug output to help diagnose PR7689.Dan Gohman2010-07-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109036 91177308-0d34-0410-b5e6-96231b3b80d8
* Disallow null as a named metadata operand.Dan Gohman2010-07-21
| | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109028 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for remapping metadata kind IDs when reading in aDan Gohman2010-07-20
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108939 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.Dan Gohman2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108569 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for empty metadata nodes: !{}.Dan Gohman2010-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108259 91177308-0d34-0410-b5e6-96231b3b80d8
* cache result of operator*Gabor Greif2010-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107979 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-01
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r107205 and r107207.Bill Wendling2010-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-29
| | | | | | | | | | | | | | | | | | | | 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
* resort to ArgOperand APIGabor Greif2010-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106942 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy.Bob Wilson2010-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106383 91177308-0d34-0410-b5e6-96231b3b80d8
* Speedup bitcode writer. Do not walk all values for all functions to emit ↵Devang Patel2010-06-02
| | | | | | function local metadata. In one testcase, probably worst case scenario, the 70x speed up is seen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105360 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcode support for allocas with arbitrary array size types.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104915 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't flush the raw_ostream in llvm::WriteBitcodeToFile; it's atDan Gohman2010-05-27
| | | | | | | | | the wrong level. Clients which need to leave the stream open but which still require the bitcode bits to be on disk should call flush themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104885 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't special-case stdout in llvm::WriteBitcodeToFile; just considerDan Gohman2010-05-27
| | | | | | | | it to be the caller's responsibility to provide a stream in binary mode. This fixes a layering violation and avoids an outs() call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104878 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-16
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101434Gabor Greif2010-04-16
| | | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-15
| | | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-15
| | | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add special case bitcode support for DebugLoc. This avoidsChris Lattner2010-04-03
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
* If the bitcode reader input stream isn't a multiple of 4 bytes, it's moreDan Gohman2010-04-02
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100156 91177308-0d34-0410-b5e6-96231b3b80d8
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-24
| | | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-22
| | | | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r98957, it broke ↵Gabor Greif2010-03-19
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-19
| | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-16
| | | | | | | handling constant unions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98680 91177308-0d34-0410-b5e6-96231b3b80d8