P4 to Git Change 1178228 by marsenau@marsenau_home on 2015/08/07 14:23:27

ECR #304775 - Fork llvm-link into new tool called opencl-link

	Most of what the patched llvm-link does has nothing to do with linking LLVM IR, and more to do with loading SPIR and specifically handling the builtin library.

	Forking this into a separate tool is the fastest way to fix dependencies on large LLVM patches for the OpenCL build to work. With this in place, it should now be possible to move the various linker and SPIR conversions out of the llvm directory and into compiler library.

	Ideally this would be fixed by:

	1. Not always lowering the library from SPIR
	2. Having a separate SPIR lowering tool for testing
	3. Using function attributes and stub libraries for library FP options instead of linker flags
	4. Structuring all of the SPIR conversions as passes and having a single PassManager handle all of the lowering / linking / optimization passes.

	But accomplishing all of these will be more time consuming.

	Branching

	//depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/...

	to //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/...

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#118 edit
... //depot/stg/opencl/drivers/opencl/compiler/Makefile#60 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/Makefile#34 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/build/Makefile.common#33 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#131 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/build/Makefile.complib#88 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/compliblinkerlibs#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/Makefile#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/include/AMDFixupKernelModule.h#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/include/AMDPrelink.h#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/include/AMDResolveLinker.h#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/AMDFixupKernelModule.cpp#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/AMDPrelink.cpp#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/AMDResolveLinker.cpp#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/Makefile#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/build/Makefile#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/build/Makefile.linker#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/lib/clpVectorExpansion.cpp#1 move/add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/Android.mk#1 branch
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/Makefile#1 branch
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/build/Makefile#1 branch
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/build/Makefile.opencl-link#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/linker/tools/opencl-link/opencl-link.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDFixupKernelModule.h#3 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDPrelink.h#2 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDResolveLinker.h#7 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDFixupKernelModule.cpp#9 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDPrelink.cpp#2 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDResolveLinker.cpp#11 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/clpVectorExpansion.cpp#3 move/delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/llvmdefs#41 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/llvm-link.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/openclrules#87 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/bin/hsa_dist.pl#2 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/bin/test_driver.pl#18 edit


[ROCm/clr commit: f5885934a0]
このコミットが含まれているのは:
foreman
2015-08-07 14:34:06 -04:00
コミット 7778c3b127
2個のファイルの変更11行の追加4行の削除
+7 -4
ファイルの表示
@@ -44,9 +44,16 @@
#include "llvm/Linker/Linker.h"
#endif
#ifndef LEGACY_COMPLIB
#include "AMDFixupKernelModule.h"
#include "AMDResolveLinker.h"
#include "AMDPrelink.h"
#else
#include "llvm/AMDFixupKernelModule.h"
#include "llvm/AMDResolveLinker.h"
#include "llvm/AMDPrelink.h"
#endif
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Analysis/AMDLocalArrayUsage.h"
@@ -56,10 +63,6 @@
#include "llvm/CodeGen/LinkAllAsmWriterComponents.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
#if 1 || LLVM_TRUNK_INTEGRATION_CL >= 2270
#else
#include "llvm/CodeGen/ObjectCodeEmitter.h"
#endif
#include "llvm/Config/config.h"
#include "llvm/MC/SubtargetFeature.h"
+4
ファイルの表示
@@ -0,0 +1,4 @@
COMPLIB_DEPTH = $(OPENCL_DEPTH)/compiler/lib
#AMDOpenCLLLVMLinkerLIBS = $(COMPLIB_DEPTH)/linker/lib/$(FULL_BUILD_DIR)/AMDLLVMOpenCLLinker$(LIB_EXT)
AMDOpenCLLLVMLinkerLIBS = $(OPENCL_DEPTH)/compiler/lib/linker/lib/$(FULL_BUILD_DIR)/AMDOpenCLLLVMLinker$(LIB_EXT)