4a7a1e7598
ECR #304775 - Split the legacy compiler library (OpenCL C/C++ 1.x->EDG->LLVM32->AMDIL/x86) and trunk compiler library (OpenCL C 2.x->CLANG->LLVM TOT->HSAIL/x86). The legacy compiler library (amdocl12cl.dll) will be dynamically loaded when building OpenCL 1.x programs, the trunk compiler library will be embedded in the OpenCL runtime. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#100 edit ... //depot/stg/opencl/drivers/opencl/compiler/Makefile#52 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/build/Makefile#5 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/build/Makefile.clc#18 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/src/build/Makefile#5 edit ... //depot/stg/opencl/drivers/opencl/compiler/clc/src/build/Makefile.clc#15 edit ... //depot/stg/opencl/drivers/opencl/compiler/edg/build/Makefile#4 edit ... //depot/stg/opencl/drivers/opencl/compiler/edg/build/Makefile.edg#9 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/Makefile#31 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#25 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclLoaders.cpp#10 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/build/Makefile.common#27 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#61 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/Makefile#45 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/build/Makefile.gpu#27 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/metadata.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/build/Makefile.complib#77 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/complibdefs#39 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/jit/src/Disassembler.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/jit/src/build/Makefile.src#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#15 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDIL.h#110 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDIL.td#20 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILAlgorithms.tpp#19 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILAsmBackend.cpp#31 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILAsmBackend.h#24 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILAsmPrinter.cpp#60 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILAsmPrinter.h#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILBarrierDetect.cpp#75 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILBase.td#69 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCFGStructurizer.cpp#193 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCIIOExpansion.cpp#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCIIOExpansion.h#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCIPointerManager.cpp#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCIPointerManager.h#2 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCallingConv.td#31 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCompilerErrors.cpp#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCompilerErrors.h#27 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCompilerWarnings.cpp#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCompilerWarnings.h#19 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILConversions.td#30 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILCreateKernelStub.cpp#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILDeviceInfo.h#10 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILEBBPass.cpp#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILEGIOExpansion.cpp#101 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILEnumeratedTypes.td#55 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILFixupKinds.h#11 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILFormats.td#77 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILFrameLowering.cpp#20 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILFrameLowering.h#21 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILIOExpansion.cpp#100 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILIOExpansion.h#51 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILISelDAGToDAG.cpp#96 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILISelLowering.cpp#407 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILISelLowering.h#78 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInliner.cpp#59 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstPrinter.cpp#25 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstPrinter.h#16 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstrInfo.cpp#118 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstrInfo.h#37 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstrInfo.td#73 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstrPatterns.td#60 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILInstructions.td#190 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILIntrinsicInfo.cpp#37 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILIntrinsicInfo.h#16 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILIntrinsics.td#103 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILKernel.h#22 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILKernelManager.cpp#454 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILKernelManager.h#52 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILLLVMApple.h#14 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILLLVMPC.h#18 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILLiteralManager.cpp#34 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMCAsmInfo.cpp#62 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMCAsmInfo.h#20 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMCCodeEmitter.cpp#22 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineDCE.cpp#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineDCE.h#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineEBB.cpp#9 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineEBB.h#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineFunctionInfo.cpp#76 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineFunctionInfo.h#50 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachinePeephole.cpp#57 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineValue.cpp#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMachineValue.h#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMem32.td#32 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMem64.td#32 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILModuleInfo.cpp#59 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILModuleInfo.h#35 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILMultiClass.td#90 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILNodes.td#47 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILOperands.td#30 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPatterns.td#41 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPeepholeOptimizer.cpp#166 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPointerManager.cpp#230 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPointerManager.h#32 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPointerManagerImpl.h#31 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILPrintfConvert.cpp#93 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILProfiles.td#36 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterInfo.cpp#88 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterInfo.h#35 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterInfo.td#72 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUseValidate.cpp#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesINScalar.td#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesINV2.td#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesINV4.td#3 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesScalar.td#13 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesV2.td#13 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRegisterUsesV4.td#13 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILRenumberRegister.cpp#8 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSIIOExpansion.cpp#53 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSIIOExpansion.h#19 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSIPointerManager.cpp#37 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSIPointerManager.h#16 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSubtarget.cpp#208 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSubtarget.h#39 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSwizzleEncoder.cpp#68 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSwizzleEncoder.h#27 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILTargetMachine.cpp#165 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILTargetMachine.h#26 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILTokenDesc.td#14 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILUtilityFunctions.cpp#128 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILUtilityFunctions.h#71 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILVersion.td#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AddrSpaces.txt#8 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Android.mk#2 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Apple/AMDIL.td#11 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Apple/AMDILVersion.td#12 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/CMakeLists.txt#15 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Doxyfile#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/GPUMetadataAbi.pdf#8 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILInternal.h#8 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILInternalDeviceFlags.h#13 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILKVDevice.h#7 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILVIInstrInfo.td#2 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILVIInstructions.td#12 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILVIIntrinsics.td#5 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/CMakeLists.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/InternalProcessors.td#22 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/LLVMBuild.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/LICENSE.TXT#5 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/LLVMBuild.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/MCTargetDesc/AMDILELFObjectWriter.cpp#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/MCTargetDesc/AMDILELFObjectWriter.h#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/MCTargetDesc/CMakeLists.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/MCTargetDesc/LLVMBuild.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Processors.td#9 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/TD-Class-Flow-new.xmi#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/TD-Class-Flow.xmi#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/TargetInfo/AMDILTargetInfo.cpp#25 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/TargetInfo/CMakeLists.txt#10 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/TargetInfo/LLVMBuild.txt#6 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/build/Makefile.amdil#26 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/generateRegisters.pl#8 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/notes#5 delete ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/Makefile#23 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/llvmdefs#37 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/llvmlibs#36 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Analysis/AMDExportKernelNature.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Linker/AMDFixupKernelModule.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Linker/clpVectorExpansion.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/library/build/Makefile#5 edit ... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#42 edit ... //depot/stg/opencl/drivers/opencl/library/gpu/7xx/build/Makefile.7xx#15 edit ... //depot/stg/opencl/drivers/opencl/library/gpu/CI/build/Makefile.CI#4 edit ... //depot/stg/opencl/drivers/opencl/library/gpu/SI/build/Makefile.SI#8 edit ... //depot/stg/opencl/drivers/opencl/library/gpu/common/build/Makefile.common#27 edit ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subany.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subbar.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subbcast.cl#4 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subget.cl#4 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subreduce.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/common/src/subgroup/subscan.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/gpu/gen/build/Makefile.gen#8 edit ... //depot/stg/opencl/drivers/opencl/library/x86/Makefile#7 edit ... //depot/stg/opencl/drivers/opencl/library/x86/avx/build/Makefile.avx#20 edit ... //depot/stg/opencl/drivers/opencl/library/x86/common/build/Makefile.common#36 edit ... //depot/stg/opencl/drivers/opencl/library/x86/common/src/amdrt/build/Makefile.amdrt#22 edit ... //depot/stg/opencl/drivers/opencl/library/x86/fma4/build/Makefile.fma4#13 edit ... //depot/stg/opencl/drivers/opencl/library/x86/gen/build/Makefile.gen#21 edit ... //depot/stg/opencl/drivers/opencl/opencldefs#153 edit ... //depot/stg/opencl/drivers/opencl/openclrules#84 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#270 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/build/Makefile.gpu#59 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#498 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/build/Makefile.binary#16 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/compiler/OCLStructOperations.cpp#14 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/build/Makefile.complib#33 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/spir/build/Makefile.spir#8 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/testdefs#26 edit
221 行
5.3 KiB
C++
221 行
5.3 KiB
C++
//
|
|
// Copyright (c) 2011 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#ifndef _CL_LIB_UTILS_0_8_H_
|
|
#define _CL_LIB_UTILS_0_8_H_
|
|
#include "v0_8/aclTypes.h"
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <iterator>
|
|
#include "library.hpp"
|
|
// Utility function to set a flag in option structure
|
|
// of the aclDevCaps.
|
|
void
|
|
setFlag(aclDevCaps *elf, compDeviceCaps option);
|
|
|
|
// Utility function to flip a flag in option structure
|
|
// of the aclDevCaps.
|
|
void
|
|
flipFlag(aclDevCaps *elf, compDeviceCaps option);
|
|
|
|
// Utility function to clear a flag in option structure
|
|
// of the aclDevCaps.
|
|
void
|
|
clearFlag(aclDevCaps *elf, compDeviceCaps option);
|
|
|
|
// Utility function to check that a flag in option structure
|
|
// of the aclDevCaps is set.
|
|
bool
|
|
checkFlag(aclDevCaps *elf, compDeviceCaps option);
|
|
|
|
// Utility function to initialize and elf device capabilities
|
|
void
|
|
initElfDeviceCaps(aclBinary *elf);
|
|
|
|
// Append the string to the aclCompiler log string.
|
|
void
|
|
appendLogToCL(aclCompiler *cl, const std::string &logStr);
|
|
|
|
const char *getDeviceName(const aclTargetInfo &Target);
|
|
|
|
// Select the correct library from the target information.
|
|
amd::LibrarySelector getLibraryType(const aclTargetInfo *Target);
|
|
|
|
// get family_enum from the target information.
|
|
unsigned getFamilyEnum(const aclTargetInfo *Target);
|
|
|
|
// get chip_enum from the target information.
|
|
unsigned getChipEnum(const aclTargetInfo *Target);
|
|
|
|
// Create a copy of an ELF and duplicate all sections/symbols
|
|
aclBinary*
|
|
createELFCopy(aclBinary *src);
|
|
|
|
// Create a BIF2.1 elf from a BIF 2.0 elf
|
|
aclBinary*
|
|
convertBIF20ToBIF21(aclBinary *src);
|
|
|
|
// Create a BIF3.0 elf from a BIF 2.0 elf
|
|
aclBinary*
|
|
convertBIF20ToBIF30(aclBinary *src);
|
|
|
|
// Create a BIF2.0 elf from a BIF 2.1 elf
|
|
aclBinary*
|
|
convertBIF21ToBIF20(aclBinary *src);
|
|
|
|
// Create a BIF3.0 elf from a BIF 2.1 elf
|
|
aclBinary*
|
|
convertBIF21ToBIF30(aclBinary *src);
|
|
|
|
// Create a BIF2.0 elf from a BIF 3.0 elf
|
|
aclBinary*
|
|
convertBIF30ToBIF20(aclBinary *src);
|
|
|
|
// Create a BIF2.1 elf from a BIF 3.0 elf
|
|
aclBinary*
|
|
convertBIF30ToBIF21(aclBinary *src);
|
|
|
|
// get a pointer to the aclBIF irrespective of the
|
|
// binary version.
|
|
aclBIF*
|
|
aclutGetBIF(aclBinary*);
|
|
|
|
// Get a pointer to the aclOptions irrespective of
|
|
// the binary version.
|
|
aclOptions*
|
|
aclutGetOptions(aclBinary*);
|
|
|
|
// Get a pointer to the aclBinaryOptions struct
|
|
// irrespective of the binary version.
|
|
aclBinaryOptions*
|
|
aclutGetBinOpts(aclBinary*);
|
|
|
|
// Get a pointer to the target info struct
|
|
// irrespective of the binary version.
|
|
aclTargetInfo*
|
|
aclutGetTargetInfo(aclBinary*);
|
|
|
|
// Get a pointer to the device caps
|
|
// irrespective of the binary version.
|
|
aclDevCaps*
|
|
aclutGetCaps(aclBinary*);
|
|
|
|
// Copy two binary option structures irrespective
|
|
// of the binary version and uses defaults when
|
|
// things don't match up.
|
|
void
|
|
aclutCopyBinOpts(aclBinaryOptions *dst,
|
|
const aclBinaryOptions *src,
|
|
bool is64bit);
|
|
|
|
// Retrieve kernel statistics from binary
|
|
// and insert to elf as symbol
|
|
acl_error aclutInsertKernelStatistics(aclCompiler*, aclBinary*);
|
|
|
|
// Helper function that returns the
|
|
// allocation function from the binary.
|
|
AllocFunc
|
|
aclutAlloc(const aclBinary *bin);
|
|
|
|
// Helper function that returns the
|
|
// de-allocation function from the binary.
|
|
FreeFunc
|
|
aclutFree(const aclBinary *bin);
|
|
|
|
|
|
// Helper function that returns the
|
|
// allocation function from the compiler.
|
|
AllocFunc
|
|
aclutAlloc(const aclCompiler *bin);
|
|
|
|
// Helper function that returns the
|
|
// de-allocation function from the compiler.
|
|
FreeFunc
|
|
aclutFree(const aclCompiler *bin);
|
|
|
|
// Helper function that returns the
|
|
// allocation function from the compiler options.
|
|
AllocFunc
|
|
aclutAlloc(const aclCompilerOptions *bin);
|
|
|
|
// Helper function that returns the
|
|
// de-allocation function from the compiler options.
|
|
FreeFunc
|
|
aclutFree(const aclCompilerOptions *bin);
|
|
|
|
// Helper predicate
|
|
// returns true if p starts with bit code signature.
|
|
bool
|
|
isBcMagic(const char* p);
|
|
|
|
inline bool is64BitTarget(const aclTargetInfo& target)
|
|
{
|
|
return (target.arch_id == aclX64 ||
|
|
target.arch_id == aclAMDIL64 ||
|
|
target.arch_id == aclHSAIL64);
|
|
}
|
|
|
|
inline bool isCpuTarget(const aclTargetInfo& target)
|
|
{
|
|
return (target.arch_id == aclX64 || target.arch_id == aclX86);
|
|
}
|
|
|
|
inline bool isGpuTarget(const aclTargetInfo& target)
|
|
{
|
|
return (target.arch_id == aclAMDIL || target.arch_id == aclAMDIL64 ||
|
|
target.arch_id == aclHSAIL || target.arch_id == aclHSAIL64);
|
|
}
|
|
|
|
inline bool isAMDILTarget(const aclTargetInfo& target)
|
|
{
|
|
return (target.arch_id == aclAMDIL || target.arch_id == aclAMDIL64);
|
|
}
|
|
|
|
inline bool isHSAILTarget(const aclTargetInfo& target)
|
|
{
|
|
return (target.arch_id == aclHSAIL || target.arch_id == aclHSAIL64);
|
|
}
|
|
|
|
enum scId {
|
|
SC_AMDIL = 0,
|
|
SC_HSAIL = 0,
|
|
SC_LAST,
|
|
};
|
|
|
|
inline std::vector<std::string> splitSpaceSeparatedString(char *str)
|
|
{
|
|
std::string s(str);
|
|
std::stringstream ss(s);
|
|
std::istream_iterator<std::string> beg(ss), end;
|
|
std::vector<std::string> vec(beg, end);
|
|
return vec;
|
|
}
|
|
|
|
// Helper function that allocates an aligned memory.
|
|
inline void*
|
|
alignedMalloc(size_t size, size_t alignment)
|
|
{
|
|
#if defined(_WIN32)
|
|
return ::_aligned_malloc(size, alignment);
|
|
#else
|
|
void * ptr = NULL;
|
|
if (0 == ::posix_memalign(&ptr, alignment, size)) {
|
|
return ptr;
|
|
}
|
|
return NULL;
|
|
#endif
|
|
}
|
|
|
|
// Helper function that frees an aligned memory.
|
|
inline void
|
|
alignedFree(void *ptr)
|
|
{
|
|
#if defined(_WIN32)
|
|
::_aligned_free(ptr);
|
|
#else
|
|
free(ptr);
|
|
#endif
|
|
}
|
|
|
|
#endif // _CL_LIB_UTILS_0_8_H_
|