Skip to content

Commit

Permalink
Mark indirect calls uniform
Browse files Browse the repository at this point in the history
When indirect calls are uniform, VISA can avoid applying some SW WAs
(eg, fused call WA = 2).
  • Loading branch information
pratikashar authored and igcbot committed Aug 30, 2023
1 parent 48650b1 commit 7ab2f49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion IGC/Compiler/CISACodeGen/CISABuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ namespace IGC
VISA_Exec_Size execSize = visaExecSize(m_program->m_dispatchSize);
VISA_VectorOpnd* funcAddrOpnd = GetSourceOperandNoModifier(funcPtr);
V(vKernel->AppendVISACFIndirectFuncCallInst(
predOpnd, emask, execSize, false, funcAddrOpnd, argSize, retSize));
predOpnd, emask, execSize, funcPtr->IsUniform(), funcAddrOpnd,
argSize, retSize));
}

void CEncoder::SubroutineRet(CVariable* flag, llvm::Function* F)
Expand Down
2 changes: 1 addition & 1 deletion IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ class GenXKernelBuilder {
unsigned char ReturnSize) {
updateSIMDSize(ExecMask, ExecSize);
CISA_CALL(Kernel->AppendVISACFIndirectFuncCallInst(
Pred, ExecMask, ExecSize, false, FuncAddr, ArgSize, ReturnSize));
Pred, ExecMask, ExecSize, true, FuncAddr, ArgSize, ReturnSize));
}

inline void appendVISACFRetInst(VISA_PredOpnd *Pred, VISA_EMask_Ctrl ExecMask,
Expand Down

0 comments on commit 7ab2f49

Please sign in to comment.