Lines Matching refs:VE
159 static void WriteAttributeTable(const llvm_3_2::ValueEnumerator &VE, in WriteAttributeTable() argument
161 const std::vector<AttributeSet> &Attrs = VE.getAttributes(); in WriteAttributeTable()
183 static void WriteTypeTable(const llvm_3_2::ValueEnumerator &VE, in WriteTypeTable() argument
185 const llvm_3_2::ValueEnumerator::TypeList &TypeList = VE.getTypes(); in WriteTypeTable()
190 uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1); in WriteTypeTable()
273 TypeVals.push_back(VE.getTypeID(PTy->getElementType())); in WriteTypeTable()
284 TypeVals.push_back(VE.getTypeID(FT->getReturnType())); in WriteTypeTable()
286 TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); in WriteTypeTable()
297 TypeVals.push_back(VE.getTypeID(*I)); in WriteTypeTable()
322 TypeVals.push_back(VE.getTypeID(AT->getElementType())); in WriteTypeTable()
331 TypeVals.push_back(VE.getTypeID(VT->getElementType())); in WriteTypeTable()
395 const llvm_3_2::ValueEnumerator &VE, in WriteModuleInfo() argument
416 MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); in WriteModuleInfo()
484 Vals.push_back(VE.getTypeID(GV.getType())); in WriteModuleInfo()
487 (VE.getValueID(GV.getInitializer()) + 1)); in WriteModuleInfo()
511 Vals.push_back(VE.getTypeID(F.getType())); in WriteModuleInfo()
515 Vals.push_back(VE.getAttributeID(F.getAttributes())); in WriteModuleInfo()
530 Vals.push_back(VE.getTypeID(A.getType())); in WriteModuleInfo()
531 Vals.push_back(VE.getValueID(A.getAliasee())); in WriteModuleInfo()
571 const llvm_3_2::ValueEnumerator &VE, in WriteValueAsMetadata() argument
576 Record.push_back(VE.getTypeID(V->getType())); in WriteValueAsMetadata()
577 Record.push_back(VE.getValueID(V)); in WriteValueAsMetadata()
582 static void WriteMDTuple(const MDTuple *N, const llvm_3_2::ValueEnumerator &VE, in WriteMDTuple() argument
591 Record.push_back(VE.getTypeID(llvm::Type::getVoidTy(N->getContext()))); in WriteMDTuple()
594 Record.push_back(VE.getTypeID(MDC->getType())); in WriteMDTuple()
595 Record.push_back(VE.getValueID(MDC->getValue())); in WriteMDTuple()
597 Record.push_back(VE.getTypeID( in WriteMDTuple()
599 Record.push_back(VE.getMetadataID(MD)); in WriteMDTuple()
627 const llvm_3_2::ValueEnumerator &VE, in WriteModuleMetadata() argument
629 const auto &MDs = VE.getMDs(); in WriteModuleMetadata()
637 if (VE.hasMDString()) { in WriteModuleMetadata()
647 if (VE.hasDILocation()) { in WriteModuleMetadata()
684 Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ in WriteModuleMetadata()
690 WriteValueAsMetadata(MDC, VE, Stream, Record); in WriteModuleMetadata()
712 Record.push_back(VE.getMetadataID(N)); in WriteModuleMetadata()
721 const llvm_3_2::ValueEnumerator &VE, in WriteFunctionLocalMetadata() argument
726 VE.getFunctionLocalMDs(); in WriteFunctionLocalMetadata()
733 WriteValueAsMetadata(MDs[i], VE, Stream, Record); in WriteFunctionLocalMetadata()
741 const llvm_3_2::ValueEnumerator &VE, in WriteMetadataAttachment() argument
760 Record.push_back(VE.getInstructionID(&*I)); in WriteMetadataAttachment()
764 Record.push_back(VE.getMetadataID(MDs[i].second)); in WriteMetadataAttachment()
805 const llvm_3_2::ValueEnumerator &VE, in WriteConstants() argument
846 const llvm_3_2::ValueEnumerator::ValueList &Vals = VE.getValues(); in WriteConstants()
853 Record.push_back(VE.getTypeID(LastTy)); in WriteConstants()
967 Record.push_back(VE.getValueID(C->getOperand(i))); in WriteConstants()
975 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
976 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
982 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
983 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
994 Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); in WriteConstants()
995 Record.push_back(VE.getValueID(C->getOperand(i))); in WriteConstants()
1000 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1001 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1002 Record.push_back(VE.getValueID(C->getOperand(2))); in WriteConstants()
1006 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
1007 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1008 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1012 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1013 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1014 Record.push_back(VE.getValueID(C->getOperand(2))); in WriteConstants()
1025 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
1027 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1028 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1029 Record.push_back(VE.getValueID(C->getOperand(2))); in WriteConstants()
1034 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
1035 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1036 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1042 Record.push_back(VE.getTypeID(BA->getFunction()->getType())); in WriteConstants()
1043 Record.push_back(VE.getValueID(BA->getFunction())); in WriteConstants()
1044 Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); in WriteConstants()
1058 static void WriteModuleConstants(const llvm_3_2::ValueEnumerator &VE, in WriteModuleConstants() argument
1060 const llvm_3_2::ValueEnumerator::ValueList &Vals = VE.getValues(); in WriteModuleConstants()
1066 WriteConstants(i, Vals.size(), VE, Stream, true); in WriteModuleConstants()
1082 llvm_3_2::ValueEnumerator &VE) { in PushValueAndType() argument
1083 unsigned ValID = VE.getValueID(V); in PushValueAndType()
1086 Vals.push_back(VE.getTypeID(V->getType())); in PushValueAndType()
1094 llvm_3_2::ValueEnumerator &VE, in WriteInstruction() argument
1099 VE.setInstructionID(&I); in WriteInstruction()
1104 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1106 Vals.push_back(VE.getTypeID(I.getType())); in WriteInstruction()
1111 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1113 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1129 PushValueAndType(I.getOperand(i), InstID, Vals, VE); in WriteInstruction()
1133 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1141 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1142 PushValueAndType(I.getOperand(1), InstID, Vals, VE); in WriteInstruction()
1150 PushValueAndType(I.getOperand(1), InstID, Vals, VE); in WriteInstruction()
1151 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1152 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1156 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1157 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1161 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1162 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1163 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1167 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1168 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1169 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1175 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1176 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1187 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1191 PushValueAndType(I.getOperand(i), InstID, Vals, VE); in WriteInstruction()
1199 Vals.push_back(VE.getValueID(II.getSuccessor(0))); in WriteInstruction()
1201 Vals.push_back(VE.getValueID(II.getSuccessor(1))); in WriteInstruction()
1202 Vals.push_back(VE.getValueID(II.getCondition())); in WriteInstruction()
1210 Vals.push_back(VE.getTypeID(SI.getCondition()->getType())); in WriteInstruction()
1211 Vals.push_back(VE.getValueID(SI.getCondition())); in WriteInstruction()
1212 Vals.push_back(VE.getValueID(SI.getDefaultDest())); in WriteInstruction()
1215 Vals.push_back(VE.getValueID(i.getCaseValue())); in WriteInstruction()
1216 Vals.push_back(VE.getValueID(i.getCaseSuccessor())); in WriteInstruction()
1222 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); in WriteInstruction()
1224 Vals.push_back(VE.getValueID(I.getOperand(i))); in WriteInstruction()
1234 Vals.push_back(VE.getAttributeID(II->getAttributes())); in WriteInstruction()
1236 Vals.push_back(VE.getValueID(II->getNormalDest())); in WriteInstruction()
1237 Vals.push_back(VE.getValueID(II->getUnwindDest())); in WriteInstruction()
1238 PushValueAndType(Callee, InstID, Vals, VE); in WriteInstruction()
1242 Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. in WriteInstruction()
1248 PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg in WriteInstruction()
1254 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1264 Vals.push_back(VE.getTypeID(PN.getType())); in WriteInstruction()
1266 Vals.push_back(VE.getValueID(PN.getIncomingValue(i))); in WriteInstruction()
1267 Vals.push_back(VE.getValueID(PN.getIncomingBlock(i))); in WriteInstruction()
1275 Vals.push_back(VE.getTypeID(LP.getType())); in WriteInstruction()
1285 PushValueAndType(LP.getClause(I), InstID, Vals, VE); in WriteInstruction()
1292 Vals.push_back(VE.getTypeID(I.getType())); in WriteInstruction()
1293 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); in WriteInstruction()
1294 Vals.push_back(VE.getValueID(I.getOperand(0))); // size. in WriteInstruction()
1302 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1305 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) // ptr in WriteInstruction()
1320 PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr in WriteInstruction()
1321 Vals.push_back(VE.getValueID(I.getOperand(0))); // val. in WriteInstruction()
1331 PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr in WriteInstruction()
1332 Vals.push_back(VE.getValueID(I.getOperand(1))); // cmp. in WriteInstruction()
1333 Vals.push_back(VE.getValueID(I.getOperand(2))); // newval. in WriteInstruction()
1342 PushValueAndType(I.getOperand(0), InstID, Vals, VE); // ptrty + ptr in WriteInstruction()
1343 Vals.push_back(VE.getValueID(I.getOperand(1))); // val. in WriteInstruction()
1363 Vals.push_back(VE.getAttributeID(CI.getAttributes())); in WriteInstruction()
1365 PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee in WriteInstruction()
1369 Vals.push_back(VE.getValueID(CI.getArgOperand(i))); // fixed param. in WriteInstruction()
1375 PushValueAndType(CI.getArgOperand(i), InstID, Vals, VE); // varargs in WriteInstruction()
1381 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); // valistty in WriteInstruction()
1382 Vals.push_back(VE.getValueID(I.getOperand(0))); // valist. in WriteInstruction()
1383 Vals.push_back(VE.getTypeID(I.getType())); // restype. in WriteInstruction()
1393 const llvm_3_2::ValueEnumerator &VE, in WriteValueSymbolTable() argument
1437 NameVals.push_back(VE.getValueID(SI->getValue())); in WriteValueSymbolTable()
1449 static void WriteUseList(llvm_3_2::ValueEnumerator &VE, UseListOrder &&Order, in WriteUseList() argument
1461 Record.push_back(VE.getValueID(Order.V)); in WriteUseList()
1465 static void WriteUseListBlock(const Function *F, llvm_3_2::ValueEnumerator &VE, in WriteUseListBlock() argument
1468 return !VE.UseListOrders.empty() && VE.UseListOrders.back().F == F; in WriteUseListBlock()
1476 WriteUseList(VE, std::move(VE.UseListOrders.back()), Stream); in WriteUseListBlock()
1477 VE.UseListOrders.pop_back(); in WriteUseListBlock()
1483 static void WriteFunction(const Function &F, llvm_3_2::ValueEnumerator &VE, in WriteFunction() argument
1486 VE.incorporateFunction(F); in WriteFunction()
1492 Vals.push_back(VE.getBasicBlocks().size()); in WriteFunction()
1498 VE.getFunctionConstantRange(CstStart, CstEnd); in WriteFunction()
1499 WriteConstants(CstStart, CstEnd, VE, Stream, false); in WriteFunction()
1502 WriteFunctionLocalMetadata(F, VE, Stream); in WriteFunction()
1515 WriteInstruction(*I, InstID, VE, Stream, Vals); in WriteFunction()
1536 Vals.push_back(VE.getMetadataOrNullID(DL->getScope())); in WriteFunction()
1537 Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt())); in WriteFunction()
1547 WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); in WriteFunction()
1550 WriteMetadataAttachment(F, VE, Stream); in WriteFunction()
1552 WriteUseListBlock(&F, VE, Stream); in WriteFunction()
1553 VE.purgeFunction(); in WriteFunction()
1558 static void WriteBlockInfo(const llvm_3_2::ValueEnumerator &VE, in WriteBlockInfo() argument
1613 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1633 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1686 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1732 llvm_3_2::ValueEnumerator VE(*M); in WriteModule() local
1735 WriteBlockInfo(VE, Stream); in WriteModule()
1738 WriteAttributeTable(VE, Stream); in WriteModule()
1741 WriteTypeTable(VE, Stream); in WriteModule()
1745 WriteModuleInfo(M, VE, Stream); in WriteModule()
1748 WriteModuleConstants(VE, Stream); in WriteModule()
1751 WriteModuleMetadata(M, VE, Stream); in WriteModule()
1757 WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); in WriteModule()
1761 WriteUseListBlock(nullptr, VE, Stream); in WriteModule()
1766 WriteFunction(*F, VE, Stream); in WriteModule()