diff options
author | Marek Olšák <[email protected]> | 2019-07-12 17:14:11 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-19 20:16:19 -0400 |
commit | 73aa04e40d5fa7ec5f7d37d939a324be06518a47 (patch) | |
tree | 91345033b295d84426ff3385878df2e1234456ee /src/amd/common/ac_llvm_util.c | |
parent | 9e467d111b2c9046c9b35b9e76891a8cfbb752c1 (diff) |
ac: add Wave32 LLVM target machine
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_util.c')
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index 1cf51b79c76..e4a353a4967 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -157,7 +157,8 @@ static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, snprintf(features, sizeof(features), "+DumpCode,-fp32-denormals,+fp64-denormals%s%s%s%s%s%s%s", HAVE_LLVM >= 0x0800 ? "" : ",+vgpr-spilling", - family >= CHIP_NAVI10 ? ",+wavefrontsize64,-wavefrontsize32" : "", + family >= CHIP_NAVI10 && !(tm_options & AC_TM_WAVE32) ? + ",+wavefrontsize64,-wavefrontsize32" : "", tm_options & AC_TM_SISCHED ? ",+si-scheduler" : "", tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "", tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "", @@ -337,6 +338,16 @@ ac_init_llvm_compiler(struct ac_llvm_compiler *compiler, goto fail; } + if (family >= CHIP_NAVI10) { + assert(!(tm_options & AC_TM_CREATE_LOW_OPT)); + compiler->tm_wave32 = ac_create_target_machine(family, + tm_options | AC_TM_WAVE32, + LLVMCodeGenLevelDefault, + NULL); + if (!compiler->tm_wave32) + goto fail; + } + compiler->target_library_info = ac_create_target_library_info(triple); if (!compiler->target_library_info) @@ -357,6 +368,7 @@ void ac_destroy_llvm_compiler(struct ac_llvm_compiler *compiler) { ac_destroy_llvm_passes(compiler->passes); + ac_destroy_llvm_passes(compiler->passes_wave32); ac_destroy_llvm_passes(compiler->low_opt_passes); if (compiler->passmgr) @@ -367,4 +379,6 @@ ac_destroy_llvm_compiler(struct ac_llvm_compiler *compiler) LLVMDisposeTargetMachine(compiler->low_opt_tm); if (compiler->tm) LLVMDisposeTargetMachine(compiler->tm); + if (compiler->tm_wave32) + LLVMDisposeTargetMachine(compiler->tm_wave32); } |