File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,14 @@ ModulePass *llvm::createSYCLLowerWGLocalMemoryLegacyPass() {
52
52
return new SYCLLowerWGLocalMemoryLegacy ();
53
53
}
54
54
55
- // Static local memory allocation should be allowed only in a scope of a kernel
56
- // (not a device function) and shouldn't be called inside loop or if statement
55
+ // TODO: It should be checked that __sycl_allocateLocalMemory (or its source
56
+ // form - group_local_memory) does not occur:
57
+ // - in a function (other than user lambda/functor)
58
+ // - in a loop
59
+ // - in a non-convergent control flow
57
60
// to make it consistent with OpenCL restriction.
58
- // TODO: Relax that restriction for SYCL or modify this pass to move allocation
59
- // of memory up to a kernel scope at the beginning for each nested device
60
- // function call, loop or if statement.
61
+ // But LLVM pass is not the best place to diagnose these cases.
62
+ // Error checking should be done in the front-end compiler.
61
63
static void lowerAllocaLocalMemCall (CallInst *CI, Module &M) {
62
64
assert (CI);
63
65
You can’t perform that action at this time.
0 commit comments