Skip to content

Commit 2b2e08b

Browse files
Anton Sidorenkoigcbot
authored andcommitted
Do not create trampoline for fast composites
Fast composites are special kernel functions and do not require trampolines.
1 parent c80f561 commit 2b2e08b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

IGC/VectorCompiler/include/vc/Utils/GenX/KernelInfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ inline bool isKernel(const llvm::Function *F) {
6262

6363
inline bool isKernel(const llvm::Function &F) { return isKernel(&F); }
6464

65+
// Check if it is a fast composite.
66+
inline bool isCMCallable(const llvm::Function &F) {
67+
return F.hasFnAttribute(llvm::genx::FunctionMD::CMCallable);
68+
}
69+
6570
// Utility function to tell if a Function needs to be called using
6671
// vISA stack call ABI.
6772
inline bool requiresStackCall(const llvm::Function *F) {

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXTrampolineInsertion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ void GenXTrampolineInsertion::visitFunction(Function &F) {
103103
return;
104104
if (vc::isKernel(&F))
105105
return;
106+
if (vc::isCMCallable(F))
107+
return;
106108

107109
if (!F.hasLocalLinkage()) {
108110
ExternalFuncs.push_back(&F);

0 commit comments

Comments
 (0)