diff options
author | Marek Olšák <[email protected]> | 2017-11-07 03:50:19 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-07 17:58:38 +0100 |
commit | cde664ab81dba8c7f0fa15ef6e28aac463719ac5 (patch) | |
tree | 223c02a4acc323a7a47d574c3970dd818bf9c791 /src/amd/common | |
parent | 81f81fdb54001903078af7df6c9e8f2d4ff46294 (diff) |
radeonsi: use ac_create_target_machine
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 7 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_util.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index fb2bc118743..429904c0403 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -128,8 +128,11 @@ LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, enum ac LLVMTargetRef target = ac_get_llvm_target(triple); snprintf(features, sizeof(features), - "+DumpCode,+vgpr-spilling,-fp32-denormals%s", - tm_options & AC_TM_SISCHED ? ",+si-scheduler" : ""); + "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s%s%s", + tm_options & AC_TM_SISCHED ? ",+si-scheduler" : "", + tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "", + tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "", + tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : ""); LLVMTargetMachineRef tm = LLVMCreateTargetMachine( target, diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h index d4b3915ffa9..7c8b6b0a130 100644 --- a/src/amd/common/ac_llvm_util.h +++ b/src/amd/common/ac_llvm_util.h @@ -57,6 +57,9 @@ enum ac_func_attr { enum ac_target_machine_options { AC_TM_SUPPORTS_SPILL = (1 << 0), AC_TM_SISCHED = (1 << 1), + AC_TM_FORCE_ENABLE_XNACK = (1 << 2), + AC_TM_FORCE_DISABLE_XNACK = (1 << 3), + AC_TM_PROMOTE_ALLOCA_TO_SCRATCH = (1 << 4), }; const char *ac_get_llvm_processor_name(enum radeon_family family); |