P4 to Git Change 1266028 by smekhano@stas-rampitec-hsa on 2016/05/06 13:22:26
SWDEV-93545 - HSA HLC: produce v_fma_f32 instead of v_mad_f32/v_mac_f32 on GFX9 if denorms are supported 1. Added means to know HW target for HSAIL BE. 2. Simplified compiler lib logic in handling target capabilities. 3. Used target info to fuse mul/add into fma_f32 on GFX9. Previously it was disabled because mad/mac always flush. v_fma_f32 does not flush, but only fast starting with GFX9. Testing: smoke, precheckin Reviewed by Nikolay Haustov and Evgeny Mankov Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#69 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#142 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#17 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#26 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAIL.h#42 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILFusion.td#29 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILISelDAGToDAG.cpp#70 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILISelLowering.cpp#115 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILInstructions.td#21 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILTargetMachine.cpp#56 edit ... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/llc_opt.tlst#95 edit
This commit is contained in:
@@ -42,6 +42,10 @@
|
||||
using namespace amdcl;
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
extern int HsailOptimizeFor;
|
||||
}
|
||||
|
||||
//!--------------------------------------------------------------------------!//
|
||||
// JIT Memory manager
|
||||
//!--------------------------------------------------------------------------!//
|
||||
@@ -614,6 +618,7 @@ llvmCodeGen(
|
||||
|
||||
#ifdef WITH_TARGET_HSAIL
|
||||
if (isHSAILTarget(binary->target)) {
|
||||
llvm::HsailOptimizeFor = getIsaType(aclutGetTargetInfo(binary));
|
||||
if (Target.addPassesToEmitFile(Passes, *Out, TargetMachine::CGFT_ObjectFile, true)) {
|
||||
delete Out;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user