aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Special case FixedStackPseudoSourceValueVal as well. Do we really need to ↵Evan Cheng2009-11-161-1/+2
| | | | | | differentiate PseudoSourceValueVal from FixedStackPseudoSourceValueVal at this level? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88902 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous commit.Eric Christopher2009-11-131-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88716 91177308-0d34-0410-b5e6-96231b3b80d8
* Print out something, even if it's non-parseable later when we'veEric Christopher2009-11-131-2/+7
| | | | | | | got ghost linkage. It's better than aborting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88715 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-4/+1
| | | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699 91177308-0d34-0410-b5e6-96231b3b80d8
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-311-1/+4
| | | | | | | | | | | | | block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code and avoid an extra space character in the output.Dan Gohman2009-10-301-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85568 91177308-0d34-0410-b5e6-96231b3b80d8
* asmprinter support for BlockAddress.Chris Lattner2009-10-281-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85367 91177308-0d34-0410-b5e6-96231b3b80d8
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-1/+14
| | | | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85254 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-1/+1
| | | | | | subclass of AllocationInst, so it no longer is necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix getMDs() interface such that it does not expose implementation details.Devang Patel2009-10-221-11/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84885 91177308-0d34-0410-b5e6-96231b3b80d8
* Using TrackingVH instead of WeakVH or WeakMetadataVH.Devang Patel2009-10-221-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84884 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix getHandlerNames() interface. Now it populate clinet supplied small ↵Devang Patel2009-10-221-6/+7
| | | | | | vector with handler names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84820 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename msasm to alignstack per review.Dale Johannesen2009-10-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84795 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use SmallVector to store MDNode elements.Devang Patel2009-10-211-9/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84784 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen2009-10-131-0/+2
| | | | | | | | | A little ugliness is accepted to keep the binary file format compatible. No functional change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not assume that the module is set.Devang Patel2009-10-071-15/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83462 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for null MDNode element while printing comment.Devang Patel2009-09-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83172 91177308-0d34-0410-b5e6-96231b3b80d8
* Print tag name for MDNodes that are used to encode debug info. Devang Patel2009-09-301-1/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83160 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse custom metadata attached with an instruction.Devang Patel2009-09-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83033 91177308-0d34-0410-b5e6-96231b3b80d8
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83019 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not hardcode metadata names.Devang Patel2009-09-281-4/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83010 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Devang Patel2009-09-281-5/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82999 91177308-0d34-0410-b5e6-96231b3b80d8
* Give MachineMemOperand an operator<<, factoring out code fromDan Gohman2009-09-231-1/+13
| | | | | | | | | | | | | two different places for printing MachineMemOperands. Drop the virtual from Value::dump and instead give Value a protected virtual hook that can be overridden by subclasses to implement custom printing. This lets printing be more consistent, and simplifies printing of PseudoSourceValue values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82599 91177308-0d34-0410-b5e6-96231b3b80d8
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-119/+119
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355 91177308-0d34-0410-b5e6-96231b3b80d8
* Print debug info attached with an instruction.Devang Patel2009-09-161-1/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82075 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unused variables and methods warned about byDuncan Sands2009-09-061-2/+0
| | | | | | | icc (#177, partial). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-031-4/+3
| | | | | | buildbot's stage 2 configure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-031-3/+4
| | | | | | this time. I'll back out if needed... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner2009-08-231-16/+0
| | | | | | | This also updates dominator related stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79825 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the std::ostream version of module and type printing.Chris Lattner2009-08-231-9/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79823 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-1/+2
| | | | | | | This required converting a bunch of stuff off DOUT and other cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79819 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-2/+2
| | | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
* the MinPad argument to PadToColumn only really makes sense to be 1,Chris Lattner2009-08-171-3/+3
| | | | | | | just remove the argument and replace it with 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix printing of instructions with null operands.Dan Gohman2009-08-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79243 91177308-0d34-0410-b5e6-96231b3b80d8
* Always print at least one space before adding a comment.Dan Gohman2009-08-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79242 91177308-0d34-0410-b5e6-96231b3b80d8
* Make formatted_raw_ostream restore the buffer settings of theDan Gohman2009-08-131-10/+0
| | | | | | | | underlying stream when it is finished, so that clients don't have to do this manually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78952 91177308-0d34-0410-b5e6-96231b3b80d8
* Take the fast path for any named value and any GlobalValue, which doesn'tDan Gohman2009-08-131-1/+2
| | | | | | | | | need TypePrinting despite being a subclass of Constant. This fixes compile-time problems especially visible on 403.gcc when -asm-verbose is enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78951 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a 4x slowdown in llc -asm-verbose caused by the use ofDan Gohman2009-08-131-18/+27
| | | | | | | | | | | | | WriteAsOperand in more places. Now that more things are using WriteAsOperand, its behavior of constructing a TypePrinting object and populating it with strings for all the numbered types in the Module on each call is a significant bottleneck. Fancier solutions could be pursued here, but for now, just bypass the TypePrinting overhead in obvious cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78906 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the indentation for LLVM Assembly files from 1 tab to 2 spaces.Dan Gohman2009-08-131-4/+4
| | | | | | | | This is vaguely consistent with LLVM's own source code, but more importantly it lets more lines stay within 80 columns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78879 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that numbered types have their number printed, it's no longerDan Gohman2009-08-121-18/+12
| | | | | | | | | | interesting to print the number in a comment. Numbered instructions don't need their number in a comment either. Also, tidy up newline printing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78865 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."Dan Gohman2009-08-121-6/+4
| | | | | | | | and unnamed numbered global variables as "@0 = global ...". Extend the AsmParser to recognize these forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78859 91177308-0d34-0410-b5e6-96231b3b80d8
* Make AsmWriter more careful with formatted_raw_ostream so thatDan Gohman2009-08-121-14/+22
| | | | | | | | | | | | | it doesn't leave the underlying stream in unbuffered mode when the stream was originally buffered. Also, change WriteAsOperand back to plain raw_ostream. This lets it work for either formatted_raw_ostream or plain raw_ostream, so that it doesn't have to force a buffer flush on a plain raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78837 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVM Assembly dramatically easier to read by aligning the comments,Dan Gohman2009-08-121-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | using formatted_raw_ostream's PadToColumn. Before: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1] %4 = load double* %3, align 8 ; <double> [#uses=1] %5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1] %6 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1] After: bb1: ; preds = %bb %2 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %3 = getelementptr double* %p, i64 %2 ; <double*> [#uses=1] %4 = load double* %3, align 8 ; <double> [#uses=1] %5 = fmul double %4, 1.100000e+00 ; <double> [#uses=1] %6 = sext i32 %i.01 to i64 ; <i64> [#uses=1] %7 = getelementptr double* %p, i64 %6 ; <double*> [#uses=1] Several tests required whitespace adjustments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78816 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix printing of Alloca instructions with null operands.Dan Gohman2009-07-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77697 91177308-0d34-0410-b5e6-96231b3b80d8
* Check null NameMDNode elements.Devang Patel2009-07-301-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77559 91177308-0d34-0410-b5e6-96231b3b80d8
* print single NamedMDNode.Devang Patel2009-07-301-3/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77549 91177308-0d34-0410-b5e6-96231b3b80d8
* Print named metadata.Devang Patel2009-07-291-0/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77513 91177308-0d34-0410-b5e6-96231b3b80d8