Lines Matching refs:Record

145 static bool convertToString(ArrayRef<uint64_t> Record, unsigned Idx,  in convertToString()  argument
147 if (Idx > Record.size()) in convertToString()
150 for (unsigned i = Idx, e = Record.size(); i != e; ++i) in convertToString()
151 Result += (char)Record[i]; in convertToString()
172 SmallVector<uint64_t, 64> Record; in readIdentificationBlock() local
185 case BitstreamEntry::Record: in readIdentificationBlock()
191 Record.clear(); in readIdentificationBlock()
192 unsigned BitCode = Stream.readRecord(Entry.ID, Record); in readIdentificationBlock()
197 convertToString(Record, 0, ProducerIdentification); in readIdentificationBlock()
200 unsigned epoch = (unsigned)Record[0]; in readIdentificationBlock()
232 case BitstreamEntry::Record: in readIdentificationCode()
243 SmallVector<uint64_t, 64> Record; in hasObjCCategoryInModule() local
255 case BitstreamEntry::Record: in hasObjCCategoryInModule()
261 switch (Stream.readRecord(Entry.ID, Record)) { in hasObjCCategoryInModule()
266 if (convertToString(Record, 0, S)) in hasObjCCategoryInModule()
275 Record.clear(); in hasObjCCategoryInModule()
301 case BitstreamEntry::Record: in hasObjCCategory()
312 SmallVector<uint64_t, 64> Record; in readModuleTriple() local
326 case BitstreamEntry::Record: in readModuleTriple()
332 switch (Stream.readRecord(Entry.ID, Record)) { in readModuleTriple()
336 if (convertToString(Record, 0, S)) in readModuleTriple()
342 Record.clear(); in readModuleTriple()
368 case BitstreamEntry::Record: in readTriple()
392 Expected<unsigned> parseVersionRecord(ArrayRef<uint64_t> Record);
398 readNameFromStrtab(ArrayRef<uint64_t> Record);
419 BitcodeReaderBase::parseVersionRecord(ArrayRef<uint64_t> Record) { in parseVersionRecord() argument
420 if (Record.empty()) in parseVersionRecord()
422 unsigned ModuleVersion = Record[0]; in parseVersionRecord()
430 BitcodeReaderBase::readNameFromStrtab(ArrayRef<uint64_t> Record) { in readNameFromStrtab() argument
432 return {"", Record}; in readNameFromStrtab()
434 if (Record[0] + Record[1] > Strtab.size()) in readNameFromStrtab()
436 return {StringRef(Strtab.data() + Record[0], Record[1]), Record.slice(2)}; in readNameFromStrtab()
579 bool getValueTypePair(SmallVectorImpl<uint64_t> &Record, unsigned &Slot, in getValueTypePair() argument
581 if (Slot == Record.size()) return true; in getValueTypePair()
582 unsigned ValNo = (unsigned)Record[Slot++]; in getValueTypePair()
592 if (Slot == Record.size()) in getValueTypePair()
595 unsigned TypeNo = (unsigned)Record[Slot++]; in getValueTypePair()
603 bool popValue(SmallVectorImpl<uint64_t> &Record, unsigned &Slot, in popValue() argument
605 if (getValue(Record, Slot, InstNum, Ty, ResVal)) in popValue()
613 bool getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot, in getValue() argument
615 ResVal = getValue(Record, Slot, InstNum, Ty); in getValue()
621 Value *getValue(SmallVectorImpl<uint64_t> &Record, unsigned Slot, in getValue() argument
623 if (Slot == Record.size()) return nullptr; in getValue()
624 unsigned ValNo = (unsigned)Record[Slot]; in getValue()
632 Value *getValueSigned(SmallVectorImpl<uint64_t> &Record, unsigned Slot, in getValueSigned() argument
634 if (Slot == Record.size()) return nullptr; in getValueSigned()
635 unsigned ValNo = (unsigned)decodeSignRotatedValue(Record[Slot]); in getValueSigned()
649 Error parseComdatRecord(ArrayRef<uint64_t> Record);
650 Error parseGlobalVarRecord(ArrayRef<uint64_t> Record);
651 Error parseFunctionRecord(ArrayRef<uint64_t> Record);
653 ArrayRef<uint64_t> Record);
662 Expected<Value *> recordValue(SmallVectorImpl<uint64_t> &Record,
665 ArrayRef<uint64_t> Record);
744 std::vector<ValueInfo> makeRefList(ArrayRef<uint64_t> Record);
745 std::vector<FunctionSummary::EdgeTy> makeCallList(ArrayRef<uint64_t> Record,
1254 SmallVector<uint64_t, 64> Record; in parseAttributeBlock() local
1268 case BitstreamEntry::Record: in parseAttributeBlock()
1274 Record.clear(); in parseAttributeBlock()
1275 switch (Stream.readRecord(Entry.ID, Record)) { in parseAttributeBlock()
1280 if (Record.size() & 1) in parseAttributeBlock()
1283 for (unsigned i = 0, e = Record.size(); i != e; i += 2) { in parseAttributeBlock()
1285 decodeLLVMAttributesForBitcode(B, Record[i+1]); in parseAttributeBlock()
1286 Attrs.push_back(AttributeList::get(Context, Record[i], B)); in parseAttributeBlock()
1293 for (unsigned i = 0, e = Record.size(); i != e; ++i) in parseAttributeBlock()
1294 Attrs.push_back(MAttributeGroups[Record[i]]); in parseAttributeBlock()
1453 SmallVector<uint64_t, 64> Record; in parseAttributeGroupBlock() local
1465 case BitstreamEntry::Record: in parseAttributeGroupBlock()
1471 Record.clear(); in parseAttributeGroupBlock()
1472 switch (Stream.readRecord(Entry.ID, Record)) { in parseAttributeGroupBlock()
1476 if (Record.size() < 3) in parseAttributeGroupBlock()
1479 uint64_t GrpID = Record[0]; in parseAttributeGroupBlock()
1480 uint64_t Idx = Record[1]; // Index of the object this attribute refers to. in parseAttributeGroupBlock()
1483 for (unsigned i = 2, e = Record.size(); i != e; ++i) { in parseAttributeGroupBlock()
1484 if (Record[i] == 0) { // Enum attribute in parseAttributeGroupBlock()
1486 if (Error Err = parseAttrKind(Record[++i], &Kind)) in parseAttributeGroupBlock()
1490 } else if (Record[i] == 1) { // Integer attribute in parseAttributeGroupBlock()
1492 if (Error Err = parseAttrKind(Record[++i], &Kind)) in parseAttributeGroupBlock()
1495 B.addAlignmentAttr(Record[++i]); in parseAttributeGroupBlock()
1497 B.addStackAlignmentAttr(Record[++i]); in parseAttributeGroupBlock()
1499 B.addDereferenceableAttr(Record[++i]); in parseAttributeGroupBlock()
1501 B.addDereferenceableOrNullAttr(Record[++i]); in parseAttributeGroupBlock()
1503 B.addAllocSizeAttrFromRawRepr(Record[++i]); in parseAttributeGroupBlock()
1505 assert((Record[i] == 3 || Record[i] == 4) && in parseAttributeGroupBlock()
1507 bool HasValue = (Record[i++] == 4); in parseAttributeGroupBlock()
1511 while (Record[i] != 0 && i != e) in parseAttributeGroupBlock()
1512 KindStr += Record[i++]; in parseAttributeGroupBlock()
1513 assert(Record[i] == 0 && "Kind string not null terminated"); in parseAttributeGroupBlock()
1518 while (Record[i] != 0 && i != e) in parseAttributeGroupBlock()
1519 ValStr += Record[i++]; in parseAttributeGroupBlock()
1520 assert(Record[i] == 0 && "Value string not null terminated"); in parseAttributeGroupBlock()
1545 SmallVector<uint64_t, 64> Record; in parseTypeTableBody() local
1562 case BitstreamEntry::Record: in parseTypeTableBody()
1568 Record.clear(); in parseTypeTableBody()
1570 switch (Stream.readRecord(Entry.ID, Record)) { in parseTypeTableBody()
1576 if (Record.size() < 1) in parseTypeTableBody()
1578 TypeList.resize(Record[0]); in parseTypeTableBody()
1614 if (Record.size() < 1) in parseTypeTableBody()
1617 uint64_t NumBits = Record[0]; in parseTypeTableBody()
1626 if (Record.size() < 1) in parseTypeTableBody()
1629 if (Record.size() == 2) in parseTypeTableBody()
1630 AddressSpace = Record[1]; in parseTypeTableBody()
1631 ResultTy = getTypeByID(Record[0]); in parseTypeTableBody()
1641 if (Record.size() < 3) in parseTypeTableBody()
1644 for (unsigned i = 3, e = Record.size(); i != e; ++i) { in parseTypeTableBody()
1645 if (Type *T = getTypeByID(Record[i])) in parseTypeTableBody()
1651 ResultTy = getTypeByID(Record[2]); in parseTypeTableBody()
1652 if (!ResultTy || ArgTys.size() < Record.size()-3) in parseTypeTableBody()
1655 ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); in parseTypeTableBody()
1660 if (Record.size() < 2) in parseTypeTableBody()
1663 for (unsigned i = 2, e = Record.size(); i != e; ++i) { in parseTypeTableBody()
1664 if (Type *T = getTypeByID(Record[i])) { in parseTypeTableBody()
1673 ResultTy = getTypeByID(Record[1]); in parseTypeTableBody()
1674 if (!ResultTy || ArgTys.size() < Record.size()-2) in parseTypeTableBody()
1677 ResultTy = FunctionType::get(ResultTy, ArgTys, Record[0]); in parseTypeTableBody()
1681 if (Record.size() < 1) in parseTypeTableBody()
1684 for (unsigned i = 1, e = Record.size(); i != e; ++i) { in parseTypeTableBody()
1685 if (Type *T = getTypeByID(Record[i])) in parseTypeTableBody()
1690 if (EltTys.size() != Record.size()-1) in parseTypeTableBody()
1692 ResultTy = StructType::get(Context, EltTys, Record[0]); in parseTypeTableBody()
1696 if (convertToString(Record, 0, TypeName)) in parseTypeTableBody()
1701 if (Record.size() < 1) in parseTypeTableBody()
1717 for (unsigned i = 1, e = Record.size(); i != e; ++i) { in parseTypeTableBody()
1718 if (Type *T = getTypeByID(Record[i])) in parseTypeTableBody()
1723 if (EltTys.size() != Record.size()-1) in parseTypeTableBody()
1725 Res->setBody(EltTys, Record[0]); in parseTypeTableBody()
1730 if (Record.size() != 1) in parseTypeTableBody()
1748 if (Record.size() < 2) in parseTypeTableBody()
1750 ResultTy = getTypeByID(Record[1]); in parseTypeTableBody()
1753 ResultTy = ArrayType::get(ResultTy, Record[0]); in parseTypeTableBody()
1756 if (Record.size() < 2) in parseTypeTableBody()
1758 if (Record[0] == 0) in parseTypeTableBody()
1760 ResultTy = getTypeByID(Record[1]); in parseTypeTableBody()
1763 ResultTy = VectorType::get(ResultTy, Record[0]); in parseTypeTableBody()
1784 SmallVector<uint64_t, 64> Record; in parseOperandBundleTags() local
1795 case BitstreamEntry::Record: in parseOperandBundleTags()
1802 if (Stream.readRecord(Entry.ID, Record) != bitc::OPERAND_BUNDLE_TAG) in parseOperandBundleTags()
1807 if (convertToString(Record, 0, BundleTags.back())) in parseOperandBundleTags()
1809 Record.clear(); in parseOperandBundleTags()
1820 SmallVector<uint64_t, 64> Record; in parseSyncScopeNames() local
1831 case BitstreamEntry::Record: in parseSyncScopeNames()
1839 if (Stream.readRecord(Entry.ID, Record) != bitc::SYNC_SCOPE_NAME) in parseSyncScopeNames()
1843 if (convertToString(Record, 0, SSN)) in parseSyncScopeNames()
1847 Record.clear(); in parseSyncScopeNames()
1852 Expected<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record, in recordValue() argument
1855 if (convertToString(Record, NameIndex, ValueName)) in recordValue()
1857 unsigned ValueID = Record[0]; in recordValue()
1901 ArrayRef<uint64_t> Record) { in setDeferredFunctionInfo() argument
1905 uint64_t FuncWordOffset = Record[1] - 1; in setDeferredFunctionInfo()
1923 SmallVector<uint64_t, 64> Record; in parseGlobalValueSymbolTable() local
1933 case BitstreamEntry::Record: in parseGlobalValueSymbolTable()
1937 Record.clear(); in parseGlobalValueSymbolTable()
1938 switch (Stream.readRecord(Entry.ID, Record)) { in parseGlobalValueSymbolTable()
1941 cast<Function>(ValueList[Record[0]]), Record); in parseGlobalValueSymbolTable()
1984 SmallVector<uint64_t, 64> Record; in parseValueSymbolTable() local
2002 case BitstreamEntry::Record: in parseValueSymbolTable()
2008 Record.clear(); in parseValueSymbolTable()
2009 switch (Stream.readRecord(Entry.ID, Record)) { in parseValueSymbolTable()
2013 Expected<Value *> ValOrErr = recordValue(Record, 1, TT); in parseValueSymbolTable()
2021 Expected<Value *> ValOrErr = recordValue(Record, 2, TT); in parseValueSymbolTable()
2029 setDeferredFunctionInfo(FuncBitcodeOffsetDelta, F, Record); in parseValueSymbolTable()
2033 if (convertToString(Record, 1, ValueName)) in parseValueSymbolTable()
2035 BasicBlock *BB = getBasicBlock(Record[0]); in parseValueSymbolTable()
2157 SmallVector<uint64_t, 64> Record; in parseConstants() local
2178 case BitstreamEntry::Record: in parseConstants()
2184 Record.clear(); in parseConstants()
2187 unsigned BitCode = Stream.readRecord(Entry.ID, Record); in parseConstants()
2194 if (Record.empty()) in parseConstants()
2196 if (Record[0] >= TypeList.size() || !TypeList[Record[0]]) in parseConstants()
2198 if (TypeList[Record[0]] == VoidType) in parseConstants()
2200 CurTy = TypeList[Record[0]]; in parseConstants()
2206 if (!CurTy->isIntegerTy() || Record.empty()) in parseConstants()
2208 V = ConstantInt::get(CurTy, decodeSignRotatedValue(Record[0])); in parseConstants()
2211 if (!CurTy->isIntegerTy() || Record.empty()) in parseConstants()
2215 readWideAPInt(Record, cast<IntegerType>(CurTy)->getBitWidth()); in parseConstants()
2221 if (Record.empty()) in parseConstants()
2225 APInt(16, (uint16_t)Record[0]))); in parseConstants()
2228 APInt(32, (uint32_t)Record[0]))); in parseConstants()
2231 APInt(64, Record[0]))); in parseConstants()
2235 Rearrange[0] = (Record[1] & 0xffffLL) | (Record[0] << 16); in parseConstants()
2236 Rearrange[1] = Record[0] >> 48; in parseConstants()
2241 APInt(128, Record))); in parseConstants()
2244 APInt(128, Record))); in parseConstants()
2251 if (Record.empty()) in parseConstants()
2254 unsigned Size = Record.size(); in parseConstants()
2259 Elts.push_back(ValueList.getConstantFwdRef(Record[i], in parseConstants()
2265 Elts.push_back(ValueList.getConstantFwdRef(Record[i], EltTy)); in parseConstants()
2270 Elts.push_back(ValueList.getConstantFwdRef(Record[i], EltTy)); in parseConstants()
2279 if (Record.empty()) in parseConstants()
2282 SmallString<16> Elts(Record.begin(), Record.end()); in parseConstants()
2288 if (Record.empty()) in parseConstants()
2293 SmallVector<uint8_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2299 SmallVector<uint16_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2305 SmallVector<uint32_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2311 SmallVector<uint64_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2317 SmallVector<uint16_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2323 SmallVector<uint32_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2329 SmallVector<uint64_t, 16> Elts(Record.begin(), Record.end()); in parseConstants()
2340 if (Record.size() < 2) in parseConstants()
2342 int Opc = getDecodedUnaryOpcode(Record[0], CurTy); in parseConstants()
2346 Constant *LHS = ValueList.getConstantFwdRef(Record[1], CurTy); in parseConstants()
2353 if (Record.size() < 3) in parseConstants()
2355 int Opc = getDecodedBinaryOpcode(Record[0], CurTy); in parseConstants()
2359 Constant *LHS = ValueList.getConstantFwdRef(Record[1], CurTy); in parseConstants()
2360 Constant *RHS = ValueList.getConstantFwdRef(Record[2], CurTy); in parseConstants()
2362 if (Record.size() >= 4) { in parseConstants()
2367 if (Record[3] & (1 << bitc::OBO_NO_SIGNED_WRAP)) in parseConstants()
2369 if (Record[3] & (1 << bitc::OBO_NO_UNSIGNED_WRAP)) in parseConstants()
2375 if (Record[3] & (1 << bitc::PEO_EXACT)) in parseConstants()
2384 if (Record.size() < 3) in parseConstants()
2386 int Opc = getDecodedCastOpcode(Record[0]); in parseConstants()
2390 Type *OpTy = getTypeByID(Record[1]); in parseConstants()
2393 Constant *Op = ValueList.getConstantFwdRef(Record[2], OpTy); in parseConstants()
2406 Record.size() % 2) in parseConstants()
2407 PointeeType = getTypeByID(Record[OpNum++]); in parseConstants()
2412 uint64_t Op = Record[OpNum++]; in parseConstants()
2419 while (OpNum != Record.size()) { in parseConstants()
2420 Type *ElTy = getTypeByID(Record[OpNum++]); in parseConstants()
2423 Elts.push_back(ValueList.getConstantFwdRef(Record[OpNum++], ElTy)); in parseConstants()
2442 if (Record.size() < 3) in parseConstants()
2450 if (Value *V = ValueList[Record[0]]) in parseConstants()
2454 V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0], in parseConstants()
2456 ValueList.getConstantFwdRef(Record[1],CurTy), in parseConstants()
2457 ValueList.getConstantFwdRef(Record[2],CurTy)); in parseConstants()
2462 if (Record.size() < 3) in parseConstants()
2465 dyn_cast_or_null<VectorType>(getTypeByID(Record[0])); in parseConstants()
2468 Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy); in parseConstants()
2470 if (Record.size() == 4) { in parseConstants()
2471 Type *IdxTy = getTypeByID(Record[2]); in parseConstants()
2474 Op1 = ValueList.getConstantFwdRef(Record[3], IdxTy); in parseConstants()
2476 Op1 = ValueList.getConstantFwdRef(Record[2], Type::getInt32Ty(Context)); in parseConstants()
2485 if (Record.size() < 3 || !OpTy) in parseConstants()
2487 Constant *Op0 = ValueList.getConstantFwdRef(Record[0], OpTy); in parseConstants()
2488 Constant *Op1 = ValueList.getConstantFwdRef(Record[1], in parseConstants()
2491 if (Record.size() == 4) { in parseConstants()
2492 Type *IdxTy = getTypeByID(Record[2]); in parseConstants()
2495 Op2 = ValueList.getConstantFwdRef(Record[3], IdxTy); in parseConstants()
2497 Op2 = ValueList.getConstantFwdRef(Record[2], Type::getInt32Ty(Context)); in parseConstants()
2505 if (Record.size() < 3 || !OpTy) in parseConstants()
2507 Constant *Op0 = ValueList.getConstantFwdRef(Record[0], OpTy); in parseConstants()
2508 Constant *Op1 = ValueList.getConstantFwdRef(Record[1], OpTy); in parseConstants()
2511 Constant *Op2 = ValueList.getConstantFwdRef(Record[2], ShufTy); in parseConstants()
2518 dyn_cast_or_null<VectorType>(getTypeByID(Record[0])); in parseConstants()
2519 if (Record.size() < 4 || !RTy || !OpTy) in parseConstants()
2521 Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy); in parseConstants()
2522 Constant *Op1 = ValueList.getConstantFwdRef(Record[2], OpTy); in parseConstants()
2525 Constant *Op2 = ValueList.getConstantFwdRef(Record[3], ShufTy); in parseConstants()
2530 if (Record.size() < 4) in parseConstants()
2532 Type *OpTy = getTypeByID(Record[0]); in parseConstants()
2535 Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy); in parseConstants()
2536 Constant *Op1 = ValueList.getConstantFwdRef(Record[2], OpTy); in parseConstants()
2539 V = ConstantExpr::getFCmp(Record[3], Op0, Op1); in parseConstants()
2541 V = ConstantExpr::getICmp(Record[3], Op0, Op1); in parseConstants()
2547 if (Record.size() < 2) in parseConstants()
2550 bool HasSideEffects = Record[0] & 1; in parseConstants()
2551 bool IsAlignStack = Record[0] >> 1; in parseConstants()
2552 unsigned AsmStrSize = Record[1]; in parseConstants()
2553 if (2+AsmStrSize >= Record.size()) in parseConstants()
2555 unsigned ConstStrSize = Record[2+AsmStrSize]; in parseConstants()
2556 if (3+AsmStrSize+ConstStrSize > Record.size()) in parseConstants()
2560 AsmStr += (char)Record[2+i]; in parseConstants()
2562 ConstrStr += (char)Record[3+AsmStrSize+i]; in parseConstants()
2572 if (Record.size() < 2) in parseConstants()
2575 bool HasSideEffects = Record[0] & 1; in parseConstants()
2576 bool IsAlignStack = (Record[0] >> 1) & 1; in parseConstants()
2577 unsigned AsmDialect = Record[0] >> 2; in parseConstants()
2578 unsigned AsmStrSize = Record[1]; in parseConstants()
2579 if (2+AsmStrSize >= Record.size()) in parseConstants()
2581 unsigned ConstStrSize = Record[2+AsmStrSize]; in parseConstants()
2582 if (3+AsmStrSize+ConstStrSize > Record.size()) in parseConstants()
2586 AsmStr += (char)Record[2+i]; in parseConstants()
2588 ConstrStr += (char)Record[3+AsmStrSize+i]; in parseConstants()
2597 if (Record.size() < 3) in parseConstants()
2599 Type *FnTy = getTypeByID(Record[0]); in parseConstants()
2603 dyn_cast_or_null<Function>(ValueList.getConstantFwdRef(Record[1],FnTy)); in parseConstants()
2610 unsigned BBID = Record[2]; in parseConstants()
2649 SmallVector<uint64_t, 64> Record; in parseUseLists() local
2660 case BitstreamEntry::Record: in parseUseLists()
2666 Record.clear(); in parseUseLists()
2668 switch (Stream.readRecord(Entry.ID, Record)) { in parseUseLists()
2675 unsigned RecordLength = Record.size(); in parseUseLists()
2679 unsigned ID = Record.back(); in parseUseLists()
2680 Record.pop_back(); in parseUseLists()
2691 if (++NumUses > Record.size()) in parseUseLists()
2693 Order[&U] = Record[NumUses - 1]; in parseUseLists()
2695 if (Order.size() != Record.size() || NumUses > Record.size()) in parseUseLists()
2817 SmallVector<uint64_t, 64> Record; in rememberAndSkipFunctionBodies() local
2846 Error BitcodeReader::parseComdatRecord(ArrayRef<uint64_t> Record) { in parseComdatRecord() argument
2850 std::tie(Name, Record) = readNameFromStrtab(Record); in parseComdatRecord()
2852 if (Record.empty()) in parseComdatRecord()
2854 Comdat::SelectionKind SK = getDecodedComdatSelectionKind(Record[0]); in parseComdatRecord()
2857 if (Record.size() < 2) in parseComdatRecord()
2859 unsigned ComdatNameSize = Record[1]; in parseComdatRecord()
2862 OldFormatName += (char)Record[2 + i]; in parseComdatRecord()
2878 Error BitcodeReader::parseGlobalVarRecord(ArrayRef<uint64_t> Record) { in parseGlobalVarRecord() argument
2884 std::tie(Name, Record) = readNameFromStrtab(Record); in parseGlobalVarRecord()
2886 if (Record.size() < 6) in parseGlobalVarRecord()
2888 Type *Ty = getTypeByID(Record[0]); in parseGlobalVarRecord()
2891 bool isConstant = Record[1] & 1; in parseGlobalVarRecord()
2892 bool explicitType = Record[1] & 2; in parseGlobalVarRecord()
2895 AddressSpace = Record[1] >> 2; in parseGlobalVarRecord()
2903 uint64_t RawLinkage = Record[3]; in parseGlobalVarRecord()
2906 if (Error Err = parseAlignmentValue(Record[4], Alignment)) in parseGlobalVarRecord()
2909 if (Record[5]) { in parseGlobalVarRecord()
2910 if (Record[5] - 1 >= SectionTable.size()) in parseGlobalVarRecord()
2912 Section = SectionTable[Record[5] - 1]; in parseGlobalVarRecord()
2916 if (Record.size() > 6 && !GlobalValue::isLocalLinkage(Linkage)) in parseGlobalVarRecord()
2918 Visibility = getDecodedVisibility(Record[6]); in parseGlobalVarRecord()
2921 if (Record.size() > 7) in parseGlobalVarRecord()
2922 TLM = getDecodedThreadLocalMode(Record[7]); in parseGlobalVarRecord()
2925 if (Record.size() > 8) in parseGlobalVarRecord()
2926 UnnamedAddr = getDecodedUnnamedAddrType(Record[8]); in parseGlobalVarRecord()
2929 if (Record.size() > 9) in parseGlobalVarRecord()
2930 ExternallyInitialized = Record[9]; in parseGlobalVarRecord()
2941 if (Record.size() > 10) in parseGlobalVarRecord()
2942 NewGV->setDLLStorageClass(getDecodedDLLStorageClass(Record[10])); in parseGlobalVarRecord()
2949 if (unsigned InitID = Record[2]) in parseGlobalVarRecord()
2952 if (Record.size() > 11) { in parseGlobalVarRecord()
2953 if (unsigned ComdatID = Record[11]) { in parseGlobalVarRecord()
2962 if (Record.size() > 12) { in parseGlobalVarRecord()
2963 auto AS = getAttributes(Record[12]).getFnAttributes(); in parseGlobalVarRecord()
2967 if (Record.size() > 13) { in parseGlobalVarRecord()
2968 NewGV->setDSOLocal(getDecodedDSOLocal(Record[13])); in parseGlobalVarRecord()
2975 Error BitcodeReader::parseFunctionRecord(ArrayRef<uint64_t> Record) { in parseFunctionRecord() argument
2981 std::tie(Name, Record) = readNameFromStrtab(Record); in parseFunctionRecord()
2983 if (Record.size() < 8) in parseFunctionRecord()
2985 Type *Ty = getTypeByID(Record[0]); in parseFunctionRecord()
2993 auto CC = static_cast<CallingConv::ID>(Record[1]); in parseFunctionRecord()
2998 if (Record.size() > 16) in parseFunctionRecord()
2999 AddrSpace = Record[16]; in parseFunctionRecord()
3005 bool isProto = Record[2]; in parseFunctionRecord()
3006 uint64_t RawLinkage = Record[3]; in parseFunctionRecord()
3008 Func->setAttributes(getAttributes(Record[4])); in parseFunctionRecord()
3011 if (Error Err = parseAlignmentValue(Record[5], Alignment)) in parseFunctionRecord()
3014 if (Record[6]) { in parseFunctionRecord()
3015 if (Record[6] - 1 >= SectionTable.size()) in parseFunctionRecord()
3017 Func->setSection(SectionTable[Record[6] - 1]); in parseFunctionRecord()
3022 Func->setVisibility(getDecodedVisibility(Record[7])); in parseFunctionRecord()
3023 if (Record.size() > 8 && Record[8]) { in parseFunctionRecord()
3024 if (Record[8] - 1 >= GCTable.size()) in parseFunctionRecord()
3026 Func->setGC(GCTable[Record[8] - 1]); in parseFunctionRecord()
3029 if (Record.size() > 9) in parseFunctionRecord()
3030 UnnamedAddr = getDecodedUnnamedAddrType(Record[9]); in parseFunctionRecord()
3032 if (Record.size() > 10 && Record[10] != 0) in parseFunctionRecord()
3033 FunctionPrologues.push_back(std::make_pair(Func, Record[10] - 1)); in parseFunctionRecord()
3035 if (Record.size() > 11) in parseFunctionRecord()
3036 Func->setDLLStorageClass(getDecodedDLLStorageClass(Record[11])); in parseFunctionRecord()
3040 if (Record.size() > 12) { in parseFunctionRecord()
3041 if (unsigned ComdatID = Record[12]) { in parseFunctionRecord()
3050 if (Record.size() > 13 && Record[13] != 0) in parseFunctionRecord()
3051 FunctionPrefixes.push_back(std::make_pair(Func, Record[13] - 1)); in parseFunctionRecord()
3053 if (Record.size() > 14 && Record[14] != 0) in parseFunctionRecord()
3054 FunctionPersonalityFns.push_back(std::make_pair(Func, Record[14] - 1)); in parseFunctionRecord()
3056 if (Record.size() > 15) { in parseFunctionRecord()
3057 Func->setDSOLocal(getDecodedDSOLocal(Record[15])); in parseFunctionRecord()
3074 unsigned BitCode, ArrayRef<uint64_t> Record) { in parseGlobalIndirectSymbolRecord() argument
3084 std::tie(Name, Record) = readNameFromStrtab(Record); in parseGlobalIndirectSymbolRecord()
3087 if (Record.size() < (3 + (unsigned)NewRecord)) in parseGlobalIndirectSymbolRecord()
3090 Type *Ty = getTypeByID(Record[OpNum++]); in parseGlobalIndirectSymbolRecord()
3102 AddrSpace = Record[OpNum++]; in parseGlobalIndirectSymbolRecord()
3105 auto Val = Record[OpNum++]; in parseGlobalIndirectSymbolRecord()
3106 auto Linkage = Record[OpNum++]; in parseGlobalIndirectSymbolRecord()
3117 if (OpNum != Record.size()) { in parseGlobalIndirectSymbolRecord()
3121 NewGA->setVisibility(getDecodedVisibility(Record[VisInd])); in parseGlobalIndirectSymbolRecord()
3125 if (OpNum != Record.size()) in parseGlobalIndirectSymbolRecord()
3126 NewGA->setDLLStorageClass(getDecodedDLLStorageClass(Record[OpNum++])); in parseGlobalIndirectSymbolRecord()
3129 if (OpNum != Record.size()) in parseGlobalIndirectSymbolRecord()
3130 NewGA->setThreadLocalMode(getDecodedThreadLocalMode(Record[OpNum++])); in parseGlobalIndirectSymbolRecord()
3131 if (OpNum != Record.size()) in parseGlobalIndirectSymbolRecord()
3132 NewGA->setUnnamedAddr(getDecodedUnnamedAddrType(Record[OpNum++])); in parseGlobalIndirectSymbolRecord()
3134 if (OpNum != Record.size()) in parseGlobalIndirectSymbolRecord()
3135 NewGA->setDSOLocal(getDecodedDSOLocal(Record[OpNum++])); in parseGlobalIndirectSymbolRecord()
3150 SmallVector<uint64_t, 64> Record; in parseModule() local
3291 case BitstreamEntry::Record: in parseModule()
3297 auto BitCode = Stream.readRecord(Entry.ID, Record); in parseModule()
3301 Expected<unsigned> VersionOrErr = parseVersionRecord(Record); in parseModule()
3309 if (convertToString(Record, 0, S)) in parseModule()
3316 if (convertToString(Record, 0, S)) in parseModule()
3323 if (convertToString(Record, 0, S)) in parseModule()
3331 if (convertToString(Record, 0, S)) in parseModule()
3338 if (convertToString(Record, 0, S)) in parseModule()
3345 if (convertToString(Record, 0, S)) in parseModule()
3351 if (Error Err = parseComdatRecord(Record)) in parseModule()
3355 if (Error Err = parseGlobalVarRecord(Record)) in parseModule()
3359 if (Error Err = parseFunctionRecord(Record)) in parseModule()
3365 if (Error Err = parseGlobalIndirectSymbolRecord(BitCode, Record)) in parseModule()
3370 if (Record.size() < 1) in parseModule()
3375 VSTOffset = Record[0] - 1; in parseModule()
3380 if (convertToString(Record, 0, ValueName)) in parseModule()
3385 Record.clear(); in parseModule()
3444 SmallVector<uint64_t, 64> Record; in parseFunctionBody() local
3487 case BitstreamEntry::Record: in parseFunctionBody()
3493 Record.clear(); in parseFunctionBody()
3495 unsigned BitCode = Stream.readRecord(Entry.ID, Record); in parseFunctionBody()
3500 if (Record.size() < 1 || Record[0] == 0) in parseFunctionBody()
3503 FunctionBBs.resize(Record[0]); in parseFunctionBody()
3547 if (!I || Record.size() < 4) in parseFunctionBody()
3550 unsigned Line = Record[0], Col = Record[1]; in parseFunctionBody()
3551 unsigned ScopeID = Record[2], IAID = Record[3]; in parseFunctionBody()
3552 bool isImplicitCode = Record.size() == 5 && Record[4]; in parseFunctionBody()
3575 if (getValueTypePair(Record, OpNum, NextValueNo, LHS) || in parseFunctionBody()
3576 OpNum+1 > Record.size()) in parseFunctionBody()
3579 int Opc = getDecodedUnaryOpcode(Record[OpNum++], LHS->getType()); in parseFunctionBody()
3584 if (OpNum < Record.size()) { in parseFunctionBody()
3586 FastMathFlags FMF = getDecodedFastMathFlags(Record[OpNum]); in parseFunctionBody()
3596 if (getValueTypePair(Record, OpNum, NextValueNo, LHS) || in parseFunctionBody()
3597 popValue(Record, OpNum, NextValueNo, LHS->getType(), RHS) || in parseFunctionBody()
3598 OpNum+1 > Record.size()) in parseFunctionBody()
3601 int Opc = getDecodedBinaryOpcode(Record[OpNum++], LHS->getType()); in parseFunctionBody()
3606 if (OpNum < Record.size()) { in parseFunctionBody()
3611 if (Record[OpNum] & (1 << bitc::OBO_NO_SIGNED_WRAP)) in parseFunctionBody()
3613 if (Record[OpNum] & (1 << bitc::OBO_NO_UNSIGNED_WRAP)) in parseFunctionBody()
3619 if (Record[OpNum] & (1 << bitc::PEO_EXACT)) in parseFunctionBody()
3622 FastMathFlags FMF = getDecodedFastMathFlags(Record[OpNum]); in parseFunctionBody()
3633 if (getValueTypePair(Record, OpNum, NextValueNo, Op) || in parseFunctionBody()
3634 OpNum+2 != Record.size()) in parseFunctionBody()
3637 Type *ResTy = getTypeByID(Record[OpNum]); in parseFunctionBody()
3638 int Opc = getDecodedCastOpcode(Record[OpNum + 1]); in parseFunctionBody()
3665 InBounds = Record[OpNum++]; in parseFunctionBody()
3666 Ty = getTypeByID(Record[OpNum++]); in parseFunctionBody()
3673 if (getValueTypePair(Record, OpNum, NextValueNo, BasePtr)) in parseFunctionBody()
3686 while (OpNum != Record.size()) { in parseFunctionBody()
3688 if (getValueTypePair(Record, OpNum, NextValueNo, Op)) in parseFunctionBody()
3705 if (getValueTypePair(Record, OpNum, NextValueNo, Agg)) in parseFunctionBody()
3708 unsigned RecSize = Record.size(); in parseFunctionBody()
3717 uint64_t Index = Record[OpNum]; in parseFunctionBody()
3744 if (getValueTypePair(Record, OpNum, NextValueNo, Agg)) in parseFunctionBody()
3747 if (getValueTypePair(Record, OpNum, NextValueNo, Val)) in parseFunctionBody()
3750 unsigned RecSize = Record.size(); in parseFunctionBody()
3759 uint64_t Index = Record[OpNum]; in parseFunctionBody()
3790 if (getValueTypePair(Record, OpNum, NextValueNo, TrueVal) || in parseFunctionBody()
3791 popValue(Record, OpNum, NextValueNo, TrueVal->getType(), FalseVal) || in parseFunctionBody()
3792 popValue(Record, OpNum, NextValueNo, Type::getInt1Ty(Context), Cond)) in parseFunctionBody()
3805 if (getValueTypePair(Record, OpNum, NextValueNo, TrueVal) || in parseFunctionBody()
3806 popValue(Record, OpNum, NextValueNo, TrueVal->getType(), FalseVal) || in parseFunctionBody()
3807 getValueTypePair(Record, OpNum, NextValueNo, Cond)) in parseFunctionBody()
3830 if (getValueTypePair(Record, OpNum, NextValueNo, Vec) || in parseFunctionBody()
3831 getValueTypePair(Record, OpNum, NextValueNo, Idx)) in parseFunctionBody()
3843 if (getValueTypePair(Record, OpNum, NextValueNo, Vec)) in parseFunctionBody()
3847 if (popValue(Record, OpNum, NextValueNo, in parseFunctionBody()
3849 getValueTypePair(Record, OpNum, NextValueNo, Idx)) in parseFunctionBody()
3859 if (getValueTypePair(Record, OpNum, NextValueNo, Vec1) || in parseFunctionBody()
3860 popValue(Record, OpNum, NextValueNo, Vec1->getType(), Vec2)) in parseFunctionBody()
3863 if (getValueTypePair(Record, OpNum, NextValueNo, Mask)) in parseFunctionBody()
3881 if (getValueTypePair(Record, OpNum, NextValueNo, LHS) || in parseFunctionBody()
3882 popValue(Record, OpNum, NextValueNo, LHS->getType(), RHS)) in parseFunctionBody()
3885 unsigned PredVal = Record[OpNum]; in parseFunctionBody()
3888 if (IsFP && Record.size() > OpNum+1) in parseFunctionBody()
3889 FMF = getDecodedFastMathFlags(Record[++OpNum]); in parseFunctionBody()
3891 if (OpNum+1 != Record.size()) in parseFunctionBody()
3907 unsigned Size = Record.size(); in parseFunctionBody()
3916 if (getValueTypePair(Record, OpNum, NextValueNo, Op)) in parseFunctionBody()
3918 if (OpNum != Record.size()) in parseFunctionBody()
3926 if (Record.size() != 1 && Record.size() != 3) in parseFunctionBody()
3928 BasicBlock *TrueDest = getBasicBlock(Record[0]); in parseFunctionBody()
3932 if (Record.size() == 1) { in parseFunctionBody()
3937 BasicBlock *FalseDest = getBasicBlock(Record[1]); in parseFunctionBody()
3938 Value *Cond = getValue(Record, 2, NextValueNo, in parseFunctionBody()
3948 if (Record.size() != 1 && Record.size() != 2) in parseFunctionBody()
3952 getValue(Record, Idx++, NextValueNo, Type::getTokenTy(Context)); in parseFunctionBody()
3956 if (Record.size() == 2) { in parseFunctionBody()
3957 UnwindDest = getBasicBlock(Record[Idx++]); in parseFunctionBody()
3967 if (Record.size() != 2) in parseFunctionBody()
3971 getValue(Record, Idx++, NextValueNo, Type::getTokenTy(Context)); in parseFunctionBody()
3974 BasicBlock *BB = getBasicBlock(Record[Idx++]); in parseFunctionBody()
3984 if (Record.size() < 2) in parseFunctionBody()
3990 getValue(Record, Idx++, NextValueNo, Type::getTokenTy(Context)); in parseFunctionBody()
3992 unsigned NumHandlers = Record[Idx++]; in parseFunctionBody()
3996 BasicBlock *BB = getBasicBlock(Record[Idx++]); in parseFunctionBody()
4003 if (Idx + 1 == Record.size()) { in parseFunctionBody()
4004 UnwindDest = getBasicBlock(Record[Idx++]); in parseFunctionBody()
4009 if (Record.size() != Idx) in parseFunctionBody()
4023 if (Record.size() < 2) in parseFunctionBody()
4029 getValue(Record, Idx++, NextValueNo, Type::getTokenTy(Context)); in parseFunctionBody()
4031 unsigned NumArgOperands = Record[Idx++]; in parseFunctionBody()
4036 if (getValueTypePair(Record, Idx, NextValueNo, Val)) in parseFunctionBody()
4041 if (Record.size() != Idx) in parseFunctionBody()
4053 if ((Record[0] >> 16) == SWITCH_INST_MAGIC) { in parseFunctionBody()
4059 Type *OpTy = getTypeByID(Record[1]); in parseFunctionBody()
4062 Value *Cond = getValue(Record, 2, NextValueNo, OpTy); in parseFunctionBody()
4063 BasicBlock *Default = getBasicBlock(Record[3]); in parseFunctionBody()
4067 unsigned NumCases = Record[4]; in parseFunctionBody()
4075 unsigned NumItems = Record[CurIdx++]; in parseFunctionBody()
4077 bool isSingleNumber = Record[CurIdx++]; in parseFunctionBody()
4082 ActiveWords = Record[CurIdx++]; in parseFunctionBody()
4083 Low = readWideAPInt(makeArrayRef(&Record[CurIdx], ActiveWords), in parseFunctionBody()
4090 ActiveWords = Record[CurIdx++]; in parseFunctionBody()
4092 makeArrayRef(&Record[CurIdx], ActiveWords), ValueBitWidth); in parseFunctionBody()
4104 BasicBlock *DestBB = getBasicBlock(Record[CurIdx++]); in parseFunctionBody()
4115 if (Record.size() < 3 || (Record.size() & 1) == 0) in parseFunctionBody()
4117 Type *OpTy = getTypeByID(Record[0]); in parseFunctionBody()
4118 Value *Cond = getValue(Record, 1, NextValueNo, OpTy); in parseFunctionBody()
4119 BasicBlock *Default = getBasicBlock(Record[2]); in parseFunctionBody()
4122 unsigned NumCases = (Record.size()-3)/2; in parseFunctionBody()
4127 dyn_cast_or_null<ConstantInt>(getFnValueByID(Record[3+i*2], OpTy)); in parseFunctionBody()
4128 BasicBlock *DestBB = getBasicBlock(Record[1+3+i*2]); in parseFunctionBody()
4139 if (Record.size() < 2) in parseFunctionBody()
4141 Type *OpTy = getTypeByID(Record[0]); in parseFunctionBody()
4142 Value *Address = getValue(Record, 1, NextValueNo, OpTy); in parseFunctionBody()
4145 unsigned NumDests = Record.size()-2; in parseFunctionBody()
4149 if (BasicBlock *DestBB = getBasicBlock(Record[2+i])) { in parseFunctionBody()
4162 if (Record.size() < 4) in parseFunctionBody()
4165 AttributeList PAL = getAttributes(Record[OpNum++]); in parseFunctionBody()
4166 unsigned CCInfo = Record[OpNum++]; in parseFunctionBody()
4167 BasicBlock *NormalBB = getBasicBlock(Record[OpNum++]); in parseFunctionBody()
4168 BasicBlock *UnwindBB = getBasicBlock(Record[OpNum++]); in parseFunctionBody()
4172 !(FTy = dyn_cast<FunctionType>(getTypeByID(Record[OpNum++])))) in parseFunctionBody()
4176 if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) in parseFunctionBody()
4189 if (Record.size() < FTy->getNumParams() + OpNum) in parseFunctionBody()
4194 Ops.push_back(getValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4201 if (Record.size() != OpNum) in parseFunctionBody()
4205 while (OpNum != Record.size()) { in parseFunctionBody()
4207 if (getValueTypePair(Record, OpNum, NextValueNo, Op)) in parseFunctionBody()
4224 if (getValueTypePair(Record, Idx, NextValueNo, Val)) in parseFunctionBody()
4235 if (Record.size() < 1 || ((Record.size()-1)&1)) in parseFunctionBody()
4237 Type *Ty = getTypeByID(Record[0]); in parseFunctionBody()
4241 PHINode *PN = PHINode::Create(Ty, (Record.size()-1)/2); in parseFunctionBody()
4244 for (unsigned i = 0, e = Record.size()-1; i != e; i += 2) { in parseFunctionBody()
4250 V = getValueSigned(Record, 1+i, NextValueNo, Ty); in parseFunctionBody()
4252 V = getValue(Record, 1+i, NextValueNo, Ty); in parseFunctionBody()
4253 BasicBlock *BB = getBasicBlock(Record[2+i]); in parseFunctionBody()
4267 if (Record.size() < 3) in parseFunctionBody()
4271 if (Record.size() < 4) in parseFunctionBody()
4274 Type *Ty = getTypeByID(Record[Idx++]); in parseFunctionBody()
4279 if (getValueTypePair(Record, Idx, NextValueNo, PersFn)) in parseFunctionBody()
4288 bool IsCleanup = !!Record[Idx++]; in parseFunctionBody()
4289 unsigned NumClauses = Record[Idx++]; in parseFunctionBody()
4294 LandingPadInst::ClauseType(Record[Idx++]); (void)CT; in parseFunctionBody()
4297 if (getValueTypePair(Record, Idx, NextValueNo, Val)) { in parseFunctionBody()
4317 if (Record.size() != 4) in parseFunctionBody()
4319 uint64_t AlignRecord = Record[3]; in parseFunctionBody()
4327 Type *Ty = getTypeByID(Record[0]); in parseFunctionBody()
4334 Type *OpTy = getTypeByID(Record[1]); in parseFunctionBody()
4335 Value *Size = getFnValueByID(Record[2], OpTy); in parseFunctionBody()
4357 if (getValueTypePair(Record, OpNum, NextValueNo, Op) || in parseFunctionBody()
4358 (OpNum + 2 != Record.size() && OpNum + 3 != Record.size())) in parseFunctionBody()
4362 if (OpNum + 3 == Record.size()) in parseFunctionBody()
4363 Ty = getTypeByID(Record[OpNum++]); in parseFunctionBody()
4370 if (Error Err = parseAlignmentValue(Record[OpNum], Align)) in parseFunctionBody()
4372 I = new LoadInst(Ty, Op, "", Record[OpNum + 1], Align); in parseFunctionBody()
4381 if (getValueTypePair(Record, OpNum, NextValueNo, Op) || in parseFunctionBody()
4382 (OpNum + 4 != Record.size() && OpNum + 5 != Record.size())) in parseFunctionBody()
4386 if (OpNum + 5 == Record.size()) in parseFunctionBody()
4387 Ty = getTypeByID(Record[OpNum++]); in parseFunctionBody()
4393 AtomicOrdering Ordering = getDecodedOrdering(Record[OpNum + 2]); in parseFunctionBody()
4398 if (Ordering != AtomicOrdering::NotAtomic && Record[OpNum] == 0) in parseFunctionBody()
4400 SyncScope::ID SSID = getDecodedSyncScopeID(Record[OpNum + 3]); in parseFunctionBody()
4403 if (Error Err = parseAlignmentValue(Record[OpNum], Align)) in parseFunctionBody()
4405 I = new LoadInst(Op, "", Record[OpNum+1], Align, Ordering, SSID); in parseFunctionBody()
4414 if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) || in parseFunctionBody()
4416 ? getValueTypePair(Record, OpNum, NextValueNo, Val) in parseFunctionBody()
4417 : popValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4420 OpNum + 2 != Record.size()) in parseFunctionBody()
4426 if (Error Err = parseAlignmentValue(Record[OpNum], Align)) in parseFunctionBody()
4428 I = new StoreInst(Val, Ptr, Record[OpNum+1], Align); in parseFunctionBody()
4437 if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) || in parseFunctionBody()
4440 ? getValueTypePair(Record, OpNum, NextValueNo, Val) in parseFunctionBody()
4441 : popValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4444 OpNum + 4 != Record.size()) in parseFunctionBody()
4449 AtomicOrdering Ordering = getDecodedOrdering(Record[OpNum + 2]); in parseFunctionBody()
4454 SyncScope::ID SSID = getDecodedSyncScopeID(Record[OpNum + 3]); in parseFunctionBody()
4455 if (Ordering != AtomicOrdering::NotAtomic && Record[OpNum] == 0) in parseFunctionBody()
4459 if (Error Err = parseAlignmentValue(Record[OpNum], Align)) in parseFunctionBody()
4461 I = new StoreInst(Val, Ptr, Record[OpNum+1], Align, Ordering, SSID); in parseFunctionBody()
4471 if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) || in parseFunctionBody()
4473 ? getValueTypePair(Record, OpNum, NextValueNo, Cmp) in parseFunctionBody()
4474 : popValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4477 popValue(Record, OpNum, NextValueNo, Cmp->getType(), New) || in parseFunctionBody()
4478 Record.size() < OpNum + 3 || Record.size() > OpNum + 5) in parseFunctionBody()
4480 AtomicOrdering SuccessOrdering = getDecodedOrdering(Record[OpNum + 1]); in parseFunctionBody()
4484 SyncScope::ID SSID = getDecodedSyncScopeID(Record[OpNum + 2]); in parseFunctionBody()
4489 if (Record.size() < 7) in parseFunctionBody()
4493 FailureOrdering = getDecodedOrdering(Record[OpNum + 3]); in parseFunctionBody()
4497 cast<AtomicCmpXchgInst>(I)->setVolatile(Record[OpNum]); in parseFunctionBody()
4499 if (Record.size() < 8) { in parseFunctionBody()
4506 cast<AtomicCmpXchgInst>(I)->setWeak(Record[OpNum+4]); in parseFunctionBody()
4516 if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) || in parseFunctionBody()
4518 popValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4520 OpNum+4 != Record.size()) in parseFunctionBody()
4522 AtomicRMWInst::BinOp Operation = getDecodedRMWOperation(Record[OpNum]); in parseFunctionBody()
4526 AtomicOrdering Ordering = getDecodedOrdering(Record[OpNum + 2]); in parseFunctionBody()
4530 SyncScope::ID SSID = getDecodedSyncScopeID(Record[OpNum + 3]); in parseFunctionBody()
4532 cast<AtomicRMWInst>(I)->setVolatile(Record[OpNum+1]); in parseFunctionBody()
4537 if (2 != Record.size()) in parseFunctionBody()
4539 AtomicOrdering Ordering = getDecodedOrdering(Record[0]); in parseFunctionBody()
4544 SyncScope::ID SSID = getDecodedSyncScopeID(Record[1]); in parseFunctionBody()
4551 if (Record.size() < 3) in parseFunctionBody()
4555 AttributeList PAL = getAttributes(Record[OpNum++]); in parseFunctionBody()
4556 unsigned CCInfo = Record[OpNum++]; in parseFunctionBody()
4560 FMF = getDecodedFastMathFlags(Record[OpNum++]); in parseFunctionBody()
4567 !(FTy = dyn_cast<FunctionType>(getTypeByID(Record[OpNum++])))) in parseFunctionBody()
4571 if (getValueTypePair(Record, OpNum, NextValueNo, Callee)) in parseFunctionBody()
4584 if (Record.size() < FTy->getNumParams() + OpNum) in parseFunctionBody()
4591 Args.push_back(getBasicBlock(Record[OpNum])); in parseFunctionBody()
4593 Args.push_back(getValue(Record, OpNum, NextValueNo, in parseFunctionBody()
4601 if (OpNum != Record.size()) in parseFunctionBody()
4604 while (OpNum != Record.size()) { in parseFunctionBody()
4606 if (getValueTypePair(Record, OpNum, NextValueNo, Op)) in parseFunctionBody()
4635 if (Record.size() < 3) in parseFunctionBody()
4637 Type *OpTy = getTypeByID(Record[0]); in parseFunctionBody()
4638 Value *Op = getValue(Record, 1, NextValueNo, OpTy); in parseFunctionBody()
4639 Type *ResTy = getTypeByID(Record[2]); in parseFunctionBody()
4652 if (Record.size() < 1 || Record[0] >= BundleTags.size()) in parseFunctionBody()
4658 while (OpNum != Record.size()) { in parseFunctionBody()
4660 if (getValueTypePair(Record, OpNum, NextValueNo, Op)) in parseFunctionBody()
4665 OperandBundles.emplace_back(BundleTags[Record[0]], std::move(Inputs)); in parseFunctionBody()
4941 SmallVector<uint64_t, 64> Record; in parseValueSymbolTable() local
4957 case BitstreamEntry::Record: in parseValueSymbolTable()
4963 Record.clear(); in parseValueSymbolTable()
4964 switch (Stream.readRecord(Entry.ID, Record)) { in parseValueSymbolTable()
4968 if (convertToString(Record, 1, ValueName)) in parseValueSymbolTable()
4970 unsigned ValueID = Record[0]; in parseValueSymbolTable()
4982 if (convertToString(Record, 2, ValueName)) in parseValueSymbolTable()
4984 unsigned ValueID = Record[0]; in parseValueSymbolTable()
4996 unsigned ValueID = Record[0]; in parseValueSymbolTable()
4997 GlobalValue::GUID RefGUID = Record[1]; in parseValueSymbolTable()
5015 SmallVector<uint64_t, 64> Record; in parseModule() local
5076 case BitstreamEntry::Record: { in parseModule()
5077 Record.clear(); in parseModule()
5078 auto BitCode = Stream.readRecord(Entry.ID, Record); in parseModule()
5083 if (Error Err = parseVersionRecord(Record).takeError()) in parseModule()
5090 if (convertToString(Record, 0, ValueName)) in parseModule()
5097 if (Record.size() != 5) in parseModule()
5098 return error("Invalid hash length " + Twine(Record.size()).str()); in parseModule()
5101 for (auto &Val : Record) { in parseModule()
5109 if (Record.size() < 1) in parseModule()
5114 VSTOffset = Record[0] - 1; in parseModule()
5125 std::tie(Name, GVRecord) = readNameFromStrtab(Record); in parseModule()
5146 ModuleSummaryIndexBitcodeReader::makeRefList(ArrayRef<uint64_t> Record) { in makeRefList() argument
5148 Ret.reserve(Record.size()); in makeRefList()
5149 for (uint64_t RefValueId : Record) in makeRefList()
5155 ModuleSummaryIndexBitcodeReader::makeCallList(ArrayRef<uint64_t> Record, in makeCallList() argument
5159 Ret.reserve(Record.size()); in makeCallList()
5160 for (unsigned I = 0, E = Record.size(); I != E; ++I) { in makeCallList()
5163 ValueInfo Callee = getValueInfoFromValueId(Record[I]).first; in makeCallList()
5169 Hotness = static_cast<CalleeInfo::HotnessType>(Record[++I]); in makeCallList()
5171 RelBF = Record[++I]; in makeCallList()
5178 parseWholeProgramDevirtResolutionByArg(ArrayRef<uint64_t> Record, size_t &Slot, in parseWholeProgramDevirtResolutionByArg() argument
5180 uint64_t ArgNum = Record[Slot++]; in parseWholeProgramDevirtResolutionByArg()
5182 Wpd.ResByArg[{Record.begin() + Slot, Record.begin() + Slot + ArgNum}]; in parseWholeProgramDevirtResolutionByArg()
5186 static_cast<WholeProgramDevirtResolution::ByArg::Kind>(Record[Slot++]); in parseWholeProgramDevirtResolutionByArg()
5187 B.Info = Record[Slot++]; in parseWholeProgramDevirtResolutionByArg()
5188 B.Byte = Record[Slot++]; in parseWholeProgramDevirtResolutionByArg()
5189 B.Bit = Record[Slot++]; in parseWholeProgramDevirtResolutionByArg()
5192 static void parseWholeProgramDevirtResolution(ArrayRef<uint64_t> Record, in parseWholeProgramDevirtResolution() argument
5195 uint64_t Id = Record[Slot++]; in parseWholeProgramDevirtResolution()
5198 Wpd.TheKind = static_cast<WholeProgramDevirtResolution::Kind>(Record[Slot++]); in parseWholeProgramDevirtResolution()
5199 Wpd.SingleImplName = {Strtab.data() + Record[Slot], in parseWholeProgramDevirtResolution()
5200 static_cast<size_t>(Record[Slot + 1])}; in parseWholeProgramDevirtResolution()
5203 uint64_t ResByArgNum = Record[Slot++]; in parseWholeProgramDevirtResolution()
5205 parseWholeProgramDevirtResolutionByArg(Record, Slot, Wpd); in parseWholeProgramDevirtResolution()
5208 static void parseTypeIdSummaryRecord(ArrayRef<uint64_t> Record, in parseTypeIdSummaryRecord() argument
5213 {Strtab.data() + Record[Slot], static_cast<size_t>(Record[Slot + 1])}); in parseTypeIdSummaryRecord()
5216 TypeId.TTRes.TheKind = static_cast<TypeTestResolution::Kind>(Record[Slot++]); in parseTypeIdSummaryRecord()
5217 TypeId.TTRes.SizeM1BitWidth = Record[Slot++]; in parseTypeIdSummaryRecord()
5218 TypeId.TTRes.AlignLog2 = Record[Slot++]; in parseTypeIdSummaryRecord()
5219 TypeId.TTRes.SizeM1 = Record[Slot++]; in parseTypeIdSummaryRecord()
5220 TypeId.TTRes.BitMask = Record[Slot++]; in parseTypeIdSummaryRecord()
5221 TypeId.TTRes.InlineBits = Record[Slot++]; in parseTypeIdSummaryRecord()
5223 while (Slot < Record.size()) in parseTypeIdSummaryRecord()
5224 parseWholeProgramDevirtResolution(Record, Strtab, Slot, TypeId); in parseTypeIdSummaryRecord()
5238 SmallVector<uint64_t, 64> Record; in parseEntireSummary() local
5243 if (Entry.Kind != BitstreamEntry::Record) in parseEntireSummary()
5245 if (Stream.readRecord(Entry.ID, Record) != bitc::FS_VERSION) in parseEntireSummary()
5248 const uint64_t Version = Record[0]; in parseEntireSummary()
5253 Record.clear(); in parseEntireSummary()
5278 case BitstreamEntry::Record: in parseEntireSummary()
5290 Record.clear(); in parseEntireSummary()
5291 auto BitCode = Stream.readRecord(Entry.ID, Record); in parseEntireSummary()
5296 uint64_t Flags = Record[0]; in parseEntireSummary()
5324 uint64_t ValueID = Record[0]; in parseEntireSummary()
5325 GlobalValue::GUID RefGUID = Record[1]; in parseEntireSummary()
5341 unsigned ValueID = Record[0]; in parseEntireSummary()
5342 uint64_t RawFlags = Record[1]; in parseEntireSummary()
5343 unsigned InstCount = Record[2]; in parseEntireSummary()
5345 unsigned NumRefs = Record[3]; in parseEntireSummary()
5349 RawFunFlags = Record[3]; in parseEntireSummary()
5350 NumRefs = Record[4]; in parseEntireSummary()
5353 NumImmutableRefs = Record[5]; in parseEntireSummary()
5365 assert(Record.size() >= RefListStartIndex + NumRefs && in parseEntireSummary()
5368 ArrayRef<uint64_t>(Record).slice(RefListStartIndex, NumRefs)); in parseEntireSummary()
5372 ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex), in parseEntireSummary()
5397 unsigned ValueID = Record[0]; in parseEntireSummary()
5398 uint64_t RawFlags = Record[1]; in parseEntireSummary()
5399 unsigned AliaseeID = Record[2]; in parseEntireSummary()
5425 unsigned ValueID = Record[0]; in parseEntireSummary()
5426 uint64_t RawFlags = Record[1]; in parseEntireSummary()
5431 GVF = getDecodedGVarFlags(Record[2]); in parseEntireSummary()
5435 makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart)); in parseEntireSummary()
5450 unsigned ValueID = Record[0]; in parseEntireSummary()
5451 uint64_t ModuleId = Record[1]; in parseEntireSummary()
5452 uint64_t RawFlags = Record[2]; in parseEntireSummary()
5453 unsigned InstCount = Record[3]; in parseEntireSummary()
5456 unsigned NumRefs = Record[4]; in parseEntireSummary()
5461 RawFunFlags = Record[4]; in parseEntireSummary()
5468 EntryCount = Record[5]; in parseEntireSummary()
5471 NumImmutableRefs = Record[RefListStartIndex - 1]; in parseEntireSummary()
5473 NumRefs = Record[NumRefsIndex]; in parseEntireSummary()
5478 assert(Record.size() >= RefListStartIndex + NumRefs && in parseEntireSummary()
5481 ArrayRef<uint64_t>(Record).slice(RefListStartIndex, NumRefs)); in parseEntireSummary()
5484 ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex), in parseEntireSummary()
5510 unsigned ValueID = Record[0]; in parseEntireSummary()
5511 uint64_t ModuleId = Record[1]; in parseEntireSummary()
5512 uint64_t RawFlags = Record[2]; in parseEntireSummary()
5513 unsigned AliaseeValueId = Record[3]; in parseEntireSummary()
5533 unsigned ValueID = Record[0]; in parseEntireSummary()
5534 uint64_t ModuleId = Record[1]; in parseEntireSummary()
5535 uint64_t RawFlags = Record[2]; in parseEntireSummary()
5540 GVF = getDecodedGVarFlags(Record[3]); in parseEntireSummary()
5544 makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart)); in parseEntireSummary()
5556 uint64_t OriginalName = Record[0]; in parseEntireSummary()
5568 PendingTypeTests.insert(PendingTypeTests.end(), Record.begin(), in parseEntireSummary()
5569 Record.end()); in parseEntireSummary()
5574 for (unsigned I = 0; I != Record.size(); I += 2) in parseEntireSummary()
5575 PendingTypeTestAssumeVCalls.push_back({Record[I], Record[I+1]}); in parseEntireSummary()
5580 for (unsigned I = 0; I != Record.size(); I += 2) in parseEntireSummary()
5581 PendingTypeCheckedLoadVCalls.push_back({Record[I], Record[I+1]}); in parseEntireSummary()
5586 {{Record[0], Record[1]}, {Record.begin() + 2, Record.end()}}); in parseEntireSummary()
5591 {{Record[0], Record[1]}, {Record.begin() + 2, Record.end()}}); in parseEntireSummary()
5596 for (unsigned I = 0; I != Record.size(); I += 2) in parseEntireSummary()
5598 {Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])}); in parseEntireSummary()
5604 for (unsigned I = 0; I != Record.size(); I += 2) in parseEntireSummary()
5606 {Strtab.data() + Record[I], static_cast<size_t>(Record[I + 1])}); in parseEntireSummary()
5611 parseTypeIdSummaryRecord(Record, Strtab, TheIndex); in parseEntireSummary()
5624 SmallVector<uint64_t, 64> Record; in parseModuleStringTable() local
5638 case BitstreamEntry::Record: in parseModuleStringTable()
5643 Record.clear(); in parseModuleStringTable()
5644 switch (Stream.readRecord(Entry.ID, Record)) { in parseModuleStringTable()
5649 uint64_t ModuleId = Record[0]; in parseModuleStringTable()
5651 if (convertToString(Record, 1, ModulePath)) in parseModuleStringTable()
5662 if (Record.size() != 5) in parseModuleStringTable()
5663 return error("Invalid hash length " + Twine(Record.size()).str()); in parseModuleStringTable()
5667 for (auto &Val : Record) { in parseModuleStringTable()
5728 case BitstreamEntry::Record: in readBlobInRecord()
5730 SmallVector<uint64_t, 1> Record; in readBlobInRecord() local
5731 if (Stream.readRecord(Entry.ID, Record, &Blob) == RecordID) in readBlobInRecord()
5841 case BitstreamEntry::Record: in getBitcodeFileContents()
5936 SmallVector<uint64_t, 64> Record; in getEnableSplitLTOUnitFlag() local
5949 case BitstreamEntry::Record: in getEnableSplitLTOUnitFlag()
5955 Record.clear(); in getEnableSplitLTOUnitFlag()
5956 auto BitCode = Stream.readRecord(Entry.ID, Record); in getEnableSplitLTOUnitFlag()
5961 uint64_t Flags = Record[0]; in getEnableSplitLTOUnitFlag()
6014 case BitstreamEntry::Record: in getLTOInfo()