ECR #333753 - TargetMachine is created not only for codegen, but for optimizer as well
This is to provide target specific optimizations in the intermediate optimizer.
LLVM 3.6 provides TargetTransformInfo for this purpose which requires TargetMachine.
No correctness issues will occur if TargetInfo is not created, but optmizations will target generic machine.
Testing: smoke, precheckin
Reviewed by Evgeny Mankov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#60 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.hpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/optimizer.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#16 edit
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
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