llvm.org GIT mirror llvm / 0ffcde0
Merging from mainline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_20@36931 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 12 years ago
1 changed file(s) with 23 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
385385 Vals.push_back(F->getCallingConv());
386386 Vals.push_back(F->isDeclaration());
387387 Vals.push_back(getEncodedLinkage(F));
388
389 // Note: we emit the param attr ID number for the function type of this
390 // function. In the future, we intend for attrs to be properties of
391 // functions, instead of on the type. This is to support this future work.
392 Vals.push_back(VE.getParamAttrID(F->getFunctionType()->getParamAttrs()));
393
388394 Vals.push_back(Log2_32(F->getAlignment())+1);
389395 Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0);
390396 Vals.push_back(getEncodedVisibility(F));
735741 Vals.push_back(VE.getValueID(I.getOperand(i)));
736742 break;
737743 case Instruction::Invoke: {
744 const PointerType *PTy = cast(I.getOperand(0)->getType());
745 const FunctionType *FTy = cast(PTy->getElementType());
738746 Code = bitc::FUNC_CODE_INST_INVOKE;
747
748 // Note: we emit the param attr ID number for the function type of this
749 // function. In the future, we intend for attrs to be properties of
750 // functions, instead of on the type. This is to support this future work.
751 Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs()));
752
739753 Vals.push_back(cast(I).getCallingConv());
740754 Vals.push_back(VE.getValueID(I.getOperand(1))); // normal dest
741755 Vals.push_back(VE.getValueID(I.getOperand(2))); // unwind dest
742756 PushValueAndType(I.getOperand(0), InstID, Vals, VE); // callee
743757
744758 // Emit value #'s for the fixed parameters.
745 const PointerType *PTy = cast(I.getOperand(0)->getType());
746 const FunctionType *FTy = cast(PTy->getElementType());
747759 for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i)
748760 Vals.push_back(VE.getValueID(I.getOperand(i+3))); // fixed param.
749761
805817 Vals.push_back(cast(I).isVolatile());
806818 break;
807819 case Instruction::Call: {
820 const PointerType *PTy = cast(I.getOperand(0)->getType());
821 const FunctionType *FTy = cast(PTy->getElementType());
822
808823 Code = bitc::FUNC_CODE_INST_CALL;
824
825 // Note: we emit the param attr ID number for the function type of this
826 // function. In the future, we intend for attrs to be properties of
827 // functions, instead of on the type. This is to support this future work.
828 Vals.push_back(VE.getParamAttrID(FTy->getParamAttrs()));
829
809830 Vals.push_back((cast(I).getCallingConv() << 1) |
810831 unsigned(cast(I).isTailCall()));
811832 PushValueAndType(I.getOperand(0), InstID, Vals, VE); // Callee
812833
813834 // Emit value #'s for the fixed parameters.
814 const PointerType *PTy = cast(I.getOperand(0)->getType());
815 const FunctionType *FTy = cast(PTy->getElementType());
816835 for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i)
817836 Vals.push_back(VE.getValueID(I.getOperand(i+1))); // fixed param.
818837