• Home
  • Raw
  • Download

Lines Matching refs:CPV

1733 void NVPTXAsmPrinter::printScalarConstant(Constant *CPV, raw_ostream &O) {  in printScalarConstant()  argument
1734 if (ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { in printScalarConstant()
1738 if (ConstantFP *CFP = dyn_cast<ConstantFP>(CPV)) { in printScalarConstant()
1742 if (isa<ConstantPointerNull>(CPV)) { in printScalarConstant()
1746 if (GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in printScalarConstant()
1750 if (ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in printScalarConstant()
1756 O << *LowerConstant(CPV, *this); in printScalarConstant()
1764 void NVPTXAsmPrinter::bufferLEByte(Constant *CPV, int Bytes, in bufferLEByte() argument
1769 if (isa<UndefValue>(CPV) || CPV->isNullValue()) { in bufferLEByte()
1770 int s = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1778 switch (CPV->getType()->getTypeID()) { in bufferLEByte()
1781 const Type *ETy = CPV->getType(); in bufferLEByte()
1782 if ( ETy == Type::getInt8Ty(CPV->getContext()) ){ in bufferLEByte()
1784 (unsigned char)(dyn_cast<ConstantInt>(CPV))->getZExtValue(); in bufferLEByte()
1787 } else if ( ETy == Type::getInt16Ty(CPV->getContext()) ) { in bufferLEByte()
1789 (short)(dyn_cast<ConstantInt>(CPV))->getZExtValue(); in bufferLEByte()
1792 } else if ( ETy == Type::getInt32Ty(CPV->getContext()) ) { in bufferLEByte()
1793 if (ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) { in bufferLEByte()
1798 } else if (ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1815 } else if (ETy == Type::getInt64Ty(CPV->getContext()) ) { in bufferLEByte()
1816 if (ConstantInt *constInt = dyn_cast<ConstantInt>(CPV)) { in bufferLEByte()
1821 } else if (ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1843 ConstantFP *CFP = dyn_cast<ConstantFP>(CPV); in bufferLEByte()
1845 if (Ty == Type::getFloatTy(CPV->getContext())) { in bufferLEByte()
1849 } else if (Ty == Type::getDoubleTy(CPV->getContext())) { in bufferLEByte()
1860 if (GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) { in bufferLEByte()
1863 else if (ConstantExpr *Cexpr = dyn_cast<ConstantExpr>(CPV)) { in bufferLEByte()
1867 unsigned int s = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1875 if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) || in bufferLEByte()
1876 isa<ConstantStruct>(CPV)) { in bufferLEByte()
1877 int ElementSize = TD->getTypeAllocSize(CPV->getType()); in bufferLEByte()
1878 bufferAggregateConstant(CPV, aggBuffer); in bufferLEByte()
1882 else if (isa<ConstantAggregateZero>(CPV)) in bufferLEByte()
1894 void NVPTXAsmPrinter::bufferAggregateConstant(Constant *CPV, in bufferAggregateConstant() argument
1900 if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV)) { in bufferAggregateConstant()
1901 if (CPV->getNumOperands()) in bufferAggregateConstant()
1902 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) in bufferAggregateConstant()
1903 bufferLEByte(cast<Constant>(CPV->getOperand(i)), 0, aggBuffer); in bufferAggregateConstant()
1908 dyn_cast<ConstantDataSequential>(CPV)) { in bufferAggregateConstant()
1917 if (isa<ConstantStruct>(CPV)) { in bufferAggregateConstant()
1918 if (CPV->getNumOperands()) { in bufferAggregateConstant()
1919 StructType *ST = cast<StructType>(CPV->getType()); in bufferAggregateConstant()
1920 for (unsigned i = 0, e = CPV->getNumOperands(); i != e; ++i) { in bufferAggregateConstant()
1928 bufferLEByte(cast<Constant>(CPV->getOperand(i)), Bytes, in bufferAggregateConstant()