[PATCH] D104551: Delay initialization of OptBisect
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 10:33:53 PDT 2021
kparzysz created this revision.
kparzysz added a reviewer: andrew.w.kaylor.
Herald added subscribers: dexonsmith, hiraditya.
kparzysz requested review of this revision.
Herald added a project: LLVM.
When LLVM is used in other projects, it may happen that global constructors will execute before the call to `ParseCommandLineOptions`. Since `OptBisect` is initialized via a constructor, and has no ability to be updated at a later time, passing `-opt-bisect-limit` to the parse function may have no effect.
To avoid this problem use a `cl::cb` (callback) to set the bisection limit when the option is actually processed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104551
Files:
llvm/include/llvm/IR/OptBisect.h
llvm/lib/IR/OptBisect.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104551.353042.patch
Type: text/x-patch
Size: 3650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210618/2fe12ae8/attachment.bin>
More information about the llvm-commits
mailing list