summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* First step in fixing PR8927:Rafael Espindola2011-01-081-0/+3
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
* Add ret instruction to PTX backendChe-Liang Chiou2010-09-251-0/+6
| | | | llvm-svn: 114788
* Add X86 MMX type to bitcode and Type.Dale Johannesen2010-09-101-0/+1
| | | | | | | (The Ada bindings probably need it too, but all the obvious places to change say "do not edit this file".) llvm-svn: 113618
* MDNodes are not Constants.Dan Gohman2010-09-091-5/+0
| | | | llvm-svn: 113539
* Print invalid metadata references as <badref>, for consistency withDan Gohman2010-09-091-2/+10
| | | | | | regular value references. llvm-svn: 113538
* lets get crazy and name the header file the exact class name,Chris Lattner2010-09-021-1/+1
| | | | | | not a scrunched version of it. llvm-svn: 112904
* reapply 112894:Chris Lattner2010-09-021-12/+4
| | | | | | | | | | | | | | | | Remove #uses comments from functions: they we're padded out to column 50 and were potentially confusing for externally visible functions. going further, remove the "<i8**> [#uses=3]" comments entirely. They add a lot of noise, confuse people about what the IR is, and don't add any particular value. When the types are long it makes it really really hard to read IR. If someone is interested in this sort of thing, the right way to do this is to implement an AsmAnnotationWriter that produces the same output, and add a flag to llvm-dis (only) to produce this output. llvm-svn: 112899
* revert patch, need to update clang tests tooChris Lattner2010-09-021-4/+12
| | | | llvm-svn: 112895
* Remove #uses comments from functions: they we're padded out to column 50Chris Lattner2010-09-021-12/+4
| | | | | | | | | | | | | | | and were potentially confusing for externally visible functions. going further, remove the "<i8**> [#uses=3]" comments entirely. They add a lot of noise, confuse people about what the IR is, and don't add any particular value. When the types are long it makes it really really hard to read IR. If someone is interested in this sort of thing, the right way to do this is to implement an AsmAnnotationWriter that produces the same output, and add a flag to llvm-dis (only) to produce this output. llvm-svn: 112894
* Print the number of uses of a function in the .ll since it can be informativeDuncan Sands2010-09-021-2/+2
| | | | | | and there seems to be no reason not to. llvm-svn: 112812
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-25/+0
| | | | | | being actively maintained, improved, or extended. llvm-svn: 112356
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-201-0/+3
| | | | | | | | | | | 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). llvm-svn: 111684
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-021-2/+2
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-6/+7
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Disallow null as a named metadata operand.Dan Gohman2010-07-211-8/+3
| | | | | | | | | | | 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). llvm-svn: 109028
* Give MDNode printing has access to the current Module in moreDan Gohman2010-07-201-39/+62
| | | | | | | cases. This will be needed when function-local metadata can appear in places that aren't intrinsic function arguments. llvm-svn: 108971
* Don't pass StringRef by reference.Benjamin Kramer2010-07-141-2/+1
| | | | llvm-svn: 108366
* Just use getParent() instead of getModuleFromVal when the value is a Function.Dan Gohman2010-07-141-1/+1
| | | | llvm-svn: 108358
* Rename WriteConstantInt to WriteConstantInternal, to avoid confusion.Dan Gohman2010-07-141-4/+5
| | | | llvm-svn: 108357
* Convert some tab stops into spaces.Duncan Sands2010-07-121-1/+1
| | | | llvm-svn: 108130
* use PrintEscapedString to handle attribute section with escapes in it,Chris Lattner2010-07-071-6/+11
| | | | | | | PR7399. The asm parser already handles this. This is of dubious utility (see the PR) but the asmprinter was clearly broken here. llvm-svn: 107834
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 107433
* Revert r107205 and r107207.Bill Wendling2010-06-291-1/+0
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-0/+1
| | | | | | | | | | | | | | | | | | | 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". llvm-svn: 107205
* use ArgOperand accessorsGabor Greif2010-06-231-5/+6
| | | | llvm-svn: 106623
* Add support for thiscall calling convention.Anton Korobeynikov2010-05-161-0/+3
| | | | | | Patch by Charles Davis and Steven Watanabe! llvm-svn: 103902
* fix PR7105 by enumerating MDNodes on all @llvm.fooChris Lattner2010-05-101-5/+10
| | | | | | function calls, not just recognized intrinsics. llvm-svn: 103428
* Minimally fix this code to not abort on mdnodes with integer dataDan Gohman2010-05-071-5/+7
| | | | | | wider than 64 bits. llvm-svn: 103309
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-6/+5
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-5/+6
| | | | | | | | | | | | | 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 llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-6/+5
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-5/+6
| | | | | | | | | | | | | 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 llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-6/+5
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-5/+6
| | | | | | | | | | 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 llvm-svn: 101364
* Print empty structs as {} rather than { }.Dan Gohman2010-04-081-6/+10
| | | | llvm-svn: 100787
* rename pred_const_iterator to const_pred_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99567
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-3/+4
| | | | | | | | | | | | 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. llvm-svn: 99399
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-221-4/+3
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-221-3/+4
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* back out r98957, it broke ↵Gabor Greif2010-03-191-4/+3
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-191-3/+4
| | | | | | | | | | | 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
* add asmprinter suport for unions, fixing Feature/unions.ll to actuallyChris Lattner2010-03-161-0/+9
| | | | | | be doing something useful. llvm-svn: 98677
* Fix looking up MD names to not need a module.Erick Tryzelaar2010-03-021-10/+12
| | | | llvm-svn: 97550
* Dump the presence of attached metadata even if we don't know what it is. ThisNick Lewycky2010-02-251-6/+10
| | | | | | | | format is not parsable, even if the module is legal. To get parsable output, dump the module instead of the function or smaller, since metadata kind are attached to the module (not the context). llvm-svn: 97124
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-2/+2
| | | | | | methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-5/+5
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-3/+3
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-121-0/+13
| | | | llvm-svn: 96011
* Minor whitespace cleanups.Dan Gohman2010-02-101-3/+1
| | | | llvm-svn: 95801
* Add a hook to AssemblyAnnotationWriter to allow custom info commentsDan Gohman2010-02-101-0/+5
| | | | | | to be printed, in place of the familiar "uses=" comments. llvm-svn: 95798
OpenPOWER on IntegriCloud