ECR #333753 - HSA RT: avoiding superfluous recompilations on ORCA RT/HSA path (part 2)
+ support of -fno-bin-llvmir & -fno-bin-hsail options: do not check compiler options for recompilation decision.
As a result if the binary contains ISA, BRIG & HSAIL and the above options are specified when compiling from binary, then compilation options are not compared, recompilation doesn't occur. This makes possible to compile from binary with different set of options, for example: -just-kernel.
P.S. Brig & HSAIL should be in binary in order to initialize & execute kernel (even if ISA is presented).
Testing: pre check-in, compiler, api & basic ocl conformance 2.0 tests
Reviewers: German Andryeyev, Artem Tamazov
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#178 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#56 edit
ECR #333753 - HSA RT: avoiding superfluous recompilations on ORCA RT/HSA path
Next compilation stage determination based on binary sections and options (while linkImpl).
If current HSAILProgram options are equal to binarys ones:
- Do not generate BRIG if BRIG sections are already presented in binary.
- Do not finalize BRIG->ISA if ISA is already presented in binary.
- Perform only CG phase if HSAIL is absent in binary.
Always perform only brig loading (even in case of ISA presented).
Testing: pre check-in, compile & basic ocl conformance 2.0 tests
Reviewer: German Andryeyev
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#150 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#264 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#101 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#177 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#55 edit
ECR #377625 - AMDIL Function support: Calculate total private memory usage by a kernel including memory used by called functions.
This cannot be done by IPA since stack size is known only after register allocation due to potential register spill, but MachineFunctionAnalysis cannot persist after CGSCC pass with current LLVM version.
This change adds private memory usage metadata for non-kernel functions. The total private memory usage by a kernel is calculated when AMDIL is split for different kernels. BIF will contain total private memory size.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/amdilUtils.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/amdilUtils.hpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILKernelManager.cpp#451 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILKernelManager.h#51 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#175 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#54 edit