Skip to content

Commit

Permalink
Set new LLVM atomic optimizer strategy option (#2506)
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 12, 2023
1 parent 1d2115b commit 33cb8e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lgc/state/LgcContext.cpp
Expand Up @@ -149,11 +149,17 @@ 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");
#else
// New version of the code (also handles unknown version, which we treat as latest)
// New version of the code (also handles unknown version, which we treat as latest)
#endif
setOptionDefault("structurizecfg-skip-uniform-regions", "1");
setOptionDefault("spec-exec-max-speculation-cost", "10");
Expand Down

0 comments on commit 33cb8e3

Please sign in to comment.