コミットグラフ

37 コミット

作成者 SHA1 メッセージ 日付
foreman 770a084e70 P4 to Git Change 1114755 by emankov@em-hsa-amd on 2015/01/23 11:28:27
ECR #333753 - Partial fix for Bug 10478 "Fix -fno-bin-llvmir/-fno-bin-hsail options"

	If option -fno-bin-llvmi is set, .llvmir section is deleted from BIF on CG phase instead of FE. Both HSA & AMDIL are affected.

	[Fixed] -fno-bin-llvm option causes clBuildProgram fail with error -11.
	Took place only if compiled from OpenCL

	[TODO] If possible -fno-bin-hsail should avoid putting HSAIL binary (BRIG) into BIF.

	[Tests] pre check-in, make smoke, complib

	[Reviewers] Brian Sumner, Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#63 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/src/complib/options/-fbin-llvmir/HelloWorld_Kernel_cl.cl#1 add
... //depot/stg/opencl/drivers/opencl/tests/hsa/src/complib/options/-fno-bin-llvmir/HelloWorld_Kernel_cl.cl#1 add
... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/complib.tlst#3 edit
2015-01-23 11:35:29 -05:00
foreman f852a39a97 P4 to Git Change 1114751 by emankov@em-hsa-amd on 2015/01/23 11:18:10
ECR #333753 - Compiler Lib: Fix for EPR 413126 "Regression: Env. var. AMD_DEBUG_DUMP_HSAIL_ALL_KERNELS has stopped working"

	Tests: make smoke, pre check-in, complib

	Reviewer: Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#57 edit
2015-01-23 11:25:27 -05:00
foreman 60e766397d P4 to Git Change 1097207 by mbareghe@mbareghe_staging_win30 on 2014/11/14 14:11:59
ECR #304775 - Replace Trivial Relational Functions

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#117 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.cpp#88 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/llvm-link.cpp#50 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonRelationals.cl#13 edit
... //depot/stg/opencl/drivers/opencl/library/gpu/gen/build/Makefile.gen#7 edit
2014-11-14 14:22:12 -05:00
foreman 9c4a22118e P4 to Git Change 1095445 by emankov@em-hsa-amd on 2014/11/10 13:48:06
ECR #333753 - hsa_foundation RT/Compiler Lib: recompilation algorithm rework

	1. Recompilation algorithm rework in order to avoid superfluous recompilations.
	2. Replace aclExtractSymbol/Section with aclQueryInfo for symbol/section detection.

	The replaced calls in RT previously performed actual extraction of the sections from the BIF with memory allocation and copying. But what is needed in fact is only to determine whether the section exists in BIF or not to make a further decision on needed recompilations. With aclQueryInfo and new added enums RT_CONTAINS_LLVMIR, RT_CONTAINS_OPTIONS, RT_CONTAINS_BRIG, RT_CONTAINS_HSAIL, RT_CONTAINS_ISA Runtime starts querying not the whole sections but the bool flag which indicates the existence of the corresponding section(s) without any memory allocations. Every compilation on RT starting from LLVMIR is affected by the change including compilation of blit kernels.

	3. Fix in Compiler Lib for correct ACL_INVALID_ARG detection (for wrong/unsupported compilations).

	[Side Effects] performance improvement, memory consumption reduction

	[ToDo] Do not finalize program if ISA is already provided in BIF and options are unchanged.

	[Testing] pre check-in, ocltst complib, ocl conformance 2.0 compiler & api

	[Reviewers] German Andryeyev, Brian Sumner

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#56 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.hpp#3 edit
2014-11-10 13:55:17 -05:00
foreman 1837e47b4a P4 to Git Change 1094976 by yaxunl@yaxunl_stg_win50 on 2014/11/07 13:55:14
EPR #405357 - [CQE DTB][valgrind][OCL2.0]:MemLeaks are observed with MonteCarloAsian sample.

	Need to delete amdrtFunctions when it is no longer used.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#116 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDLLVMContextHook.h#23 edit
2014-11-07 14:08:41 -05:00
foreman f10df9ffcd P4 to Git Change 1087805 by yaxunl@yaxunl_stg_win50 on 2014/10/15 16:07:03
EPR #407587 - Fix llvm -stats not printing out statistics.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#59 edit
2014-10-15 17:02:40 -04:00
foreman 19a31b5fe9 P4 to Git Change 1087364 by mbareghe@mbareghe_staging_win30 on 2014/10/14 14:49:19
ECR #304775 - clp re-implementation - Refactored SPIR loader and Added replaceTrivialConversionFunc to linker and offline linker. clp Moved to prelinker.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/Makefile#2 delete
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/build/Makefile#3 delete
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/clpMain.cpp#4 delete
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/clpVectorExpansion.cpp#28 delete
... //depot/stg/opencl/drivers/opencl/compiler/clc/src/build/Makefile.clc#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#115 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDPrelinkOpt.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDPrelinkOpt.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/clpVectorExpansion.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.cpp#87 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/llvm-link.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonConversions.cl#17 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonVectorExpansions.cl#22 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/build/Makefile.hsail#36 edit
2014-10-14 15:09:17 -04:00
foreman 7f8d708ca9 P4 to Git Change 1086362 by emankov@em-hsa-amd on 2014/10/10 10:40:16
ECR #333753 - Performance: Stop obligatory BRIG disassembling to HSAIL

	[Important]: HSAIL is not being disassembled from BRIG and not being inserted into BIF anymore by default.

	Testing: pre check-in, smoke_clang

	Reviewers: Stanislav Mekhanoshin, Brian Sumner, Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.hpp#11 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#60 edit
2014-10-10 11:10:24 -04:00
foreman 3c475679ba P4 to Git Change 1085416 by emankov@em-hsa-amd on 2014/10/08 11:37:27
ECR #333753 - Compiler Lib: Compilation from ACL_TYPE_HSAIL_TEXT fix

	+ Make HSAIL compilation work from aclSOURCE section also (as it was) besides aclCODEGEN
	+ Refactoring, simplification & annotating of if_aclCompile() function

	Testing: smoke_clang, pre check-in, aoc2 tests (not integrated yet)

	Reviewers: Brian Sumner, Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#54 edit
2014-10-08 12:12:00 -04:00
foreman 99fdc9adbb P4 to Git Change 1084822 by emankov@em-hsa-amd on 2014/10/07 06:53:10
ECR #333753 - new tests are added to ocltst -m oclcomplib -t OCLRTGetInfo

	tests on aclQueryInfo for:
	RT_KERNEL_NAMES, RT_CONTAINS_LLVMIR, RT_CONTAINS_OPTIONS, RT_CONTAINS_BRIG, RT_CONTAINS_HSAIL, RT_CONTAINS_ISA

	+ query for RT_CONTAINS_HSAIL is fixed in Compiler Lib: looking for symbol symHSAILText instead of section aclCODEGEN, because aclCODEGEN section may contain also symOpenclMeta, symOpenclKernel, symOpenclStub besides symHSAILText.

	Testing: pre check-in, ocltst -m oclcomplib

	Reviewer: Brian Sumner

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/oclrtGetInfo.cpp#16 edit
2014-10-07 07:04:03 -04:00
foreman 936e8f603d P4 to Git Change 1084465 by emankov@em-hsa-amd on 2014/10/06 10:30:04
ECR #333753 - Compiler Lib/RT/Performance: Replace aclExtractSymbol/Section with aclQueryInfo for symbol/section detection.

	The replaced calls in RT previously performed actual extraction of the sections from the BIF with memory allocation and copying. But what is needed in fact is only to determine whether the section exists in BIF or not to make a further decision on needed recompilations. With aclQueryInfo and new added enums RT_CONTAINS_LLVMIR, RT_CONTAINS_OPTIONS, RT_CONTAINS_BRIG, RT_CONTAINS_HSAIL, RT_CONTAINS_ISA Runtime starts querying not the whole sections but the bool flag which indicates the existance of the corresponding section(s) without any memory allocations. Every compilation on RT starting from LLVMIR is affected by the change including compilation of blit kernels.

	Side Effects: performance improvement, memory consumption reduction

	Testing: pre check-in, ocl conformance (api, basic, compiler), ocltst complib

	Reviewers: Brian Sumner, German Andryeyev, Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#52 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#180 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#38 edit
2014-10-06 10:41:24 -04:00
foreman f7c2190e63 P4 to Git Change 1083876 by emankov@em-hsa-amd on 2014/10/03 04:25:16
ECR #333753 - HSA RT/Compiler Lib/Performance: Elimination of HSAIL text usage in RT

	Extracting HSAIL from the binary and parsing it for the kernel names in RT were replaced with aclQueryInfo call for RT_KERNEL_NAMES.
	Kernel names are obtained now from the corresponding metadata symbols names, which are already presented in BIF at kernel finalization stage.

	Side effect: performance improvement

	Next Step: Performance: elimination of BRIG disassembling to HSAIL as obligatory stage in Compiler Lib (previously was needed only by RT).

	Testing: pre check-in, ocl conformnace 2.0 (basic, api, compiler, workgroups, device_execution)

	Reviewers: Stanislav Mekhanoshin, German Andryeyev, Brian Sumner

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/bifbase.cpp#50 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/bifbase.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#266 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#179 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#37 edit
2014-10-03 04:30:34 -04:00
foreman 26ad0e1a8e P4 to Git Change 1083322 by yaxunl@yaxunl_stg_win50 on 2014/10/01 16:00:22
ECR #377625 - AMDIL Function support: allow functions without names to be not inlined.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#114 edit
2014-10-01 16:11:38 -04:00
foreman bb6fa26029 P4 to Git Change 1082819 by mbareghe@mbareghe_staging_win30 on 2014/09/30 13:59:08
ECR #304775 - clp re-implementation - refactoring and generalization of clpVectorExpansion to work on both AMDIL and CPU path, HSAIL path not included yet.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/build/Makefile.clp#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/clpVectorExpansion.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#113 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonConversions.cl#16 edit
... //depot/stg/opencl/drivers/opencl/library/x86/gen/build/Makefile.gen#16 edit
2014-09-30 14:06:47 -04:00
foreman 3faaeb958f P4 to Git Change 1082704 by smekhano@rampitec-HSA on 2014/09/30 09:39:56
ECR #333753 - HSA HLC: decouple hsail inlining options and threshold from amdil/cpu
	This allows selective enablement of the feature and selective tuning of the threshold depending on the target.

	Testing: smoke, smoke_clang, precheckin
	Reviewed by Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/Transforms/IPO/AMDOptOptions.h#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDOptOptions.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDPassManagerBuilder.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/opt/amdopt.inc#21 edit
2014-09-30 09:56:12 -04:00
foreman 9fe49c3516 P4 to Git Change 1079971 by emankov@em-hsa-amd on 2014/09/23 13:05:09
ECR #333753 - Compiler Lib, ocltst: printf metadata related changes

	+ fix pointer copying of printf metadata in compiler Lib, annotation
	+ printf testing is added to OCLRTGetInfo (ocltst complib)

	tests: pre check-in, ocltst -m oclcomplib

	Reviewers: Artem Tamazov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#50 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/clSourceShaders.h#6 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/oclrtGetInfo.cpp#15 edit
2014-09-23 13:16:11 -04:00
foreman d50fa706e3 P4 to Git Change 1079216 by emankov@em-hsa-amd on 2014/09/22 08:18:24
ECR #333753 - Compiler Lib/RT: Metadata related code refactor, annotation, minor fixes & additional checks

	+ refactor if_aclQueryInfo() in order to simplify code and to avoid direct usage of aclMetadata struct members types
	+ annotation on why we need to use deserializeCLMetadata on "serialized" (to NULL) pointers
	+ erroneously forgotten RT_KERNEL_NAME was added to aclQueryType enum
	+ OCLRTGetInfo, CLEnumCheck tests from ocltst oclcomplib was updated to use RT_KERNEL_NAME
	+ testing of printf is added to OCLRTGetInfo
	+ minor fixes and additional checks

	tests: pre check-in, ocltst -m oclcomplib

	Reviewers: Artem Tamazov, Brian Sumner, German Andryeyev

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#49 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#12 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclStructs.h#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#265 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#36 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/clSourceShaders.h#5 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/oclrtGetInfo.cpp#14 edit
2014-09-22 08:24:39 -04:00
foreman 09c85802ff P4 to Git Change 1078307 by mbareghe@mbareghe_staging_win30 on 2014/09/18 13:54:53
ECR #304775 - clp re-implementation - Back out changelist 1077873 to investigate smoke_clang failures

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/build/Makefile.clp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/clpVectorExpansion.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#112 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonConversions.cl#15 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/build/Makefile.hsail#34 edit
... //depot/stg/opencl/drivers/opencl/library/x86/gen/build/Makefile.gen#15 edit
2014-09-18 14:03:26 -04:00
foreman 4099ccc281 P4 to Git Change 1077873 by mbareghe@mbareghe_staging_win30 on 2014/09/17 13:47:49
ECR #304775 - clp re-implementation - refactoring and generalization of clpVectorExpansion to work on both edg and clang

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/build/Makefile.clp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/clc/clpSrc/clpVectorExpansion.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#111 edit
... //depot/stg/opencl/drivers/opencl/library/common/src/commonConversions.cl#14 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/build/Makefile.hsail#33 edit
... //depot/stg/opencl/drivers/opencl/library/x86/gen/build/Makefile.gen#14 edit
2014-09-17 13:58:52 -04:00
foreman 09fb6c961b P4 to Git Change 1077336 by emankov@em-hsa-amd on 2014/09/16 11:13:20
ECR #333753 - Compiler Lib/RT: Fix RT_DEVICE_ENQUEUE & RT_KERNEL_INDEX querying

	tests: pre check-in, compiler ocl conformance tests

	Reviewer: German Andryeyev, Vinay Madhusudan

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#48 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#263 edit
2014-09-16 11:54:47 -04:00
foreman fea6100aa9 P4 to Git Change 1076356 by smekhano@rampitec-HSA on 2014/09/12 09:35:57
ECR #333753 - HSA HLC: remove code changing the default filetype which is set by an external tool such as llc
	Effectively llc will produce text hsail file by default as a standard llc behaviour. Use -filetype=obj to obtain brig.
	Note, test_driver.pl is already patched to preserve old behaviour.

	Testing: smoke, smoke_clang, precheckin
	Reviewed by Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILTargetMachine.cpp#33 edit
2014-09-12 09:42:39 -04:00
foreman c02dacedb2 P4 to Git Change 1075485 by marsenau@marsenau_ma on 2014/09/10 15:00:38
ECR #304775 - Remove _ in hsail_64 triple enum name. It isn't consistent with itself, or most other targets. The string form is already "hsail64", but the target name is sometimes "hsail-64". Does not remove the - in "hsail-64" for the target name since users could be depending on that, although that should also be fixed.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#57 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#110 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/ADT/Triple.h#36 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDLLVMContextHook.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/MC/MCObjectFileInfo.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Support/Triple.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/TargetInfo/HSAILTargetInfo.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/SPIR/AMDSPIRLoader.cpp#82 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Scalar/AMDLowerAtomics.cpp#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Utils/AMDUtils.cpp#2 edit
2014-09-10 15:30:51 -04:00
foreman 7f55691ebc P4 to Git Change 1070977 by ssahasra@ssahasra_opencl_windows on 2014/08/28 01:10:11
ECR #333753 - unify online/offline linkers

	The code for "FixUpModule" from the online linker is now moved to
	a common file under llvm/lib. This replaces the copy present in
	llvm/tools/llvm-link, thus unifying the two linkers.

	Reviewed by Stanislav Mekhanoshin, Yaxun Liu (Sam)

	Passes smoke, smoke_clang and precheckin.
	Also passes OpenCL 2.0 conformance tests.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#109 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDFixupKernelModule.h#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDUtils.h#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDFixupKernelModule.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Utils/AMDUtils.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/AMDFixUpModule.cpp#12 delete
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/llvm-link.cpp#48 edit
2014-08-28 01:17:39 -04:00
foreman 762e51bb71 P4 to Git Change 1069279 by emankov@em-hsa-amd on 2014/08/22 10:25:58
ECR #333753 - Compiler Lib: improve & refactor HSAIL text routines

	+ HSAIL text is always being inserted into BIF now in one place of Codegen phase
	+ AMDIL & HSAIL paths are unified at Codegen phase
	+ Error handling is improved

	Testing: make smoke_clang, pre check-in

	Reviewers: Brian Sumner, Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.hpp#10 edit
2014-08-22 10:39:25 -04:00
foreman c2967ef855 P4 to Git Change 1066820 by emankov@em-hsa-amd on 2014/08/15 08:16:18
ECR #333753 - Compiler Lib/RT: added compilation from HSAIL & BRIG

	Added support for the following compilations:
	ACL_TYPE_HSAIL_TEXT -> ACL_TYPE_HSAIL_BINARY
	ACL_TYPE_HSAIL_TEXT -> ACL_TYPE_CG
	ACL_TYPE_HSAIL_TEXT -> ACL_TYPE_ISA
	ACL_TYPE_HSAIL_BINARY -> ACL_TYPE_HSAIL_TEXT
	ACL_TYPE_HSAIL_BINARY -> ACL_TYPE_CG
	ACL_TYPE_HSAIL_BINARY -> ACL_TYPE_ISA

	Testing: smoke, smoke_clang, pre check-in, ocl conformance api, compiler

	Reviewers: Nikolay Haustov, Matthew Arsenault, German Andryeyev

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#173 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#53 edit
2014-08-15 08:23:45 -04:00
foreman 587b069737 P4 to Git Change 1063520 by kanarayan@kanarayan-ubun-stream on 2014/08/06 15:03:51
ECR #333753 - RS compilation path.

	RS compilation will be in 2 stages, first generates BRIG and the next is done via HSA Finalize API (that involves a load step).

	Existing code in compiler/lib has a bug in that when the final output expected is HSAIL_BINARY, compilation should stop with invoking the llvm compiler (and the built-in assembler), not go all the way to ISA.

	Tests: precheckin, hsa smoke
	hsa/tests/RS/ test harness will be changed in a separate changelist.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#57 edit
2014-08-06 15:13:39 -04:00
foreman 20d46aee70 P4 to Git Change 1062689 by ssahasra@ssahasra_opencl_windows on 2014/08/05 02:45:20
ECR #333753 - linker: simplify the parameters passed to FixUpModule

	The change passes smoke_clang (Orca), smoke (HSA) and precheckin.

	Reviewed by Vinay Madhusudan, Brian Sumner.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#108 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/Transforms/Scalar.h#81 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Scalar/AMDPrintfRuntimeBinding.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/AMDFixUpModule.cpp#11 edit
2014-08-05 03:01:30 -04:00
foreman 4396288d55 P4 to Git Change 1061376 by ssahasra@ssahasra_opencl_windows on 2014/07/31 02:22:23
ECR #333753 - linker: rely on builtins library triple instead of elf binary

	This is the first of multiple changes aimed at unifying the
	offline linker (llvm-link) with the online linker in the compiler
	library. The online linker is considered state-of-the-art and the
	code there needs to be made available to the offline linker.

	This change teaches the online linker to determine the target by
	examining the target triple on the builtins library modules,
	instead of checking the elf binary target. The assumption is that
	the builtins library always matches the actual target as
	confirmed in CL 1041226. This removes one dependence of compiler
	library functions so that the affected code can eventually be
	moved to llvm/lib and shared with the offline linker.

	The change passes smoke_clang (Orca build), smoke (HSA build) and Teamcity pre-checkin.

	Reviewed by Brian Sumner, Yaxun Liu, Stanislav Mekhanoshin

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#107 edit
2014-07-31 02:31:05 -04:00
foreman cde1570514 P4 to Git Change 1058650 by shivara@shivaram_llvmmerge_dt on 2014/07/24 01:26:41
ECR #397495 - Adding macros which are missing in clang path.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#16 edit
2014-07-24 01:39:00 -04:00
foreman 3eca90a7db P4 to Git Change 1058395 by emankov@em-hsa-amd on 2014/07/23 13:32:42
ECR #333753 - Compiler Lib: Resubmitting double checked changes from CL 1056755 & 1056683

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#43 edit
2014-07-23 13:54:37 -04:00
foreman f57b7f8c29 P4 to Git Change 1058289 by emankov@em-hsa-amd on 2014/07/23 08:19:09
ECR #333753 - Compiler Lib: back out CL 1056755 & 1056683

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#42 edit
2014-07-23 08:27:56 -04:00
foreman cb89c1fe5a P4 to Git Change 1057020 by skudchad@skudchad_opencl_win_2 on 2014/07/18 20:31:56
ECR #304775 - Change to OpenCL 2.0 in library properties. Some cleanup for OPENCL_MAINLINE

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/amdocl.rc#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#41 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#447 edit
2014-07-18 20:37:25 -04:00
foreman 45497b47dd P4 to Git Change 1056683 by emankov@em-hsa-amd on 2014/07/18 05:59:08
ECR #333753 - Compiler Lib: use Callback() instead of cout

	Testing: smoke_clang, pre check-in

	Reviewer: Brian Sumner

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#39 edit
2014-07-18 06:05:30 -04:00
foreman 4798473034 P4 to Git Change 1056202 by emankov@em-hsa-amd on 2014/07/17 07:56:29
ECR #333753 - Compiler Lib: Error if wrong combination of march & OpenCL version

	HSAIL doesn't support OpenCL version < 2.0
	AMDIL doesn't support OpenCL version >= 2.0

	Affects only ORCA builds (both 1.2 & 2.0), doesn't affect .hsa build.

	Testing: smoke_clang, pre check-in

	Reviewer: Stanislav Mekhanoshin

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#38 edit
2014-07-17 08:03:17 -04:00
foreman 4663600f35 P4 to Git Change 1055301 by emankov@em-hsa-amd on 2014/07/15 10:49:45
ECR #333753 - Compiler Lib: Added Phases info print to stdout

	[Reason]: unobviousness when running on different stacks with different options. As a result the reported error logs will always contain this missing info.

	Works only for !OPENCL_MAINLINE.
	Works on online & offline paths.

	[Example]:
	aoc2 -march=hsail -mdevice=Bonaire -cl-std=CL2.0 HelloWorld_Kernel_cl.cl

	Advanced Micro Devices Inc. OpenCL Compiler
	Compiler Version: 3 size: 320
	Architecture: hsail Family: CI Device: Bonaire
	Compiling CL Source: HelloWorld_Kernel_cl.cl
	Input: HelloWorld_Kernel_cl.cl Output: HelloWorld_Kernel_cl.bin
	Options:
	        -cl-std=CL2.0
	//// added with the change:
	Phase: OCLFEToSPIR, FE: ClangOCLFrontend, Arch: hsail, OpenCL version: CL2.0
	Phase: OCLLinkPhase, Arch: hsail, OpenCL version: CL2.0
	Phase: GPUOptPhase, Arch: hsail, OpenCL version: CL2.0
	Phase: CodegenPhase, Arch: hsail, OpenCL version: CL2.0
	Phase: HSAILAsmPhase, Arch: hsail, OpenCL version: CL2.0
	////
	The binary was compiled for {hsail-CI-Bonaire}.
	Compiler log:
	Saving binary to HelloWorld_Kernel_cl.bin.

	[Testing]: smoke, smoke_clang, pre check-in

	[Reviewer]: Leonid Lobachev

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#36 edit
2014-07-15 10:56:51 -04:00
foreman 00cd00cbee P4 to Git Change 1054428 by yaxunl@yaxunl_stg_win50 on 2014/07/11 11:42:03
ECR #377625 - Allow function call for function with internal linkage.

	Internal linkage correponds to static function in C. The function could be large and should be allowed to be not inlined.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#106 edit
2014-07-11 11:51:37 -04:00
foreman 3694ab2ce8 initial commit 2014-07-04 16:17:05 -04:00