Lines Matching refs:CGM
723 CGOpenMPRuntime::CGOpenMPRuntime(CodeGenModule &CGM) in CGOpenMPRuntime() argument
724 : CGM(CGM), OffloadEntriesInfoManager(CGM) { in CGOpenMPRuntime()
726 "ident_t", CGM.Int32Ty /* reserved_1 */, CGM.Int32Ty /* flags */, in CGOpenMPRuntime()
727 CGM.Int32Ty /* reserved_2 */, CGM.Int32Ty /* reserved_3 */, in CGOpenMPRuntime()
728 CGM.Int8PtrTy /* psource */, nullptr); in CGOpenMPRuntime()
729 KmpCriticalNameTy = llvm::ArrayType::get(CGM.Int32Ty, /*NumElements*/ 8); in CGOpenMPRuntime()
739 emitCombinerOrInitializer(CodeGenModule &CGM, QualType Ty, in emitCombinerOrInitializer() argument
743 auto &C = CGM.getContext(); in emitCombinerOrInitializer()
753 CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in emitCombinerOrInitializer()
754 auto *FnTy = CGM.getTypes().GetFunctionType(FnInfo); in emitCombinerOrInitializer()
757 IsCombiner ? ".omp_combiner." : ".omp_initializer.", &CGM.getModule()); in emitCombinerOrInitializer()
758 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, Fn, FnInfo); in emitCombinerOrInitializer()
760 CodeGenFunction CGF(CGM); in emitCombinerOrInitializer()
786 auto &C = CGM.getContext(); in emitUserDefinedReduction()
792 CGM, D->getType(), D->getCombiner(), cast<VarDecl>(D->lookup(In).front()), in emitUserDefinedReduction()
802 CGM, D->getType(), Init, cast<VarDecl>(D->lookup(Orig).front()), in emitUserDefinedReduction()
823 static CharUnits getIdentAlign(CodeGenModule &CGM) { in getIdentAlign() argument
824 return CGM.getPointerAlign(); in getIdentAlign()
826 static CharUnits getIdentSize(CodeGenModule &CGM) { in getIdentSize() argument
827 assert((4 * CGM.getPointerSize()).isMultipleOf(CGM.getPointerAlign())); in getIdentSize()
828 return CharUnits::fromQuantity(16) + CGM.getPointerSize(); in getIdentSize()
847 CodeGenFunction CGF(CGM, true); in emitParallelOrTeamsOutlinedFunction()
884 CodeGenFunction CGF(CGM, true); in emitTaskOutlinedFunction()
896 CharUnits Align = getIdentAlign(CGM); in getOrCreateDefaultLocation()
905 CGM.GetAddrOfConstantCString(";unknown;unknown;0;0;;").getPointer(); in getOrCreateDefaultLocation()
907 llvm::ConstantExpr::getBitCast(DefaultOpenMPPSource, CGM.Int8PtrTy); in getOrCreateDefaultLocation()
910 CGM.getModule(), IdentTy, /*isConstant*/ true, in getOrCreateDefaultLocation()
915 llvm::Constant *Zero = llvm::ConstantInt::get(CGM.Int32Ty, 0, true); in getOrCreateDefaultLocation()
917 llvm::ConstantInt::get(CGM.Int32Ty, Flags), in getOrCreateDefaultLocation()
931 if (CGM.getCodeGenOpts().getDebugInfo() == codegenoptions::NoDebugInfo || in emitUpdateLocation()
940 LocValue = Address(I->second.DebugLoc, getIdentAlign(CGF.CGM)); in emitUpdateLocation()
946 Address AI = CGF.CreateTempAlloca(IdentTy, getIdentAlign(CGF.CGM), in emitUpdateLocation()
955 CGM.getSize(getIdentSize(CGF.CGM))); in emitUpdateLocation()
1048 llvm::Type *MicroParams[] = {llvm::PointerType::getUnqual(CGM.Int32Ty), in getKmpc_MicroPointerTy()
1049 llvm::PointerType::getUnqual(CGM.Int32Ty)}; in getKmpc_MicroPointerTy()
1050 Kmpc_MicroTy = llvm::FunctionType::get(CGM.VoidTy, MicroParams, true); in getKmpc_MicroPointerTy()
1062 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1065 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ true); in createRuntimeFunction()
1066 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_fork_call"); in createRuntimeFunction()
1073 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1074 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_global_thread_num"); in createRuntimeFunction()
1080 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1081 CGM.VoidPtrTy, CGM.SizeTy, in createRuntimeFunction()
1082 CGM.VoidPtrTy->getPointerTo()->getPointerTo()}; in createRuntimeFunction()
1084 llvm::FunctionType::get(CGM.VoidPtrTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1085 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_threadprivate_cached"); in createRuntimeFunction()
1092 getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1095 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1096 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_critical"); in createRuntimeFunction()
1102 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1104 CGM.IntPtrTy}; in createRuntimeFunction()
1106 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1107 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_critical_with_hint"); in createRuntimeFunction()
1115 llvm::FunctionType::get(CGM.VoidPtrTy, CGM.VoidPtrTy, in createRuntimeFunction()
1118 llvm::Type *KmpcCopyCtorTyArgs[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; in createRuntimeFunction()
1120 llvm::FunctionType::get(CGM.VoidPtrTy, KmpcCopyCtorTyArgs, in createRuntimeFunction()
1124 llvm::FunctionType::get(CGM.VoidTy, CGM.VoidPtrTy, /*isVarArg*/ false) in createRuntimeFunction()
1126 llvm::Type *FnTyArgs[] = {getIdentTyPointerTy(), CGM.VoidPtrTy, KmpcCtorTy, in createRuntimeFunction()
1128 auto FnTy = llvm::FunctionType::get(CGM.VoidTy, FnTyArgs, in createRuntimeFunction()
1130 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_threadprivate_register"); in createRuntimeFunction()
1137 getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1140 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1141 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_end_critical"); in createRuntimeFunction()
1147 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1149 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1150 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name*/ "__kmpc_cancel_barrier"); in createRuntimeFunction()
1155 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1157 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1158 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name*/ "__kmpc_barrier"); in createRuntimeFunction()
1163 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1165 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1166 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_for_static_fini"); in createRuntimeFunction()
1172 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1173 CGM.Int32Ty}; in createRuntimeFunction()
1175 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1176 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_push_num_threads"); in createRuntimeFunction()
1182 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1184 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1185 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_serialized_parallel"); in createRuntimeFunction()
1191 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1193 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1194 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_end_serialized_parallel"); in createRuntimeFunction()
1201 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1202 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_flush"); in createRuntimeFunction()
1207 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1209 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1210 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_master"); in createRuntimeFunction()
1215 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1217 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1218 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_end_master"); in createRuntimeFunction()
1224 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.IntTy}; in createRuntimeFunction()
1226 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1227 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_taskyield"); in createRuntimeFunction()
1232 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1234 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1235 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_single"); in createRuntimeFunction()
1240 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1242 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1243 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_end_single"); in createRuntimeFunction()
1252 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.Int32Ty, in createRuntimeFunction()
1253 CGM.SizeTy, CGM.SizeTy, KmpRoutineEntryPtrTy}; in createRuntimeFunction()
1256 llvm::FunctionType::get(CGM.VoidPtrTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1257 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_task_alloc"); in createRuntimeFunction()
1263 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1264 CGM.VoidPtrTy}; in createRuntimeFunction()
1266 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1267 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_task"); in createRuntimeFunction()
1274 llvm::Type *CpyTypeParams[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; in createRuntimeFunction()
1276 llvm::FunctionType::get(CGM.VoidTy, CpyTypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1277 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.SizeTy, in createRuntimeFunction()
1278 CGM.VoidPtrTy, CpyFnTy->getPointerTo(), in createRuntimeFunction()
1279 CGM.Int32Ty}; in createRuntimeFunction()
1281 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1282 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_copyprivate"); in createRuntimeFunction()
1289 llvm::Type *ReduceTypeParams[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; in createRuntimeFunction()
1290 auto *ReduceFnTy = llvm::FunctionType::get(CGM.VoidTy, ReduceTypeParams, in createRuntimeFunction()
1293 getIdentTyPointerTy(), CGM.Int32Ty, CGM.Int32Ty, CGM.SizeTy, in createRuntimeFunction()
1294 CGM.VoidPtrTy, ReduceFnTy->getPointerTo(), in createRuntimeFunction()
1297 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1298 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_reduce"); in createRuntimeFunction()
1306 llvm::Type *ReduceTypeParams[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; in createRuntimeFunction()
1307 auto *ReduceFnTy = llvm::FunctionType::get(CGM.VoidTy, ReduceTypeParams, in createRuntimeFunction()
1310 getIdentTyPointerTy(), CGM.Int32Ty, CGM.Int32Ty, CGM.SizeTy, in createRuntimeFunction()
1311 CGM.VoidPtrTy, ReduceFnTy->getPointerTo(), in createRuntimeFunction()
1314 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1315 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_reduce_nowait"); in createRuntimeFunction()
1322 getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1325 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1326 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_end_reduce"); in createRuntimeFunction()
1333 getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1336 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1338 CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_end_reduce_nowait"); in createRuntimeFunction()
1344 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1345 CGM.VoidPtrTy}; in createRuntimeFunction()
1347 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1349 CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_task_begin_if0"); in createRuntimeFunction()
1355 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1356 CGM.VoidPtrTy}; in createRuntimeFunction()
1358 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1359 RTLFn = CGM.CreateRuntimeFunction(FnTy, in createRuntimeFunction()
1365 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1367 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1368 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_ordered"); in createRuntimeFunction()
1373 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1375 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1376 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_end_ordered"); in createRuntimeFunction()
1381 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1383 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1384 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_omp_taskwait"); in createRuntimeFunction()
1389 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1391 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1392 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_taskgroup"); in createRuntimeFunction()
1397 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1399 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1400 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_end_taskgroup"); in createRuntimeFunction()
1406 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.IntTy}; in createRuntimeFunction()
1408 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1409 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_push_proc_bind"); in createRuntimeFunction()
1417 getIdentTyPointerTy(), CGM.Int32Ty, CGM.VoidPtrTy, CGM.Int32Ty, in createRuntimeFunction()
1418 CGM.VoidPtrTy, CGM.Int32Ty, CGM.VoidPtrTy}; in createRuntimeFunction()
1420 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1422 CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_task_with_deps"); in createRuntimeFunction()
1429 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1430 CGM.Int32Ty, CGM.VoidPtrTy, in createRuntimeFunction()
1431 CGM.Int32Ty, CGM.VoidPtrTy}; in createRuntimeFunction()
1433 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1434 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_omp_wait_deps"); in createRuntimeFunction()
1440 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.IntTy}; in createRuntimeFunction()
1442 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1443 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_cancellationpoint"); in createRuntimeFunction()
1449 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.IntTy}; in createRuntimeFunction()
1451 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1452 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_cancel"); in createRuntimeFunction()
1458 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, CGM.Int32Ty, in createRuntimeFunction()
1459 CGM.Int32Ty}; in createRuntimeFunction()
1461 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1462 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_push_num_teams"); in createRuntimeFunction()
1468 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1471 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ true); in createRuntimeFunction()
1472 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__kmpc_fork_teams"); in createRuntimeFunction()
1480 CGM.IntTy, in createRuntimeFunction()
1481 CGM.VoidPtrTy, in createRuntimeFunction()
1482 CGM.IntTy, in createRuntimeFunction()
1483 CGM.Int64Ty->getPointerTo(), in createRuntimeFunction()
1484 CGM.Int64Ty->getPointerTo(), in createRuntimeFunction()
1485 CGM.Int64Ty, in createRuntimeFunction()
1486 CGM.IntTy, in createRuntimeFunction()
1487 CGM.IntTy, in createRuntimeFunction()
1488 CGM.Int64Ty, in createRuntimeFunction()
1489 CGM.VoidPtrTy}; in createRuntimeFunction()
1491 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1492 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_taskloop"); in createRuntimeFunction()
1499 CGM.Int32Ty, in createRuntimeFunction()
1500 CGM.Int32Ty, in createRuntimeFunction()
1501 CGM.VoidPtrTy}; in createRuntimeFunction()
1503 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1504 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_doacross_init"); in createRuntimeFunction()
1509 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty}; in createRuntimeFunction()
1511 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1512 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_doacross_fini"); in createRuntimeFunction()
1518 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1519 CGM.Int64Ty->getPointerTo()}; in createRuntimeFunction()
1521 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1522 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_doacross_post"); in createRuntimeFunction()
1528 llvm::Type *TypeParams[] = {getIdentTyPointerTy(), CGM.Int32Ty, in createRuntimeFunction()
1529 CGM.Int64Ty->getPointerTo()}; in createRuntimeFunction()
1531 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createRuntimeFunction()
1532 RTLFn = CGM.CreateRuntimeFunction(FnTy, /*Name=*/"__kmpc_doacross_wait"); in createRuntimeFunction()
1539 llvm::Type *TypeParams[] = {CGM.Int32Ty, in createRuntimeFunction()
1540 CGM.VoidPtrTy, in createRuntimeFunction()
1541 CGM.Int32Ty, in createRuntimeFunction()
1542 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1543 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1544 CGM.SizeTy->getPointerTo(), in createRuntimeFunction()
1545 CGM.Int32Ty->getPointerTo()}; in createRuntimeFunction()
1547 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1548 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_target"); in createRuntimeFunction()
1555 llvm::Type *TypeParams[] = {CGM.Int32Ty, in createRuntimeFunction()
1556 CGM.VoidPtrTy, in createRuntimeFunction()
1557 CGM.Int32Ty, in createRuntimeFunction()
1558 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1559 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1560 CGM.SizeTy->getPointerTo(), in createRuntimeFunction()
1561 CGM.Int32Ty->getPointerTo(), in createRuntimeFunction()
1562 CGM.Int32Ty, in createRuntimeFunction()
1563 CGM.Int32Ty}; in createRuntimeFunction()
1565 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1566 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_target_teams"); in createRuntimeFunction()
1572 CGM.getContext().getPointerType(getTgtBinaryDescriptorQTy()); in createRuntimeFunction()
1573 llvm::Type *TypeParams[] = {CGM.getTypes().ConvertTypeForMem(ParamTy)}; in createRuntimeFunction()
1575 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1576 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_register_lib"); in createRuntimeFunction()
1582 CGM.getContext().getPointerType(getTgtBinaryDescriptorQTy()); in createRuntimeFunction()
1583 llvm::Type *TypeParams[] = {CGM.getTypes().ConvertTypeForMem(ParamTy)}; in createRuntimeFunction()
1585 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1586 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_unregister_lib"); in createRuntimeFunction()
1592 llvm::Type *TypeParams[] = {CGM.Int32Ty, in createRuntimeFunction()
1593 CGM.Int32Ty, in createRuntimeFunction()
1594 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1595 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1596 CGM.SizeTy->getPointerTo(), in createRuntimeFunction()
1597 CGM.Int32Ty->getPointerTo()}; in createRuntimeFunction()
1599 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1600 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_target_data_begin"); in createRuntimeFunction()
1606 llvm::Type *TypeParams[] = {CGM.Int32Ty, in createRuntimeFunction()
1607 CGM.Int32Ty, in createRuntimeFunction()
1608 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1609 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1610 CGM.SizeTy->getPointerTo(), in createRuntimeFunction()
1611 CGM.Int32Ty->getPointerTo()}; in createRuntimeFunction()
1613 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1614 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_target_data_end"); in createRuntimeFunction()
1620 llvm::Type *TypeParams[] = {CGM.Int32Ty, in createRuntimeFunction()
1621 CGM.Int32Ty, in createRuntimeFunction()
1622 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1623 CGM.VoidPtrPtrTy, in createRuntimeFunction()
1624 CGM.SizeTy->getPointerTo(), in createRuntimeFunction()
1625 CGM.Int32Ty->getPointerTo()}; in createRuntimeFunction()
1627 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createRuntimeFunction()
1628 RTLFn = CGM.CreateRuntimeFunction(FnTy, "__tgt_target_data_update"); in createRuntimeFunction()
1644 auto ITy = IVSize == 32 ? CGM.Int32Ty : CGM.Int64Ty; in createForStaticInitFunction()
1648 CGM.Int32Ty, // tid in createForStaticInitFunction()
1649 CGM.Int32Ty, // schedtype in createForStaticInitFunction()
1650 llvm::PointerType::getUnqual(CGM.Int32Ty), // p_lastiter in createForStaticInitFunction()
1658 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createForStaticInitFunction()
1659 return CGM.CreateRuntimeFunction(FnTy, Name); in createForStaticInitFunction()
1670 auto ITy = IVSize == 32 ? CGM.Int32Ty : CGM.Int64Ty; in createDispatchInitFunction()
1672 CGM.Int32Ty, // tid in createDispatchInitFunction()
1673 CGM.Int32Ty, // schedtype in createDispatchInitFunction()
1680 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg*/ false); in createDispatchInitFunction()
1681 return CGM.CreateRuntimeFunction(FnTy, Name); in createDispatchInitFunction()
1694 CGM.Int32Ty, // tid in createDispatchFiniFunction()
1697 llvm::FunctionType::get(CGM.VoidTy, TypeParams, /*isVarArg=*/false); in createDispatchFiniFunction()
1698 return CGM.CreateRuntimeFunction(FnTy, Name); in createDispatchFiniFunction()
1709 auto ITy = IVSize == 32 ? CGM.Int32Ty : CGM.Int64Ty; in createDispatchNextFunction()
1713 CGM.Int32Ty, // tid in createDispatchNextFunction()
1714 llvm::PointerType::getUnqual(CGM.Int32Ty), // p_lastiter in createDispatchNextFunction()
1720 llvm::FunctionType::get(CGM.Int32Ty, TypeParams, /*isVarArg*/ false); in createDispatchNextFunction()
1721 return CGM.CreateRuntimeFunction(FnTy, Name); in createDispatchNextFunction()
1726 assert(!CGM.getLangOpts().OpenMPUseTLS || in getOrCreateThreadPrivateCache()
1727 !CGM.getContext().getTargetInfo().isTLSSupported()); in getOrCreateThreadPrivateCache()
1729 return getOrCreateInternalVariable(CGM.Int8PtrPtrTy, in getOrCreateThreadPrivateCache()
1730 Twine(CGM.getMangledName(VD)) + ".cache."); in getOrCreateThreadPrivateCache()
1737 if (CGM.getLangOpts().OpenMPUseTLS && in getAddrOfThreadPrivate()
1738 CGM.getContext().getTargetInfo().isTLSSupported()) in getAddrOfThreadPrivate()
1744 CGM.Int8PtrTy), in getAddrOfThreadPrivate()
1745 CGM.getSize(CGM.GetTargetTypeStoreSize(VarTy)), in getAddrOfThreadPrivate()
1764 CGM.VoidPtrTy), in emitThreadPrivateVarInit()
1773 if (CGM.getLangOpts().OpenMPUseTLS && in emitThreadPrivateVarDefinition()
1774 CGM.getContext().getTargetInfo().isTLSSupported()) in emitThreadPrivateVarDefinition()
1777 VD = VD->getDefinition(CGM.getContext()); in emitThreadPrivateVarDefinition()
1784 if (CGM.getLangOpts().CPlusPlus && PerformInit) { in emitThreadPrivateVarDefinition()
1787 CodeGenFunction CtorCGF(CGM); in emitThreadPrivateVarDefinition()
1789 ImplicitParamDecl Dst(CGM.getContext(), /*DC=*/nullptr, SourceLocation(), in emitThreadPrivateVarDefinition()
1790 /*Id=*/nullptr, CGM.getContext().VoidPtrTy); in emitThreadPrivateVarDefinition()
1793 auto &FI = CGM.getTypes().arrangeBuiltinFunctionDeclaration( in emitThreadPrivateVarDefinition()
1794 CGM.getContext().VoidPtrTy, Args); in emitThreadPrivateVarDefinition()
1795 auto FTy = CGM.getTypes().GetFunctionType(FI); in emitThreadPrivateVarDefinition()
1796 auto Fn = CGM.CreateGlobalInitOrDestructFunction( in emitThreadPrivateVarDefinition()
1798 CtorCGF.StartFunction(GlobalDecl(), CGM.getContext().VoidPtrTy, Fn, FI, in emitThreadPrivateVarDefinition()
1802 CGM.getContext().VoidPtrTy, Dst.getLocation()); in emitThreadPrivateVarDefinition()
1810 CGM.getContext().VoidPtrTy, Dst.getLocation()); in emitThreadPrivateVarDefinition()
1818 CodeGenFunction DtorCGF(CGM); in emitThreadPrivateVarDefinition()
1820 ImplicitParamDecl Dst(CGM.getContext(), /*DC=*/nullptr, SourceLocation(), in emitThreadPrivateVarDefinition()
1821 /*Id=*/nullptr, CGM.getContext().VoidPtrTy); in emitThreadPrivateVarDefinition()
1824 auto &FI = CGM.getTypes().arrangeBuiltinFunctionDeclaration( in emitThreadPrivateVarDefinition()
1825 CGM.getContext().VoidTy, Args); in emitThreadPrivateVarDefinition()
1826 auto FTy = CGM.getTypes().GetFunctionType(FI); in emitThreadPrivateVarDefinition()
1827 auto Fn = CGM.CreateGlobalInitOrDestructFunction( in emitThreadPrivateVarDefinition()
1830 DtorCGF.StartFunction(GlobalDecl(), CGM.getContext().VoidTy, Fn, FI, Args, in emitThreadPrivateVarDefinition()
1836 /*Volatile=*/false, CGM.getContext().VoidPtrTy, Dst.getLocation()); in emitThreadPrivateVarDefinition()
1847 llvm::Type *CopyCtorTyArgs[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; in emitThreadPrivateVarDefinition()
1849 llvm::FunctionType::get(CGM.VoidPtrTy, CopyCtorTyArgs, in emitThreadPrivateVarDefinition()
1856 auto CtorTy = llvm::FunctionType::get(CGM.VoidPtrTy, CGM.VoidPtrTy, in emitThreadPrivateVarDefinition()
1861 auto DtorTy = llvm::FunctionType::get(CGM.VoidTy, CGM.VoidPtrTy, in emitThreadPrivateVarDefinition()
1867 llvm::FunctionType::get(CGM.VoidTy, /*isVarArg*/ false); in emitThreadPrivateVarDefinition()
1868 auto InitFunction = CGM.CreateGlobalInitOrDestructFunction( in emitThreadPrivateVarDefinition()
1870 CGM.getTypes().arrangeNullaryFunction()); in emitThreadPrivateVarDefinition()
1871 CodeGenFunction InitCGF(CGM); in emitThreadPrivateVarDefinition()
1873 InitCGF.StartFunction(GlobalDecl(), CGM.getContext().VoidTy, InitFunction, in emitThreadPrivateVarDefinition()
1874 CGM.getTypes().arrangeNullaryFunction(), ArgList, in emitThreadPrivateVarDefinition()
1941 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitParallelCall()
1955 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitParallelCall()
2027 CGM.getModule(), Ty, /*IsConstant*/ false, in getOrCreateInternalVariable()
2091 CGF.EmitScalarExpr(Hint), CGM.IntPtrTy, /*isSigned=*/false)); in emitCriticalRegion()
2127 llvm::ConstantInt::get(CGM.IntTy, /*V=*/0, /*isSigned=*/true)}; in emitTaskyieldCall()
2166 CodeGenModule &CGM, llvm::Type *ArgsType, in emitCopyprivateCopyFunction() argument
2169 auto &C = CGM.getContext(); in emitCopyprivateCopyFunction()
2178 auto &CGFI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in emitCopyprivateCopyFunction()
2180 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, in emitCopyprivateCopyFunction()
2181 ".omp.copyprivate.copy_func", &CGM.getModule()); in emitCopyprivateCopyFunction()
2182 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, Fn, CGFI); in emitCopyprivateCopyFunction()
2183 CodeGenFunction CGF(CGM); in emitCopyprivateCopyFunction()
2224 auto &C = CGM.getContext(); in emitSingleRegion()
2274 CGM, CGF.ConvertTypeForMem(CopyprivateArrayTy)->getPointerTo(), in emitSingleRegion()
2650 llvm::ConstantInt::get(CGM.IntTy, RuntimeProcBind, /*isSigned=*/true)}; in emitProcBindClause()
2697 assert(CGM.getLangOpts().OpenMPIsDevice && "Initialization of entries is " in initializeTargetRegionEntryInfo()
2711 if (CGM.getLangOpts().OpenMPIsDevice) { in registerTargetRegionEntryInfo()
2761 createOffloadingBinaryDescriptorFunction(CodeGenModule &CGM, StringRef Name, in createOffloadingBinaryDescriptorFunction() argument
2763 auto &C = CGM.getContext(); in createOffloadingBinaryDescriptorFunction()
2769 CodeGenFunction CGF(CGM); in createOffloadingBinaryDescriptorFunction()
2771 auto &FI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in createOffloadingBinaryDescriptorFunction()
2772 auto FTy = CGM.getTypes().GetFunctionType(FI); in createOffloadingBinaryDescriptorFunction()
2774 CGM.CreateGlobalInitOrDestructFunction(FTy, Name, FI, SourceLocation()); in createOffloadingBinaryDescriptorFunction()
2786 if (CGM.getLangOpts().OpenMPIsDevice || OffloadEntriesInfoManager.empty()) in createOffloadingBinaryDescriptorRegistration()
2789 auto &M = CGM.getModule(); in createOffloadingBinaryDescriptorRegistration()
2790 auto &C = CGM.getContext(); in createOffloadingBinaryDescriptorRegistration()
2793 auto &Devices = CGM.getLangOpts().OMPTargetTriples; in createOffloadingBinaryDescriptorRegistration()
2802 CGM.getTypes().ConvertTypeForMem(getTgtOffloadEntryQTy()); in createOffloadingBinaryDescriptorRegistration()
2815 CGM.getTypes().ConvertTypeForMem(getTgtDeviceImageQTy())); in createOffloadingBinaryDescriptorRegistration()
2820 M, CGM.Int8Ty, /*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, in createOffloadingBinaryDescriptorRegistration()
2824 M, CGM.Int8Ty, /*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, in createOffloadingBinaryDescriptorRegistration()
2846 llvm::Constant *Index[] = {llvm::Constant::getNullValue(CGM.Int32Ty), in createOffloadingBinaryDescriptorRegistration()
2847 llvm::Constant::getNullValue(CGM.Int32Ty)}; in createOffloadingBinaryDescriptorRegistration()
2851 CGM.getTypes().ConvertTypeForMem(getTgtBinaryDescriptorQTy())); in createOffloadingBinaryDescriptorRegistration()
2853 BinaryDescriptorTy, llvm::ConstantInt::get(CGM.Int32Ty, Devices.size()), in createOffloadingBinaryDescriptorRegistration()
2873 CGM, ".omp_offloading.descriptor_unreg", in createOffloadingBinaryDescriptorRegistration()
2879 CGM, ".omp_offloading.descriptor_reg", in createOffloadingBinaryDescriptorRegistration()
2883 CGM.getCXXABI().registerGlobalDtor(CGF, RegUnregVar, UnRegFn, Desc); in createOffloadingBinaryDescriptorRegistration()
2892 CGM.getTypes().ConvertTypeForMem(getTgtOffloadEntryQTy())); in createOffloadEntry()
2893 llvm::LLVMContext &C = CGM.getModule().getContext(); in createOffloadEntry()
2894 llvm::Module &M = CGM.getModule(); in createOffloadEntry()
2897 llvm::Constant *AddrPtr = llvm::ConstantExpr::getBitCast(ID, CGM.VoidPtrTy); in createOffloadEntry()
2907 llvm::Constant *StrPtr = llvm::ConstantExpr::getBitCast(Str, CGM.Int8PtrTy); in createOffloadEntry()
2912 llvm::ConstantInt::get(CGM.SizeTy, Size), nullptr); in createOffloadEntry()
2938 llvm::Module &M = CGM.getModule(); in createOffloadEntriesAndInfoMetadata()
3004 if (!CGM.getLangOpts().OpenMPIsDevice) in loadOffloadInfoMetadata()
3007 if (CGM.getLangOpts().OMPHostIRFile.empty()) in loadOffloadInfoMetadata()
3010 auto Buf = llvm::MemoryBuffer::getFile(CGM.getLangOpts().OMPHostIRFile); in loadOffloadInfoMetadata()
3056 auto &C = CGM.getContext(); in emitKmpRoutineEntryT()
3061 KmpRoutineEntryPtrTy = CGM.getTypes().ConvertType(KmpRoutineEntryPtrQTy); in emitKmpRoutineEntryT()
3087 ASTContext &C = CGM.getContext(); in getTgtOffloadEntryQTy()
3112 ASTContext &C = CGM.getContext(); in getTgtDeviceImageQTy()
3136 ASTContext &C = CGM.getContext(); in getTgtBinaryDescriptorQTy()
3164 createPrivatesRecordDecl(CodeGenModule &CGM, ArrayRef<PrivateDataTy> Privates) { in createPrivatesRecordDecl() argument
3166 auto &C = CGM.getContext(); in createPrivatesRecordDecl()
3191 createKmpTaskTRecordDecl(CodeGenModule &CGM, OpenMPDirectiveKind Kind, in createKmpTaskTRecordDecl() argument
3194 auto &C = CGM.getContext(); in createKmpTaskTRecordDecl()
3222 CGM.getContext().getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/0); in createKmpTaskTRecordDecl()
3224 CGM.getContext().getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/1); in createKmpTaskTRecordDecl()
3235 createKmpTaskTWithPrivatesRecordDecl(CodeGenModule &CGM, QualType KmpTaskTQTy, in createKmpTaskTWithPrivatesRecordDecl() argument
3237 auto &C = CGM.getContext(); in createKmpTaskTWithPrivatesRecordDecl()
3245 if (auto *PrivateRD = createPrivatesRecordDecl(CGM, Privates)) { in createKmpTaskTWithPrivatesRecordDecl()
3264 emitProxyTaskFunction(CodeGenModule &CGM, SourceLocation Loc, in emitProxyTaskFunction() argument
3270 auto &C = CGM.getContext(); in emitProxyTaskFunction()
3279 CGM.getTypes().arrangeBuiltinFunctionDeclaration(KmpInt32Ty, Args); in emitProxyTaskFunction()
3280 auto *TaskEntryTy = CGM.getTypes().GetFunctionType(TaskEntryFnInfo); in emitProxyTaskFunction()
3283 ".omp_task_entry.", &CGM.getModule()); in emitProxyTaskFunction()
3284 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, TaskEntry, TaskEntryFnInfo); in emitProxyTaskFunction()
3285 CodeGenFunction CGF(CGM); in emitProxyTaskFunction()
3359 static llvm::Value *emitDestructorsFunction(CodeGenModule &CGM, in emitDestructorsFunction() argument
3364 auto &C = CGM.getContext(); in emitDestructorsFunction()
3374 CGM.getTypes().arrangeBuiltinFunctionDeclaration(KmpInt32Ty, Args); in emitDestructorsFunction()
3375 auto *DestructorFnTy = CGM.getTypes().GetFunctionType(DestructorFnInfo); in emitDestructorsFunction()
3378 ".omp_task_destructor.", &CGM.getModule()); in emitDestructorsFunction()
3379 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, DestructorFn, in emitDestructorsFunction()
3381 CodeGenFunction CGF(CGM); in emitDestructorsFunction()
3415 emitTaskPrivateMappingFunction(CodeGenModule &CGM, SourceLocation Loc, in emitTaskPrivateMappingFunction() argument
3421 auto &C = CGM.getContext(); in emitTaskPrivateMappingFunction()
3460 CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in emitTaskPrivateMappingFunction()
3462 CGM.getTypes().GetFunctionType(TaskPrivatesMapFnInfo); in emitTaskPrivateMappingFunction()
3465 ".omp_task_privates_map.", &CGM.getModule()); in emitTaskPrivateMappingFunction()
3466 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, TaskPrivatesMap, in emitTaskPrivateMappingFunction()
3469 CodeGenFunction CGF(CGM); in emitTaskPrivateMappingFunction()
3601 emitTaskDupFunction(CodeGenModule &CGM, SourceLocation Loc, in emitTaskDupFunction() argument
3608 auto &C = CGM.getContext(); in emitTaskDupFunction()
3620 CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in emitTaskDupFunction()
3621 auto *TaskDupTy = CGM.getTypes().GetFunctionType(TaskDupFnInfo); in emitTaskDupFunction()
3624 ".omp_task_dup.", &CGM.getModule()); in emitTaskDupFunction()
3625 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, TaskDup, TaskDupFnInfo); in emitTaskDupFunction()
3626 CodeGenFunction CGF(CGM); in emitTaskDupFunction()
3686 auto &C = CGM.getContext(); in emitTaskInit()
3727 CGM, D.getDirectiveKind(), KmpInt32Ty, KmpRoutineEntryPtrQTy)); in emitTaskInit()
3732 createKmpTaskTWithPrivatesRecordDecl(CGM, KmpTaskTQTy, Privates); in emitTaskInit()
3750 CGM, Loc, Data.PrivateVars, Data.FirstprivateVars, Data.LastprivateVars, in emitTaskInit()
3761 CGM, Loc, D.getDirectiveKind(), KmpInt32Ty, KmpTaskTWithPrivatesPtrQTy, in emitTaskInit()
3793 auto *SharedsSize = CGM.getSize(C.getTypeSizeInChars(SharedsTy)); in emitTaskInit()
3829 CGM, Loc, D, KmpTaskTWithPrivatesPtrQTy, KmpTaskTWithPrivatesQTyRD, in emitTaskInit()
3841 CGM, Loc, KmpInt32Ty, KmpTaskTWithPrivatesPtrQTy, in emitTaskInit()
3882 auto &C = CGM.getContext(); in emitTaskCall()
3923 CGF.Builder.CreatePtrToInt(Addr.getPointer(), CGM.SizeTy); in emitTaskCall()
3924 llvm::Value *UpIntPtr = CGF.Builder.CreatePtrToInt(UpAddr, CGM.SizeTy); in emitTaskCall()
4019 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitTaskCall()
4212 CGF.CGM.getOpenMPRuntime().getUserDefinedReduction(DRD); in emitReductionCombiner()
4221 static llvm::Value *emitReductionFunction(CodeGenModule &CGM, in emitReductionFunction() argument
4227 auto &C = CGM.getContext(); in emitReductionFunction()
4237 auto &CGFI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args); in emitReductionFunction()
4239 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage, in emitReductionFunction()
4240 ".omp.reduction.reduction_func", &CGM.getModule()); in emitReductionFunction()
4241 CGM.SetInternalFunctionAttributes(/*D=*/nullptr, Fn, CGFI); in emitReductionFunction()
4242 CodeGenFunction CGF(CGM); in emitReductionFunction()
4371 auto &C = CGM.getContext(); in emitReduction()
4428 CGM, CGF.ConvertTypeForMem(ReductionArrayTy)->getPointerTo(), Privates, in emitReduction()
4579 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitReduction()
4716 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitCancelCall()
4803 getTargetEntryUniqueInfo(CGM.getContext(), D.getLocStart(), DeviceID, FileID, in emitTargetOutlinedFunctionHelper()
4814 CodeGenFunction CGF(CGM, true); in emitTargetOutlinedFunctionHelper()
4836 if (CGM.getLangOpts().OpenMPIsDevice) { in emitTargetOutlinedFunctionHelper()
4837 OutlinedFnID = llvm::ConstantExpr::getBitCast(OutlinedFn, CGM.Int8PtrTy); in emitTargetOutlinedFunctionHelper()
4841 CGM.getModule(), CGM.Int8Ty, /*isConstant=*/true, in emitTargetOutlinedFunctionHelper()
4843 llvm::Constant::getNullValue(CGM.Int8Ty), ".omp_offload.region_id"); in emitTargetOutlinedFunctionHelper()
5558 auto &CGM = CGF.CGM; in emitOffloadingArrays() local
5600 llvm::ArrayType::get(CGM.SizeTy, ConstSizes.size()), ConstSizes); in emitOffloadingArrays()
5602 CGM.getModule(), SizesArrayInit->getType(), in emitOffloadingArrays()
5614 CGM.getModule(), MapTypesArrayInit->getType(), in emitOffloadingArrays()
5623 BPVal = CGF.Builder.CreateBitCast(BPVal, CGM.VoidPtrTy); in emitOffloadingArrays()
5627 BPVal = CGF.Builder.CreateIntToPtr(BPVal, CGM.VoidPtrTy); in emitOffloadingArrays()
5630 llvm::ArrayType::get(CGM.VoidPtrTy, PointerNumVal), BasePointersArray, in emitOffloadingArrays()
5637 PVal = CGF.Builder.CreateBitCast(PVal, CGM.VoidPtrTy); in emitOffloadingArrays()
5641 PVal = CGF.Builder.CreateIntToPtr(PVal, CGM.VoidPtrTy); in emitOffloadingArrays()
5644 llvm::ArrayType::get(CGM.VoidPtrTy, PointerNumVal), PointersArray, 0, in emitOffloadingArrays()
5651 llvm::ArrayType::get(CGM.SizeTy, PointerNumVal), SizesArray, in emitOffloadingArrays()
5656 CGF.Builder.CreateIntCast(Sizes[i], CGM.SizeTy, /*isSigned=*/true), in emitOffloadingArrays()
5670 auto &CGM = CGF.CGM; in emitOffloadingArraysArgument() local
5673 llvm::ArrayType::get(CGM.VoidPtrTy, NumElems), BasePointersArray, in emitOffloadingArraysArgument()
5676 llvm::ArrayType::get(CGM.VoidPtrTy, NumElems), PointersArray, in emitOffloadingArraysArgument()
5680 llvm::ArrayType::get(CGM.SizeTy, NumElems), SizesArray, in emitOffloadingArraysArgument()
5683 llvm::ArrayType::get(CGM.Int32Ty, NumElems), MapTypesArray, in emitOffloadingArraysArgument()
5687 BasePointersArrayArg = llvm::ConstantPointerNull::get(CGM.VoidPtrPtrTy); in emitOffloadingArraysArgument()
5688 PointersArrayArg = llvm::ConstantPointerNull::get(CGM.VoidPtrPtrTy); in emitOffloadingArraysArgument()
5689 SizesArrayArg = llvm::ConstantPointerNull::get(CGM.SizeTy->getPointerTo()); in emitOffloadingArraysArgument()
5691 llvm::ConstantPointerNull::get(CGM.Int32Ty->getPointerTo()); in emitOffloadingArraysArgument()
5778 CGF.EmitStoreOfScalar(llvm::Constant::getNullValue(CGM.Int32Ty), in emitTargetCall()
5785 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitTargetCall()
5905 getTargetEntryUniqueInfo(CGM.getContext(), E->getLocStart(), DeviceID, in scanForTargetRegionsFunctions()
5918 CGM, cast<OMPTargetDirective>(*E), ParentName, in scanForTargetRegionsFunctions()
5948 if (!CGM.getLangOpts().OpenMPIsDevice) in emitTargetFunctions()
5952 scanForTargetRegionsFunctions(FD.getBody(), CGM.getMangledName(GD)); in emitTargetFunctions()
5961 if (!CGM.getLangOpts().OpenMPIsDevice) in emitTargetGlobalVariable()
5971 CGM.getMangledName(GlobalDecl(Ctor, Ctor_Complete)); in emitTargetGlobalVariable()
5977 CGM.getMangledName(GlobalDecl(Dtor, Dtor_Complete)); in emitTargetGlobalVariable()
6042 CGF.CGM.Int32Ty, /* isSigned = */ true) in emitNumTeamsClause()
6048 CGF.CGM.Int32Ty, /* isSigned = */ true) in emitNumTeamsClause()
6118 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitTargetDataCalls()
6153 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitTargetDataCalls()
6169 CGM.getOpenMPRuntime().emitInlinedDirective(CGF, OMPD_target_data, CodeGen); in emitTargetDataCalls()
6231 auto &RT = CGF.CGM.getOpenMPRuntime(); in emitTargetDataStandAloneCall()
6401 ASTContext &C = CGM.getContext(); in emitDeclareSimdFunction()
6483 if (CGM.getTriple().getArch() == llvm::Triple::x86 || in emitDeclareSimdFunction()
6484 CGM.getTriple().getArch() == llvm::Triple::x86_64) in emitDeclareSimdFunction()
6518 ASTContext &C = CGM.getContext(); in emitDoacrossInit()
6552 CGF.EmitStoreOfScalar(llvm::ConstantInt::getSigned(CGM.Int64Ty, /*V=*/1), in emitDoacrossInit()
6559 llvm::ConstantInt::getSigned(CGM.Int32Ty, 1), in emitDoacrossInit()
6561 DimsAddr.getPointer(), CGM.VoidPtrTy)}; in emitDoacrossInit()
6575 CGM.getContext().getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/1); in emitDoacrossOrdered()