Lines Matching refs:VE
136 static void WriteAttributeTable(const llvm_2_9::ValueEnumerator &VE, in WriteAttributeTable() argument
138 const std::vector<AttributeSet> &Attrs = VE.getAttributes(); in WriteAttributeTable()
159 static void WriteTypeSymbolTable(const llvm_2_9::ValueEnumerator &VE, in WriteTypeSymbolTable() argument
161 const llvm_2_9::ValueEnumerator::TypeList &TypeList = VE.getTypes(); in WriteTypeSymbolTable()
168 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteTypeSymbolTable()
212 static void WriteTypeTable(const llvm_2_9::ValueEnumerator &VE, in WriteTypeTable() argument
214 const llvm_2_9::ValueEnumerator::TypeList &TypeList = VE.getTypes(); in WriteTypeTable()
219 uint64_t NumBits = Log2_32_Ceil(VE.getTypes().size()+1); in WriteTypeTable()
285 TypeVals.push_back(VE.getTypeID(PTy->getElementType())); in WriteTypeTable()
297 TypeVals.push_back(VE.getTypeID(FT->getReturnType())); in WriteTypeTable()
299 TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); in WriteTypeTable()
310 TypeVals.push_back(VE.getTypeID(*I)); in WriteTypeTable()
320 TypeVals.push_back(VE.getTypeID(AT->getElementType())); in WriteTypeTable()
329 TypeVals.push_back(VE.getTypeID(VT->getElementType())); in WriteTypeTable()
341 WriteTypeSymbolTable(VE, Stream); in WriteTypeTable()
384 const llvm_2_9::ValueEnumerator &VE, in WriteModuleInfo() argument
405 MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getType())); in WriteModuleInfo()
473 Vals.push_back(VE.getTypeID(GV.getType())); in WriteModuleInfo()
476 (VE.getValueID(GV.getInitializer()) + 1)); in WriteModuleInfo()
498 Vals.push_back(VE.getTypeID(F.getType())); in WriteModuleInfo()
502 Vals.push_back(VE.getAttributeID(F.getAttributes())); in WriteModuleInfo()
516 Vals.push_back(VE.getTypeID(A.getType())); in WriteModuleInfo()
517 Vals.push_back(VE.getValueID(A.getAliasee())); in WriteModuleInfo()
543 const llvm_2_9::ValueEnumerator &VE, in WriteValueAsMetadata() argument
548 Record.push_back(VE.getTypeID(V->getType())); in WriteValueAsMetadata()
549 Record.push_back(VE.getValueID(V)); in WriteValueAsMetadata()
554 static void WriteMDTuple(const MDTuple *N, const llvm_2_9::ValueEnumerator &VE, in WriteMDTuple() argument
563 Record.push_back(VE.getTypeID(llvm::Type::getVoidTy(N->getContext()))); in WriteMDTuple()
566 Record.push_back(VE.getTypeID(MDC->getType())); in WriteMDTuple()
567 Record.push_back(VE.getValueID(MDC->getValue())); in WriteMDTuple()
569 Record.push_back(VE.getTypeID( in WriteMDTuple()
571 Record.push_back(VE.getMetadataID(MD)); in WriteMDTuple()
599 const llvm_2_9::ValueEnumerator &VE, in WriteModuleMetadata() argument
601 const auto &MDs = VE.getMDs(); in WriteModuleMetadata()
609 if (VE.hasMDString()) { in WriteModuleMetadata()
619 if (VE.hasDILocation()) { in WriteModuleMetadata()
656 Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ in WriteModuleMetadata()
662 WriteValueAsMetadata(MDC, VE, Stream, Record); in WriteModuleMetadata()
684 Record.push_back(VE.getMetadataID(N)); in WriteModuleMetadata()
693 const llvm_2_9::ValueEnumerator &VE, in WriteFunctionLocalMetadata() argument
698 VE.getFunctionLocalMDs(); in WriteFunctionLocalMetadata()
705 WriteValueAsMetadata(MDs[i], VE, Stream, Record); in WriteFunctionLocalMetadata()
713 const llvm_2_9::ValueEnumerator &VE, in WriteMetadataAttachment() argument
732 Record.push_back(VE.getInstructionID(&*I)); in WriteMetadataAttachment()
736 Record.push_back(VE.getMetadataID(MDs[i].second)); in WriteMetadataAttachment()
770 const llvm_2_9::ValueEnumerator &VE, in WriteConstants() argument
811 const llvm_2_9::ValueEnumerator::ValueList &Vals = VE.getValues(); in WriteConstants()
818 Record.push_back(VE.getTypeID(LastTy)); in WriteConstants()
930 Record.push_back(VE.getValueID(CDS->getElementAsConstant(i))); in WriteConstants()
936 Record.push_back(VE.getValueID(C->getOperand(i))); in WriteConstants()
944 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
945 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
951 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
952 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
963 Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); in WriteConstants()
964 Record.push_back(VE.getValueID(C->getOperand(i))); in WriteConstants()
969 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
970 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
971 Record.push_back(VE.getValueID(C->getOperand(2))); 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()
977 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
981 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
982 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
983 Record.push_back(VE.getValueID(C->getOperand(2))); in WriteConstants()
994 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
996 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
997 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
998 Record.push_back(VE.getValueID(C->getOperand(2))); in WriteConstants()
1003 Record.push_back(VE.getTypeID(C->getOperand(0)->getType())); in WriteConstants()
1004 Record.push_back(VE.getValueID(C->getOperand(0))); in WriteConstants()
1005 Record.push_back(VE.getValueID(C->getOperand(1))); in WriteConstants()
1011 Record.push_back(VE.getTypeID(BA->getFunction()->getType())); in WriteConstants()
1012 Record.push_back(VE.getValueID(BA->getFunction())); in WriteConstants()
1013 Record.push_back(VE.getGlobalBasicBlockID(BA->getBasicBlock())); in WriteConstants()
1027 static void WriteModuleConstants(const llvm_2_9::ValueEnumerator &VE, in WriteModuleConstants() argument
1029 const llvm_2_9::ValueEnumerator::ValueList &Vals = VE.getValues(); in WriteModuleConstants()
1035 WriteConstants(i, Vals.size(), VE, Stream, true); in WriteModuleConstants()
1051 llvm_2_9::ValueEnumerator &VE) { in PushValueAndType() argument
1052 unsigned ValID = VE.getValueID(V); in PushValueAndType()
1055 Vals.push_back(VE.getTypeID(V->getType())); in PushValueAndType()
1063 llvm_2_9::ValueEnumerator &VE, in WriteInstruction() argument
1068 VE.setInstructionID(&I); in WriteInstruction()
1073 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1075 Vals.push_back(VE.getTypeID(I.getType())); in WriteInstruction()
1080 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1082 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1098 PushValueAndType(I.getOperand(i), InstID, Vals, VE); in WriteInstruction()
1102 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1110 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1111 PushValueAndType(I.getOperand(1), InstID, Vals, VE); in WriteInstruction()
1119 PushValueAndType(I.getOperand(1), InstID, Vals, VE); in WriteInstruction()
1120 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1121 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1125 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1126 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1130 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1131 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1132 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1136 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1137 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1138 Vals.push_back(VE.getValueID(I.getOperand(2))); in WriteInstruction()
1144 PushValueAndType(I.getOperand(0), InstID, Vals, VE); in WriteInstruction()
1145 Vals.push_back(VE.getValueID(I.getOperand(1))); in WriteInstruction()
1156 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) in WriteInstruction()
1160 PushValueAndType(I.getOperand(i), InstID, Vals, VE); in WriteInstruction()
1168 Vals.push_back(VE.getValueID(II.getSuccessor(0))); in WriteInstruction()
1170 Vals.push_back(VE.getValueID(II.getSuccessor(1))); in WriteInstruction()
1171 Vals.push_back(VE.getValueID(II.getCondition())); in WriteInstruction()
1179 Vals.push_back(VE.getTypeID(SI.getCondition()->getType())); in WriteInstruction()
1180 Vals.push_back(VE.getValueID(SI.getCondition())); in WriteInstruction()
1181 Vals.push_back(VE.getValueID(SI.getDefaultDest())); in WriteInstruction()
1184 Vals.push_back(VE.getValueID(i.getCaseValue())); in WriteInstruction()
1185 Vals.push_back(VE.getValueID(i.getCaseSuccessor())); in WriteInstruction()
1191 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); in WriteInstruction()
1193 Vals.push_back(VE.getValueID(I.getOperand(i))); in WriteInstruction()
1203 Vals.push_back(VE.getAttributeID(II->getAttributes())); in WriteInstruction()
1205 Vals.push_back(VE.getValueID(II->getNormalDest())); in WriteInstruction()
1206 Vals.push_back(VE.getValueID(II->getUnwindDest())); in WriteInstruction()
1207 PushValueAndType(Callee, InstID, Vals, VE); in WriteInstruction()
1211 Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. in WriteInstruction()
1217 PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg in WriteInstruction()
1229 Vals.push_back(VE.getTypeID(PN.getType())); in WriteInstruction()
1231 Vals.push_back(VE.getValueID(PN.getIncomingValue(i))); in WriteInstruction()
1232 Vals.push_back(VE.getValueID(PN.getIncomingBlock(i))); in WriteInstruction()
1239 Vals.push_back(VE.getTypeID(I.getType())); in WriteInstruction()
1240 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); in WriteInstruction()
1241 Vals.push_back(VE.getValueID(I.getOperand(0))); // size. in WriteInstruction()
1247 if (!PushValueAndType(I.getOperand(0), InstID, Vals, VE)) // ptr in WriteInstruction()
1255 PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr in WriteInstruction()
1256 Vals.push_back(VE.getValueID(I.getOperand(0))); // val. in WriteInstruction()
1267 Vals.push_back(VE.getAttributeID(CI.getAttributes())); in WriteInstruction()
1269 PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee in WriteInstruction()
1273 Vals.push_back(VE.getValueID(CI.getArgOperand(i))); // fixed param. in WriteInstruction()
1279 PushValueAndType(CI.getArgOperand(i), InstID, Vals, VE); // varargs in WriteInstruction()
1285 Vals.push_back(VE.getTypeID(I.getOperand(0)->getType())); // valistty in WriteInstruction()
1286 Vals.push_back(VE.getValueID(I.getOperand(0))); // valist. in WriteInstruction()
1287 Vals.push_back(VE.getTypeID(I.getType())); // restype. in WriteInstruction()
1297 const llvm_2_9::ValueEnumerator &VE, in WriteValueSymbolTable() argument
1341 NameVals.push_back(VE.getValueID(SI->getValue())); in WriteValueSymbolTable()
1354 static void WriteFunction(const Function &F, llvm_2_9::ValueEnumerator &VE, in WriteFunction() argument
1357 VE.incorporateFunction(F); in WriteFunction()
1363 Vals.push_back(VE.getBasicBlocks().size()); in WriteFunction()
1369 VE.getFunctionConstantRange(CstStart, CstEnd); in WriteFunction()
1370 WriteConstants(CstStart, CstEnd, VE, Stream, false); in WriteFunction()
1373 WriteFunctionLocalMetadata(F, VE, Stream); in WriteFunction()
1386 WriteInstruction(*I, InstID, VE, Stream, Vals); in WriteFunction()
1407 Vals.push_back(VE.getMetadataOrNullID(DL->getScope())); in WriteFunction()
1408 Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt())); in WriteFunction()
1416 WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); in WriteFunction()
1419 WriteMetadataAttachment(F, VE, Stream); in WriteFunction()
1420 VE.purgeFunction(); in WriteFunction()
1425 static void WriteBlockInfo(const llvm_2_9::ValueEnumerator &VE, in WriteBlockInfo() argument
1480 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1500 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1553 Log2_32_Ceil(VE.getTypes().size()+1))); in WriteBlockInfo()
1598 llvm_2_9::ValueEnumerator VE(*M); in WriteModule() local
1601 WriteBlockInfo(VE, Stream); in WriteModule()
1604 WriteAttributeTable(VE, Stream); in WriteModule()
1607 WriteTypeTable(VE, Stream); in WriteModule()
1611 WriteModuleInfo(M, VE, Stream); in WriteModule()
1614 WriteModuleConstants(VE, Stream); in WriteModule()
1617 WriteModuleMetadata(M, VE, Stream); in WriteModule()
1622 WriteFunction(*F, VE, Stream); in WriteModule()
1628 WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); in WriteModule()