[PATCH] D115896: [AMDGPU] Fix data race in SIInsertWaitcnts
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 16 12:23:48 PST 2021
kuhar created this revision.
kuhar added reviewers: foad, dstuttard, piotr, sebastian-ne.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a reviewer: grosser.
kuhar requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115896
Files:
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115896.394957.patch
Type: text/x-patch
Size: 4536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/3b76311d/attachment.bin>
More information about the llvm-commits
mailing list