Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,14 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
}

// Allocate static local memory in SYCL kernel scope for each allocation call.
if (LangOpts.SYCLIsDevice)
if (LangOpts.SYCLIsDevice) {
// Group local memory pass depends on inlining. Turn it on even in case if
// all llvm passes or SYCL early optimizations are disabled.
// FIXME: Remove this workaround when dependency on inlining is eliminated.
if (CodeGenOpts.DisableLLVMPasses)
PerModulePasses.add(createAlwaysInlinerLegacyPass(false));
PerModulePasses.add(createSYCLLowerWGLocalMemoryLegacyPass());
}

switch (Action) {
case Backend_EmitNothing:
Expand Down