diff options
author | Marek Olšák <[email protected]> | 2018-06-14 01:27:10 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-28 22:27:25 -0400 |
commit | 8e9c57a7fefe2f6ddbc1434ad38829c0aebf82fb (patch) | |
tree | 1f5fd761a920f4f6efcd16bc34f55b8702ead877 | |
parent | 7d6ec9d43bd45843eebddb046db333f0b18c9495 (diff) |
ac: set +auto-waitcnt-before-barrier when needed
This removes useless s_waitcnt before barriers.
Only radeonsi uses this function.
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index be2d92b4c08..99cc677edce 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -133,13 +133,15 @@ LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, char features[256]; const char *triple = (tm_options & AC_TM_SUPPORTS_SPILL) ? "amdgcn-mesa-mesa3d" : "amdgcn--"; LLVMTargetRef target = ac_get_llvm_target(triple); + bool barrier_does_waitcnt = true; /* TODO: not for Vega20 */ snprintf(features, sizeof(features), - "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s%s%s", + "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%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" : ""); + tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : "", + barrier_does_waitcnt ? ",+auto-waitcnt-before-barrier" : ""); LLVMTargetMachineRef tm = LLVMCreateTargetMachine( target, |