Lines Matching refs:CPV
1755 void NVPTXAsmPrinter::printScalarConstant(const Constant *CPV, raw_ostream &O) { in printScalarConstant() argument
1756 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { in printScalarConstant()
1760 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV)) { in printScalarConstant()
1764 if (isa<ConstantPointerNull>(CPV)) { in printScalarConstant()
1768 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in printScalarConstant()
1773 if (EmitGeneric && !isa<Function>(CPV) && !IsNonGenericPointer) { in printScalarConstant()
1782 if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in printScalarConstant()
1799 lowerConstant(CPV)->print(O, MAI); in printScalarConstant()
1806 void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes, in bufferLEByte() argument
1809 int AllocSize = DL.getTypeAllocSize(CPV->getType()); in bufferLEByte()
1810 if (isa<UndefValue>(CPV) || CPV->isNullValue()) { in bufferLEByte()
1827 switch (CPV->getType()->getTypeID()) { in bufferLEByte()
1829 if (const auto CI = dyn_cast<ConstantInt>(CPV)) { in bufferLEByte()
1833 if (const auto *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1852 AddIntToBuffer(cast<ConstantFP>(CPV)->getValueAPF().bitcastToAPInt()); in bufferLEByte()
1856 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in bufferLEByte()
1858 } else if (const ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1869 if (isa<ConstantAggregate>(CPV) || isa<ConstantDataSequential>(CPV)) { in bufferLEByte()
1870 bufferAggregateConstant(CPV, AggBuffer); in bufferLEByte()
1873 } else if (isa<ConstantAggregateZero>(CPV)) in bufferLEByte()
1885 void NVPTXAsmPrinter::bufferAggregateConstant(const Constant *CPV, in bufferAggregateConstant() argument
1891 if (const ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { in bufferAggregateConstant()
1893 for (unsigned I = 0, E = DL.getTypeAllocSize(CPV->getType()); I < E; ++I) { in bufferAggregateConstant()
1902 if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV)) { in bufferAggregateConstant()
1903 if (CPV->getNumOperands()) in bufferAggregateConstant()
1904 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) in bufferAggregateConstant()
1905 bufferLEByte(cast<Constant>(CPV->getOperand(i)), 0, aggBuffer); in bufferAggregateConstant()
1910 dyn_cast<ConstantDataSequential>(CPV)) { in bufferAggregateConstant()
1918 if (isa<ConstantStruct>(CPV)) { in bufferAggregateConstant()
1919 if (CPV->getNumOperands()) { in bufferAggregateConstant()
1920 StructType *ST = cast<StructType>(CPV->getType()); in bufferAggregateConstant()
1921 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) { in bufferAggregateConstant()
1929 bufferLEByte(cast<Constant>(CPV->getOperand(i)), Bytes, aggBuffer); in bufferAggregateConstant()