From 01482fd967274c96d5d79e22cf5edbd143dfd414 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 19 Jan 2016 14:31:59 -0500
Subject: [PATCH] P4 to Git Change 1228972 by smekhano@stas-nova-hsa on
2016/01/19 14:21:26
SWDEV-85602 - rename hsail-64 arch to hsail64
This is to match other existing llvm targets, such as spir64 and amdil64, as well as to match behavior of open source HSAIL BE.
For legacy users there is alias "-hsail-64" provided in the aoc2 only.
Testing: smoke, precheckin
Reviewed by Matthew Arsenault, Evgeny Mankov and Nikolay Haustov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/codegen.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/frontend.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#66 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.cpp#37 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#37 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILTargetMachine.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/TargetInfo/HSAILTargetInfo.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/aacl/aa.h#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/amp_libm/build/Makefile.amp_libm#4 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/gcn/build/Makefile.gcn#20 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/gcndev/build/Makefile.gcndev#3 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/build/Makefile.hsail#44 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#153 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#222 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsacompiler.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/bin/test_driver.pl#25 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/complib.tlst#21 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/ocl_debug.tlst#9 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/ocl_regression.tlst#25 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/SPIRBase.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/SPIRVBasic.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/SPIRVDropIn.cpp#5 edit
[ROCm/clr commit: 14179df14f9fb2e3ee7b7be4ae809121f9d76039]
---
projects/clr/rocclr/compiler/lib/backends/common/codegen.cpp | 2 +-
projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp | 4 ++--
projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h | 2 +-
projects/clr/rocclr/runtime/device/gpu/gpucompiler.cpp | 2 +-
projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/codegen.cpp b/projects/clr/rocclr/compiler/lib/backends/common/codegen.cpp
index 8fe5a76ac6..4abd48a133 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/codegen.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/codegen.cpp
@@ -451,7 +451,7 @@ llvmCodeGen(
#ifdef WITH_TARGET_HSAIL
if (MArch == "hsail" && OptionsObj->oVariables->GPU64BitIsa) {
- MArch = std::string("hsail-64");
+ MArch = std::string("hsail64");
}
#endif
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp b/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp
index 1e10b72962..3a21f1bd72 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/frontend.cpp
@@ -119,7 +119,7 @@ amdcl::OCLFrontend::getFrontendCommand(aclBinary *elf,
systemPath << "--march=hsail -D__HSAIL__ -D__" << HSAILTargetMapping[chipName].chip_name << "__=1 ";
break;
case aclHSAIL64:
- systemPath << "--march=hsail-64 -D__HSAIL__ -D__" << HSAIL64TargetMapping[chipName].chip_name << "__=1 ";
+ systemPath << "--march=hsail64 -D__HSAIL__ -D__" << HSAIL64TargetMapping[chipName].chip_name << "__=1 ";
break;
};
// AMDIL and non CPU HSAIL targets get the GPU define, everything
@@ -142,7 +142,7 @@ amdcl::OCLFrontend::getFrontendCommand(aclBinary *elf,
#ifdef WITH_TARGET_HSAIL
if ((Is64bitMachine() && isHSAILTarget(elf->target)) ||
(Opts->oVariables->GPU64BitIsa && (elf->target.arch_id == aclHSAIL)))
- systemPath << " --march=hsail-64 ";
+ systemPath << " --march=hsail64 ";
#endif
#ifdef DEBUG
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
index 27ea13de3e..41fcb7cb7b 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
@@ -230,7 +230,7 @@ inline const char* getArchitecture(aclDevType arch_id)
case aclX64:
return "x86-64";
case aclHSAIL64:
- return "hsail-64";
+ return "hsail64";
case aclAMDIL64:
return "amdil64";
default:
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpucompiler.cpp b/projects/clr/rocclr/runtime/device/gpu/gpucompiler.cpp
index d70118eb26..f51cad05cc 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpucompiler.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpucompiler.cpp
@@ -346,7 +346,7 @@ HSAILProgram::compileImpl(
std::string arch = "hsail";
if (dev().settings().use64BitPtr_) {
- arch += "-64";
+ arch += "64";
}
target = aclGetTargetInfo(arch.c_str(),
dev().info().name_, &errorCode);
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp
index 37fc985f45..69be513500 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp
@@ -2335,7 +2335,7 @@ HSAILProgram::info(const char * str) {
acl_error err;
std::string arch = "hsail";
if (dev().settings().use64BitPtr_) {
- arch = "hsail-64";
+ arch = "hsail64";
}
info_ = aclGetTargetInfo(arch.c_str(), ( str && str[0] == '\0' ?
dev().hwInfo()->targetName_ : str ), &err);