[PATCH] D157459: Make DWARFContext more thread safe.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 16:15:59 PDT 2023
dblaikie added a comment.
In D157459#4590028 <https://reviews.llvm.org/D157459#4590028>, @clayborg wrote:
> IMHO this is just creating thread safe code and is no different that any other patch.
Ish. It's adding a fairly subtle & incomplete invariant to a fairly complex API (with a bunch of fairly subtle invariants already). Even if this weren't about multithreading, but some other similarly subtle invariant, I think there'd still be similar reasonable concerns.
(DWARFContext's API is wide, this locking only protects it from certain multithreading, and not others - that's what I mean by subtle and incomplete - and so it's going to be difficult to keep track of/maintain this invariant going forward - as @JDevlieghere points out, I think, it'd be hard to document what DWARFContext's guarantees are after/with this patch, because I think it's still a fairly arbitrary selection of functions that can be used in a multithreaded environment)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157459/new/
https://reviews.llvm.org/D157459
More information about the llvm-commits
mailing list