summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-281-0/+25
| | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. llvm-svn: 136404
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-271-0/+30
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* Initial implementation of 'fence' instruction, the new C++0x-style ↵Eli Friedman2011-07-251-0/+25
| | | | | | | | replacement for llvm.memory.barrier. This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon. llvm-svn: 136009
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-1/+1
| | | | llvm-svn: 135375
* Remove mentions of type planes.Jay Foad2011-07-111-4/+4
| | | | llvm-svn: 134887
* Eliminate the WriteTypeSymbolic function. Now that types knowChris Lattner2011-07-091-5/+0
| | | | | | their names, we don't need a module around to print them. llvm-svn: 134835
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-299/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Revert unintentional check-in.Devang Patel2011-06-241-55/+0
| | | | llvm-svn: 133822
* Handle debug info for i128 constants.Devang Patel2011-06-241-0/+55
| | | | llvm-svn: 133821
* Remove r130409, as requested by Chris.Devang Patel2011-06-211-55/+0
| | | | llvm-svn: 133536
* Make better use of the PHINode API.Jay Foad2011-06-201-4/+4
| | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
* now that Type::getDescription() is dead, the TypePrinting class can move ↵Chris Lattner2011-06-181-28/+42
| | | | | | | | from Assembly/Writer.h to being a private class in AsmWriter.cpp. llvm-svn: 133361
* Teach the .ll parser to handle named metadata with non-simple names.Nick Lewycky2011-06-151-1/+19
| | | | | | | | Unfortunately we can't follow what the rest of the language does (wrapping it in double-quotes) because that would cause an ambiguity with metadata strings, so instead we escape any unusual characters with \xx escaping. llvm-svn: 133050
* Add command line option to print debug info in human readable form as ↵Devang Patel2011-04-281-0/+55
| | | | | | comment in llvm IR output. This, i.e -enable-debug-info-comment, is very useful if you want to easily find out which optimization pass is losing line number information. llvm-svn: 130409
* Fix an assert to check exactly what it says.Jay Foad2011-04-241-1/+1
| | | | llvm-svn: 130093
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* PR9214: Convert ConstantExpr::getIndices() to return an ArrayRef, plusJay Foad2011-04-131-1/+1
| | | | | | related tweaks to ExprMapKeyType. llvm-svn: 129443
* Revert r129235 pending a vetting of the EH rewrite.Bill Wendling2011-04-101-6/+1
| | | | | | | | | | | | | | | | --- Reverse-merging r129235 into '.': D test/Feature/bb_attrs.ll U include/llvm/BasicBlock.h U include/llvm/Bitcode/LLVMBitCodes.h U lib/VMCore/AsmWriter.cpp U lib/VMCore/BasicBlock.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLLexer.cpp U lib/AsmParser/LLToken.h U lib/Bitcode/Reader/BitcodeReader.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp llvm-svn: 129259
* Beginning of the Great Exception Handling Rewrite.Bill Wendling2011-04-101-1/+6
| | | | | | | | | | | | | * Add a "landing pad" attribute to the BasicBlock. * Modify the bitcode reader and writer to handle said attribute. Later: The verifier will ensure that the landing pad attribute is used in the appropriate manner. I.e., not applied to the entry block, and applied only to basic blocks that are branched to via a `dispatch' instruction. (This is a work-in-progress.) llvm-svn: 129235
* ptx: Fix calling convention printing in AsmWriter.cppJustin Holewinski2011-03-071-2/+2
| | | | | | | This allows LLVM IR using ptx_kernel or ptx_device calling conventions to be properly printed when emitted in text form. llvm-svn: 127157
* Use X86_thiscall calling convention for Win64 as well.Tilmann Scheller2011-03-031-3/+0
| | | | llvm-svn: 126934
* Add Win64 thiscall calling convention.Tilmann Scheller2011-03-021-0/+3
| | | | llvm-svn: 126862
* Add a special streamer to libLTO that just records symbols definitions andRafael Espindola2011-03-021-3/+6
| | | | | | | | | | | uses. The result produced by the streamer is used to give the linker more accurate information and to add to llvm.compiler.used. The second improvement removes the need for the user to add __attribute__((used)) to functions only used in inline asm. The first one lets us build firefox with LTO on Darwin :-) llvm-svn: 126830
* These tags are now covered by dwarf::TagString().Devang Patel2011-02-181-9/+1
| | | | llvm-svn: 125987
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-061-1/+2
| | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 llvm-svn: 124992
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-2/+2
| | | | llvm-svn: 124209
* 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
OpenPOWER on IntegriCloud