From 36fb8d67648d2eec38e0cc1fe1e421812142707a Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 18 Dec 2015 13:54:00 -0500 Subject: [PATCH] P4 to Git Change 1222362 by smekhano@stas-rampitec-hsa on 2015/12/18 13:43:21 SWDEV-80173 - HSA HLC: disable liveness analysis and jump threading After the investigation I have found liveness analysis never changed code generation in any of the benchmarks or applications. Its only use is in the LICM and the hoisting limitation was never really triggered. Since the analysis is very expensive I'm disabling it. The jump threading is generally bad on the GPU because it creates unstructured control flow. Even if hsail might become smaller and have less branches, it does not help because finalzier's structurizer will have to clone blocks. Jump threading is disabled for GPU. This improves compilation speed and just slightly improves performance. Testing: smoke, precheckin, vray and blender compilation Reviewed by Daniil Fukalov Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#133 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDLLVMContextHook.h#29 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Analysis/AMDLiveAnalysis.cpp#32 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDPassManagerBuilder.cpp#61 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/opt/amdopt.inc#29 edit --- rocclr/compiler/lib/utils/OPTIONS.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/compiler/lib/utils/OPTIONS.def b/rocclr/compiler/lib/utils/OPTIONS.def index 611de0c94c..9b8b18f4c2 100644 --- a/rocclr/compiler/lib/utils/OPTIONS.def +++ b/rocclr/compiler/lib/utils/OPTIONS.def @@ -653,8 +653,8 @@ FLAG(OT_UINT32, OVIS_SUPPORT, "SRAE-threshold", OptSRAEThreshold, 1024, \ "Maximum size of the local array element aggregrates that\n" HINDENT " will be scalar replaced.") -// -liveness=0|1 (default 1) -FLAG(OT_BOOL, OVIS_SUPPORT, "liveness", OptLiveness, 1, "Enable/disable Liveness Analysis") +// -liveness=0|1 (default 0) +FLAG(OT_BOOL, OVIS_SUPPORT, "liveness", OptLiveness, 0, "Enable/disable Liveness Analysis") // -prt-opt-liveness=0|1 (default 0) FLAG(OT_BOOL, OVIS_SUPPORT, "prt-opt-liveness", OptPrintLiveness, 0, \