[PATCH] D18610: [PGO] Restore the correct counter value after processing a nested region in case of combined regions.
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 12:58:06 PDT 2016
vsk added a comment.
Thanks for the patch.
+ 1 to Justin's comments.
================
Comment at: llvm/trunk/lib/ProfileData/CoverageMapping.cpp:310
@@ -307,1 +309,3 @@
+ else
+ startSegment(Region.LineStart, Region.ColumnStart, true, None);
}
----------------
nit: I think we can reduce repetition here by computing the Optional<uint64_t> first, and then calling startSegment.
================
Comment at: llvm/trunk/test/tools/llvm-cov/showTemplateInstantiations.cpp:10
@@ -9,3 +9,3 @@
return 0; // ALL-NEXT: 1| [[@LINE]]| return 0;
- else // ALL-NEXT: 1| [[@LINE]]| else
+ else // ALL-NEXT: 2| [[@LINE]]| else
return 1; // ALL-NEXT: 1| [[@LINE]]| return 1;
----------------
Could you explain why the line containing the `else` is marked as having executed twice? It seems like it should only be executed once.
http://reviews.llvm.org/D18610
More information about the llvm-commits
mailing list