Lines Matching refs:AP
527 static void emitImplicitDef(const MachineInstr *MI, AsmPrinter &AP) { in emitImplicitDef() argument
529 AP.OutStreamer.AddComment(Twine("implicit-def: ") + in emitImplicitDef()
530 AP.TM.getRegisterInfo()->getName(RegNo)); in emitImplicitDef()
531 AP.OutStreamer.AddBlankLine(); in emitImplicitDef()
534 static void emitKill(const MachineInstr *MI, AsmPrinter &AP) { in emitKill() argument
540 Str += AP.TM.getRegisterInfo()->getName(Op.getReg()); in emitKill()
543 AP.OutStreamer.AddComment(Str); in emitKill()
544 AP.OutStreamer.AddBlankLine(); in emitKill()
550 static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { in emitDebugValueComment() argument
557 OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: "; in emitDebugValueComment()
590 AP.OutStreamer.EmitRawText(OS.str()); in emitDebugValueComment()
593 OS << AP.TM.getRegisterInfo()->getName(MI->getOperand(0).getReg()); in emitDebugValueComment()
598 AP.OutStreamer.EmitRawText(OS.str()); in emitDebugValueComment()
1439 static const MCExpr *lowerConstant(const Constant *CV, AsmPrinter &AP) { in lowerConstant() argument
1440 MCContext &Ctx = AP.OutContext; in lowerConstant()
1449 return MCSymbolRefExpr::Create(AP.Mang->getSymbol(GV), Ctx); in lowerConstant()
1452 return MCSymbolRefExpr::Create(AP.GetBlockAddressSymbol(BA), Ctx); in lowerConstant()
1465 ConstantFoldConstantExpression(CE, AP.TM.getDataLayout())) in lowerConstant()
1467 return lowerConstant(C, AP); in lowerConstant()
1475 !AP.MF ? 0 : AP.MF->getFunction()->getParent()); in lowerConstant()
1479 const DataLayout &TD = *AP.TM.getDataLayout(); in lowerConstant()
1484 const MCExpr *Base = lowerConstant(CE->getOperand(0), AP); in lowerConstant()
1500 return lowerConstant(CE->getOperand(0), AP); in lowerConstant()
1503 const DataLayout &TD = *AP.TM.getDataLayout(); in lowerConstant()
1509 return lowerConstant(Op, AP); in lowerConstant()
1513 const DataLayout &TD = *AP.TM.getDataLayout(); in lowerConstant()
1519 const MCExpr *OpExpr = lowerConstant(Op, AP); in lowerConstant()
1545 const MCExpr *LHS = lowerConstant(CE->getOperand(0), AP); in lowerConstant()
1546 const MCExpr *RHS = lowerConstant(CE->getOperand(1), AP); in lowerConstant()
1564 AsmPrinter &AP);
1626 unsigned AddrSpace,AsmPrinter &AP){ in emitGlobalConstantDataSequential() argument
1629 int Value = isRepeatedByteSequence(CDS, AP.TM); in emitGlobalConstantDataSequential()
1631 uint64_t Bytes = AP.TM.getDataLayout()->getTypeAllocSize(CDS->getType()); in emitGlobalConstantDataSequential()
1634 return AP.OutStreamer.EmitFill(Bytes, Value, AddrSpace); in emitGlobalConstantDataSequential()
1639 return AP.OutStreamer.EmitBytes(CDS->getAsString(), AddrSpace); in emitGlobalConstantDataSequential()
1645 if (AP.isVerbose()) in emitGlobalConstantDataSequential()
1646 AP.OutStreamer.GetCommentOS() << format("0x%" PRIx64 "\n", in emitGlobalConstantDataSequential()
1648 AP.OutStreamer.EmitIntValue(CDS->getElementAsInteger(i), in emitGlobalConstantDataSequential()
1662 if (AP.isVerbose()) in emitGlobalConstantDataSequential()
1663 AP.OutStreamer.GetCommentOS() << "float " << F << '\n'; in emitGlobalConstantDataSequential()
1664 AP.OutStreamer.EmitIntValue(I, 4, AddrSpace); in emitGlobalConstantDataSequential()
1675 if (AP.isVerbose()) in emitGlobalConstantDataSequential()
1676 AP.OutStreamer.GetCommentOS() << "double " << F << '\n'; in emitGlobalConstantDataSequential()
1677 AP.OutStreamer.EmitIntValue(I, 8, AddrSpace); in emitGlobalConstantDataSequential()
1681 const DataLayout &TD = *AP.TM.getDataLayout(); in emitGlobalConstantDataSequential()
1686 AP.OutStreamer.EmitZeros(Padding, AddrSpace); in emitGlobalConstantDataSequential()
1691 AsmPrinter &AP) { in emitGlobalConstantArray() argument
1694 int Value = isRepeatedByteSequence(CA, AP.TM); in emitGlobalConstantArray()
1697 uint64_t Bytes = AP.TM.getDataLayout()->getTypeAllocSize(CA->getType()); in emitGlobalConstantArray()
1698 AP.OutStreamer.EmitFill(Bytes, Value, AddrSpace); in emitGlobalConstantArray()
1702 emitGlobalConstantImpl(CA->getOperand(i), AddrSpace, AP); in emitGlobalConstantArray()
1707 unsigned AddrSpace, AsmPrinter &AP) { in emitGlobalConstantVector() argument
1709 emitGlobalConstantImpl(CV->getOperand(i), AddrSpace, AP); in emitGlobalConstantVector()
1711 const DataLayout &TD = *AP.TM.getDataLayout(); in emitGlobalConstantVector()
1716 AP.OutStreamer.EmitZeros(Padding, AddrSpace); in emitGlobalConstantVector()
1720 unsigned AddrSpace, AsmPrinter &AP) { in emitGlobalConstantStruct() argument
1722 const DataLayout *TD = AP.TM.getDataLayout(); in emitGlobalConstantStruct()
1736 emitGlobalConstantImpl(Field, AddrSpace, AP); in emitGlobalConstantStruct()
1741 AP.OutStreamer.EmitZeros(PadSize, AddrSpace); in emitGlobalConstantStruct()
1748 AsmPrinter &AP) { in emitGlobalConstantFP() argument
1753 if (AP.isVerbose()) { in emitGlobalConstantFP()
1757 CFP->getType()->print(AP.OutStreamer.GetCommentOS()); in emitGlobalConstantFP()
1758 AP.OutStreamer.GetCommentOS() << ' ' << StrVal << '\n'; in emitGlobalConstantFP()
1770 if (AP.TM.getDataLayout()->isBigEndian() != CFP->getType()->isPPC_FP128Ty()) { in emitGlobalConstantFP()
1774 AP.OutStreamer.EmitIntValue(p[Chunk--], TrailingBytes, AddrSpace); in emitGlobalConstantFP()
1777 AP.OutStreamer.EmitIntValue(p[Chunk], sizeof(uint64_t), AddrSpace); in emitGlobalConstantFP()
1781 AP.OutStreamer.EmitIntValue(p[Chunk], sizeof(uint64_t), AddrSpace); in emitGlobalConstantFP()
1784 AP.OutStreamer.EmitIntValue(p[Chunk], TrailingBytes, AddrSpace); in emitGlobalConstantFP()
1788 const DataLayout &TD = *AP.TM.getDataLayout(); in emitGlobalConstantFP()
1789 AP.OutStreamer.EmitZeros(TD.getTypeAllocSize(CFP->getType()) - in emitGlobalConstantFP()
1794 unsigned AddrSpace, AsmPrinter &AP) { in emitGlobalConstantLargeInt() argument
1795 const DataLayout *TD = AP.TM.getDataLayout(); in emitGlobalConstantLargeInt()
1805 AP.OutStreamer.EmitIntValue(Val, 8, AddrSpace); in emitGlobalConstantLargeInt()
1810 AsmPrinter &AP) { in emitGlobalConstantImpl() argument
1811 const DataLayout *TD = AP.TM.getDataLayout(); in emitGlobalConstantImpl()
1814 return AP.OutStreamer.EmitZeros(Size, AddrSpace); in emitGlobalConstantImpl()
1822 if (AP.isVerbose()) in emitGlobalConstantImpl()
1823 AP.OutStreamer.GetCommentOS() << format("0x%" PRIx64 "\n", in emitGlobalConstantImpl()
1825 AP.OutStreamer.EmitIntValue(CI->getZExtValue(), Size, AddrSpace); in emitGlobalConstantImpl()
1828 emitGlobalConstantLargeInt(CI, AddrSpace, AP); in emitGlobalConstantImpl()
1834 return emitGlobalConstantFP(CFP, AddrSpace, AP); in emitGlobalConstantImpl()
1837 AP.OutStreamer.EmitIntValue(0, Size, AddrSpace); in emitGlobalConstantImpl()
1842 return emitGlobalConstantDataSequential(CDS, AddrSpace, AP); in emitGlobalConstantImpl()
1845 return emitGlobalConstantArray(CVA, AddrSpace, AP); in emitGlobalConstantImpl()
1848 return emitGlobalConstantStruct(CVS, AddrSpace, AP); in emitGlobalConstantImpl()
1854 return emitGlobalConstantImpl(CE->getOperand(0), AddrSpace, AP); in emitGlobalConstantImpl()
1862 return emitGlobalConstantImpl(New, AddrSpace, AP); in emitGlobalConstantImpl()
1867 return emitGlobalConstantVector(V, AddrSpace, AP); in emitGlobalConstantImpl()
1871 AP.OutStreamer.EmitValue(lowerConstant(CV, AP), Size, AddrSpace); in emitGlobalConstantImpl()
1996 const AsmPrinter &AP) { in emitBasicBlockLoopComments() argument
2007 AP.OutStreamer.AddComment(" in Loop: Header=BB" + in emitBasicBlockLoopComments()
2008 Twine(AP.getFunctionNumber())+"_" + in emitBasicBlockLoopComments()
2016 raw_ostream &OS = AP.OutStreamer.GetCommentOS(); in emitBasicBlockLoopComments()
2018 PrintParentLoopComment(OS, Loop->getParentLoop(), AP.getFunctionNumber()); in emitBasicBlockLoopComments()
2028 PrintChildLoopComment(OS, Loop, AP.getFunctionNumber()); in emitBasicBlockLoopComments()