[PATCH] D129119: Add llvm::llvm_fast_shutdown()
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 02:15:20 PDT 2022
nhaehnle created this revision.
nhaehnle added reviewers: efriedma, lattner.
Herald added subscribers: mstorsjo, hiraditya, mgorny.
Herald added a reviewer: MaskRay.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a subscriber: StephenFan.
Herald added a project: LLVM.
LLD uses an unclean process exit to shut the process down faster, but
still wants the benefit of some side-effects that have traditionally
been invoked via llvm_shutdown() and ManagedStatic destruction.
The new llvm_fast_shutdown() function provides a more explicit alternative
solution that will still work when ManagedStatic is removed. Incidentally,
it also reduces the amount of cleanup code that is run even further.
This change also removes the use of ManagedStatic in the affected
components.
Note that the StatLock is moved into the StatisticInfo class. This is a
robust solution to guarantee that the StatLock destructor doesn't run
too early.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129119
Files:
lld/Common/ErrorHandler.cpp
llvm/include/llvm/ADT/Statistic.h
llvm/include/llvm/Support/FastShutdown.h
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/FastShutdown.cpp
llvm/lib/Support/Parallel.cpp
llvm/lib/Support/Statistic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129119.442219.patch
Type: text/x-patch
Size: 14639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220705/1af5b75b/attachment.bin>
More information about the llvm-commits
mailing list