P4 to Git Change 1192073 by atimofee@atimofee-hsa on 2015/09/18 10:21:36
ECR #333753 - HSA HLC: TBAA metadata missed in Clang because -O0 is forced in wrapper
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/clc2/driver/clc2.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc2/wrapper/ClangWrapper.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#24 edit
[ROCm/clr commit: 0c9990d426]
This commit is contained in:
@@ -41,6 +41,11 @@ int amdcl::ClangOCLFrontend::compileCommand(const std::string& src) {
|
||||
// Following are the options passed to the ClangOCLFE library
|
||||
// and then to Clang itself.
|
||||
|
||||
// handle -O0
|
||||
if (amdOpts && amdOpts->origOptionStr.find("-O0") != std::string::npos) {
|
||||
amdOpts->clangOptions.push_back("-O0");
|
||||
}
|
||||
|
||||
// Passing the compiler FE options to clang.
|
||||
if (amdOpts) {
|
||||
for (std::vector<std::string>::const_iterator it = amdOpts->clangOptions.begin();
|
||||
@@ -48,6 +53,7 @@ int amdcl::ClangOCLFrontend::compileCommand(const std::string& src) {
|
||||
argsToClang.push_back((*it).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (Options()->oVariables->ImageSupport) {
|
||||
argsToClang.push_back ("-D__IMAGE_SUPPORT__=1 ");
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user