fedor.sergeev added a comment.

In D57835#1387622 <https://reviews.llvm.org/D57835#1387622>, @arsenm wrote:

> I partially solved the problem with double printing the reports.  It's from 
> this in cc1_main:
>
>   // If any timers were active but haven't been destroyed yet, print theirp
>   // results now.  This happens in -disable-free mode.
>   llvm::TimerGroup::printAll(llvm::errs());
>   
>
> On a source file, -ftime-report  -disable-free prints one report. 
> -ftime-report without disable-free prints 2. For the IR file, both happen 
> either way and it double prints. The printing destructor can still be called 
> from the ManagedStatic in PassTimingInfo


I dont quite understand what clang is doing in terms of timers (and what 
-disable-free is/how does it interact with -ftime-report).
However if after doing printAll() you expect that there wont be any other 
reports then you should call clearAll() immediately after.


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

https://reviews.llvm.org/D57835



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D57835: Fix -ftime-r... Fedor Sergeev via Phabricator via cfe-commits

Reply via email to