Home | History | Annotate | Download | only in AsmParser

Lines Matching refs:PFS

2079                                   PerFunctionState &PFS, bool IsMustTailCall,
2111 if (ParseMetadataAsValue(V, PFS))
2115 if (ParseOptionalParamAttrs(ArgAttrs) || ParseValue(ArgTy, V, PFS))
2141 SmallVectorImpl<OperandBundleDef> &BundleList, PerFunctionState &PFS) {
2168 if (ParseType(Ty) || ParseValue(Ty, Input, PFS))
2678 /// sanity. PFS is used to convert function-local operands of metadata (since
2680 /// PFS can be null when we are not parsing metadata values inside a function.
2681 bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
2893 // We found the function; now find the basic block. Don't use PFS, since we
4299 bool LLParser::ParseMetadataAsValue(Value *&V, PerFunctionState &PFS) {
4302 if (ParseMetadata(MD, &PFS))
4314 PerFunctionState *PFS) {
4323 if (ParseValue(Ty, V, PFS))
4338 bool LLParser::ParseMetadata(Metadata *&MD, PerFunctionState *PFS) {
4350 return ParseValueAsMetadata(MD, "expected metadata operand", PFS);
4382 PerFunctionState *PFS) {
4388 if (!PFS) return Error(ID.Loc, "invalid use of function-local name");
4389 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc);
4392 if (!PFS) return Error(ID.Loc, "invalid use of function-local name");
4393 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc);
4499 if (ParseValID(ID, /*PFS=*/nullptr))
4509 if (ConvertValIDToValue(Ty, ID, V, /*PFS=*/nullptr))
4520 bool LLParser::ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS) {
4523 return ParseValID(ID, PFS) || ConvertValIDToValue(Ty, ID, V, PFS);
4526 bool LLParser::ParseTypeAndValue(Value *&V, PerFunctionState *PFS) {
4529 ParseValue(Ty, V, PFS);
4533 PerFunctionState &PFS) {
4536 if (ParseTypeAndValue(V, PFS)) return true;
4827 PerFunctionState PFS(*this, Fn, FunctionNumber);
4831 if (PFS.resolveForwardRefBlockAddresses())
4833 SaveAndRestore<PerFunctionState *> ScopeExit(BlockAddressPFS, &PFS);
4841 if (ParseBasicBlock(PFS)) return true;
4844 if (ParseUseListOrder(&PFS))
4851 return PFS.FinishFunction();
4856 bool LLParser::ParseBasicBlock(PerFunctionState &PFS) {
4865 BasicBlock *BB = PFS.DefineBB(Name, NameLoc);
4893 switch (ParseInstruction(Inst, BB, PFS)) {
4916 if (PFS.SetInstName(NameID, NameStr, NameLoc, Inst)) return true;
4929 PerFunctionState &PFS) {
4941 case lltok::kw_ret: return ParseRet(Inst, BB, PFS);
4942 case lltok::kw_br: return ParseBr(Inst, PFS);
4943 case lltok::kw_switch: return ParseSwitch(Inst, PFS);
4944 case lltok::kw_indirectbr: return ParseIndirectBr(Inst, PFS);
4945 case lltok::kw_invoke: return ParseInvoke(Inst, PFS);
4946 case lltok::kw_resume: return ParseResume(Inst, PFS);
4947 case lltok::kw_cleanupret: return ParseCleanupRet(Inst, PFS);
4948 case lltok::kw_catchret: return ParseCatchRet(Inst, PFS);
4949 case lltok::kw_catchswitch: return ParseCatchSwitch(Inst, PFS);
4950 case lltok::kw_catchpad: return ParseCatchPad(Inst, PFS);
4951 case lltok::kw_cleanuppad: return ParseCleanupPad(Inst, PFS);
4961 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true;
4973 int Res = ParseArithmetic(Inst, PFS, KeywordVal, 2);
4987 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true;
4993 case lltok::kw_srem: return ParseArithmetic(Inst, PFS, KeywordVal, 1);
4996 case lltok::kw_xor: return ParseLogical(Inst, PFS, KeywordVal);
4997 case lltok::kw_icmp: return ParseCompare(Inst, PFS, KeywordVal);
5000 int Res = ParseCompare(Inst, PFS, KeywordVal);
5021 case lltok::kw_ptrtoint: return ParseCast(Inst, PFS, KeywordVal);
5023 case lltok::kw_select: return ParseSelect(Inst, PFS);
5024 case lltok::kw_va_arg: return ParseVA_Arg(Inst, PFS);
5025 case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS);
5026 case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS);
5027 case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS);
5028 case lltok::kw_phi: return ParsePHI(Inst, PFS);
5029 case lltok::kw_landingpad: return ParseLandingPad(Inst, PFS);
5031 case lltok::kw_call: return ParseCall(Inst, PFS, CallInst::TCK_None);
5032 case lltok::kw_tail: return ParseCall(Inst, PFS, CallInst::TCK_Tail);
5033 case lltok::kw_musttail: return ParseCall(Inst, PFS, CallInst::TCK_MustTail);
5034 case lltok::kw_notail: return ParseCall(Inst, PFS, CallInst::TCK_NoTail);
5036 case lltok::kw_alloca: return ParseAlloc(Inst, PFS);
5037 case lltok::kw_load: return ParseLoad(Inst, PFS);
5038 case lltok::kw_store: return ParseStore(Inst, PFS);
5039 case lltok::kw_cmpxchg: return ParseCmpXchg(Inst, PFS);
5040 case lltok::kw_atomicrmw: return ParseAtomicRMW(Inst, PFS);
5041 case lltok::kw_fence: return ParseFence(Inst, PFS);
5042 case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS);
5043 case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS);
5044 case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS);
5097 PerFunctionState &PFS) {
5102 Type *ResType = PFS.getFunction().getReturnType();
5114 if (ParseValue(Ty, RV, PFS)) return true;
5128 bool LLParser::ParseBr(Instruction *&Inst, PerFunctionState &PFS) {
5132 if (ParseTypeAndValue(Op0, Loc, PFS)) return true;
5143 ParseTypeAndBasicBlock(Op1, Loc, PFS) ||
5145 ParseTypeAndBasicBlock(Op2, Loc2, PFS))
5157 bool LLParser::ParseSwitch(Instruction *&Inst, PerFunctionState &PFS) {
5161 if (ParseTypeAndValue(Cond, CondLoc, PFS) ||
5163 ParseTypeAndBasicBlock(DefaultBB, BBLoc, PFS) ||
5177 if (ParseTypeAndValue(Constant, CondLoc, PFS) ||
5179 ParseTypeAndBasicBlock(DestBB, PFS))
5202 bool LLParser::ParseIndirectBr(Instruction *&Inst, PerFunctionState &PFS) {
5205 if (ParseTypeAndValue(Address, AddrLoc, PFS) ||
5218 if (ParseTypeAndBasicBlock(DestBB, PFS))
5223 if (ParseTypeAndBasicBlock(DestBB, PFS))
5243 bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) {
5258 ParseValID(CalleeID) || ParseParameterList(ArgList, PFS) ||
5261 ParseOptionalOperandBundles(BundleList, PFS) ||
5263 ParseTypeAndBasicBlock(NormalBB, PFS) ||
5265 ParseTypeAndBasicBlock(UnwindBB, PFS))
5288 if (ConvertValIDToValue(PointerType::getUnqual(Ty), CalleeID, Callee, &PFS))
5348 bool LLParser::ParseResume(Instruction *&Inst, PerFunctionState &PFS) {
5350 if (ParseTypeAndValue(Exn, ExnLoc, PFS))
5359 PerFunctionState &PFS) {
5377 if (ParseMetadataAsValue(V, PFS))
5380 if (ParseValue(ArgTy, V, PFS))
5392 bool LLParser::ParseCleanupRet(Instruction *&Inst, PerFunctionState &PFS) {
5398 if (ParseValue(Type::getTokenTy(Context), CleanupPad, PFS))
5410 if (ParseTypeAndBasicBlock(UnwindBB, PFS)) {
5421 bool LLParser::ParseCatchRet(Instruction *&Inst, PerFunctionState &PFS) {
5427 if (ParseValue(Type::getTokenTy(Context), CatchPad, PFS))
5432 ParseTypeAndBasicBlock(BB, PFS))
5441 bool LLParser::ParseCatchSwitch(Instruction *&Inst, PerFunctionState &PFS) {
5452 if (ParseValue(Type::getTokenTy(Context), ParentPad, PFS))
5461 if (ParseTypeAndBasicBlock(DestBB, PFS))
5478 if (ParseTypeAndBasicBlock(UnwindBB, PFS))
5492 bool LLParser::ParseCatchPad(Instruction *&Inst, PerFunctionState &PFS) {
5501 if (ParseValue(Type::getTokenTy(Context), CatchSwitch, PFS))
5505 if (ParseExceptionArgs(Args, PFS))
5514 bool LLParser::ParseCleanupPad(Instruction *&Inst, PerFunctionState &PFS) {
5524 if (ParseValue(Type::getTokenTy(Context), ParentPad, PFS))
5528 if (ParseExceptionArgs(Args, PFS))
5544 bool LLParser::ParseArithmetic(Instruction *&Inst, PerFunctionState &PFS,
5547 if (ParseTypeAndValue(LHS, Loc, PFS) ||
5549 ParseValue(LHS->getType(), RHS, PFS))
5572 bool LLParser::ParseLogical(Instruction *&Inst, PerFunctionState &PFS,
5575 if (ParseTypeAndValue(LHS, Loc, PFS) ||
5577 ParseValue(LHS->getType(), RHS, PFS))
5591 bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS,
5598 ParseTypeAndValue(LHS, Loc, PFS) ||
5600 ParseValue(LHS->getType(), RHS, PFS))
5624 bool LLParser::ParseCast(Instruction *&Inst, PerFunctionState &PFS,
5629 if (ParseTypeAndValue(Op, Loc, PFS) ||
5646 PFS) {
5649 if (ParseTypeAndValue(Op0, Loc, PFS) ||
5651 ParseTypeAndValue(Op1, PFS) ||
5653 ParseTypeAndValue(Op2, PFS))
5665 bool LLParser::ParseVA_Arg(Instruction *&Inst, PerFunctionState &PFS) {
5669 if (ParseTypeAndValue(Op, PFS) ||
5683 bool LLParser::ParseExtractElement(Instruction *&Inst, PerFunctionState &PFS) {
5686 if (ParseTypeAndValue(Op0, Loc, PFS) ||
5688 ParseTypeAndValue(Op1, PFS))
5700 bool LLParser::ParseInsertElement(Instruction *&Inst, PerFunctionState &PFS) {
5703 if (ParseTypeAndValue(Op0, Loc, PFS) ||
5705 ParseTypeAndValue(Op1, PFS) ||
5707 ParseTypeAndValue(Op2, PFS))
5719 bool LLParser::ParseShuffleVector(Instruction *&Inst, PerFunctionState &PFS) {
5722 if (ParseTypeAndValue(Op0, Loc, PFS) ||
5724 ParseTypeAndValue(Op1, PFS) ||
5726 ParseTypeAndValue(Op2, PFS))
5738 int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) {
5744 ParseValue(Ty, Op0, PFS) ||
5746 ParseValue(Type::getLabelTy(Context), Op1, PFS) ||
5764 ParseValue(Ty, Op0, PFS) ||
5766 ParseValue(Type::getLabelTy(Context), Op1, PFS) ||
5787 bool LLParser::ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS) {
5807 if (ParseTypeAndValue(V, VLoc, PFS))
5839 bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS,
5862 ParseParameterList(ArgList, PFS, TCK == CallInst::TCK_MustTail,
5863 PFS.getFunction().isVarArg()) ||
5865 ParseOptionalOperandBundles(BundleList, PFS))
5892 if (ConvertValIDToValue(PointerType::getUnqual(Ty), CalleeID, Callee, &PFS))
5959 int LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS) {
5980 if (ParseTypeAndValue(Size, SizeLoc, PFS) ||
6000 int LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS) {
6023 ParseTypeAndValue(Val, Loc, PFS) ||
6049 int LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS) {
6068 if (ParseTypeAndValue(Val, Loc, PFS) ||
6070 ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
6094 int LLParser::ParseCmpXchg(Instruction *&Inst, PerFunctionState &PFS) {
6109 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
6111 ParseTypeAndValue(Cmp, CmpLoc, PFS) ||
6113 ParseTypeAndValue(New, NewLoc, PFS) ||
6147 int LLParser::ParseAtomicRMW(Instruction *&Inst, PerFunctionState &PFS) {
6174 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
6176 ParseTypeAndValue(Val, ValLoc, PFS) ||
6202 int LLParser::ParseFence(Instruction *&Inst, PerFunctionState &PFS) {
6219 int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
6230 ParseTypeAndValue(Ptr, Loc, PFS))
6254 if (ParseTypeAndValue(Val, EltLoc, PFS)) return true;
6282 int LLParser::ParseExtractValue(Instruction *&Inst, PerFunctionState &PFS) {
6286 if (ParseTypeAndValue(Val, Loc, PFS) ||
6301 int LLParser::ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS) {
6305 if (ParseTypeAndValue(Val0, Loc0, PFS) ||
6307 ParseTypeAndValue(Val1, Loc1, PFS) ||
6428 bool LLParser::ParseUseListOrder(PerFunctionState *PFS) {
6435 if (ParseTypeAndValue(V, PFS) ||