• Home
  • Raw
  • Download

Lines Matching refs:PFS

130                                                PerFunctionState *PFS) {  in ResolveForwardRefBlockAddresses()  argument
134 if (PFS) { in ResolveForwardRefBlockAddresses()
136 Res = PFS->GetBB(Refs[i].first.StrVal, Refs[i].first.Loc); in ResolveForwardRefBlockAddresses()
138 Res = PFS->GetBB(Refs[i].first.UIntVal, Refs[i].first.Loc); in ResolveForwardRefBlockAddresses()
1063 PerFunctionState *PFS) { in ParseInstructionMetadata() argument
1084 if (ParseMetadataListValue(ID, PFS)) in ParseInstructionMetadata()
1319 PerFunctionState &PFS) { in ParseParameterList() argument
1339 if (ParseOptionalAttrs(ArgAttrs1, 0) || ParseValue(ArgTy, V, PFS)) in ParseParameterList()
1863 bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { in ParseValID() argument
1884 return ParseMetadataValue(ID, PFS); in ParseValID()
2366 bool LLParser::ParseMetadataListValue(ValID &ID, PerFunctionState *PFS) { in ParseMetadataListValue() argument
2371 if (ParseMDNodeVector(Elts, PFS) || in ParseMetadataListValue()
2384 bool LLParser::ParseMetadataValue(ValID &ID, PerFunctionState *PFS) { in ParseMetadataValue() argument
2391 return ParseMetadataListValue(ID, PFS); in ParseMetadataValue()
2414 PerFunctionState *PFS) { in ConvertValIDToValue() argument
2421 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); in ConvertValIDToValue()
2422 V = PFS->GetVal(ID.UIntVal, Ty, ID.Loc); in ConvertValIDToValue()
2425 if (!PFS) return Error(ID.Loc, "invalid use of function-local name"); in ConvertValIDToValue()
2426 V = PFS->GetVal(ID.StrVal, Ty, ID.Loc); in ConvertValIDToValue()
2530 bool LLParser::ParseValue(Type *Ty, Value *&V, PerFunctionState *PFS) { in ParseValue() argument
2533 return ParseValID(ID, PFS) || in ParseValue()
2534 ConvertValIDToValue(Ty, ID, V, PFS); in ParseValue()
2537 bool LLParser::ParseTypeAndValue(Value *&V, PerFunctionState *PFS) { in ParseTypeAndValue() argument
2540 ParseValue(Ty, V, PFS); in ParseTypeAndValue()
2544 PerFunctionState &PFS) { in ParseTypeAndBasicBlock() argument
2547 if (ParseTypeAndValue(V, PFS)) return true; in ParseTypeAndBasicBlock()
2759 PerFunctionState PFS(*this, Fn, FunctionNumber); in ParseFunctionBody() local
2766 if (ParseBasicBlock(PFS)) return true; in ParseFunctionBody()
2772 return PFS.FinishFunction(); in ParseFunctionBody()
2777 bool LLParser::ParseBasicBlock(PerFunctionState &PFS) { in ParseBasicBlock() argument
2786 BasicBlock *BB = PFS.DefineBB(Name, NameLoc); in ParseBasicBlock()
2813 switch (ParseInstruction(Inst, BB, PFS)) { in ParseBasicBlock()
2822 if (ParseInstructionMetadata(Inst, &PFS)) in ParseBasicBlock()
2830 if (ParseInstructionMetadata(Inst, &PFS)) in ParseBasicBlock()
2836 if (PFS.SetInstName(NameID, NameStr, NameLoc, Inst)) return true; in ParseBasicBlock()
2849 PerFunctionState &PFS) { in ParseInstruction() argument
2862 case lltok::kw_ret: return ParseRet(Inst, BB, PFS); in ParseInstruction()
2863 case lltok::kw_br: return ParseBr(Inst, PFS); in ParseInstruction()
2864 case lltok::kw_switch: return ParseSwitch(Inst, PFS); in ParseInstruction()
2865 case lltok::kw_indirectbr: return ParseIndirectBr(Inst, PFS); in ParseInstruction()
2866 case lltok::kw_invoke: return ParseInvoke(Inst, PFS); in ParseInstruction()
2876 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true; in ParseInstruction()
2884 case lltok::kw_fmul: return ParseArithmetic(Inst, PFS, KeywordVal, 2); in ParseInstruction()
2892 if (ParseArithmetic(Inst, PFS, KeywordVal, 1)) return true; in ParseInstruction()
2898 case lltok::kw_srem: return ParseArithmetic(Inst, PFS, KeywordVal, 1); in ParseInstruction()
2900 case lltok::kw_frem: return ParseArithmetic(Inst, PFS, KeywordVal, 2); in ParseInstruction()
2903 case lltok::kw_xor: return ParseLogical(Inst, PFS, KeywordVal); in ParseInstruction()
2905 case lltok::kw_fcmp: return ParseCompare(Inst, PFS, KeywordVal); in ParseInstruction()
2918 case lltok::kw_ptrtoint: return ParseCast(Inst, PFS, KeywordVal); in ParseInstruction()
2920 case lltok::kw_select: return ParseSelect(Inst, PFS); in ParseInstruction()
2921 case lltok::kw_va_arg: return ParseVA_Arg(Inst, PFS); in ParseInstruction()
2922 case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS); in ParseInstruction()
2923 case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS); in ParseInstruction()
2924 case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS); in ParseInstruction()
2925 case lltok::kw_phi: return ParsePHI(Inst, PFS); in ParseInstruction()
2926 case lltok::kw_call: return ParseCall(Inst, PFS, false); in ParseInstruction()
2927 case lltok::kw_tail: return ParseCall(Inst, PFS, true); in ParseInstruction()
2929 case lltok::kw_alloca: return ParseAlloc(Inst, PFS); in ParseInstruction()
2930 case lltok::kw_load: return ParseLoad(Inst, PFS, false); in ParseInstruction()
2931 case lltok::kw_store: return ParseStore(Inst, PFS, false); in ParseInstruction()
2934 return ParseLoad(Inst, PFS, true); in ParseInstruction()
2936 return ParseStore(Inst, PFS, true); in ParseInstruction()
2939 case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS); in ParseInstruction()
2940 case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS); in ParseInstruction()
2941 case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS); in ParseInstruction()
2994 PerFunctionState &PFS) { in ParseRet() argument
2999 Type *ResType = PFS.getFunction().getReturnType(); in ParseRet()
3011 if (ParseValue(Ty, RV, PFS)) return true; in ParseRet()
3025 bool LLParser::ParseBr(Instruction *&Inst, PerFunctionState &PFS) { in ParseBr() argument
3029 if (ParseTypeAndValue(Op0, Loc, PFS)) return true; in ParseBr()
3040 ParseTypeAndBasicBlock(Op1, Loc, PFS) || in ParseBr()
3042 ParseTypeAndBasicBlock(Op2, Loc2, PFS)) in ParseBr()
3054 bool LLParser::ParseSwitch(Instruction *&Inst, PerFunctionState &PFS) { in ParseSwitch() argument
3058 if (ParseTypeAndValue(Cond, CondLoc, PFS) || in ParseSwitch()
3060 ParseTypeAndBasicBlock(DefaultBB, BBLoc, PFS) || in ParseSwitch()
3074 if (ParseTypeAndValue(Constant, CondLoc, PFS) || in ParseSwitch()
3076 ParseTypeAndBasicBlock(DestBB, PFS)) in ParseSwitch()
3099 bool LLParser::ParseIndirectBr(Instruction *&Inst, PerFunctionState &PFS) { in ParseIndirectBr() argument
3102 if (ParseTypeAndValue(Address, AddrLoc, PFS) || in ParseIndirectBr()
3115 if (ParseTypeAndBasicBlock(DestBB, PFS)) in ParseIndirectBr()
3120 if (ParseTypeAndBasicBlock(DestBB, PFS)) in ParseIndirectBr()
3140 bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { in ParseInvoke() argument
3154 ParseParameterList(ArgList, PFS) || in ParseInvoke()
3157 ParseTypeAndBasicBlock(NormalBB, PFS) || in ParseInvoke()
3159 ParseTypeAndBasicBlock(UnwindBB, PFS)) in ParseInvoke()
3183 if (ConvertValIDToValue(PFTy, CalleeID, Callee, &PFS)) return true; in ParseInvoke()
3239 bool LLParser::ParseArithmetic(Instruction *&Inst, PerFunctionState &PFS, in ParseArithmetic() argument
3242 if (ParseTypeAndValue(LHS, Loc, PFS) || in ParseArithmetic()
3244 ParseValue(LHS->getType(), RHS, PFS)) in ParseArithmetic()
3267 bool LLParser::ParseLogical(Instruction *&Inst, PerFunctionState &PFS, in ParseLogical() argument
3270 if (ParseTypeAndValue(LHS, Loc, PFS) || in ParseLogical()
3272 ParseValue(LHS->getType(), RHS, PFS)) in ParseLogical()
3286 bool LLParser::ParseCompare(Instruction *&Inst, PerFunctionState &PFS, in ParseCompare() argument
3293 ParseTypeAndValue(LHS, Loc, PFS) || in ParseCompare()
3295 ParseValue(LHS->getType(), RHS, PFS)) in ParseCompare()
3319 bool LLParser::ParseCast(Instruction *&Inst, PerFunctionState &PFS, in ParseCast() argument
3324 if (ParseTypeAndValue(Op, Loc, PFS) || in ParseCast()
3341 bool LLParser::ParseSelect(Instruction *&Inst, PerFunctionState &PFS) { in ParseSelect() argument
3344 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseSelect()
3346 ParseTypeAndValue(Op1, PFS) || in ParseSelect()
3348 ParseTypeAndValue(Op2, PFS)) in ParseSelect()
3360 bool LLParser::ParseVA_Arg(Instruction *&Inst, PerFunctionState &PFS) { in ParseVA_Arg() argument
3364 if (ParseTypeAndValue(Op, PFS) || in ParseVA_Arg()
3378 bool LLParser::ParseExtractElement(Instruction *&Inst, PerFunctionState &PFS) { in ParseExtractElement() argument
3381 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseExtractElement()
3383 ParseTypeAndValue(Op1, PFS)) in ParseExtractElement()
3395 bool LLParser::ParseInsertElement(Instruction *&Inst, PerFunctionState &PFS) { in ParseInsertElement() argument
3398 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseInsertElement()
3400 ParseTypeAndValue(Op1, PFS) || in ParseInsertElement()
3402 ParseTypeAndValue(Op2, PFS)) in ParseInsertElement()
3414 bool LLParser::ParseShuffleVector(Instruction *&Inst, PerFunctionState &PFS) { in ParseShuffleVector() argument
3417 if (ParseTypeAndValue(Op0, Loc, PFS) || in ParseShuffleVector()
3419 ParseTypeAndValue(Op1, PFS) || in ParseShuffleVector()
3421 ParseTypeAndValue(Op2, PFS)) in ParseShuffleVector()
3433 int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) { in ParsePHI() argument
3439 ParseValue(Ty, Op0, PFS) || in ParsePHI()
3441 ParseValue(Type::getLabelTy(Context), Op1, PFS) || in ParsePHI()
3459 ParseValue(Ty, Op0, PFS) || in ParsePHI()
3461 ParseValue(Type::getLabelTy(Context), Op1, PFS) || in ParsePHI()
3479 bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, in ParseCall() argument
3494 ParseParameterList(ArgList, PFS) || in ParseCall()
3519 if (ConvertValIDToValue(PFTy, CalleeID, Callee, &PFS)) return true; in ParseCall()
3571 int LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS) { in ParseAlloc() argument
3585 if (ParseTypeAndValue(Size, SizeLoc, PFS) || in ParseAlloc()
3600 int LLParser::ParseLoad(Instruction *&Inst, PerFunctionState &PFS, in ParseLoad() argument
3605 if (ParseTypeAndValue(Val, Loc, PFS) || in ParseLoad()
3619 int LLParser::ParseStore(Instruction *&Inst, PerFunctionState &PFS, in ParseStore() argument
3624 if (ParseTypeAndValue(Val, Loc, PFS) || in ParseStore()
3626 ParseTypeAndValue(Ptr, PtrLoc, PFS) || in ParseStore()
3643 int LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) { in ParseGetElementPtr() argument
3648 if (ParseTypeAndValue(Ptr, Loc, PFS)) return true; in ParseGetElementPtr()
3660 if (ParseTypeAndValue(Val, EltLoc, PFS)) return true; in ParseGetElementPtr()
3677 int LLParser::ParseExtractValue(Instruction *&Inst, PerFunctionState &PFS) { in ParseExtractValue() argument
3681 if (ParseTypeAndValue(Val, Loc, PFS) || in ParseExtractValue()
3696 int LLParser::ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS) { in ParseInsertValue() argument
3700 if (ParseTypeAndValue(Val0, Loc0, PFS) || in ParseInsertValue()
3702 ParseTypeAndValue(Val1, Loc1, PFS) || in ParseInsertValue()
3724 PerFunctionState *PFS) { in ParseMDNodeVector() argument
3737 if (ParseTypeAndValue(V, PFS)) return true; in ParseMDNodeVector()