[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 14:21:24 PDT 2019


lebedev.ri added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenAction.cpp:250-252
+      // Finish "Frontend" section starting inside clang::ParseAST()
+      if (llvm::timeTraceProfilerEnabled())
+        llvm::timeTraceProfilerEnd();
----------------
I think i'm missing a point here.
Why do we want to end `"Frontend"` section here,  exclude all this following diag/optremark/etc stuff?


================
Comment at: clang/lib/Parse/ParseAST.cpp:154
   if (HaveLexer) {
-    llvm::TimeTraceScope TimeScope("Frontend", StringRef(""));
     P.Initialize();
----------------
Why not keep this as `"Lexing"`?


================
Comment at: clang/lib/Parse/ParseAST.cpp:182
   finalize(S.TemplateInstCallbacks, S);
 
   std::swap(OldCollectStats, S.CollectStats);
----------------
I.e. why do we not want to end it here, where the other stats are printed?


================
Comment at: clang/test/Driver/check-time-trace-sections.py:1
+#!/usr/bin/env python
+
----------------
Does some other test already require python?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63325/new/

https://reviews.llvm.org/D63325





More information about the cfe-commits mailing list