From 3faaeb958f4427716bae254eeb30792e43816f6d Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 30 Sep 2014 09:56:12 -0400 Subject: [PATCH] P4 to Git Change 1082704 by smekhano@rampitec-HSA on 2014/09/30 09:39:56 ECR #333753 - HSA HLC: decouple hsail inlining options and threshold from amdil/cpu This allows selective enablement of the feature and selective tuning of the threshold depending on the target. Testing: smoke, smoke_clang, precheckin Reviewed by Nikolay Haustov Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#21 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/Transforms/IPO/AMDOptOptions.h#6 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDOptOptions.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDPassManagerBuilder.cpp#44 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/opt/amdopt.inc#21 edit --- rocclr/compiler/lib/backends/common/opt_level.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/compiler/lib/backends/common/opt_level.cpp b/rocclr/compiler/lib/backends/common/opt_level.cpp index 51456c2268..848332f15b 100644 --- a/rocclr/compiler/lib/backends/common/opt_level.cpp +++ b/rocclr/compiler/lib/backends/common/opt_level.cpp @@ -35,14 +35,14 @@ OptLevel::setup(bool isGPU, uint32_t OptLevel) } else if (isGPU) { #ifdef WITH_TARGET_HSAIL if (Options()->libraryType_ == amd::GPU_Library_HSAIL) { - if (HLC_Experimental_Enable_Calls) { + if (HLC_HSAIL_Enable_Calls) { HLC_Disable_Amd_Inline_All = true; } // Always create Inliner regardless of OptLevel if (HLC_Force_Always_Inliner_Pass) { Builder.Inliner = createAlwaysInlinerPass(); } else { - Builder.Inliner = createFunctionInliningPass(500); + Builder.Inliner = createFunctionInliningPass(HLC_HSAIL_Inline_Threshold); } } else #endif