Home | History | Annotate | Download | only in AsmParser

Lines Matching full:pfs

186                                                PerFunctionState *PFS) {
190 if (PFS) {
192 Res = PFS->GetBB(Refs[i].first.StrVal, Refs[i].first.Loc);
194 Res = PFS->GetBB(Refs[i].first.UIntVal, Refs[i].first.Loc);
1388 PerFunctionState *PFS) {
1409 if (ParseMetadataListValue(ID, PFS))
1670 PerFunctionState &PFS) {
1690 if (ParseOptionalParamAttrs(ArgAttrs) || ParseValue(ArgTy, V, PFS))
2219 /// sanity. PFS is used to convert function-local operands of metadata (since
2221 /// PFS can be null when we are not parsing metadata values inside a function.
2222 bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
2243 return ParseMetadataValue(ID, PFS);
2726 bool LLParser::ParseMetadataListValue(ValID &ID, PerFunctionState *PFS) {
2731 if (ParseMDNodeVector(Elts, PFS) ||
2744 bool LLParser::ParseMetadataValue(ValID &ID, PerFunctionState *PFS) {
2751 return ParseMetadataListValue(ID, PFS);
2774 PerFunctionState *PFS) {
2780 if (!PFS) return Error(ID.Loc, "invalid use of function-local name");
2781 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc);
2784 if (!PFS) return Error(ID.Loc, "invalid use of function-local name");
2785 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc);
2894 bool LLParser::ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS) {
2897 return ParseValID(ID, PFS) ||
2898 ConvertValIDToValue(Ty, ID, V, PFS);
2901 bool LLParser::ParseTypeAndValue(Value *&V, PerFunctionState *PFS) {
2904 ParseValue(Ty, V, PFS);
2908 PerFunctionState &PFS) {
2911 if (ParseTypeAndValue(V, PFS)) return true;
3140 PerFunctionState PFS(*this, Fn, FunctionNumber);
3147 if (ParseBasicBlock(PFS)) return true;
3153 return PFS.FinishFunction();
3158 bool LLParser::ParseBasicBlock(PerFunctionState &PFS) {
3167 BasicBlock *BB = PFS.DefineBB(Name, NameLoc);
3194 switch (ParseInstruction(Inst, BB, PFS)) {
3203 if (ParseInstructionMetadata(Inst, &PFS))
3211 if (ParseInstructionMetadata(Inst, &PFS))
3217 if (PFS.SetInstName(NameID, NameStr, NameLoc, Inst)) return true;
3230 PerFunctionState &PFS) {
3242 case lltok::kw_ret: return ParseRet(Inst, BB, PFS);
3243 case lltok::kw_br: return ParseBr(Inst, PFS);
3244 case lltok::kw_switch: return ParseSwitch(Inst, PFS);
3245 case lltok::kw_indirectbr: return ParseIndirectBr(Inst, PFS);
3246 case lltok::kw_invoke: return ParseInvoke(Inst, PFS);
3247 case lltok::kw_resume: return ParseResume(Inst, PFS);
3257 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true;
3269 int Res = ParseArithmetic(Inst, PFS, KeywordVal, 2);
3283 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true;
3289 case lltok::kw_srem: return ParseArithmetic(Inst, PFS, KeywordVal, 1);
3292 case lltok::kw_xor: return ParseLogical(Inst, PFS, KeywordVal);
3294 PFS, KeywordVal);
3307 case lltok::kw_ptrtoint: return ParseCast(Inst, PFS, KeywordVal);
3309 case lltok::kw_select: return ParseSelect(Inst, PFS);
3310 case lltok::kw_va_arg: return ParseVA_Arg(Inst, PFS);
3311 case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS);
3312 case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS);
3313 case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS);
3314 case lltok::kw_phi: return ParsePHI(Inst, PFS);
3315 case lltok::kw_landingpad: return ParseLandingPad(Inst, PFS);
3316 case lltok::kw_call: return ParseCall(Inst, PFS, false);
3317 case lltok::kw_tail: return ParseCall(Inst, PFS, true);
3319 case lltok::kw_alloca: return ParseAlloc(Inst, PFS);
3320 case lltok::kw_load: return ParseLoad(Inst, PFS);
3321 case lltok::kw_store: return ParseStore(Inst, PFS);
3322 case lltok::kw_cmpxchg: return ParseCmpXchg(Inst, PFS);
3323 case lltok::kw_atomicrmw: return ParseAtomicRMW(Inst, PFS);
3324 case lltok::kw_fence: return ParseFence(Inst, PFS);
3325 case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS);
3326 case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS);
3327 case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS);
3380 PerFunctionState &PFS) {
3385 Type *ResType = PFS.getFunction().getReturnType();
3397 if (ParseValue(Ty, RV, PFS)) return true;
3411 bool LLParser::ParseBr(Instruction *&Inst, PerFunctionState &PFS) {
3415 if (ParseTypeAndValue(Op0, Loc, PFS)) return true;
3426 ParseTypeAndBasicBlock(Op1, Loc, PFS) ||
3428 ParseTypeAndBasicBlock(Op2, Loc2, PFS))
3440 bool LLParser::ParseSwitch(Instruction *&Inst, PerFunctionState &PFS) {
3444 if (ParseTypeAndValue(Cond, CondLoc, PFS) ||
3446 ParseTypeAndBasicBlock(DefaultBB, BBLoc, PFS) ||
3460 if (ParseTypeAndValue(Constant, CondLoc, PFS) ||
3462 ParseTypeAndBasicBlock(DestBB, PFS))
3485 bool LLParser::ParseIndirectBr(Instruction *&Inst, PerFunctionState &PFS) {
3488 if (ParseTypeAndValue(Address, AddrLoc, PFS) ||
3501 if (ParseTypeAndBasicBlock(DestBB, PFS))
3506 if (ParseTypeAndBasicBlock(DestBB, PFS))
3526 bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) {
3542 ParseParameterList(ArgList, PFS) ||
3546 ParseTypeAndBasicBlock(NormalBB, PFS) ||
3548 ParseTypeAndBasicBlock(UnwindBB, PFS))
3572 if (ConvertValIDToValue(PFTy, CalleeID, Callee, &PFS)) return true;
3626 bool LLParser::ParseResume(Instruction *&Inst, PerFunctionState &PFS) {
3628 if (ParseTypeAndValue(Exn, ExnLoc, PFS))
3645 bool LLParser::ParseArithmetic(Instruction *&Inst, PerFunctionState &PFS,
3648 if (ParseTypeAndValue(LHS, Loc, PFS) ||
3650 ParseValue(LHS->getType(), RHS, PFS))
3673 bool LLParser::ParseLogical(Instruction *&Inst, PerFunctionState &PFS,
3676 if (ParseTypeAndValue(LHS, Loc, PFS) ||
3678 ParseValue(LHS->getType(), RHS, PFS))
3692 bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS,
3699 ParseTypeAndValue(LHS, Loc, PFS) ||
3701 ParseValue(LHS->getType(), RHS, PFS))
3725 bool LLParser::ParseCast(Instruction *&Inst, PerFunctionState &PFS,
3730 if (ParseTypeAndValue(Op, Loc, PFS) ||
3747 PFS) {
3750 if (ParseTypeAndValue(Op0, Loc, PFS) ||
3752 ParseTypeAndValue(Op1, PFS) ||
3754 ParseTypeAndValue(Op2, PFS))
3766 bool LLParser::ParseVA_Arg(Instruction *&Inst, PerFunctionState &PFS) {
3770 if (ParseTypeAndValue(Op, PFS) ||
3784 bool LLParser::ParseExtractElement(Instruction *&Inst, PerFunctionState &PFS) {
3787 if (ParseTypeAndValue(Op0, Loc, PFS) ||
3789 ParseTypeAndValue(Op1, PFS))
3801 bool LLParser::ParseInsertElement(Instruction *&Inst, PerFunctionState &PFS) {
3804 if (ParseTypeAndValue(Op0, Loc, PFS) ||
3806 ParseTypeAndValue(Op1, PFS) ||
3808 ParseTypeAndValue(Op2, PFS))
3820 bool LLParser::ParseShuffleVector(Instruction *&Inst, PerFunctionState &PFS) {
3823 if (ParseTypeAndValue(Op0, Loc, PFS) ||
3825 ParseTypeAndValue(Op1, PFS) ||
3827 ParseTypeAndValue(Op2, PFS))
3839 int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) {
3845 ParseValue(Ty, Op0, PFS) ||
3847 ParseValue(Type::getLabelTy(Context), Op1, PFS) ||
3865 ParseValue(Ty, Op0, PFS) ||
3867 ParseValue(Type::getLabelTy(Context), Op1, PFS) ||
3888 bool LLParser::ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS) {
3894 ParseTypeAndValue(PersFn, PersFnLoc, PFS))
3910 if (ParseTypeAndValue(V, VLoc, PFS)) {
3935 bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS,
3952 ParseParameterList(ArgList, PFS) ||
3978 if (ConvertValIDToValue(PFTy, CalleeID, Callee, &PFS)) return true;
4037 int LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS) {
4051 if (ParseTypeAndValue(Size, SizeLoc, PFS) ||
4068 int LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS) {
4087 if (ParseTypeAndValue(Val, Loc, PFS) ||
4109 int LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS) {
4128 if (ParseTypeAndValue(Val, Loc, PFS) ||
4130 ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
4153 int LLParser::ParseCmpXchg(Instruction *&Inst, PerFunctionState &PFS) {
4163 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
4165 ParseTypeAndValue(Cmp, CmpLoc, PFS) ||
4167 ParseTypeAndValue(New, NewLoc, PFS) ||
4196 int LLParser::ParseAtomicRMW(Instruction *&Inst, PerFunctionState &PFS) {
4223 if (ParseTypeAndValue(Ptr, PtrLoc, PFS) ||
4225 ParseTypeAndValue(Val, ValLoc, PFS) ||
4251 int LLParser::ParseFence(Instruction *&Inst, PerFunctionState &PFS) {
4268 int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
4275 if (ParseTypeAndValue(Ptr, Loc, PFS)) return true;
4289 if (ParseTypeAndValue(Val, EltLoc, PFS)) return true;
4317 int LLParser::ParseExtractValue(Instruction *&Inst, PerFunctionState &PFS) {
4321 if (ParseTypeAndValue(Val, Loc, PFS) ||
4336 int LLParser::ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS) {
4340 if (ParseTypeAndValue(Val0, Loc0, PFS) ||
4342 ParseTypeAndValue(Val1, Loc1, PFS) ||
4364 PerFunctionState *PFS) {
4377 if (ParseTypeAndValue(V, PFS)) return true;