[all-commits] [llvm/llvm-project] d9ae85: [AMDGPU] Fix data race in SIInsertWaitcnts
Jakub Kuderski via All-commits
all-commits at lists.llvm.org
Sat Dec 18 13:05:23 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d9ae852fcc97a6a1b48bf7516d6f3f03a85eed62
https://github.com/llvm/llvm-project/commit/d9ae852fcc97a6a1b48bf7516d6f3f03a85eed62
Author: Jakub Kuderski <kubak at google.com>
Date: 2021-12-18 (Sat, 18 Dec 2021)
Changed paths:
M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Log Message:
-----------
[AMDGPU] Fix data race in SIInsertWaitcnts
The race condition happened when two pass managers ran on two different modules but modified/read the global variables.
To address this, I considered using singletons and freestanding functions to allow getting/setting `HardwareLimits` and `RegisterEncoding`, or making it local to the pass. I chose the latter and made it a member of `WaitcntsBrackets`, to minimizes the amount of global state.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D115896
More information about the All-commits
mailing list