feature: propagate printf/indirect calls info from functions to kernel

Related-To: NEO-15211
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-09-18 09:10:40 +00:00
committed by Compute-Runtime-Automation
parent 7b71a13c6a
commit 04ad429e58
5 changed files with 84 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -65,6 +65,8 @@ uint32_t resolveExtFuncDependencies(const ExternalFunctionInfosT &externalFuncti
auto caller = externalFunctionInfos[callerId];
caller->barrierCount = std::max(caller->barrierCount, callee->barrierCount);
caller->hasRTCalls |= callee->hasRTCalls;
caller->hasPrintfCalls |= callee->hasPrintfCalls;
caller->hasIndirectCalls |= callee->hasIndirectCalls;
}
}
return RESOLVE_SUCCESS;
@@ -81,6 +83,8 @@ uint32_t resolveKernelDependencies(const ExternalFunctionInfosT &externalFunctio
const auto &externalFunctionInfo = *externalFunctionInfos.at(funcNameToId.at(kernelDep->usedFuncName));
kernelAttributes.barrierCount = std::max(externalFunctionInfo.barrierCount, kernelAttributes.barrierCount);
kernelAttributes.flags.hasRTCalls |= externalFunctionInfo.hasRTCalls;
kernelAttributes.flags.hasPrintfCalls |= externalFunctionInfo.hasPrintfCalls;
kernelAttributes.flags.hasIndirectCalls |= externalFunctionInfo.hasIndirectCalls;
}
return RESOLVE_SUCCESS;
}