Lines Matching refs:builder
51 OpenACCIRBuilder &builder, in createSourceLocStrFromLocation() argument
58 return builder.getOrCreateSrcLocStr(name, fileName, lineNo, colNo, strLen); in createSourceLocStrFromLocation()
63 return builder.getOrCreateSrcLocStr(locOS.str(), strLen); in createSourceLocStrFromLocation()
67 static llvm::Value *createSourceLocationInfo(OpenACCIRBuilder &builder, in createSourceLocationInfo() argument
74 createSourceLocStrFromLocation(loc, builder, funcName, strLen); in createSourceLocationInfo()
75 return builder.getOrCreateIdent(locStr, strLen); in createSourceLocationInfo()
81 OpenACCIRBuilder &builder) { in createMappingInformation() argument
85 return createSourceLocStrFromLocation(nameLoc.getChildLoc(), builder, name, in createMappingInformation()
88 return createSourceLocStrFromLocation(loc, builder, "unknown", strLen); in createMappingInformation()
92 static llvm::Function *getAssociatedFunction(OpenACCIRBuilder &builder, in getAssociatedFunction() argument
96 return builder.getOrCreateRuntimeFunctionPtr( in getAssociatedFunction()
100 return builder.getOrCreateRuntimeFunctionPtr( in getAssociatedFunction()
104 return builder.getOrCreateRuntimeFunctionPtr( in getAssociatedFunction()
111 static llvm::Value *getSizeInBytes(llvm::IRBuilderBase &builder, in getSizeInBytes() argument
113 llvm::LLVMContext &ctx = builder.getContext(); in getSizeInBytes()
117 builder.CreateGEP(basePtr->getType(), null, builder.getInt32(1)); in getSizeInBytes()
119 builder.CreatePtrToInt(sizeGep, llvm::Type::getInt64Ty(ctx)); in getSizeInBytes()
126 processOperands(llvm::IRBuilderBase &builder, in processOperands() argument
133 llvm::LLVMContext &ctx = builder.getContext(); in processOperands()
149 builder.CreateExtractValue(dataValue, kPtrBasePosInDataDescriptor); in processOperands()
150 dataPtr = builder.CreateExtractValue(dataValue, kPtrPosInDataDescriptor); in processOperands()
152 builder.CreateExtractValue(dataValue, kSizePosInDataDescriptor); in processOperands()
156 dataSize = getSizeInBytes(builder, dataValue); in processOperands()
165 llvm::Value *ptrBaseGEP = builder.CreateInBoundsGEP( in processOperands()
167 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
168 llvm::Value *ptrBaseCast = builder.CreateBitCast( in processOperands()
170 builder.CreateStore(dataPtrBase, ptrBaseCast); in processOperands()
173 llvm::Value *ptrGEP = builder.CreateInBoundsGEP( in processOperands()
175 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
177 builder.CreateBitCast(ptrGEP, dataPtr->getType()->getPointerTo()); in processOperands()
178 builder.CreateStore(dataPtr, ptrCast); in processOperands()
181 llvm::Value *sizeGEP = builder.CreateInBoundsGEP( in processOperands()
183 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
184 builder.CreateStore(dataSize, sizeGEP); in processOperands()
197 processDataOperands(llvm::IRBuilderBase &builder, in processDataOperands() argument
207 if (failed(processOperands(builder, moduleTranslation, op, in processDataOperands()
213 if (failed(processOperands(builder, moduleTranslation, op, in processDataOperands()
224 processDataOperands(llvm::IRBuilderBase &builder, in processDataOperands() argument
234 if (failed(processOperands(builder, moduleTranslation, op, in processDataOperands()
240 if (failed(processOperands(builder, moduleTranslation, op, in processDataOperands()
251 processDataOperands(llvm::IRBuilderBase &builder, in processDataOperands() argument
259 if (failed(processOperands(builder, moduleTranslation, op, op.hostOperands(), in processDataOperands()
265 if (failed(processOperands(builder, moduleTranslation, op, in processDataOperands()
280 llvm::IRBuilderBase &builder, in convertDataOp() argument
282 llvm::LLVMContext &ctx = builder.getContext(); in convertDataOp()
304 accBuilder->createMapperAllocas(builder.saveIP(), allocaIP, totalNbOperand, in convertDataOp()
313 if (failed(processOperands(builder, moduleTranslation, op, op.copyOperands(), in convertDataOp()
319 builder, moduleTranslation, op, op.copyinOperands(), totalNbOperand, in convertDataOp()
325 if (failed(processOperands(builder, moduleTranslation, op, in convertDataOp()
332 builder, moduleTranslation, op, op.copyoutOperands(), totalNbOperand, in convertDataOp()
338 if (failed(processOperands(builder, moduleTranslation, op, in convertDataOp()
345 builder, moduleTranslation, op, op.createOperands(), totalNbOperand, in convertDataOp()
351 if (failed(processOperands(builder, moduleTranslation, op, in convertDataOp()
358 builder, moduleTranslation, op, op.presentOperands(), totalNbOperand, in convertDataOp()
364 llvm::Value *maptypesArg = builder.CreateConstInBoundsGEP2_32( in convertDataOp()
370 llvm::Value *mapnamesArg = builder.CreateConstInBoundsGEP2_32( in convertDataOp()
375 accBuilder->emitMapperCall(builder.saveIP(), beginMapperFunc, srcLocInfo, in convertDataOp()
384 ctx, "acc.data", builder.GetInsertBlock()->getParent()); in convertDataOp()
390 auto afterDataRegion = builder.saveIP(); in convertDataOp()
392 llvm::BranchInst *sourceTerminator = builder.CreateBr(entryBlock); in convertDataOp()
394 builder.restoreIP(afterDataRegion); in convertDataOp()
396 ctx, "acc.end_data", builder.GetInsertBlock()->getParent()); in convertDataOp()
409 moduleTranslation.convertBlock(*bb, bb->isEntryBlock(), builder))) { in convertDataOp()
414 builder.CreateBr(endDataBlock); in convertDataOp()
418 builder.SetInsertPoint(endDataBlock); in convertDataOp()
419 accBuilder->emitMapperCall(builder.saveIP(), endMapperFunc, srcLocInfo, in convertDataOp()
429 convertStandaloneDataOp(OpTy &op, llvm::IRBuilderBase &builder, in convertStandaloneDataOp() argument
444 llvm::LLVMContext &ctx = builder.getContext(); in convertStandaloneDataOp()
450 accBuilder->createMapperAllocas(builder.saveIP(), allocaIP, totalNbOperand, in convertStandaloneDataOp()
456 if (failed(processDataOperands(builder, moduleTranslation, op, flags, names, in convertStandaloneDataOp()
462 llvm::Value *maptypesArg = builder.CreateConstInBoundsGEP2_32( in convertStandaloneDataOp()
468 llvm::Value *mapnamesArg = builder.CreateConstInBoundsGEP2_32( in convertStandaloneDataOp()
472 accBuilder->emitMapperCall(builder.saveIP(), mapperFunc, srcLocInfo, in convertStandaloneDataOp()
491 convertOperation(Operation *op, llvm::IRBuilderBase &builder,
500 Operation *op, llvm::IRBuilderBase &builder, in convertOperation() argument
505 return convertDataOp(dataOp, builder, moduleTranslation); in convertOperation()
508 return convertStandaloneDataOp<acc::EnterDataOp>(enterDataOp, builder, in convertOperation()
512 return convertStandaloneDataOp<acc::ExitDataOp>(exitDataOp, builder, in convertOperation()
516 return convertStandaloneDataOp<acc::UpdateOp>(updateOp, builder, in convertOperation()