From 10a5371f59f86c53ff0ef3b5c8a19fdeb82cab0c Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 17 Sep 2014 21:58:55 -0400
Subject: [PATCH] P4 to Git Change 1078026 by yaxunl@yaxunl_stg_win50 on
2014/09/17 21:51:23
EPR #402000 - Add option to control SC reg alloc strategy.
[CQE OCL][Perf][QR] ~6-7% perf drop in CompuCL Benchmark (Graphics: T-Rex subtest).
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/SI/scStateSI.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#115 edit
[ROCm/clr commit: 478f10bc24213762772fe0fea46901b078f734f4]
---
projects/clr/rocclr/compiler/lib/utils/OPTIONS.def | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def b/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def
index 97beab603e..385727cec0 100644
--- a/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def
+++ b/projects/clr/rocclr/compiler/lib/utils/OPTIONS.def
@@ -747,6 +747,17 @@ OPTION(OT_BOOL, \
SCUseBufferForHsaGlobal, \
false, 0, 0, NULL, \
"HSA: use buffer instructions instead of flat for global memory")
+
+// -scras=int or --sc-si-opt-reg-alloc-strategy (default 0)
+// 0 let shader compiler choose reg alloc strategy
+// keep this updated with SCShaderSi.h
+OPTION(OT_UINT32, \
+ OA_RUNTIME|OVIS_SUPPORT|OVA_REQUIRED|OA_SEPARATOR_EQUAL, \
+ "scras", "sc-si-opt-reg-alloc-strategy", \
+ SCSIOptRegAllocStrategy, \
+ 0, 0, 3, NULL, \
+ "Set SI+ shader compiler register allocation strategy 0-default, "
+ "1-balanced, 2-minimize GPRs, 3-minimize moves (default 0).")
// -fuser-no-inline -fno-user-no-inline
OPTION(OT_BOOL, \