Skip to content

Commit

Permalink
Set new LLVM atomic optimizer strategy option
Browse files Browse the repository at this point in the history
See: https://reviews.llvm.org/D147408#4394537
The LLVM AMDGPU atomic optimizer pass has a new command line option
-amdgpu-atomic-optimizer-strategy= which currently defaults to DPP, but
the plan is to change the default to Iterative. Set it to DPP explicitly
so that LLPC will not be affected by that change.
  • Loading branch information
jayfoad committed Jun 9, 2023
1 parent 1d2115b commit 736b360
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lgc/state/LgcContext.cpp
Expand Up @@ -149,6 +149,12 @@ void LgcContext::initialize() {
setOptionDefault("simplifycfg-sink-common", "0");
setOptionDefault("amdgpu-vgpr-index-mode", "1"); // force VGPR indexing on GFX8
setOptionDefault("amdgpu-atomic-optimizations", "1");
#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 463788
// Old version of the code
#else
// New version of the code (also handles unknown version, which we treat as latest)
setOptionDefault("amdgpu-atomic-optimizer-strategy", "DPP");
#endif
#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 458033
// Old version of the code
setOptionDefault("use-gpu-divergence-analysis", "1");
Expand Down

0 comments on commit 736b360

Please sign in to comment.