llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[WIP][SYCL-MLIR]: Changes to fix codegen

Open whitneywhtsang opened this issue 3 years ago • 0 comments

  1. Added all remaining functions needed for the single_task test case in supported function list. Only declaration remains in the generated LLVMIR:
  declare i8* @malloc(i64)
  declare void @free(i8*)
  declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
  1. Given that not all SYCL functions are member functions, sycl.call Type attribute may not exists.
  2. For polygeist.subindex memref<1xstruct<sycl>> -> memref<?xstruct<sycl>> lowering, we can reuse the original code.
  3. For polygeist.subindex, the element type of memref<?xstruct<>> may not be SYCL type when it is created as a polygeist.subindex chain from a SYCL type.
  4. In Pointer2MemrefOpLowering, AddrSpaceCastOp is needed for address spaces of the operand and result of the created BitcastOp is different.

Signed-off-by: Tsang, Whitney [email protected]

whitneywhtsang avatar Sep 20 '22 03:09 whitneywhtsang