Skip to content

Entrypoint wrapper and Function with LinkageAttributes #158

Description

@iliya-diyachkov

The translator translates LLVM spir_kernel into an entrypoint wrapper and a function with LinkageAttributes. In entry_point_func.ll test we have:

define spir_kernel void @testfunction() {
   ret void
}

and after the translator:

...
               OpEntryPoint Kernel %6 "testfunction"
...
               OpName %testfunction "testfunction"
               OpDecorate %testfunction LinkageAttributes "testfunction" Export
       %void = OpTypeVoid
          %3 = OpTypeFunction %void
%testfunction = OpFunction %void None %3
          %5 = OpLabel
               OpReturn
               OpFunctionEnd
          %6 = OpFunction %void None %3
          %7 = OpLabel
          %8 = OpFunctionCall %void %testfunction
               OpReturn
               OpFunctionEnd

We probably need to do the same.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions