Lines Matching refs:FormatStr
1764 StringRef FormatStr; in optimizePrintFString() local
1765 if (!getConstantStringInfo(CI->getArgOperand(0), FormatStr)) in optimizePrintFString()
1769 if (FormatStr.empty()) // Tolerate printf's declared void. in optimizePrintFString()
1779 if (FormatStr.size() == 1) { in optimizePrintFString()
1780 Value *Res = EmitPutChar(B.getInt32(FormatStr[0]), B, TLI); in optimizePrintFString()
1787 if (FormatStr[FormatStr.size() - 1] == '\n' && in optimizePrintFString()
1788 FormatStr.find('%') == StringRef::npos) { // No format characters. in optimizePrintFString()
1791 FormatStr = FormatStr.drop_back(); in optimizePrintFString()
1792 Value *GV = B.CreateGlobalString(FormatStr, "str"); in optimizePrintFString()
1796 : ConstantInt::get(CI->getType(), FormatStr.size() + 1); in optimizePrintFString()
1801 if (FormatStr == "%c" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
1811 if (FormatStr == "%s\n" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
1847 StringRef FormatStr; in optimizeSPrintFString() local
1848 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeSPrintFString()
1855 for (unsigned i = 0, e = FormatStr.size(); i != e; ++i) in optimizeSPrintFString()
1856 if (FormatStr[i] == '%') in optimizeSPrintFString()
1862 FormatStr.size() + 1), in optimizeSPrintFString()
1864 return ConstantInt::get(CI->getType(), FormatStr.size()); in optimizeSPrintFString()
1869 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeSPrintFString()
1874 if (FormatStr[1] == 'c') { in optimizeSPrintFString()
1887 if (FormatStr[1] == 's') { in optimizeSPrintFString()
1936 StringRef FormatStr; in optimizeFPrintFString() local
1937 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeFPrintFString()
1948 for (unsigned i = 0, e = FormatStr.size(); i != e; ++i) in optimizeFPrintFString()
1949 if (FormatStr[i] == '%') // Could handle %% -> % if we cared. in optimizeFPrintFString()
1954 ConstantInt::get(DL.getIntPtrType(CI->getContext()), FormatStr.size()), in optimizeFPrintFString()
1960 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeFPrintFString()
1965 if (FormatStr[1] == 'c') { in optimizeFPrintFString()
1972 if (FormatStr[1] == 's') { in optimizeFPrintFString()