Lines Matching refs:FormatStr
1587 StringRef FormatStr; in optimizePrintFString() local
1588 if (!getConstantStringInfo(CI->getArgOperand(0), FormatStr)) in optimizePrintFString()
1592 if (FormatStr.empty()) // Tolerate printf's declared void. in optimizePrintFString()
1602 if (FormatStr.size() == 1 || FormatStr == "%%") in optimizePrintFString()
1603 return emitPutChar(B.getInt32(FormatStr[0]), B, TLI); in optimizePrintFString()
1606 if (FormatStr == "%s" && CI->getNumArgOperands() > 1) { in optimizePrintFString()
1616 if (FormatStr[FormatStr.size() - 1] == '\n' && in optimizePrintFString()
1617 FormatStr.find('%') == StringRef::npos) { // No format characters. in optimizePrintFString()
1620 FormatStr = FormatStr.drop_back(); in optimizePrintFString()
1621 Value *GV = B.CreateGlobalString(FormatStr, "str"); in optimizePrintFString()
1627 if (FormatStr == "%c" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
1632 if (FormatStr == "%s\n" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
1662 StringRef FormatStr; in optimizeSPrintFString() local
1663 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeSPrintFString()
1670 for (unsigned i = 0, e = FormatStr.size(); i != e; ++i) in optimizeSPrintFString()
1671 if (FormatStr[i] == '%') in optimizeSPrintFString()
1677 FormatStr.size() + 1), in optimizeSPrintFString()
1679 return ConstantInt::get(CI->getType(), FormatStr.size()); in optimizeSPrintFString()
1684 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeSPrintFString()
1689 if (FormatStr[1] == 'c') { in optimizeSPrintFString()
1702 if (FormatStr[1] == 's') { in optimizeSPrintFString()
1745 StringRef FormatStr; in optimizeFPrintFString() local
1746 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeFPrintFString()
1757 for (unsigned i = 0, e = FormatStr.size(); i != e; ++i) in optimizeFPrintFString()
1758 if (FormatStr[i] == '%') // Could handle %% -> % if we cared. in optimizeFPrintFString()
1763 ConstantInt::get(DL.getIntPtrType(CI->getContext()), FormatStr.size()), in optimizeFPrintFString()
1769 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeFPrintFString()
1774 if (FormatStr[1] == 'c') { in optimizeFPrintFString()
1781 if (FormatStr[1] == 's') { in optimizeFPrintFString()