[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 07:03:26 PST 2025
================
@@ -179,8 +181,40 @@ bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned MaxSteps,
return WList->hasWork();
}
-void CoreEngine::dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc,
- const WorkListUnit& WU) {
+static std::string timeTraceScopeName(const ProgramPoint &Loc) {
+ if (llvm::timeTraceProfilerEnabled()) {
+ return llvm::formatv("Loc {0}",
+ ProgramPoint::getProgramPointKindName(Loc.getKind()))
+ .str();
+ }
+ return "";
+}
+
+static llvm::TimeTraceMetadata timeTraceMetadata(const ExplodedNode *Pred,
+ const ProgramPoint &Loc) {
+ // If time-trace profiler is not enabled, this function is never called.
+ assert(llvm::timeTraceProfilerEnabled());
+ std::string str;
----------------
necto wrote:
Sorry for overlooking these
4cc3be9658c4 [NFC] Uppercase some variable names
https://github.com/llvm/llvm-project/pull/125508
More information about the cfe-commits
mailing list