/external/llvm/lib/Analysis/ |
D | TargetLibraryInfo.cpp | 490 bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, in isValidProtoForLibFunc() argument 493 LLVMContext &Ctx = FTy.getContext(); in isValidProtoForLibFunc() 499 unsigned NumParams = FTy.getNumParams(); in isValidProtoForLibFunc() 503 return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && in isValidProtoForLibFunc() 504 FTy.getReturnType()->isIntegerTy()); in isValidProtoForLibFunc() 508 return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && in isValidProtoForLibFunc() 509 FTy.getParamType(0) == FTy.getReturnType() && in isValidProtoForLibFunc() 510 FTy.getParamType(1)->isIntegerTy()); in isValidProtoForLibFunc() 520 FTy.getParamType(0)->isPointerTy() && in isValidProtoForLibFunc() 521 FTy.getParamType(1)->isPointerTy()); in isValidProtoForLibFunc() [all …]
|
D | MemoryBuiltins.cpp | 153 FunctionType *FTy = Callee->getFunctionType(); in getAllocationData() local 155 if (FTy->getReturnType() == Type::getInt8PtrTy(FTy->getContext()) && in getAllocationData() 156 FTy->getNumParams() == FnData->NumParams && in getAllocationData() 158 (FTy->getParamType(FstParam)->isIntegerTy(32) || in getAllocationData() 159 FTy->getParamType(FstParam)->isIntegerTy(64))) && in getAllocationData() 161 FTy->getParamType(SndParam)->isIntegerTy(32) || in getAllocationData() 162 FTy->getParamType(SndParam)->isIntegerTy(64))) in getAllocationData() 353 FunctionType *FTy = Callee->getFunctionType(); in isFreeCall() local 354 if (!FTy->getReturnType()->isVoidTy()) in isFreeCall() 356 if (FTy->getNumParams() != ExpectedNumParams) in isFreeCall() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | SimplifyLibCalls.cpp | 1693 FunctionType *FTy = F.getFunctionType(); in inferPrototypeAttributes() local 1699 if (FTy->getNumParams() != 1 || !FTy->getParamType(0)->isPointerTy()) in inferPrototypeAttributes() 1706 if (FTy->getNumParams() != 2 || in inferPrototypeAttributes() 1707 !FTy->getParamType(0)->isPointerTy() || in inferPrototypeAttributes() 1708 !FTy->getParamType(1)->isIntegerTy()) in inferPrototypeAttributes() 1724 if (FTy->getNumParams() < 2 || in inferPrototypeAttributes() 1725 !FTy->getParamType(1)->isPointerTy()) in inferPrototypeAttributes() 1730 if (FTy->getNumParams() != 3 || in inferPrototypeAttributes() 1731 !FTy->getParamType(0)->isPointerTy() || in inferPrototypeAttributes() 1732 !FTy->getParamType(1)->isPointerTy()) in inferPrototypeAttributes() [all …]
|
/external/llvm/lib/ExecutionEngine/Orc/ |
D | OrcMCJITReplacement.cpp | 33 FunctionType *FTy = F->getFunctionType(); in runFunction() local 34 Type *RetTy = FTy->getReturnType(); in runFunction() 36 assert((FTy->getNumParams() == ArgValues.size() || in runFunction() 37 (FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) && in runFunction() 39 assert(FTy->getNumParams() == ArgValues.size() && in runFunction() 47 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 48 FTy->getParamType(1)->isPointerTy() && in runFunction() 49 FTy->getParamType(2)->isPointerTy()) { in runFunction() 62 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 63 FTy->getParamType(1)->isPointerTy()) { in runFunction() [all …]
|
/external/swiftshader/third_party/LLVM/lib/ExecutionEngine/MCJIT/ |
D | MCJIT.cpp | 128 FunctionType *FTy = F->getFunctionType(); in runFunction() local 129 Type *RetTy = FTy->getReturnType(); in runFunction() 131 assert((FTy->getNumParams() == ArgValues.size() || in runFunction() 132 (FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) && in runFunction() 134 assert(FTy->getNumParams() == ArgValues.size() && in runFunction() 142 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 143 FTy->getParamType(1)->isPointerTy() && in runFunction() 144 FTy->getParamType(2)->isPointerTy()) { in runFunction() 157 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 158 FTy->getParamType(1)->isPointerTy()) { in runFunction() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | MemoryBuiltins.cpp | 50 FunctionType *FTy = Callee->getFunctionType(); in isMallocCall() local 51 if (FTy->getNumParams() != 1) in isMallocCall() 53 return FTy->getParamType(0)->isIntegerTy(32) || in isMallocCall() 54 FTy->getParamType(0)->isIntegerTy(64); in isMallocCall() 204 FunctionType *FTy = Callee->getFunctionType(); in isFreeCall() local 205 if (!FTy->getReturnType()->isVoidTy()) in isFreeCall() 207 if (FTy->getNumParams() != 1) in isFreeCall() 209 if (FTy->getParamType(0) != Type::getInt8PtrTy(Callee->getContext())) in isFreeCall()
|
/external/llvm/unittests/IR/ |
D | VerifierTest.cpp | 29 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), /*isVarArg=*/false); in TEST() local 30 Function *F = cast<Function>(M.getOrInsertFunction("foo", FTy)); in TEST() 52 FunctionType *FTy = FunctionType::get(Type::getInt32Ty(C), /*isVarArg=*/false); in TEST() local 53 Function *F = cast<Function>(M.getOrInsertFunction("foo", FTy)); in TEST() 70 FunctionType *FTy = FunctionType::get(Type::getInt32Ty(C), /*isVarArg=*/false); in TEST() local 71 Function *F1 = cast<Function>(M1.getOrInsertFunction("foo1", FTy)); in TEST() 72 Function *F2 = cast<Function>(M2.getOrInsertFunction("foo2", FTy)); in TEST() 73 Function *F3 = cast<Function>(M3.getOrInsertFunction("foo3", FTy)); in TEST() 166 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), /*isVarArg=*/false); in TEST() local 167 Function::Create(FTy, GlobalValue::LinkOnceODRLinkage, "foo", &M); in TEST()
|
D | FunctionTest.cpp | 20 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), ArgTypes, false); in TEST() local 24 Function::Create(FTy, GlobalValue::ExternalLinkage, "F")); in TEST() 42 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), ArgTypes, false); in TEST() local 44 Function::Create(FTy, GlobalValue::ExternalLinkage, "F1")); in TEST() 46 Function::Create(FTy, GlobalValue::ExternalLinkage, "F1")); in TEST()
|
/external/llvm/lib/IR/ |
D | InlineAsm.cpp | 27 InlineAsm *InlineAsm::get(FunctionType *FTy, StringRef AsmString, in get() argument 30 InlineAsmKeyType Key(AsmString, Constraints, FTy, hasSideEffects, in get() 32 LLVMContextImpl *pImpl = FTy->getContext().pImpl; in get() 33 return pImpl->InlineAsms.getOrCreate(PointerType::getUnqual(FTy), Key); in get() 36 InlineAsm::InlineAsm(FunctionType *FTy, const std::string &asmString, in InlineAsm() argument 39 : Value(PointerType::getUnqual(FTy), Value::InlineAsmVal), in InlineAsm() 40 AsmString(asmString), Constraints(constraints), FTy(FTy), in InlineAsm() 55 return FTy; in getFunctionType()
|
D | ConstantsContext.h | 397 FunctionType *FTy; 403 FunctionType *FTy, bool HasSideEffects, bool IsAlignStack, 405 : AsmString(AsmString), Constraints(Constraints), FTy(FTy), 410 FTy(Asm->getFunctionType()), HasSideEffects(Asm->hasSideEffects()), 417 FTy == X.FTy; 425 FTy == Asm->getFunctionType(); 429 AsmDialect, FTy); 434 assert(PointerType::getUnqual(FTy) == Ty); 435 return new InlineAsm(FTy, AsmString, Constraints, HasSideEffects,
|
/external/swiftshader/third_party/LLVM/lib/ExecutionEngine/JIT/ |
D | JIT.cpp | 393 FunctionType *FTy = F->getFunctionType(); in runFunction() local 394 Type *RetTy = FTy->getReturnType(); in runFunction() 396 assert((FTy->getNumParams() == ArgValues.size() || in runFunction() 397 (FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) && in runFunction() 399 assert(FTy->getNumParams() == ArgValues.size() && in runFunction() 407 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 408 FTy->getParamType(1)->isPointerTy() && in runFunction() 409 FTy->getParamType(2)->isPointerTy()) { in runFunction() 422 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 423 FTy->getParamType(1)->isPointerTy()) { in runFunction() [all …]
|
/external/llvm/lib/ExecutionEngine/MCJIT/ |
D | MCJIT.cpp | 499 FunctionType *FTy = F->getFunctionType(); in runFunction() local 500 Type *RetTy = FTy->getReturnType(); in runFunction() 502 assert((FTy->getNumParams() == ArgValues.size() || in runFunction() 503 (FTy->isVarArg() && FTy->getNumParams() <= ArgValues.size())) && in runFunction() 505 assert(FTy->getNumParams() == ArgValues.size() && in runFunction() 513 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 514 FTy->getParamType(1)->isPointerTy() && in runFunction() 515 FTy->getParamType(2)->isPointerTy()) { in runFunction() 528 if (FTy->getParamType(0)->isIntegerTy(32) && in runFunction() 529 FTy->getParamType(1)->isPointerTy()) { in runFunction() [all …]
|
/external/llvm/unittests/Transforms/Utils/ |
D | ValueMapperTest.cpp | 175 FunctionType *FTy = in TEST() local 178 Function::Create(FTy, GlobalValue::ExternalLinkage, "F")); in TEST() 234 FunctionType *FTy = in TEST() local 237 Function::Create(FTy, GlobalValue::ExternalLinkage, "F")); in TEST() 256 Function::Create(FTy, GlobalValue::ExternalLinkage, "F2")); in TEST() 269 FunctionType *FTy = in TEST() local 272 Function::Create(FTy, GlobalValue::ExternalLinkage, "F")); in TEST() 288 FunctionType *FTy = in TEST() local 291 Function::Create(FTy, GlobalValue::ExternalLinkage, "F")); in TEST() 331 FunctionType *FTy = FunctionType::get(Type::getVoidTy(Context), Int8, false); in TEST() local [all …]
|
/external/llvm/lib/Transforms/Instrumentation/ |
D | GCOVProfiling.cpp | 683 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false); in emitProfileArcs() local 684 Function *F = Function::Create(FTy, GlobalValue::InternalLinkage, in emitProfileArcs() 695 FTy = FunctionType::get(Type::getVoidTy(*Ctx), false); in emitProfileArcs() 697 PointerType::get(FTy, 0), in emitProfileArcs() 698 PointerType::get(FTy, 0) in emitProfileArcs() 700 FTy = FunctionType::get(Builder.getVoidTy(), Params, false); in emitProfileArcs() 704 Constant *GCOVInit = M->getOrInsertFunction("llvm_gcov_init", FTy); in emitProfileArcs() 771 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), Args, false); in getStartFileFunc() local 772 return M->getOrInsertFunction("llvm_gcda_start_file", FTy); in getStartFileFunc() 782 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), Args, false); in getIncrementIndirectCounterFunc() local [all …]
|
/external/swiftshader/third_party/LLVM/lib/VMCore/ |
D | AutoUpgrade.cpp | 41 FunctionType *FTy = F->getFunctionType(); in UpgradeIntrinsicFunction1() local 65 if (FTy->getReturnType()->isVoidTy()) in UpgradeIntrinsicFunction1() 68 assert(FTy->getNumParams() == 3 && "old init.trampoline takes 3 args!"); in UpgradeIntrinsicFunction1() 76 FTy->getParamType(0), FTy->getParamType(1), in UpgradeIntrinsicFunction1() 77 FTy->getParamType(2), (Type *)0)); in UpgradeIntrinsicFunction1() 89 if (FTy->getNumParams() == 4) in UpgradeIntrinsicFunction1() 92 assert(FTy->getNumParams() == 3 && "old prefetch takes 3 args!"); in UpgradeIntrinsicFunction1() 100 FTy->getReturnType(), in UpgradeIntrinsicFunction1() 101 FTy->getParamType(0), in UpgradeIntrinsicFunction1() 102 FTy->getParamType(1), in UpgradeIntrinsicFunction1() [all …]
|
D | Verifier.cpp | 1112 FunctionType *FTy = cast<FunctionType>(FPTy->getElementType()); in VerifyCallSite() local 1115 if (FTy->isVarArg()) in VerifyCallSite() 1116 Assert1(CS.arg_size() >= FTy->getNumParams(), in VerifyCallSite() 1119 Assert1(CS.arg_size() == FTy->getNumParams(), in VerifyCallSite() 1123 for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) in VerifyCallSite() 1124 Assert3(CS.getArgument(i)->getType() == FTy->getParamType(i), in VerifyCallSite() 1126 CS.getArgument(i), FTy->getParamType(i), I); in VerifyCallSite() 1134 VerifyFunctionAttrs(FTy, Attrs, I); in VerifyCallSite() 1136 if (FTy->isVarArg()) in VerifyCallSite() 1138 for (unsigned Idx = 1 + FTy->getNumParams(); Idx <= CS.arg_size(); ++Idx) { in VerifyCallSite() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | TargetTransformInfoImpl.h | 116 unsigned getCallCost(FunctionType *FTy, int NumArgs) { in getCallCost() argument 117 assert(FTy && "FunctionType must be provided to this routine."); in getCallCost() 126 NumArgs = FTy->getNumParams(); in getCallCost() 414 FunctionType *FTy = F->getFunctionType(); in getCallCost() local 415 SmallVector<Type *, 8> ParamTys(FTy->param_begin(), FTy->param_end()); in getCallCost() 417 ->getIntrinsicCost(IID, FTy->getReturnType(), ParamTys); in getCallCost() 517 Type *FTy = CS.getCalledValue()->getType()->getPointerElementType(); in getUserCost() local 519 ->getCallCost(cast<FunctionType>(FTy), CS.arg_size()); in getUserCost()
|
/external/clang/lib/CodeGen/ |
D | CGDeclCXX.cpp | 260 llvm::FunctionType *FTy, const Twine &Name, const CGFunctionInfo &FI, in CreateGlobalInitOrDestructFunction() argument 263 llvm::Function::Create(FTy, llvm::GlobalValue::InternalLinkage, in CreateGlobalInitOrDestructFunction() 331 llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, false); in EmitCXXGlobalVarDeclInitFunc() local 340 CreateGlobalInitOrDestructFunction(FTy, FnName.str(), in EmitCXXGlobalVarDeclInitFunc() 416 llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, false); in EmitCXXGlobalInitFunc() local 441 FTy, "_GLOBAL__I_" + PrioritySuffix, FI); in EmitCXXGlobalInitFunc() 471 FTy, llvm::Twine("_GLOBAL__sub_I_", FileName), FI); in EmitCXXGlobalInitFunc() 483 llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, false); in EmitCXXGlobalDtorFunc() local 488 CreateGlobalInitOrDestructFunction(FTy, "_GLOBAL__D_a", FI); in EmitCXXGlobalDtorFunc() 611 llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType(FI); in generateDestroyHelper() local [all …]
|
/external/llvm/unittests/Linker/ |
D | LinkModulesTest.cpp | 31 FunctionType *FTy = FunctionType::get( in SetUp() local 33 F = Function::Create(FTy, Function::ExternalLinkage, "ba_func", M.get()); in SetUp() 136 FunctionType *FTy = FunctionType::get( in getExternal() local 140 Function::Create(FTy, Function::ExternalLinkage, FuncName, M); in getExternal() 151 FunctionType *FTy = FunctionType::get( in getInternal() local 155 Function::Create(FTy, Function::InternalLinkage, "bar", InternalM); in getInternal() 162 StructType *STy = StructType::create(Ctx, PointerType::get(FTy, 0)); in getInternal()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Instrumentation/ |
D | GCOVProfiling.cpp | 570 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), in getStartFileFunc() local 572 return M->getOrInsertFunction("llvm_gcda_start_file", FTy); in getStartFileFunc() 580 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), in getIncrementIndirectCounterFunc() local 582 return M->getOrInsertFunction("llvm_gcda_increment_indirect_counter", FTy); in getIncrementIndirectCounterFunc() 590 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), in getEmitFunctionFunc() local 592 return M->getOrInsertFunction("llvm_gcda_emit_function", FTy); in getEmitFunctionFunc() 600 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), in getEmitArcsFunc() local 602 return M->getOrInsertFunction("llvm_gcda_emit_arcs", FTy); in getEmitArcsFunc() 606 FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false); in getEndFileFunc() local 607 return M->getOrInsertFunction("llvm_gcda_end_file", FTy); in getEndFileFunc()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/IPO/ |
D | DeadArgumentElimination.cpp | 209 FunctionType *FTy = Fn.getFunctionType(); in DeleteDeadVarargs() local 211 std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); in DeleteDeadVarargs() 212 FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), in DeleteDeadVarargs() 649 FunctionType *FTy = F->getFunctionType(); in RemoveDeadStuffFromFunction() local 662 Type *RetTy = FTy->getReturnType(); in RemoveDeadStuffFromFunction() 729 SmallVector<bool, 10> ArgAlive(FTy->getNumParams(), false); in RemoveDeadStuffFromFunction() 760 FunctionType *NFTy = FunctionType::get(NRetTy, Params, FTy->isVarArg()); in RemoveDeadStuffFromFunction() 763 if (NFTy == FTy) in RemoveDeadStuffFromFunction() 800 for (unsigned e = FTy->getNumParams(); i != e; ++I, ++i) in RemoveDeadStuffFromFunction()
|
/external/llvm/lib/Transforms/IPO/ |
D | DeadArgumentElimination.cpp | 141 FunctionType *FTy = Fn.getFunctionType(); in DeleteDeadVarargs() local 143 std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); in DeleteDeadVarargs() 144 FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), in DeleteDeadVarargs() 677 FunctionType *FTy = F->getFunctionType(); in RemoveDeadStuffFromFunction() local 688 SmallVector<bool, 10> ArgAlive(FTy->getNumParams(), false); in RemoveDeadStuffFromFunction() 718 Type *RetTy = FTy->getReturnType(); in RemoveDeadStuffFromFunction() 808 FunctionType *NFTy = FunctionType::get(NRetTy, Params, FTy->isVarArg()); in RemoveDeadStuffFromFunction() 811 if (NFTy == FTy) in RemoveDeadStuffFromFunction() 851 for (unsigned e = FTy->getNumParams(); i != e; ++I, ++i) in RemoveDeadStuffFromFunction()
|
/external/llvm/unittests/ProfileData/ |
D | InstrProfTest.cpp | 275 FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx), in TEST_P() local 278 Function::Create(FTy, Function::ExternalLinkage, "caller", M.get()); in TEST_P() 891 FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx), in TEST_P() local 893 Function::Create(FTy, Function::ExternalLinkage, "Gfoo", M.get()); in TEST_P() 894 Function::Create(FTy, Function::ExternalLinkage, "Gblah", M.get()); in TEST_P() 895 Function::Create(FTy, Function::ExternalLinkage, "Gbar", M.get()); in TEST_P() 896 Function::Create(FTy, Function::InternalLinkage, "Ifoo", M.get()); in TEST_P() 897 Function::Create(FTy, Function::InternalLinkage, "Iblah", M.get()); in TEST_P() 898 Function::Create(FTy, Function::InternalLinkage, "Ibar", M.get()); in TEST_P() 899 Function::Create(FTy, Function::PrivateLinkage, "Pfoo", M.get()); in TEST_P() [all …]
|
/external/swiftshader/third_party/LLVM/unittests/VMCore/ |
D | VerifierTest.cpp | 27 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), /*isVarArg=*/false); in TEST() local 28 OwningPtr<Function> F(Function::Create(FTy, GlobalValue::ExternalLinkage)); in TEST()
|
/external/llvm/unittests/Analysis/ |
D | MixedTBAATest.cpp | 37 FunctionType *FTy = FunctionType::get(Type::getVoidTy(C), in TEST_F() local 39 auto *F = cast<Function>(M.getOrInsertFunction("f", FTy)); in TEST_F()
|