[PATCH] D60283: [clang-cl] Don't emit checksums when compiling a preprocessed CPP
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 5 11:46:15 PDT 2019
aganea added a comment.
In D60283#1456497 <https://reviews.llvm.org/D60283#1456497>, @thakis wrote:
> See http://llvm-cs.pcc.me.uk/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp#756 for a "is same file" example. I'm not sure adding a bool to PresumedLoc is worth it for this.
Yeah that works. However I'm getting two conflicting directions - I thought the worry was to avoid an extra runtime cost when comparing strings (see first version <https://reviews.llvm.org/D60283?id=193764#inline-534041>). @rnk wanted at first a compare by FileID, although it looks like it's more costly to do that, because all paths end up in `SourceManager::getFileIDSlow`. Just by tracing the code on a small preprocessed CPP, it looks like a costly solution. Using `IsFromSameFile` ends up in `SourceManager::getFileIDSlow` several times per iteration - whereas the solution proposed above (boolean) has zero runtime cost. I'm worried that large files with lots of `#line` will be much slower to compile. What do you think?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60283/new/
https://reviews.llvm.org/D60283
More information about the cfe-commits
mailing list