Lines Matching refs:os

54 void OperationName::print(raw_ostream &os) const { os << getStringRef(); }  in print()
81 auto &os = getStream(); in printFunctionalType() local
82 os << '('; in printFunctionalType()
83 llvm::interleaveComma(op->getOperands(), os, [&](Value operand) { in printFunctionalType()
87 os << ") -> "; in printFunctionalType()
97 os << '('; in printFunctionalType()
99 llvm::interleaveComma(op->getResults(), os, [&](const OpResult &result) { in printFunctionalType()
105 os << ')'; in printFunctionalType()
313 static raw_ostream &operator<<(raw_ostream &os, NewLineCounter &newLine) { in operator <<() argument
315 return os << '\n'; in operator <<()
335 void print(raw_ostream &os) const { in print()
336 os << name; in print()
338 os << suffixIndex; in print()
558 raw_ostream &getStream() const override { return os; } in getStream()
567 void printOperand(Value, raw_ostream &os) override { in printOperand() argument
571 os << "%"; in printOperand()
586 mutable llvm::raw_null_ostream os; member in __anon190d4e680511::DummyAliasOperationPrinter
764 LogicalResult getAlias(Attribute attr, raw_ostream &os) const;
768 LogicalResult getAlias(Type ty, raw_ostream &os) const;
772 void printNonDeferredAliases(raw_ostream &os, NewLineCounter &newLine) const { in printNonDeferredAliases() argument
773 printAliases(os, newLine, /*isDeferred=*/false); in printNonDeferredAliases()
777 void printDeferredAliases(raw_ostream &os, NewLineCounter &newLine) const { in printDeferredAliases() argument
778 printAliases(os, newLine, /*isDeferred=*/true); in printDeferredAliases()
784 void printAliases(raw_ostream &os, NewLineCounter &newLine,
804 LogicalResult AliasState::getAlias(Attribute attr, raw_ostream &os) const { in getAlias()
808 it->second.print(os << '#'); in getAlias()
812 LogicalResult AliasState::getAlias(Type ty, raw_ostream &os) const { in getAlias()
817 it->second.print(os << '!'); in getAlias()
821 void AliasState::printAliases(raw_ostream &os, NewLineCounter &newLine, in printAliases() argument
827 it.second.print(os << '#'); in printAliases()
828 os << " = " << it.first << newLine; in printAliases()
831 it.second.print(os << '!'); in printAliases()
832 os << " = " << it.first << newLine; in printAliases()
1399 Impl(raw_ostream &os, OpPrintingFlags flags = llvm::None, in Impl() argument
1401 : os(os), printerFlags(flags), state(state) {} in Impl()
1403 : Impl(other.os, other.printerFlags, other.state) {} in Impl()
1406 raw_ostream &getStream() { return os; } in getStream()
1410 llvm::interleaveComma(c, os, eachFn); in interleaveComma()
1447 os << interface->getResourceKey(resource); in printResourceHandle()
1500 raw_ostream &os; member in mlir::AsmPrinter::Impl
1521 os << " "; in printTrailingLocation()
1532 os << "[unknown]"; in printLocationInternal()
1534 os << "unknown"; in printLocationInternal()
1538 os << loc.getFilename().getValue(); in printLocationInternal()
1541 os << ':' << loc.getLine() << ':' << loc.getColumn(); in printLocationInternal()
1549 os << '('; in printLocationInternal()
1551 os << ')'; in printLocationInternal()
1558 os << "callsite("; in printLocationInternal()
1563 os << " at "; in printLocationInternal()
1565 os << newLine << " at "; in printLocationInternal()
1568 os << newLine << " at "; in printLocationInternal()
1571 os << " at "; in printLocationInternal()
1575 os << ")"; in printLocationInternal()
1579 os << "fused"; in printLocationInternal()
1581 os << '<' << metadata << '>'; in printLocationInternal()
1582 os << '['; in printLocationInternal()
1586 [&]() { os << ", "; }); in printLocationInternal()
1587 os << ']'; in printLocationInternal()
1593 static void printFloatValue(const APFloat &apValue, raw_ostream &os) { in printFloatValue() argument
1616 os << strValue; in printFloatValue()
1627 os << strValue; in printFloatValue()
1638 os << str; in printFloatValue()
1645 os << "loc("; in printLocation()
1646 if (!allowAlias || !state || failed(state->getAliasState().getAlias(loc, os))) in printLocation()
1648 os << ')'; in printLocation()
1672 static void printDialectSymbol(raw_ostream &os, StringRef symPrefix, in printDialectSymbol() argument
1674 os << symPrefix << dialectName; in printDialectSymbol()
1679 os << '.' << symString; in printDialectSymbol()
1683 os << '<' << symString << '>'; in printDialectSymbol()
1701 static void printKeywordOrString(StringRef keyword, raw_ostream &os) { in printKeywordOrString() argument
1704 os << keyword; in printKeywordOrString()
1709 os << "\""; in printKeywordOrString()
1710 printEscapedString(keyword, os); in printKeywordOrString()
1711 os << '"'; in printKeywordOrString()
1717 static void printSymbolReference(StringRef symbolRef, raw_ostream &os) { in printSymbolReference() argument
1719 os << '@'; in printSymbolReference()
1720 printKeywordOrString(symbolRef, os); in printSymbolReference()
1732 static void printElidedElementsAttr(raw_ostream &os) { in printElidedElementsAttr() argument
1733 os << R"(opaque<"elided_large_const", "0xDEADBEEF">)"; in printElidedElementsAttr()
1737 return success(state && succeeded(state->getAliasState().getAlias(attr, os))); in printAlias()
1741 return success(state && succeeded(state->getAliasState().getAlias(type, os))); in printAlias()
1747 os << "<<NULL ATTRIBUTE>>"; in printAttribute()
1759 printDialectSymbol(os, "#", opaqueAttr.getDialectNamespace(), in printAttribute()
1762 os << "unit"; in printAttribute()
1765 os << '{'; in printAttribute()
1768 os << '}'; in printAttribute()
1772 os << (intAttr.getValue().getBoolValue() ? "true" : "false"); in printAttribute()
1783 intAttr.getValue().print(os, !isUnsigned); in printAttribute()
1790 printFloatValue(floatAttr.getValue(), os); in printAttribute()
1800 os << '['; in printAttribute()
1804 os << ']'; in printAttribute()
1807 os << "affine_map<"; in printAttribute()
1808 affineMapAttr.getValue().print(os); in printAttribute()
1809 os << '>'; in printAttribute()
1815 os << "affine_set<"; in printAttribute()
1816 integerSetAttr.getValue().print(os); in printAttribute()
1817 os << '>'; in printAttribute()
1826 printSymbolReference(refAttr.getRootReference().getValue(), os); in printAttribute()
1828 os << "::"; in printAttribute()
1829 printSymbolReference(nestedRef.getValue(), os); in printAttribute()
1834 printElidedElementsAttr(os); in printAttribute()
1836 os << "opaque<" << opaqueAttr.getDialect() << ", "; in printAttribute()
1838 os << ">"; in printAttribute()
1843 printElidedElementsAttr(os); in printAttribute()
1845 os << "dense<"; in printAttribute()
1847 os << '>'; in printAttribute()
1852 printElidedElementsAttr(os); in printAttribute()
1854 os << "dense<"; in printAttribute()
1856 os << '>'; in printAttribute()
1862 printElidedElementsAttr(os); in printAttribute()
1864 os << "sparse<"; in printAttribute()
1868 os << ", "; in printAttribute()
1871 os << '>'; in printAttribute()
1877 os << "[:i8"; in printAttribute()
1880 os << "[:i16"; in printAttribute()
1883 os << "[:i32"; in printAttribute()
1886 os << "[:i64"; in printAttribute()
1889 os << "[:f32"; in printAttribute()
1892 os << "[:f64"; in printAttribute()
1896 os << " "; in printAttribute()
1897 denseArrayAttr.printWithoutBraces(os); in printAttribute()
1898 os << "]"; in printAttribute()
1906 os << " : "; in printAttribute()
1912 static void printDenseIntElement(const APInt &value, raw_ostream &os, in printDenseIntElement() argument
1915 os << (value.getBoolValue() ? "true" : "false"); in printDenseIntElement()
1917 value.print(os, isSigned); in printDenseIntElement()
1921 printDenseElementsAttrImpl(bool isSplat, ShapedType type, raw_ostream &os, in printDenseElementsAttrImpl() argument
1953 os << ']'; in printDenseElementsAttrImpl()
1959 os << ", "; in printDenseElementsAttrImpl()
1961 os << '['; in printDenseElementsAttrImpl()
1967 os << ']'; in printDenseElementsAttrImpl()
2013 printDenseElementsAttrImpl(attr.isSplat(), type, os, [&](unsigned index) { in printDenseIntOrFPElementsAttr()
2015 os << "("; in printDenseIntOrFPElementsAttr()
2016 printDenseIntElement(complexValue.real(), os, isSigned); in printDenseIntOrFPElementsAttr()
2017 os << ","; in printDenseIntOrFPElementsAttr()
2018 printDenseIntElement(complexValue.imag(), os, isSigned); in printDenseIntOrFPElementsAttr()
2019 os << ")"; in printDenseIntOrFPElementsAttr()
2023 printDenseElementsAttrImpl(attr.isSplat(), type, os, [&](unsigned index) { in printDenseIntOrFPElementsAttr()
2025 os << "("; in printDenseIntOrFPElementsAttr()
2026 printFloatValue(complexValue.real(), os); in printDenseIntOrFPElementsAttr()
2027 os << ","; in printDenseIntOrFPElementsAttr()
2028 printFloatValue(complexValue.imag(), os); in printDenseIntOrFPElementsAttr()
2029 os << ")"; in printDenseIntOrFPElementsAttr()
2035 printDenseElementsAttrImpl(attr.isSplat(), type, os, [&](unsigned index) { in printDenseIntOrFPElementsAttr()
2036 printDenseIntElement(*(valueIt + index), os, isSigned); in printDenseIntOrFPElementsAttr()
2041 printDenseElementsAttrImpl(attr.isSplat(), type, os, [&](unsigned index) { in printDenseIntOrFPElementsAttr()
2042 printFloatValue(*(valueIt + index), os); in printDenseIntOrFPElementsAttr()
2051 printDenseElementsAttrImpl(attr.isSplat(), attr.getType(), os, printFn); in printDenseStringElementsAttr()
2056 os << "<<NULL TYPE>>"; in printType()
2061 if (state && succeeded(state->getAliasState().getAlias(type, os))) in printType()
2066 printDialectSymbol(os, "!", opaqueTy.getDialectNamespace(), in printType()
2069 .Case<IndexType>([&](Type) { os << "index"; }) in printType()
2070 .Case<BFloat16Type>([&](Type) { os << "bf16"; }) in printType()
2071 .Case<Float16Type>([&](Type) { os << "f16"; }) in printType()
2072 .Case<Float32Type>([&](Type) { os << "f32"; }) in printType()
2073 .Case<Float64Type>([&](Type) { os << "f64"; }) in printType()
2074 .Case<Float80Type>([&](Type) { os << "f80"; }) in printType()
2075 .Case<Float128Type>([&](Type) { os << "f128"; }) in printType()
2078 os << 's'; in printType()
2080 os << 'u'; in printType()
2081 os << 'i' << integerTy.getWidth(); in printType()
2084 os << '('; in printType()
2086 os << ") -> "; in printType()
2091 os << '('; in printType()
2093 os << ')'; in printType()
2097 os << "vector<"; in printType()
2103 os << vShape[dimIdx] << 'x'; in printType()
2105 os << '['; in printType()
2108 os << vShape[dimIdx] << 'x'; in printType()
2109 os << vShape[dimIdx] << "]x"; in printType()
2112 os << '>'; in printType()
2115 os << "tensor<"; in printType()
2118 os << '?'; in printType()
2120 os << dim; in printType()
2121 os << 'x'; in printType()
2126 os << ", "; in printType()
2129 os << '>'; in printType()
2132 os << "tensor<*x"; in printType()
2134 os << '>'; in printType()
2137 os << "memref<"; in printType()
2140 os << '?'; in printType()
2142 os << dim; in printType()
2143 os << 'x'; in printType()
2147 os << ", "; in printType()
2152 os << ", "; in printType()
2155 os << '>'; in printType()
2158 os << "memref<*x"; in printType()
2162 os << ", "; in printType()
2165 os << '>'; in printType()
2168 os << "complex<"; in printType()
2170 os << '>'; in printType()
2173 os << "tuple<"; in printType()
2176 os << '>'; in printType()
2178 .Case<NoneType>([&](Type) { os << "none"; }) in printType()
2193 os << " attributes"; in printOptionalAttrDict()
2196 os << " {"; in printOptionalAttrDict()
2199 os << '}'; in printOptionalAttrDict()
2218 ::printKeywordOrString(attr.getName().strref(), os); in printNamedAttribute()
2224 os << " = "; in printNamedAttribute()
2244 printDialectSymbol(os, "#", dialect.getNamespace(), attrName); in printDialectAttribute()
2263 printDialectSymbol(os, "!", dialect.getNamespace(), typeName); in printDialectType()
2267 os << "\""; in printEscapedString()
2268 llvm::printEscapedString(str, os); in printEscapedString()
2269 os << "\""; in printEscapedString()
2273 os << "\"0x" << llvm::toHex(str) << "\""; in printHexString()
2356 os << 's' << pos; in printAffineExprInternal()
2364 os << 'd' << pos; in printAffineExprInternal()
2368 os << expr.cast<AffineConstantExpr>().getValue(); in printAffineExprInternal()
2394 os << '('; in printAffineExprInternal()
2400 os << "-"; in printAffineExprInternal()
2403 os << ')'; in printAffineExprInternal()
2409 os << binopSpelling; in printAffineExprInternal()
2413 os << ')'; in printAffineExprInternal()
2419 os << '('; in printAffineExprInternal()
2430 os << " - "; in printAffineExprInternal()
2440 os << ')'; in printAffineExprInternal()
2447 os << " - "; in printAffineExprInternal()
2450 os << " * " << -rrhs.getValue(); in printAffineExprInternal()
2452 os << ')'; in printAffineExprInternal()
2463 os << " - " << -rhsConst.getValue(); in printAffineExprInternal()
2465 os << ')'; in printAffineExprInternal()
2472 os << " + "; in printAffineExprInternal()
2476 os << ')'; in printAffineExprInternal()
2481 isEq ? os << " == 0" : os << " >= 0"; in printAffineConstraint()
2486 os << '('; in printAffineMap()
2488 os << 'd' << i << ", "; in printAffineMap()
2490 os << 'd' << map.getNumDims() - 1; in printAffineMap()
2491 os << ')'; in printAffineMap()
2495 os << '['; in printAffineMap()
2497 os << 's' << i << ", "; in printAffineMap()
2499 os << 's' << map.getNumSymbols() - 1; in printAffineMap()
2500 os << ']'; in printAffineMap()
2504 os << " -> ("; in printAffineMap()
2507 os << ')'; in printAffineMap()
2512 os << '('; in printIntegerSet()
2514 os << 'd' << i - 1 << ", "; in printIntegerSet()
2516 os << 'd' << set.getNumDims() - 1; in printIntegerSet()
2517 os << ')'; in printIntegerSet()
2521 os << '['; in printIntegerSet()
2523 os << 's' << i << ", "; in printIntegerSet()
2525 os << 's' << set.getNumSymbols() - 1; in printIntegerSet()
2526 os << ']'; in printIntegerSet()
2530 os << " : ("; in printIntegerSet()
2534 os << ", "; in printIntegerSet()
2539 os << ')'; in printIntegerSet()
2553 explicit OperationPrinter(raw_ostream &os, AsmStateImpl &state) in OperationPrinter() argument
2554 : Impl(os, state.getPrinterFlags(), &state), in OperationPrinter()
2591 os << newLine; in printNewline()
2592 os.indent(currentIndent); in printNewline()
2606 void printOperand(Value value, raw_ostream &os) override { in printOperand() argument
2607 printValueID(value, /*printResultNo=*/true, &os); in printOperand()
2678 printFn(key, [&](raw_ostream &os) { p.os << (data ? "true" : "false"); }); in buildBool() argument
2682 printFn(key, [&](raw_ostream &os) { p.printEscapedString(data); }); in buildString() argument
2687 printFn(key, [&](raw_ostream &os) { in buildBlob() argument
2690 os << "\"0x" in buildBlob()
2729 state->getAliasState().printNonDeferredAliases(os, newLine); in printTopLevelOperation()
2733 os << newLine; in printTopLevelOperation()
2736 state->getAliasState().printDeferredAliases(os, newLine); in printTopLevelOperation()
2746 os << newLine << "{-#" << newLine; in printFileMetadataDictionary()
2754 os << newLine << "#-}" << newLine; in printFileMetadataDictionary()
2769 os << " " << dictName << "_resources: {" << newLine; in printResourceFileMetadata()
2772 os << " " << name << ": {" << newLine; in printResourceFileMetadata()
2774 os << "," << newLine; in printResourceFileMetadata()
2776 os << " " << key << ": "; in printResourceFileMetadata()
2777 valueFn(os); in printResourceFileMetadata()
2783 os << newLine << " }"; in printResourceFileMetadata()
2798 os << newLine << " }"; in printResourceFileMetadata()
2806 os << newLine << " }"; in printResourceFileMetadata()
2819 os << ": "; in printRegionArgument()
2831 os.indent(currentIndent); in print()
2843 os << ':' << resultCount; in printOperation()
2855 os << ", "; in printOperation()
2862 os << " = "; in printOperation()
2882 os << name; in printOperation()
2898 os << " // id: "; in printUsersComment()
2901 os << " // unused"; in printUsersComment()
2918 os << " // " << (exactlyOneUniqueUse ? "user" : "users") << ": "; in printUsersComment()
2922 os << "("; in printUsersComment()
2925 os << ")"; in printUsersComment()
2933 os << "// "; in printUsersComment()
2936 os << " is unused"; in printUsersComment()
2938 os << " is used by "; in printUsersComment()
2941 os << newLine; in printUsersComment()
2946 os << "unused"; in printValueUsers()
2959 os << ", "; in printUserIDs()
2972 os << '('; in printGenericOp()
2974 os << ')'; in printGenericOp()
2978 os << '['; in printGenericOp()
2981 os << ']'; in printGenericOp()
2986 os << " ("; in printGenericOp()
2991 os << ')'; in printGenericOp()
2998 os << " : "; in printGenericOp()
3003 os << state->getSSANameState().getBlockInfo(block).name; in printBlockName()
3010 os.indent(currentIndent); in print()
3015 os << '('; in print()
3018 os << ": "; in print()
3023 os << ')'; in print()
3025 os << ':'; in print()
3029 os << " // block is not in a region!"; in print()
3032 os << " // no predecessors"; in print()
3034 os << " // pred: "; in print()
3046 os << " // " << predIDs.size() << " preds: "; in print()
3048 interleaveComma(predIDs, [&](BlockInfo pred) { os << pred.name; }); in print()
3050 os << newLine; in print()
3057 os.indent(currentIndent); in print()
3070 os << newLine; in print()
3078 streamOverride ? *streamOverride : os); in printValueID()
3084 : os); in printOperationID()
3097 os << '('; in printSuccessorAndUseList()
3100 os << " : "; in printSuccessorAndUseList()
3103 os << ')'; in printSuccessorAndUseList()
3109 os << "{" << newLine; in printRegion()
3129 os.indent(currentIndent) << "}"; in printRegion()
3140 os << "symbol("; in printAffineMapOfSSAIds()
3143 os << ')'; in printAffineMapOfSSAIds()
3157 os << "symbol("; in printAffineExprOfSSAIds()
3159 os << ')'; in printAffineExprOfSSAIds()
3168 void Attribute::print(raw_ostream &os) const { in print()
3169 AsmPrinter::Impl(os).printAttribute(*this); in print()
3177 void Type::print(raw_ostream &os) const { in print()
3178 AsmPrinter::Impl(os).printType(*this); in print()
3193 void AffineExpr::print(raw_ostream &os) const { in print()
3195 os << "<<NULL AFFINE EXPR>>"; in print()
3198 AsmPrinter::Impl(os).printAffineExpr(*this); in print()
3206 void AffineMap::print(raw_ostream &os) const { in print()
3208 os << "<<NULL AFFINE MAP>>"; in print()
3211 AsmPrinter::Impl(os).printAffineMap(*this); in print()
3214 void IntegerSet::print(raw_ostream &os) const { in print()
3215 AsmPrinter::Impl(os).printIntegerSet(*this); in print()
3218 void Value::print(raw_ostream &os) { print(os, OpPrintingFlags()); } in print() argument
3219 void Value::print(raw_ostream &os, const OpPrintingFlags &flags) { in print() argument
3221 os << "<<NULL VALUE>>"; in print()
3226 return op->print(os, flags); in print()
3229 os << "<block argument> of type '" << arg.getType() in print()
3232 void Value::print(raw_ostream &os, AsmState &state) { in print() argument
3234 os << "<<NULL VALUE>>"; in print()
3239 return op->print(os, state); in print()
3243 os << "<block argument> of type '" << arg.getType() in print()
3252 void Value::printAsOperand(raw_ostream &os, AsmState &state) { in printAsOperand() argument
3258 os); in printAsOperand()
3261 void Operation::print(raw_ostream &os, const OpPrintingFlags &printerFlags) { in print() argument
3266 print(os, state); in print()
3287 print(os, state); in print()
3289 void Operation::print(raw_ostream &os, AsmState &state) { in print() argument
3290 OperationPrinter printer(os, state.getImpl()); in print()
3302 void Block::print(raw_ostream &os) { in print() argument
3305 os << "<<UNLINKED BLOCK>>\n"; in print()
3313 print(os, state); in print()
3315 void Block::print(raw_ostream &os, AsmState &state) { in print() argument
3316 OperationPrinter(os, state.getImpl()).print(this); in print()
3322 void Block::printAsOperand(raw_ostream &os, bool printType) { in printAsOperand() argument
3325 os << "<<UNLINKED BLOCK>>\n"; in printAsOperand()
3329 printAsOperand(os, state); in printAsOperand()
3331 void Block::printAsOperand(raw_ostream &os, AsmState &state) { in printAsOperand() argument
3332 OperationPrinter printer(os, state.getImpl()); in printAsOperand()