From 0efe4a5ead53c16d02b725cf997f037c6daab173 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 3 Nov 2015 08:51:35 -0500
Subject: [PATCH] P4 to Git Change 1206858 by emankov@em-hsa-amd on 2015/11/03
08:44:27
SWDEV-77584 - Compiler Lib: Preparations for enabling HSAIL on OpenCL 1.2 by default. Adding -legacy and -binary_is_spirv.
-legacy option will be used for forcing AMDIL path after switching HSAIL by default for OpenCL.
-binary_is_spirv option will be used for indicating that the binary is constructed from SPIRV.
[Testing] pre-checkin:
http://ocltc.amd.com:8111/viewModification.html?modId=61541&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true
[Reviewer] Stanislav Mekhanoshin
http://ocltc.amd.com/reviews/r/8850
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/OPTIONS.def#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#132 edit
---
rocclr/compiler/lib/utils/OPTIONS.def | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/rocclr/compiler/lib/utils/OPTIONS.def b/rocclr/compiler/lib/utils/OPTIONS.def
index bd9afe5459..611de0c94c 100644
--- a/rocclr/compiler/lib/utils/OPTIONS.def
+++ b/rocclr/compiler/lib/utils/OPTIONS.def
@@ -349,6 +349,22 @@ OPTION(OT_BOOL, \
false, 0, 0, NULL, \
"Produce debugging information")
+// -legacy
+OPTION(OT_BOOL, \
+ OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED|OA_SEPARATOR_NONE|OFA_NORMAL, \
+ "legacy", NULL, \
+ Legacy, \
+ false, 0, 0, NULL, \
+ "Forces compilation via legacy (AMDIL)")
+
+// -binary_is_spirv
+OPTION(OT_BOOL, \
+ OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED|OA_SEPARATOR_NONE|OFA_NORMAL, \
+ "binary_is_spirv", NULL, \
+ BinaryIsSpirv, \
+ false, 0, 0, NULL, \
+ "Program is created from SPIRV binary")
+
// -falias, -fno-alias
OPTION(OT_BOOL, \
OA_RUNTIME|OVIS_SUPPORT|OVA_DISALLOWED|OFA_PREFIX_F, \
@@ -517,7 +533,6 @@ OPTION(OT_CSTRING, \
0, 0, 0, NULL, \
"-x clc|clc++|spir")
-
// -Wb, : pass comma-separated to the backend (llvm)
OPTION(OT_CSTRING, \
OA_RUNTIME|OA_LINK_EXE|OVIS_SUPPORT|OVA_REQUIRED|OA_SEPARATOR_NONE, \