From 5901528bb0832f7e4efe37f1fa0e0a0a35990213 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 20 May 2016 13:32:27 -0400
Subject: [PATCH] P4 to Git Change 1271561 by smekhano@stas-rampitec-hsa on
2016/05/20 13:15:00
SWDEV-85602 - Complib: switch off some legacy code
Testing: smoke, precheckin
Reviewed by Evgeny Mankov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#143 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.hpp#16 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/include/AMDResolveLinker.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/AMDResolveLinker.cpp#3 edit
---
.../compiler/lib/backends/common/linker.cpp | 47 -------------------
.../compiler/lib/backends/common/linker.hpp | 1 -
2 files changed, 48 deletions(-)
diff --git a/rocclr/compiler/lib/backends/common/linker.cpp b/rocclr/compiler/lib/backends/common/linker.cpp
index 49ca3c6e74..8d9fbfb11c 100644
--- a/rocclr/compiler/lib/backends/common/linker.cpp
+++ b/rocclr/compiler/lib/backends/common/linker.cpp
@@ -265,50 +265,6 @@ static std::set *getAmdRtFunctions()
} // namespace amd
-// Create functions that returns true or false for some features which
-// are used by the built-in library
-void amdcl::OCLLinker::createASICIDFunctions(llvm::Module* module)
-{
- uint64_t features = aclGetChipOptions(Elf()->target);
-
- llvm::StringRef chip(aclGetChip(Elf()->target));
- llvm::StringRef family(aclGetFamily(Elf()->target));
-
- createConstIntFunc("__amdil_have_hw_fma32",
- chip == "Cypress"
- || chip == "Cayman"
- || family == "SI"
- || family == "CI"
- || family == "KV"
- || family == "TN"
- || family == "VI"
- || family == "CZ"
- || family == "AI",
- module);
- createConstIntFunc("__amdil_have_fast_fma32",
- chip == "Cypress"
- || chip == "Cayman"
- || chip == "Tahiti"
- || chip == "Hawaii"
- || chip == "Carrizo"
- || chip == "",
- module);
- createConstIntFunc("__amdil_have_bitalign", !!(features & F_EG_BASE), module);
- createConstIntFunc("__amdil_is_cypress", chip == "Cypress", module);
- createConstIntFunc("__amdil_is_ni",
- chip == "Cayman"
- || family == "TN",
- module);
- createConstIntFunc("__amdil_is_gcn",
- family == "SI"
- || family == "CI"
- || family == "VI"
- || family == "KV"
- || family == "CZ"
- || family == "AI",
- module);
-}
-
bool
amdcl::OCLLinker::linkWithModule(
llvm::Module* Dst, llvm::Module* Src,
@@ -782,9 +738,6 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector &libs)
}
std::string ErrorMessage;
-#ifdef LEGACY_COMPLIB
- createASICIDFunctions(LLVMBinary());
-#endif // LEGACY_COMPLIB
// Link libraries to get every functions that are referenced.
std::string ErrorMsg;
if (resolveLink(LLVMBinary(), LibMs, &ErrorMsg)) {
diff --git a/rocclr/compiler/lib/backends/common/linker.hpp b/rocclr/compiler/lib/backends/common/linker.hpp
index 2608d63cbf..8dc89321cf 100644
--- a/rocclr/compiler/lib/backends/common/linker.hpp
+++ b/rocclr/compiler/lib/backends/common/linker.hpp
@@ -76,7 +76,6 @@ namespace amdcl
*/
int link(llvm::Module* input, std::vector &libs);
protected:
- void createASICIDFunctions(llvm::Module* module);
bool linkLLVMModules(std::vector &libs);
bool linkWithModule(llvm::Module* Dst, llvm::Module* Src,
std::map *ModuleRefMap);