KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator

Enqueue kernel: translation of target specific bits

Open
#204 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
625
Forks
279
Avg merge
3d 5h
Merged PRs (30d)
34

Description

Clang emits blocks in IR in a format of a struct some of the fields are however target specific.

```
// struct __opencl_block_literal_generic {
// int __size;
// int __align;
// __generic void *__invoke;
// /* custom fields */
// };
```
When we compile for SPIR we can't add the target specific fields. Do we need a similar mechanism for target specific functionality? Modifying the structs in the IR module after its generation is known to be error prone mainly because we need to track all accesses to it that might need to be changed.

Also I generally don't get how can something be translated to run on some specific target without taking target into account.

Contributor guide

Open the contributing guide

Research direction

Start by examining enqueue-kernel translation and the handling of block literal structs in the LLVM IR-to-SPIR path. Resolve whether target-specific fields need a translation mechanism, and define how target-specific functionality should be represented without error-prone post-generation struct edits.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.