P4 to Git Change 1367875 by smekhano@stas-mwamba-rocm on 2017/02/01 01:33:12

SWDEV-105835 - ROCm OpenCL: add -amdgpu-internalize-symbols to BE

	The option -amdgpu-internalize-symbols allows to drop unused symbols from program,
	functions and global variables. This saves compile time and object size, a lot in
	case of a big program.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#55 edit
This commit is contained in:
foreman
2017-02-01 01:41:59 -05:00
والد a7a4a6dbad
کامیت df22dc2a47
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
@@ -1504,6 +1504,9 @@ LightningProgram::linkImpl(amd::option::Options *options)
optLevel << "-O" << options->oVariables->OptLevel;
codegenOptions.append(" ").append(optLevel.str());
// Set whole program mode
codegenOptions.append(" -mllvm -amdgpu-internalize-symbols");
// Tokenize the options string into a vector of strings
std::istringstream strstr(codegenOptions);
std::istream_iterator<std::string> sit(strstr), end;
@@ -813,6 +813,9 @@ HSAILProgram::linkImpl_LC(amd::option::Options *options)
optLevel << "-O" << options->oVariables->OptLevel;
codegenOptions.append(" ").append(optLevel.str());
// Set whole program mode
codegenOptions.append(" -mllvm -amdgpu-internalize-symbols");
// Tokenize the options string into a vector of strings
std::istringstream strstr(codegenOptions);
std::istream_iterator<std::string> sit(strstr), end;