[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

Andrew V. Tischenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 31 05:25:05 PDT 2018


avt77 updated this revision to Diff 158221.
avt77 added a comment.
Herald added a subscriber: eraman.

Accordingly to efriedma suggestion I removed start/stopFrontendTimer where it's possible and inserted FrontendTimeRAII in several new places. As result the patch becomes bigger and bigger. And as another result I got output like here (on compiler bootstrap):
....
 0.5920 (165) _ZSt7declvalv (*)
 0.5960 (155) _ZSt7declvalv (*)
 0.5960 (162) _ZSt7declvalv (*)
 0.6000 (167) _ZSt7declvalv (*)
 0.6040 (155) _ZSt7declvalv (*)
 0.6040 (160) _ZSt7declvalv (*)
 0.6040 (169) _ZSt7declvalv (*)
 ....
(the above is grep output from build log file)

It means we compile the same function many times inside many files and it should be optimised in some way.
Another thought: I should add "human" names to simplify the mangling names resolution.


https://reviews.llvm.org/D47196

Files:
  include/clang/Driver/CC1Options.td
  include/clang/Frontend/CodeGenOptions.h
  include/clang/Frontend/Utils.h
  lib/AST/Decl.cpp
  lib/AST/Expr.cpp
  lib/Analysis/AnalysisDeclContext.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenAction.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenModule.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Frontend/FrontendTiming.cpp
  lib/Parse/CMakeLists.txt
  lib/Parse/ParseCXXInlineMethods.cpp
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseTemplate.cpp
  lib/Parse/Parser.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaLambda.cpp
  lib/Sema/SemaOverload.cpp
  lib/Sema/SemaTemplateDeduction.cpp
  lib/Sema/SemaTemplateInstantiate.cpp
  lib/Sema/TreeTransform.h
  test/Frontend/ftime-report-template-decl.cpp
  test/Headers/opencl-c-header.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47196.158221.patch
Type: text/x-patch
Size: 44242 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180731/d923a851/attachment-0001.bin>


More information about the cfe-commits mailing list