Lines Matching refs:LLVM

60     llvmFloatType = LLVM::LLVMType::getFloatTy(&getContext());  in initializeCachedTypes()
61 llvmVoidType = LLVM::LLVMType::getVoidTy(&getContext()); in initializeCachedTypes()
62 llvmPointerType = LLVM::LLVMType::getInt8PtrTy(&getContext()); in initializeCachedTypes()
63 llvmInt32Type = LLVM::LLVMType::getInt32Ty(&getContext()); in initializeCachedTypes()
64 llvmInt64Type = LLVM::LLVMType::getInt64Ty(&getContext()); in initializeCachedTypes()
67 LLVM::LLVMType getMemRefType(uint32_t rank, LLVM::LLVMType elemenType) { in getMemRefType()
80 LLVM::LLVMType::getArrayTy(getInt64Type(), rank); in getMemRefType()
85 return LLVM::LLVMType::getStructTy( in getMemRefType()
91 LLVM::LLVMType getVoidType() { return llvmVoidType; } in getVoidType()
92 LLVM::LLVMType getPointerType() { return llvmPointerType; } in getPointerType()
93 LLVM::LLVMType getInt32Type() { return llvmInt32Type; } in getInt32Type()
94 LLVM::LLVMType getInt64Type() { return llvmInt64Type; } in getInt64Type()
104 bool isVulkanLaunchCallOp(LLVM::CallOp callOp) { in isVulkanLaunchCallOp()
111 bool isCInterfaceVulkanLaunchCallOp(LLVM::CallOp callOp) { in isCInterfaceVulkanLaunchCallOp()
119 void translateVulkanLaunchCall(LLVM::CallOp vulkanLaunchCallOp);
122 void createBindMemRefCalls(LLVM::CallOp vulkanLaunchCallOp,
126 void collectSPIRVAttributes(LLVM::CallOp vulkanLaunchCallOp);
130 uint32_t &rank, LLVM::LLVMType &type);
133 StringRef stringifyType(LLVM::LLVMType type) { in stringifyType()
152 LLVM::LLVMType llvmFloatType;
153 LLVM::LLVMType llvmVoidType;
154 LLVM::LLVMType llvmPointerType;
155 LLVM::LLVMType llvmInt32Type;
156 LLVM::LLVMType llvmInt64Type;
172 getOperation().walk([this](LLVM::CallOp op) { in runOnOperation()
178 getOperation().walk([this](LLVM::CallOp op) { in runOnOperation()
185 LLVM::CallOp vulkanLaunchCallOp) { in collectSPIRVAttributes()
208 LLVM::CallOp cInterfaceVulkanLaunchCallOp, Value vulkanRuntime) { in createBindMemRefCalls()
218 Value descriptorSet = builder.create<LLVM::ConstantOp>( in createBindMemRefCalls()
225 Value descriptorBinding = builder.create<LLVM::ConstantOp>( in createBindMemRefCalls()
230 LLVM::LLVMType type; in createBindMemRefCalls()
243 getMemRefType(rank, LLVM::LLVMType::getInt16Ty(&getContext())); in createBindMemRefCalls()
244 ptrToMemRefDescriptor = builder.create<LLVM::BitcastOp>( in createBindMemRefCalls()
248 builder.create<LLVM::CallOp>( in createBindMemRefCalls()
258 Value ptrToMemRefDescriptor, uint32_t &rank, LLVM::LLVMType &type) { in deduceMemRefRankAndType()
260 ptrToMemRefDescriptor.getType().dyn_cast<LLVM::LLVMType>(); in deduceMemRefRankAndType()
290 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
292 LLVM::LLVMType::getFunctionTy(getVoidType(), in declareVulkanFunctions()
298 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
300 LLVM::LLVMType::getFunctionTy( in declareVulkanFunctions()
307 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
309 LLVM::LLVMType::getFunctionTy( in declareVulkanFunctions()
315 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
317 LLVM::LLVMType::getFunctionTy(getVoidType(), {getPointerType()}, in declareVulkanFunctions()
322 for (LLVM::LLVMType type : {LLVM::LLVMType::getFloatTy(&getContext()), in declareVulkanFunctions()
323 LLVM::LLVMType::getInt32Ty(&getContext()), in declareVulkanFunctions()
324 LLVM::LLVMType::getInt16Ty(&getContext()), in declareVulkanFunctions()
325 LLVM::LLVMType::getInt8Ty(&getContext()), in declareVulkanFunctions()
326 LLVM::LLVMType::getHalfTy(&getContext())}) { in declareVulkanFunctions()
330 type = LLVM::LLVMType::getInt16Ty(&getContext()); in declareVulkanFunctions()
332 auto fnType = LLVM::LLVMType::getFunctionTy( in declareVulkanFunctions()
337 builder.create<LLVM::LLVMFuncOp>(loc, fnName, fnType); in declareVulkanFunctions()
343 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
345 LLVM::LLVMType::getFunctionTy(getPointerType(), {}, in declareVulkanFunctions()
350 builder.create<LLVM::LLVMFuncOp>( in declareVulkanFunctions()
352 LLVM::LLVMType::getFunctionTy(getVoidType(), {getPointerType()}, in declareVulkanFunctions()
365 return LLVM::createGlobalString(loc, builder, entryPointGlobalName, in createEntryPointNameConstant()
366 shaderName, LLVM::Linkage::Internal); in createEntryPointNameConstant()
370 LLVM::CallOp cInterfaceVulkanLaunchCallOp) { in translateVulkanLaunchCall()
374 auto initVulkanCall = builder.create<LLVM::CallOp>( in translateVulkanLaunchCall()
383 Value ptrToSPIRVBinary = LLVM::createGlobalString( in translateVulkanLaunchCall()
385 LLVM::Linkage::Internal); in translateVulkanLaunchCall()
388 Value binarySize = builder.create<LLVM::ConstantOp>( in translateVulkanLaunchCall()
397 builder.create<LLVM::CallOp>( in translateVulkanLaunchCall()
405 builder.create<LLVM::CallOp>(loc, TypeRange{getVoidType()}, in translateVulkanLaunchCall()
410 builder.create<LLVM::CallOp>( in translateVulkanLaunchCall()
418 builder.create<LLVM::CallOp>(loc, TypeRange{getVoidType()}, in translateVulkanLaunchCall()
423 builder.create<LLVM::CallOp>(loc, TypeRange{getVoidType()}, in translateVulkanLaunchCall()