[llvm] [BOLT][rewrite] warn about functions without CFG before binary analyses. (PR #197294)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 03:30:54 PDT 2026
================
@@ -3888,8 +3888,24 @@ void RewriteInstance::runBinaryAnalyses() {
NamedRegionTimer T("runBinaryAnalyses", "run binary analysis passes",
TimerGroupName, TimerGroupDesc, opts::TimeRewrite);
BinaryFunctionPassManager Manager(*BC);
- // FIXME: add a pass that warns about which functions do not have CFG,
- // and therefore, analysis is most likely to be less accurate.
+
+ // Warn about functions without a reconstructed CFG: binary analyses degrade
+ // in accuracy on those and may produce false negatives.
+ uint64_t NoCFGCount = 0;
+ for (const auto &BFI : BC->getBinaryFunctions()) {
+ const BinaryFunction &BF = BFI.second;
+ if (BF.isIgnored() || BF.hasCFG())
----------------
atrosinenko wrote:
Hmm, I wonder why `PAuthGadgetScanner.cpp` does not check `isIgnored()` as well - was it by design or should we skip `ignored` functions there too? Maybe @kbeyls remembers something on this decision.
https://github.com/llvm/llvm-project/pull/197294
More information about the llvm-commits
mailing list