P4 to Git Change 1451958 by skudchad@skudchad_test_win_opencl2 on 2017/08/25 19:27:11

SWDEV-116136 - Support -Og for Clang

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/13341/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/codegen.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/linker.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/opt_level.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/opt_level.hpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/optimizer.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/gpu/hsail_be.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/gpu/scwrapper/scState.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/OPTIONS.def#7 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/options.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/options.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#157 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/optimizer.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#68 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#136 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.hpp#19 edit
Esse commit está contido em:
foreman
2017-08-25 19:39:53 -04:00
commit 2c0b212d96
8 arquivos alterados com 110 adições e 45 exclusões
+9 -7
Ver Arquivo
@@ -392,7 +392,7 @@ llvmCodeGen(
aclBinary* binary)
{
const FamilyMapping &familyMap = familySet[binary->target.arch_id];
const bool optimize = (OptionsObj ? (OptionsObj->oVariables->OptLevel > 0) : true);
const bool optimize = (OptionsObj ? (OptionsObj->oVariables->OptLevel > amd::option::OPT_O0) : true);
const TargetMapping* targetMap = familyMap.target;
unsigned famID = binary->target.chip_id;
if (!targetMap || !targetMap[famID].supported) {
@@ -475,20 +475,22 @@ llvmCodeGen(
CodeGenOpt::Level OLvl = CodeGenOpt::None;
switch (OptionsObj->oVariables->OptLevel) {
case 0: // -O0
case amd::option::OPT_O0: // -O0
OLvl = CodeGenOpt::None;
break;
case 1: // -O1
case amd::option::OPT_O1: // -O1
OLvl = CodeGenOpt::Less;
break;
default:
assert(!"Error with optimization level");
case 2: // -O2
case 5: // -O5(-Os)
case amd::option::OPT_O2: // -O2
case amd::option::OPT_O5: // -O5
case amd::option::OPT_OS: // -Os
OLvl = CodeGenOpt::Default;
break;
case 3: // -O3
case 4: // -O4
case amd::option::OPT_OG: // -Og
case amd::option::OPT_O3: // -O3
case amd::option::OPT_O4: // -O4
OLvl = CodeGenOpt::Aggressive;
break;
};