erik.pilkington added a comment.
This looks really usefull, thanks for working on this!
================
Comment at: lib/Lex/Preprocessor.cpp:746
void Preprocessor::Lex(Token &Result) {
+ llvm::TimeRegion(PPOpts->getTimer());
+
----------------
Doesn't this just start a timer and immediately end the timer? Shouldn't we do:
`llvm::TimeRegion LexTime(PPOpts->getTimer())` so that the dtor gets called
when this function returns and we track the time spent in this function?
Also: this is a pretty hot function, and it looks like TimeRegion does some
non-trivial work if time is being tracked. Have you tried testing this on a big
c++ file with and without this patch and seeing what the difference in compile
time looks like?
https://reviews.llvm.org/D36492
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits