Lines Matching refs:CPV
1697 void NVPTXAsmPrinter::printScalarConstant(const Constant *CPV, raw_ostream &O) { in printScalarConstant() argument
1698 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { in printScalarConstant()
1702 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV)) { in printScalarConstant()
1706 if (isa<ConstantPointerNull>(CPV)) { in printScalarConstant()
1710 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in printScalarConstant()
1716 if (EmitGeneric && !isa<Function>(CPV) && !IsNonGenericPointer) { in printScalarConstant()
1725 if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in printScalarConstant()
1742 O << *lowerConstant(CPV); in printScalarConstant()
1749 void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes, in bufferLEByte() argument
1754 if (isa<UndefValue>(CPV) || CPV->isNullValue()) { in bufferLEByte()
1755 int s = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1763 switch (CPV->getType()->getTypeID()) { in bufferLEByte()
1766 const Type *ETy = CPV->getType(); in bufferLEByte()
1767 if (ETy == Type::getInt8Ty(CPV->getContext())) { in bufferLEByte()
1768 unsigned char c = (unsigned char)cast<ConstantInt>(CPV)->getZExtValue(); in bufferLEByte()
1771 } else if (ETy == Type::getInt16Ty(CPV->getContext())) { in bufferLEByte()
1772 short int16 = (short)cast<ConstantInt>(CPV)->getZExtValue(); in bufferLEByte()
1775 } else if (ETy == Type::getInt32Ty(CPV->getContext())) { in bufferLEByte()
1776 if (const ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) { in bufferLEByte()
1781 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1797 } else if (ETy == Type::getInt64Ty(CPV->getContext())) { in bufferLEByte()
1798 if (const ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) { in bufferLEByte()
1803 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1825 const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV); in bufferLEByte()
1827 if (Ty == Type::getFloatTy(CPV->getContext())) { in bufferLEByte()
1831 } else if (Ty == Type::getDoubleTy(CPV->getContext())) { in bufferLEByte()
1841 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in bufferLEByte()
1843 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1847 unsigned int s = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1855 if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) || in bufferLEByte()
1856 isa<ConstantStruct>(CPV) || isa<ConstantDataSequential>(CPV)) { in bufferLEByte()
1857 int ElementSize = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1858 bufferAggregateConstant(CPV, aggBuffer); in bufferLEByte()
1861 } else if (isa<ConstantAggregateZero>(CPV)) in bufferLEByte()
1873 void NVPTXAsmPrinter::bufferAggregateConstant(const Constant *CPV, in bufferAggregateConstant() argument
1879 if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV)) { in bufferAggregateConstant()
1880 if (CPV->getNumOperands()) in bufferAggregateConstant()
1881 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) in bufferAggregateConstant()
1882 bufferLEByte(cast<Constant>(CPV->getOperand(i)), 0, aggBuffer); in bufferAggregateConstant()
1887 dyn_cast<ConstantDataSequential>(CPV)) { in bufferAggregateConstant()
1895 if (isa<ConstantStruct>(CPV)) { in bufferAggregateConstant()
1896 if (CPV->getNumOperands()) { in bufferAggregateConstant()
1897 StructType *ST = cast<StructType>(CPV->getType()); in bufferAggregateConstant()
1898 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) { in bufferAggregateConstant()
1906 bufferLEByte(cast<Constant>(CPV->getOperand(i)), Bytes, aggBuffer); in bufferAggregateConstant()