Lines Matching refs:PFS

2370                                   PerFunctionState &PFS, bool IsMustTailCall,  in ParseParameterList()  argument
2401 if (ParseMetadataAsValue(V, PFS)) in ParseParameterList()
2405 if (ParseOptionalParamAttrs(ArgAttrs) || ParseValue(ArgTy, V, PFS)) in ParseParameterList()
2430 SmallVectorImpl<OperandBundleDef> &BundleList, PerFunctionState &PFS) { in ParseOptionalOperandBundles() argument
2457 if (ParseType(Ty) || ParseValue(Ty, Input, PFS)) in ParseOptionalOperandBundles()
2953 bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { in ParseValID() argument
4916 bool LLParser::ParseMetadataAsValue(Value *&V, PerFunctionState &PFS) { in ParseMetadataAsValue() argument
4919 if (ParseMetadata(MD, &PFS)) in ParseMetadataAsValue()
4931 PerFunctionState *PFS) { in ParseValueAsMetadata() argument
4940 if (ParseValue(Ty, V, PFS)) in ParseValueAsMetadata()
4955 bool LLParser::ParseMetadata(Metadata *&MD, PerFunctionState *PFS) { in ParseMetadata() argument
4967 return ParseValueAsMetadata(MD, "expected metadata operand", PFS); in ParseMetadata()
4998 PerFunctionState *PFS, bool IsCall) { in ConvertValIDToValue() argument
5004 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); in ConvertValIDToValue()
5005 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc, IsCall); in ConvertValIDToValue()
5008 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); in ConvertValIDToValue()
5009 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc, IsCall); in ConvertValIDToValue()
5139 bool LLParser::ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS) { in ParseValue() argument
5142 return ParseValID(ID, PFS) || in ParseValue()
5143 ConvertValIDToValue(Ty, ID, V, PFS, /*IsCall=*/false); in ParseValue()
5146 bool LLParser::ParseTypeAndValue(Value *&V, PerFunctionState *PFS) { in ParseTypeAndValue() argument
5149 ParseValue(Ty, V, PFS); in ParseTypeAndValue()
5153 PerFunctionState &PFS) { in ParseTypeAndBasicBlock() argument
5156 if (ParseTypeAndValue(V, PFS)) return true; in ParseTypeAndBasicBlock()
5445 PerFunctionState PFS(*this, Fn, FunctionNumber); in ParseFunctionBody() local
5449 if (PFS.resolveForwardRefBlockAddresses()) in ParseFunctionBody()
5451 SaveAndRestore<PerFunctionState *> ScopeExit(BlockAddressPFS, &PFS); in ParseFunctionBody()
5459 if (ParseBasicBlock(PFS)) return true; in ParseFunctionBody()
5462 if (ParseUseListOrder(&PFS)) in ParseFunctionBody()
5469 return PFS.FinishFunction(); in ParseFunctionBody()
5474 bool LLParser::ParseBasicBlock(PerFunctionState &PFS) { in ParseBasicBlock() argument
5483 BasicBlock *BB = PFS.DefineBB(Name, NameLoc); in ParseBasicBlock()
5511 switch (ParseInstruction(Inst, BB, PFS)) { in ParseBasicBlock()
5534 if (PFS.SetInstName(NameID, NameStr, NameLoc, Inst)) return true; in ParseBasicBlock()
5547 PerFunctionState &PFS) { in ParseInstruction() argument
5559 case lltok::kw_ret: return ParseRet(Inst, BB, PFS); in ParseInstruction()
5560 case lltok::kw_br: return ParseBr(Inst, PFS); in ParseInstruction()
5561 case lltok::kw_switch: return ParseSwitch(Inst, PFS); in ParseInstruction()
5562 case lltok::kw_indirectbr: return ParseIndirectBr(Inst, PFS); in ParseInstruction()
5563 case lltok::kw_invoke: return ParseInvoke(Inst, PFS); in ParseInstruction()
5564 case lltok::kw_resume: return ParseResume(Inst, PFS); in ParseInstruction()
5565 case lltok::kw_cleanupret: return ParseCleanupRet(Inst, PFS); in ParseInstruction()
5566 case lltok::kw_catchret: return ParseCatchRet(Inst, PFS); in ParseInstruction()
5567 case lltok::kw_catchswitch: return ParseCatchSwitch(Inst, PFS); in ParseInstruction()
5568 case lltok::kw_catchpad: return ParseCatchPad(Inst, PFS); in ParseInstruction()
5569 case lltok::kw_cleanuppad: return ParseCleanupPad(Inst, PFS); in ParseInstruction()
5573 int Res = ParseUnaryOp(Inst, PFS, KeywordVal, 2); in ParseInstruction()
5589 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true; in ParseInstruction()
5601 int Res = ParseArithmetic(Inst, PFS, KeywordVal, 2); in ParseInstruction()
5615 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true; in ParseInstruction()
5621 case lltok::kw_srem: return ParseArithmetic(Inst, PFS, KeywordVal, 1); in ParseInstruction()
5624 case lltok::kw_xor: return ParseLogical(Inst, PFS, KeywordVal); in ParseInstruction()
5625 case lltok::kw_icmp: return ParseCompare(Inst, PFS, KeywordVal); in ParseInstruction()
5628 int Res = ParseCompare(Inst, PFS, KeywordVal); in ParseInstruction()
5649 case lltok::kw_ptrtoint: return ParseCast(Inst, PFS, KeywordVal); in ParseInstruction()
5651 case lltok::kw_select: return ParseSelect(Inst, PFS); in ParseInstruction()
5652 case lltok::kw_va_arg: return ParseVA_Arg(Inst, PFS); in ParseInstruction()
5653 case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS); in ParseInstruction()
5654 case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS); in ParseInstruction()
5655 case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS); in ParseInstruction()
5656 case lltok::kw_phi: return ParsePHI(Inst, PFS); in ParseInstruction()
5657 case lltok::kw_landingpad: return ParseLandingPad(Inst, PFS); in ParseInstruction()
5659 case lltok::kw_call: return ParseCall(Inst, PFS, CallInst::TCK_None); in ParseInstruction()
5660 case lltok::kw_tail: return ParseCall(Inst, PFS, CallInst::TCK_Tail); in ParseInstruction()
5661 case lltok::kw_musttail: return ParseCall(Inst, PFS, CallInst::TCK_MustTail); in ParseInstruction()
5662 case lltok::kw_notail: return ParseCall(Inst, PFS, CallInst::TCK_NoTail); in ParseInstruction()
5664 case lltok::kw_alloca: return ParseAlloc(Inst, PFS); in ParseInstruction()
5665 case lltok::kw_load: return ParseLoad(Inst, PFS); in ParseInstruction()
5666 case lltok::kw_store: return ParseStore(Inst, PFS); in ParseInstruction()
5667 case lltok::kw_cmpxchg: return ParseCmpXchg(Inst, PFS); in ParseInstruction()
5668 case lltok::kw_atomicrmw: return ParseAtomicRMW(Inst, PFS); in ParseInstruction()
5669 case lltok::kw_fence: return ParseFence(Inst, PFS); in ParseInstruction()
5670 case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS); in ParseInstruction()
5671 case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS); in ParseInstruction()
5672 case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS); in ParseInstruction()
5725 PerFunctionState &PFS) { in ParseRet() argument
5730 Type *ResType = PFS.getFunction().getReturnType(); in ParseRet()
5742 if (ParseValue(Ty, RV, PFS)) return true; in ParseRet()
5755 bool LLParser::ParseBr(Instruction *&Inst, PerFunctionState &PFS) { in ParseBr() argument
5759 if (ParseTypeAndValue(Op0, Loc, PFS)) return true; in ParseBr()
5770 ParseTypeAndBasicBlock(Op1, Loc, PFS) || in ParseBr()
5772 ParseTypeAndBasicBlock(Op2, Loc2, PFS)) in ParseBr()
5784 bool LLParser::ParseSwitch(Instruction *&Inst, PerFunctionState &PFS) { in ParseSwitch() argument
5788 if (ParseTypeAndValue(Cond, CondLoc, PFS) || in ParseSwitch()
5790 ParseTypeAndBasicBlock(DefaultBB, BBLoc, PFS) || in ParseSwitch()
5804 if (ParseTypeAndValue(Constant, CondLoc, PFS) || in ParseSwitch()
5806 ParseTypeAndBasicBlock(DestBB, PFS)) in ParseSwitch()
5829 bool LLParser::ParseIndirectBr(Instruction *&Inst, PerFunctionState &PFS) { in ParseIndirectBr() argument
5832 if (ParseTypeAndValue(Address, AddrLoc, PFS) || in ParseIndirectBr()
5845 if (ParseTypeAndBasicBlock(DestBB, PFS)) in ParseIndirectBr()
5850 if (ParseTypeAndBasicBlock(DestBB, PFS)) in ParseIndirectBr()
5869 bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { in ParseInvoke() argument
5886 ParseValID(CalleeID) || ParseParameterList(ArgList, PFS) || in ParseInvoke()
5889 ParseOptionalOperandBundles(BundleList, PFS) || in ParseInvoke()
5891 ParseTypeAndBasicBlock(NormalBB, PFS) || in ParseInvoke()
5893 ParseTypeAndBasicBlock(UnwindBB, PFS)) in ParseInvoke()
5917 Callee, &PFS, /*IsCall=*/true)) in ParseInvoke()
5965 bool LLParser::ParseResume(Instruction *&Inst, PerFunctionState &PFS) { in ParseResume() argument
5967 if (ParseTypeAndValue(Exn, ExnLoc, PFS)) in ParseResume()
5976 PerFunctionState &PFS) { in ParseExceptionArgs() argument
5994 if (ParseMetadataAsValue(V, PFS)) in ParseExceptionArgs()
5997 if (ParseValue(ArgTy, V, PFS)) in ParseExceptionArgs()
6009 bool LLParser::ParseCleanupRet(Instruction *&Inst, PerFunctionState &PFS) { in ParseCleanupRet() argument
6015 if (ParseValue(Type::getTokenTy(Context), CleanupPad, PFS)) in ParseCleanupRet()
6027 if (ParseTypeAndBasicBlock(UnwindBB, PFS)) { in ParseCleanupRet()
6038 bool LLParser::ParseCatchRet(Instruction *&Inst, PerFunctionState &PFS) { in ParseCatchRet() argument
6044 if (ParseValue(Type::getTokenTy(Context), CatchPad, PFS)) in ParseCatchRet()
6049 ParseTypeAndBasicBlock(BB, PFS)) in ParseCatchRet()
6058 bool LLParser::ParseCatchSwitch(Instruction *&Inst, PerFunctionState &PFS) { in ParseCatchSwitch() argument
6068 if (ParseValue(Type::getTokenTy(Context), ParentPad, PFS)) in ParseCatchSwitch()
6077 if (ParseTypeAndBasicBlock(DestBB, PFS)) in ParseCatchSwitch()
6094 if (ParseTypeAndBasicBlock(UnwindBB, PFS)) in ParseCatchSwitch()
6108 bool LLParser::ParseCatchPad(Instruction *&Inst, PerFunctionState &PFS) { in ParseCatchPad() argument
6117 if (ParseValue(Type::getTokenTy(Context), CatchSwitch, PFS)) in ParseCatchPad()
6121 if (ParseExceptionArgs(Args, PFS)) in ParseCatchPad()
6130 bool LLParser::ParseCleanupPad(Instruction *&Inst, PerFunctionState &PFS) { in ParseCleanupPad() argument
6140 if (ParseValue(Type::getTokenTy(Context), ParentPad, PFS)) in ParseCleanupPad()
6144 if (ParseExceptionArgs(Args, PFS)) in ParseCleanupPad()
6160 bool LLParser::ParseUnaryOp(Instruction *&Inst, PerFunctionState &PFS, in ParseUnaryOp() argument
6163 if (ParseTypeAndValue(LHS, Loc, PFS)) in ParseUnaryOp()
6197 bool LLParser::ParseArithmetic(Instruction *&Inst, PerFunctionState &PFS, in ParseArithmetic() argument
6200 if (ParseTypeAndValue(LHS, Loc, PFS) || in ParseArithmetic()
6202 ParseValue(LHS->getType(), RHS, PFS)) in ParseArithmetic()
6225 bool LLParser::ParseLogical(Instruction *&Inst, PerFunctionState &PFS, in ParseLogical() argument
6228 if (ParseTypeAndValue(LHS, Loc, PFS) || in ParseLogical()
6230 ParseValue(LHS->getType(), RHS, PFS)) in ParseLogical()
6243 bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS, in ParseCompare() argument
6250 ParseTypeAndValue(LHS, Loc, PFS) || in ParseCompare()
6252 ParseValue(LHS->getType(), RHS, PFS)) in ParseCompare()
6276 bool LLParser::ParseCast(Instruction *&Inst, PerFunctionState &PFS, in ParseCast() argument
6281 if (ParseTypeAndValue(Op, Loc, PFS) || in ParseCast()
6298 bool LLParser::ParseSelect(Instruction *&Inst, PerFunctionState &PFS) { in ParseSelect() argument
6301 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseSelect()
6303 ParseTypeAndValue(Op1, PFS) || in ParseSelect()
6305 ParseTypeAndValue(Op2, PFS)) in ParseSelect()
6317 bool LLParser::ParseVA_Arg(Instruction *&Inst, PerFunctionState &PFS) { in ParseVA_Arg() argument
6321 if (ParseTypeAndValue(Op, PFS) || in ParseVA_Arg()
6335 bool LLParser::ParseExtractElement(Instruction *&Inst, PerFunctionState &PFS) { in ParseExtractElement() argument
6338 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseExtractElement()
6340 ParseTypeAndValue(Op1, PFS)) in ParseExtractElement()
6352 bool LLParser::ParseInsertElement(Instruction *&Inst, PerFunctionState &PFS) { in ParseInsertElement() argument
6355 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseInsertElement()
6357 ParseTypeAndValue(Op1, PFS) || in ParseInsertElement()
6359 ParseTypeAndValue(Op2, PFS)) in ParseInsertElement()
6371 bool LLParser::ParseShuffleVector(Instruction *&Inst, PerFunctionState &PFS) { in ParseShuffleVector() argument
6374 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseShuffleVector()
6376 ParseTypeAndValue(Op1, PFS) || in ParseShuffleVector()
6378 ParseTypeAndValue(Op2, PFS)) in ParseShuffleVector()
6390 int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) { in ParsePHI() argument
6396 ParseValue(Ty, Op0, PFS) || in ParsePHI()
6398 ParseValue(Type::getLabelTy(Context), Op1, PFS) || in ParsePHI()
6417 ParseValue(Ty, Op0, PFS) || in ParsePHI()
6419 ParseValue(Type::getLabelTy(Context), Op1, PFS) || in ParsePHI()
6440 bool LLParser::ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS) { in ParseLandingPad() argument
6460 if (ParseTypeAndValue(V, VLoc, PFS)) in ParseLandingPad()
6492 bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, in ParseCall() argument
6517 ParseParameterList(ArgList, PFS, TCK == CallInst::TCK_MustTail, in ParseCall()
6518 PFS.getFunction().isVarArg()) || in ParseCall()
6520 ParseOptionalOperandBundles(BundleList, PFS)) in ParseCall()
6548 &PFS, /*IsCall=*/true)) in ParseCall()
6604 int LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS) { in ParseAlloc() argument
6633 if (ParseTypeAndValue(Size, SizeLoc, PFS)) in ParseAlloc()
6666 int LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS) { in ParseLoad() argument
6689 ParseTypeAndValue(Val, Loc, PFS) || in ParseLoad()
6715 int LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS) { in ParseStore() argument
6734 if (ParseTypeAndValue(Val, Loc, PFS) || in ParseStore()
6736 ParseTypeAndValue(Ptr, PtrLoc, PFS) || in ParseStore()
6760 int LLParser::ParseCmpXchg(Instruction *&Inst, PerFunctionState &PFS) { in ParseCmpXchg() argument
6775 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) || in ParseCmpXchg()
6777 ParseTypeAndValue(Cmp, CmpLoc, PFS) || in ParseCmpXchg()
6779 ParseTypeAndValue(New, NewLoc, PFS) || in ParseCmpXchg()
6813 int LLParser::ParseAtomicRMW(Instruction *&Inst, PerFunctionState &PFS) { in ParseAtomicRMW() argument
6840 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) || in ParseAtomicRMW()
6842 ParseTypeAndValue(Val, ValLoc, PFS) || in ParseAtomicRMW()
6873 int LLParser::ParseFence(Instruction *&Inst, PerFunctionState &PFS) { in ParseFence() argument
6890 int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) { in ParseGetElementPtr() argument
6901 ParseTypeAndValue(Ptr, Loc, PFS)) in ParseGetElementPtr()
6925 if (ParseTypeAndValue(Val, EltLoc, PFS)) return true; in ParseGetElementPtr()
6953 int LLParser::ParseExtractValue(Instruction *&Inst, PerFunctionState &PFS) { in ParseExtractValue() argument
6957 if (ParseTypeAndValue(Val, Loc, PFS) || in ParseExtractValue()
6972 int LLParser::ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS) { in ParseInsertValue() argument
6976 if (ParseTypeAndValue(Val0, Loc0, PFS) || in ParseInsertValue()
6978 ParseTypeAndValue(Val1, Loc1, PFS) || in ParseInsertValue()
7099 bool LLParser::ParseUseListOrder(PerFunctionState *PFS) { in ParseUseListOrder() argument
7106 if (ParseTypeAndValue(V, PFS) || in ParseUseListOrder()