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
[ROCm/clr commit: 2c0b212d96]
This commit is contained in:
@@ -63,18 +63,20 @@ OptLevel::setup(aclBinary *elf, bool isGPU, uint32_t OptLevel)
|
||||
|
||||
llvm::CodeGenOpt::Level OLvl = CodeGenOpt::None;
|
||||
switch (Options()->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;
|
||||
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;
|
||||
default:
|
||||
@@ -271,3 +273,12 @@ OsOptLevel::optimize(aclBinary *elf, Module *input, bool isGPU)
|
||||
run(elf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OgOptLevel::optimize(aclBinary *elf, Module *input, bool isGPU)
|
||||
{
|
||||
module_ = input;
|
||||
setup(elf, isGPU, 3);
|
||||
run(elf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Verwijs in nieuw issue
Block a user