Skip to content

Commit f456bac

Browse files
hliao2igcbot
authored andcommitted
Skip bindless promotion on func with stackcall.
As AddImplicitArgs skips functions with stackcall, bindless promotion should be skipped as well as it relies on the BINDLESS_OFFSET implicit argument.
1 parent a697788 commit f456bac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

IGC/Compiler/PromoteStatelessToBindless.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ bool PromoteStatelessToBindless::runOnFunction(Function& F)
4545
CodeGenContext* ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
4646
auto ClContext = static_cast<OpenCLProgramContext*>(ctx);
4747

48+
bool HasStackCall = F.hasFnAttribute("visaStackCall");
49+
// Skip functions marked with stackcall.
50+
if (HasStackCall)
51+
return false;
52+
4853
m_AccessToSrcPtrMap.clear();
4954
m_AddressUsedSrcPtrMap.clear();
5055
if (!ClContext->m_InternalOptions.UseBindlessPrintf)

0 commit comments

Comments
 (0)