[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 24 08:24:30 PDT 2025
================
@@ -2570,21 +2584,24 @@ void ExprEngine::processCFGBlockEntrance(const BlockEdge &L,
const ExplodedNode *Sink =
nodeBuilder.generateSink(Pred->getState(), Pred, &tag);
- // Check if we stopped at the top level function or not.
- // Root node should have the location context of the top most function.
- const LocationContext *CalleeLC = Pred->getLocation().getLocationContext();
- const LocationContext *CalleeSF = CalleeLC->getStackFrame();
- const LocationContext *RootLC =
- (*G.roots_begin())->getLocation().getLocationContext();
- if (RootLC->getStackFrame() != CalleeSF) {
- Engine.FunctionSummaries->markReachedMaxBlockCount(CalleeSF->getDecl());
+ if (const LocationContext *LC = getInlinedLocationContext(Pred, G)) {
+ // FIXME: This will unconditionally prevent inlining this function (even
+ // from other entrypoints), which is not a reasonable heuristic: even if
----------------
Xazax-hun wrote:
Nit: I think entry points are two distinct words.
https://github.com/llvm/llvm-project/pull/136720
More information about the cfe-commits
mailing list