aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2023-07-31 10:33:14 -0700
committerLang Hames <lhames@gmail.com>2023-07-31 12:17:17 -0700
commite0b3f45d87a6677efb59d8a4f0e6deac9c346c76 (patch)
treec4b95705189dcfb5b59de8cf776edc1901308e73 /clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
parent3a100ea901ed79d6a06a5f018be2b4d3bbca51e8 (diff)
downloadllvm-e0b3f45d87a6677efb59d8a4f0e6deac9c346c76.zip
llvm-e0b3f45d87a6677efb59d8a4f0e6deac9c346c76.tar.gz
llvm-e0b3f45d87a6677efb59d8a4f0e6deac9c346c76.tar.bz2
[ORC] Automatically suspend and resume lookups that depend on in-use generators.
Access to individual DefinitionGenerators is serialized in order to make generators easier to implement: serializing access means that tryToGenerate methods don't have to handle concurrent, potentially overlapping, requests. Prior to this patch serialization was achieved by having each lookup acquire a lock on each generator, however this causes the lookup thread to block if the generator is in use. In the common case where many objects reference some common library symbol that is provided by a generator this may cause many threads to block concurrently preventing progress on other work. This patch changes the model so that lookups are automatically suspended if they need to use a generator that is already in use, and then automatically resumed once the generator is free. This is achieved by reusing the lookup suspension machinery that was introduced in 069919c9ba3 for optionally asynchronous generators.
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp')
0 files changed, 0 insertions, 0 deletions