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
This commit is contained in:
foreman
2016-05-20 13:32:27 -04:00
bovenliggende 12d0555a41
commit 5901528bb0
2 gewijzigde bestanden met toevoegingen van 0 en 48 verwijderingen
@@ -265,50 +265,6 @@ static std::set<std::string> *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<llvm::Module*> &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)) {
@@ -76,7 +76,6 @@ namespace amdcl
*/
int link(llvm::Module* input, std::vector<llvm::Module*> &libs);
protected:
void createASICIDFunctions(llvm::Module* module);
bool linkLLVMModules(std::vector<llvm::Module*> &libs);
bool linkWithModule(llvm::Module* Dst, llvm::Module* Src,
std::map<const llvm::Value*, bool> *ModuleRefMap);