zequanwu abandoned this revision.
zequanwu added inline comments.
Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:353
+SkippedRanges.erase(
+std::remove_if(
+SkippedRanges.begin(), SkippedRanges.end(),
vsk wrote:
> In the worst case,
vsk added a comment.
(Depending on what the potential performance gains look like, it might be
advisable to keep things simple with the current O(n^2) approach. Optimizing
things can carry some risk -- not sure if we've already ruled this out, but
e.g. perhaps there's some edge case with
vsk added a comment.
Unfortunately it does look like the work done in gatherSkippedRegions is O(n^2)
in the number of functions, at the moment. If the goal is to speed it up, it'd
be good to grab some performance numbers for some representative compile unit
(the sqlite3 amalgamation is my
zequanwu created this revision.
zequanwu added a reviewer: vsk.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
zequanwu requested review of this revision.
There is no need to scan through all SkippedRegions when some of them are
already added into MappingRegions.