From d979e5bfab6f4dc0f358271835c8cd8e6c98d782 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 15 Aug 2019 16:53:34 -0400 Subject: [PATCH] ac: enable LLVM atomic optimizations --- src/amd/common/ac_llvm_util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index 7793926bf49..deca5b98772 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -59,7 +59,15 @@ static void ac_init_llvm_target() * This option tells the backend to fall-back to SelectionDAG and print * a diagnostic message if global isel fails. */ - const char *argv[] = { "mesa", "-simplifycfg-sink-common=false", "-global-isel-abort=2" }; + const char *argv[] = { + "mesa", + "-simplifycfg-sink-common=false", + "-global-isel-abort=2", +#if HAVE_LLVM >= 0x1000 + /* Atomic optimizations require LLVM 10.0 for gfx10 support. */ + "-amdgpu-atomic-optimizations=true", +#endif + }; LLVMParseCommandLineOptions(ARRAY_SIZE(argv), argv, NULL); } -- 2.30.2