summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do not assume that the module is set.Devang Patel2009-10-071-15/+18
| | | | llvm-svn: 83462
* Check for null MDNode element while printing comment.Devang Patel2009-09-301-1/+1
| | | | llvm-svn: 83172
* Print tag name for MDNodes that are used to encode debug info. Devang Patel2009-09-301-1/+29
| | | | llvm-svn: 83160
* Parse custom metadata attached with an instruction.Devang Patel2009-09-291-1/+1
| | | | llvm-svn: 83033
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-7/+7
| | | | llvm-svn: 83019
* Do not hardcode metadata names.Devang Patel2009-09-281-4/+18
| | | | llvm-svn: 83010
* Remove dead code.Devang Patel2009-09-281-5/+1
| | | | llvm-svn: 82999
* 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. llvm-svn: 82599
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-119/+119
| | | | llvm-svn: 82355
* Print debug info attached with an instruction.Devang Patel2009-09-161-1/+17
| | | | llvm-svn: 82075
* Remove some unused variables and methods warned about byDuncan Sands2009-09-061-2/+0
| | | | | | icc (#177, partial). Patch by Erick Tryzelaar. llvm-svn: 81106
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-031-4/+3
| | | | | | 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-3/+4
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner2009-08-231-16/+0
| | | | | | This also updates dominator related stuff. llvm-svn: 79825
* remove the std::ostream version of module and type printing.Chris Lattner2009-08-231-9/+0
| | | | llvm-svn: 79823
* 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. llvm-svn: 79819
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-2/+2
| | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. llvm-svn: 79539
* 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. llvm-svn: 79246
* Fix printing of instructions with null operands.Dan Gohman2009-08-171-1/+1
| | | | llvm-svn: 79243
* Always print at least one space before adding a comment.Dan Gohman2009-08-171-3/+3
| | | | llvm-svn: 79242
* 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. llvm-svn: 78952
* 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. llvm-svn: 78951
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-7/+9
| | | | llvm-svn: 78948
* 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. llvm-svn: 78906
* 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. llvm-svn: 78879
* 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. llvm-svn: 78865
* 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. llvm-svn: 78859
* 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. llvm-svn: 78837
* 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. llvm-svn: 78816
* Fix printing of Alloca instructions with null operands.Dan Gohman2009-07-311-1/+1
| | | | llvm-svn: 77697
* Check null NameMDNode elements.Devang Patel2009-07-301-4/+8
| | | | llvm-svn: 77559
* print single NamedMDNode.Devang Patel2009-07-301-3/+45
| | | | llvm-svn: 77549
* Print named metadata.Devang Patel2009-07-291-0/+25
| | | | llvm-svn: 77513
* 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/+3
| | | | | | LangRef.html changes for details. llvm-svn: 77259
* Initialize mdnNext.Devang Patel2009-07-271-1/+1
| | | | llvm-svn: 77229
* Change the assembly syntax for nsw, nuw, and exact, putting themDan Gohman2009-07-271-7/+7
| | | | | | | after their associated opcodes rather than before. This makes them a little easier to read. llvm-svn: 77194
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-24/+17
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* Convert a few more things to use raw_ostream.Dan Gohman2009-07-251-2/+1
| | | | llvm-svn: 77039
* MDStringDevang Patel2009-07-231-2/+2
| | | | | | | - 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-0/+5
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Rename the new unsigned and signed keywords to nuw and nsw,Dan Gohman2009-07-221-2/+2
| | | | | | which stand for no-unsigned-wrap and no-signed-wrap. llvm-svn: 76810
* Do not print "metadata" twice while printing MDString.Devang Patel2009-07-221-2/+0
| | | | | | This fixes unittest failure. llvm-svn: 76764
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-221-8/+17
| | | | | | | 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/+18
| | | | | | exact sdiv flags. llvm-svn: 76475
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-12/+13
| | | | | | | | | "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-6/+6
| | | | | | | | | 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
* Change printInstruction to not print a trailing newline. Value::dumpDan Gohman2009-07-131-2/+3
| | | | | | | always adds a newline, so this fixes Value::dump printing an extra blank line. llvm-svn: 75481
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-5/+5
| | | | | | | | | 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
* Drop "constant" from Devang Patel2009-07-081-1/+1
| | | | | | !0 = constant metadata !{...} llvm-svn: 75057
OpenPOWER on IntegriCloud