From a831af4af0d2b92b932f8139f2184fa012255369 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 29 Mar 2017 13:51:36 -0400 Subject: [PATCH] P4 to Git Change 1392064 by smekhano@stas-mwamba-rocm on 2017/03/29 13:38:24 SWDEV-116959 - ROCm OpenCL: split -amdgpu-internalize-symbols and -amdgpu-early-inline-all We shall not run internalize pass in FE, it breaks separate compilation. Thus two options are split now. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#14 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#38 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#30 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#61 edit --- rocclr/runtime/device/pal/palcompiler.cpp | 2 +- rocclr/runtime/device/pal/palprogram.cpp | 2 +- rocclr/runtime/device/rocm/roccompiler.cpp | 2 +- rocclr/runtime/device/rocm/rocprogram.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rocclr/runtime/device/pal/palcompiler.cpp b/rocclr/runtime/device/pal/palcompiler.cpp index dca465e8c7..dc96144654 100644 --- a/rocclr/runtime/device/pal/palcompiler.cpp +++ b/rocclr/runtime/device/pal/palcompiler.cpp @@ -273,7 +273,7 @@ LightningProgram::compileImpl( driverOptions.append(hsailOptions(options)); // Set whole program mode - driverOptions.append(" -mllvm -amdgpu-internalize-symbols"); + driverOptions.append(" -mllvm -amdgpu-early-inline-all"); //Find the temp folder for the OS std::string tempFolder = amd::Os::getEnvironment("TEMP"); diff --git a/rocclr/runtime/device/pal/palprogram.cpp b/rocclr/runtime/device/pal/palprogram.cpp index 44e9a9d8b0..2ab9b7ba88 100644 --- a/rocclr/runtime/device/pal/palprogram.cpp +++ b/rocclr/runtime/device/pal/palprogram.cpp @@ -1511,7 +1511,7 @@ LightningProgram::linkImpl(amd::option::Options *options) codegenOptions.append(" ").append(ostrstr.str()); // Set whole program mode - codegenOptions.append(" -mllvm -amdgpu-internalize-symbols"); + codegenOptions.append(" -mllvm -amdgpu-internalize-symbols -mllvm -amdgpu-early-inline-all"); // Tokenize the options string into a vector of strings std::istringstream strstr(codegenOptions); diff --git a/rocclr/runtime/device/rocm/roccompiler.cpp b/rocclr/runtime/device/rocm/roccompiler.cpp index 18a3197450..f277addbe4 100644 --- a/rocclr/runtime/device/rocm/roccompiler.cpp +++ b/rocclr/runtime/device/rocm/roccompiler.cpp @@ -100,7 +100,7 @@ HSAILProgram::compileImpl_LC( driverOptions.append(options->llvmOptions); // Set whole program mode - driverOptions.append(" -mllvm -amdgpu-internalize-symbols"); + driverOptions.append(" -mllvm -amdgpu-early-inline-all"); driverOptions.append(preprocessorOptions(options)); diff --git a/rocclr/runtime/device/rocm/rocprogram.cpp b/rocclr/runtime/device/rocm/rocprogram.cpp index d7f9d602b1..ea6c1d0319 100644 --- a/rocclr/runtime/device/rocm/rocprogram.cpp +++ b/rocclr/runtime/device/rocm/rocprogram.cpp @@ -820,7 +820,7 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options) codegenOptions.append(" ").append(ostrstr.str()); // Set whole program mode - codegenOptions.append(" -mllvm -amdgpu-internalize-symbols"); + codegenOptions.append(" -mllvm -amdgpu-internalize-symbols -mllvm -amdgpu-early-inline-all"); // Tokenize the options string into a vector of strings std::istringstream strstr(codegenOptions);