<div dir="ltr"><div dir="ltr">Ping. I'd like to revert this patch to fix the bot.<div><br></div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/14504">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/14504</a><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 21, 2018 at 11:44 AM Evgenii Stepanov via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>since this patch, gcov tests are failing on ppc64 bot:</div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt?numbuilds=200" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt?numbuilds=200</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 20, 2018 at 9:09 AM, Calixte Denizet via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: calixte<br>
Date: Thu Sep 20 09:09:30 2018<br>
New Revision: 342657<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342657&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=342657&view=rev</a><br>
Log:<br>
[gcov] Fix wrong line hit counts when multiple blocks are on the same line<br>
<br>
Summary:<br>
The goal of this patch is to have the same behaviour than gcc-gcov.<br>
Currently the hit counts for a line is the sum of the counts for each block on that line.<br>
The idea is to detect the cycles in the graph of blocks in using the algorithm by Hawick & James.<br>
The count for a cycle is the min of the counts for each edge in the cycle.<br>
Once we've the count for each cycle, we can sum them and add the transition counts of those cycles.<br>
<br>
Fix both <a href="https://bugs.llvm.org/show_bug.cgi?id=38065" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=38065</a> and <a href="https://bugs.llvm.org/show_bug.cgi?id=38066" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=38066</a><br>
<br>
Reviewers: marco-c, davidxl<br>
<br>
Reviewed By: marco-c<br>
<br>
Subscribers: vsk, lebedev.ri, sylvestre.ledru, dblaikie, llvm-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D49659" rel="noreferrer" target="_blank">https://reviews.llvm.org/D49659</a><br>
<br>
Modified:<br>
  llvm/trunk/include/llvm/ProfileData/GCOV.h<br>
  llvm/trunk/lib/ProfileData/GCOV.cpp<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov<br>
  llvm/trunk/test/tools/llvm-cov/range_based_for.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/GCOV.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/GCOV.h?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/GCOV.h?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/GCOV.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/GCOV.h Thu Sep 20 09:09:30 2018<br>
@@ -24,9 +24,11 @@<br>
 #include "llvm/ADT/iterator_range.h"<br>
 #include "llvm/Support/MemoryBuffer.h"<br>
 #include "llvm/Support/raw_ostream.h"<br>
+#include <algorithm><br>
 #include <cassert><br>
 #include <cstddef><br>
 #include <cstdint><br>
+#include <limits><br>
 #include <memory><br>
 #include <string><br>
 #include <utility><br>
@@ -266,13 +268,14 @@ struct GCOVEdge {<br>
  GCOVBlock &Src;<br>
  GCOVBlock &Dst;<br>
  uint64_t Count = 0;<br>
+Â uint64_t CyclesCount = 0;<br>
 };<br>
<br>
 /// GCOVFunction - Collects function information.<br>
 class GCOVFunction {<br>
 public:<br>
-Â using BlockIterator = pointee_iterator<SmallVectorImpl<<br>
-Â Â Â std::unique_ptr<GCOVBlock>>::const_iterator>;<br>
+Â using BlockIterator = pointee_iterator<<br>
+Â Â Â SmallVectorImpl<std::unique_ptr<GCOVBlock>>::const_iterator>;<br>
<br>
  GCOVFunction(GCOVFile &P) : Parent(P) {}<br>
<br>
@@ -322,6 +325,9 @@ class GCOVBlock {<br>
<br>
 public:<br>
  using EdgeIterator = SmallVectorImpl<GCOVEdge *>::const_iterator;<br>
+Â using BlockVector = SmallVector<const GCOVBlock *, 4>;<br>
+Â using BlockVectorLists = SmallVector<BlockVector, 4>;<br>
+Â using Edges = SmallVector<GCOVEdge *, 4>;<br>
<br>
  GCOVBlock(GCOVFunction &P, uint32_t N) : Parent(P), Number(N) {}<br>
  ~GCOVBlock();<br>
@@ -365,6 +371,16 @@ public:<br>
  void dump() const;<br>
  void collectLineCounts(FileInfo &FI);<br>
<br>
+Â static uint64_t getCycleCount(const Edges &Path);<br>
+Â static void unblock(const GCOVBlock *U, BlockVector &Blocked,<br>
+Â Â Â Â Â Â Â Â Â Â Â BlockVectorLists &BlockLists);<br>
+Â static bool lookForCircuit(const GCOVBlock *V, const GCOVBlock *Start,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Edges &Path, BlockVector &Blocked,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â BlockVectorLists &BlockLists,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â const BlockVector &Blocks, uint64_t &Count);<br>
+Â static void getCyclesCount(const BlockVector &Blocks, uint64_t &Count);<br>
+Â static uint64_t getLineCount(const BlockVector &Blocks);<br>
+<br>
 private:<br>
  GCOVFunction &Parent;<br>
  uint32_t Number;<br>
<br>
Modified: llvm/trunk/lib/ProfileData/GCOV.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/GCOV.cpp?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/GCOV.cpp?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ProfileData/GCOV.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/GCOV.cpp Thu Sep 20 09:09:30 2018<br>
@@ -111,9 +111,7 @@ void GCOVFile::print(raw_ostream &OS) co<br>
<br>
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
 /// dump - Dump GCOVFile content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVFile::dump() const {<br>
-Â print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVFile::dump() const { print(dbgs()); }<br>
 #endif<br>
<br>
 /// collectLineCounts - Collect line counts. This must be used after<br>
@@ -359,9 +357,7 @@ void GCOVFunction::print(raw_ostream &OS<br>
<br>
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
 /// dump - Dump GCOVFunction content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVFunction::dump() const {<br>
-Â print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVFunction::dump() const { print(dbgs()); }<br>
 #endif<br>
<br>
 /// collectLineCounts - Collect line counts. This must be used after<br>
@@ -437,12 +433,135 @@ void GCOVBlock::print(raw_ostream &OS) c<br>
<br>
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)<br>
 /// dump - Dump GCOVBlock content to dbgs() for debugging purposes.<br>
-LLVM_DUMP_METHOD void GCOVBlock::dump() const {<br>
-Â print(dbgs());<br>
-}<br>
+LLVM_DUMP_METHOD void GCOVBlock::dump() const { print(dbgs()); }<br>
 #endif<br>
<br>
 //===----------------------------------------------------------------------===//<br>
+// Cycles detection<br>
+//<br>
+// The algorithm in GCC is based on the algorihtm by Hawick & James:<br>
+//Â Â "Enumerating Circuits and Loops in Graphs with Self-Arcs and Multiple-Arcs"<br>
+//Â Â <a href="http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf" rel="noreferrer" target="_blank">http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf</a>.<br>
+<br>
+/// Get the count for the detected cycle.<br>
+uint64_t GCOVBlock::getCycleCount(const Edges &Path) {<br>
+Â uint64_t CycleCount = std::numeric_limits<uint64_t>::max();<br>
+Â for (auto E : Path) {<br>
+Â Â CycleCount = std::min(E->CyclesCount, CycleCount);<br>
+Â }<br>
+Â for (auto E : Path) {<br>
+Â Â E->CyclesCount -= CycleCount;<br>
+Â }<br>
+Â return CycleCount;<br>
+}<br>
+<br>
+/// Unblock a vertex previously marked as blocked.<br>
+void GCOVBlock::unblock(const GCOVBlock *U, BlockVector &Blocked,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â BlockVectorLists &BlockLists) {<br>
+Â auto it = find(Blocked, U);<br>
+Â if (it == Blocked.end()) {<br>
+Â Â return;<br>
+Â }<br>
+<br>
+Â const size_t index = it - Blocked.begin();<br>
+Â Blocked.erase(it);<br>
+<br>
+Â const BlockVector ToUnblock(BlockLists[index]);<br>
+Â BlockLists.erase(BlockLists.begin() + index);<br>
+Â for (auto GB : ToUnblock) {<br>
+Â Â GCOVBlock::unblock(GB, Blocked, BlockLists);<br>
+Â }<br>
+}<br>
+<br>
+bool GCOVBlock::lookForCircuit(const GCOVBlock *V, const GCOVBlock *Start,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Edges &Path, BlockVector &Blocked,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â BlockVectorLists &BlockLists,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â const BlockVector &Blocks, uint64_t &Count) {<br>
+Â Blocked.push_back(V);<br>
+Â BlockLists.emplace_back(BlockVector());<br>
+Â bool FoundCircuit = false;<br>
+<br>
+Â for (auto E : V->dsts()) {<br>
+Â Â const GCOVBlock *W = &E->Dst;<br>
+Â Â if (W < Start || find(Blocks, W) == Blocks.end()) {<br>
+Â Â Â continue;<br>
+Â Â }<br>
+<br>
+Â Â Path.push_back(E);<br>
+<br>
+Â Â if (W == Start) {<br>
+Â Â Â // We've a cycle.<br>
+Â Â Â Count += GCOVBlock::getCycleCount(Path);<br>
+Â Â Â FoundCircuit = true;<br>
+Â Â } else if (find(Blocked, W) == Blocked.end() && // W is not blocked.<br>
+Â Â Â Â Â Â Â Â GCOVBlock::lookForCircuit(W, Start, Path, Blocked, BlockLists,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Blocks, Count)) {<br>
+Â Â Â FoundCircuit = true;<br>
+Â Â }<br>
+<br>
+Â Â Path.pop_back();<br>
+Â }<br>
+<br>
+Â if (FoundCircuit) {<br>
+Â Â GCOVBlock::unblock(V, Blocked, BlockLists);<br>
+Â } else {<br>
+Â Â for (auto E : V->dsts()) {<br>
+Â Â Â const GCOVBlock *W = &E->Dst;<br>
+Â Â Â if (W < Start || find(Blocks, W) == Blocks.end()) {<br>
+Â Â Â Â continue;<br>
+Â Â Â }<br>
+Â Â Â const size_t index = find(Blocked, W) - Blocked.begin();<br>
+Â Â Â BlockVector &List = BlockLists[index];<br>
+Â Â Â if (find(List, V) == List.end()) {<br>
+Â Â Â Â List.push_back(V);<br>
+Â Â Â }<br>
+Â Â }<br>
+Â }<br>
+<br>
+Â return FoundCircuit;<br>
+}<br>
+<br>
+/// Get the count for the list of blocks which lie on the same line.<br>
+void GCOVBlock::getCyclesCount(const BlockVector &Blocks, uint64_t &Count) {<br>
+Â for (auto Block : Blocks) {<br>
+Â Â Edges Path;<br>
+Â Â BlockVector Blocked;<br>
+Â Â BlockVectorLists BlockLists;<br>
+<br>
+Â Â GCOVBlock::lookForCircuit(Block, Block, Path, Blocked, BlockLists, Blocks,<br>
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Count);<br>
+Â }<br>
+}<br>
+<br>
+/// Get the count for the list of blocks which lie on the same line.<br>
+uint64_t GCOVBlock::getLineCount(const BlockVector &Blocks) {<br>
+Â uint64_t Count = 0;<br>
+<br>
+Â for (auto Block : Blocks) {<br>
+Â Â if (Block->getNumSrcEdges() == 0) {<br>
+Â Â Â // The block has no predecessors and a non-null counter<br>
+Â Â Â // (can be the case with entry block in functions).<br>
+Â Â Â Count += Block->getCount();<br>
+Â Â } else {<br>
+Â Â Â // Add counts from predecessors that are not on the same line.<br>
+Â Â Â for (auto E : Block->srcs()) {<br>
+Â Â Â Â const GCOVBlock *W = &E->Src;<br>
+Â Â Â Â if (find(Blocks, W) == Blocks.end()) {<br>
+Â Â Â Â Â Count += E->Count;<br>
+Â Â Â Â }<br>
+Â Â Â }<br>
+Â Â }<br>
+Â Â for (auto E : Block->dsts()) {<br>
+Â Â Â E->CyclesCount = E->Count;<br>
+Â Â }<br>
+Â }<br>
+<br>
+Â GCOVBlock::getCyclesCount(Blocks, Count);<br>
+<br>
+Â return Count;<br>
+}<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
 // FileInfo implementation.<br>
<br>
 // Safe integer division, returns 0 if numerator is 0.<br>
@@ -578,8 +697,8 @@ FileInfo::openCoveragePath(StringRef Cov<br>
   return llvm::make_unique<raw_null_ostream>();<br>
<br>
  std::error_code EC;<br>
-Â auto OS = llvm::make_unique<raw_fd_ostream>(CoveragePath, EC,<br>
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â sys::fs::F_Text);<br>
+Â auto OS =<br>
+Â Â Â llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::F_Text);<br>
  if (EC) {<br>
   errs() << EC.message() << "\n";<br>
   return llvm::make_unique<raw_null_ostream>();<br>
@@ -628,17 +747,7 @@ void FileInfo::print(raw_ostream &InfoOS<br>
<br>
     // Add up the block counts to form line counts.<br>
     DenseMap<const GCOVFunction *, bool> LineExecs;<br>
-Â Â Â Â uint64_t LineCount = 0;<br>
     for (const GCOVBlock *Block : Blocks) {<br>
-Â Â Â Â Â if (Options.AllBlocks) {<br>
-Â Â Â Â Â Â // Only take the highest block count for that line.<br>
-Â Â Â Â Â Â uint64_t BlockCount = Block->getCount();<br>
-Â Â Â Â Â Â LineCount = LineCount > BlockCount ? LineCount : BlockCount;<br>
-Â Â Â Â Â } else {<br>
-Â Â Â Â Â Â // Sum up all of the block counts.<br>
-Â Â Â Â Â Â LineCount += Block->getCount();<br>
-Â Â Â Â Â }<br>
-<br>
      if (Options.FuncCoverage) {<br>
       // This is a slightly convoluted way to most accurately gather line<br>
       // statistics for functions. Basically what is happening is that we<br>
@@ -674,6 +783,7 @@ void FileInfo::print(raw_ostream &InfoOS<br>
      }<br>
     }<br>
<br>
+Â Â Â Â const uint64_t LineCount = GCOVBlock::getLineCount(Blocks);<br>
     if (LineCount == 0)<br>
      CovOS << "  #####:";<br>
     else {<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -49,7 +49,7 @@<br>
     4:  34-block 0<br>
    12:  34-block 1<br>
     8:  34-block 2<br>
-Â Â Â Â 8:Â Â 35:Â Â Â assign(ii, jj);<br>
+Â Â Â Â 12:Â Â 35:Â Â Â assign(ii, jj);<br>
     8:  35-block 0<br>
     4:  35-block 1<br>
     2:  36:}<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -3,7 +3,7 @@<br>
     -:  0:Data:test.gcda<br>
     -:  0:Runs:2<br>
     -:  0:Programs:1<br>
-Â Â Â Â 2:Â Â 1:struct A {<br>
+Â Â Â Â 4:Â Â 1:struct A {<br>
     2:  1-block 0<br>
     2:  1-block 1<br>
     -:  2: virtual void B();<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -60,7 +60,7 @@ branch 1 taken 33%<br>
 branch 0 taken 67%<br>
 branch 1 taken 33%<br>
     8:  34-block 2<br>
-Â Â Â Â 8:Â Â 35:Â Â Â assign(ii, jj);<br>
+Â Â Â Â 12:Â Â 35:Â Â Â assign(ii, jj);<br>
     8:  35-block 0<br>
     4:  35-block 1<br>
     2:  36:}<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
     -:  0:Programs:1<br>
 function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
 function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
-Â Â Â Â 2:Â Â 1:struct A {<br>
+Â Â Â Â 4:Â Â 1:struct A {<br>
     2:  1-block 0<br>
     2:  1-block 1<br>
     -:  2: virtual void B();<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -70,7 +70,7 @@ branch 1 taken 8<br>
 branch 2 taken 4<br>
     8:  34-block 2<br>
 unconditional 3 taken 8<br>
-Â Â Â Â 8:Â Â 35:Â Â Â assign(ii, jj);<br>
+Â Â Â Â 12:Â Â 35:Â Â Â assign(ii, jj);<br>
     8:  35-block 0<br>
 unconditional 0 taken 8<br>
     4:  35-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-c_-u.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
     -:  0:Programs:1<br>
 function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
 function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
-Â Â Â Â 2:Â Â 1:struct A {<br>
+Â Â Â Â 4:Â Â 1:struct A {<br>
     2:  1-block 0<br>
 unconditional 0 taken 2<br>
     2:  1-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -70,7 +70,7 @@ branch 1 taken 67%<br>
 branch 2 taken 33%<br>
     8:  34-block 2<br>
 unconditional 3 taken 100%<br>
-Â Â Â Â 8:Â Â 35:Â Â Â assign(ii, jj);<br>
+Â Â Â Â 12:Â Â 35:Â Â Â assign(ii, jj);<br>
     8:  35-block 0<br>
 unconditional 0 taken 100%<br>
     4:  35-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_-a_-b_-u.h.gcov Thu Sep 20 09:09:30 2018<br>
@@ -5,7 +5,7 @@<br>
     -:  0:Programs:1<br>
 function _ZN1AC1Ev called 2 returned 100% blocks executed 100%<br>
 function _ZN1AC2Ev called 2 returned 100% blocks executed 100%<br>
-Â Â Â Â 2:Â Â 1:struct A {<br>
+Â Â Â Â 4:Â Â 1:struct A {<br>
     2:  1-block 0<br>
 unconditional 0 taken 100%<br>
     2:  1-block 1<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_missing.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
    12:  30:/*EOF*/<br>
     -:  31:/*EOF*/<br>
     -:  32:/*EOF*/<br>
-Â Â Â Â 21:Â Â 33:/*EOF*/<br>
-Â Â Â Â 36:Â Â 34:/*EOF*/<br>
+Â Â Â Â 9:Â Â 33:/*EOF*/<br>
+Â Â Â Â 18:Â Â 34:/*EOF*/<br>
    18:  35:/*EOF*/<br>
     3:  36:/*EOF*/<br>
     -:  37:/*EOF*/<br>
@@ -53,7 +53,7 @@<br>
   #####:  48:/*EOF*/<br>
     -:  49:/*EOF*/<br>
     -:  50:/*EOF*/<br>
-Â Â Â Â 66:Â Â 51:/*EOF*/<br>
+Â Â Â Â 33:Â Â 51:/*EOF*/<br>
    30:  52:/*EOF*/<br>
     -:  53:/*EOF*/<br>
     6:  54:/*EOF*/<br>
@@ -71,7 +71,7 @@<br>
    30:  66:/*EOF*/<br>
     -:  67:/*EOF*/<br>
     3:  68:/*EOF*/<br>
-25769803782:Â Â 69:/*EOF*/<br>
+12884901891:Â Â 69:/*EOF*/<br>
 12884901888:  70:/*EOF*/<br>
     -:  71:/*EOF*/<br>
     3:  72:/*EOF*/<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_no_options.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
     8:  30:}<br>
     -:  31:<br>
     -:  32:void initialize_grid() {<br>
-Â Â Â Â 12:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
-Â Â Â Â 24:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
+Â Â Â Â 6:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
+Â Â Â Â 12:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
    12:  35:   assign(ii, jj);<br>
     2:  36:}<br>
     -:  37:<br>
@@ -53,7 +53,7 @@<br>
   #####:  48:  a += rand();<br>
     -:  49: }<br>
     -:  50:<br>
-Â Â Â Â 44:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
+Â Â Â Â 22:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
    20:  52:  switch (rand() % 5) {<br>
     -:  53:   case 0:<br>
     4:  54:    a += rand();<br>
@@ -71,7 +71,7 @@<br>
    20:  66: }<br>
     -:  67:<br>
     2:  68: A thing;<br>
-17179869188:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+8589934594:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
 8589934592:  70:  thing.B();<br>
     -:  71:<br>
     2:  72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_objdir.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
     8:  30:}<br>
     -:  31:<br>
     -:  32:void initialize_grid() {<br>
-Â Â Â Â 12:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
-Â Â Â Â 24:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
+Â Â Â Â 6:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
+Â Â Â Â 12:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
    12:  35:   assign(ii, jj);<br>
     2:  36:}<br>
     -:  37:<br>
@@ -53,7 +53,7 @@<br>
   #####:  48:  a += rand();<br>
     -:  49: }<br>
     -:  50:<br>
-Â Â Â Â 44:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
+Â Â Â Â 22:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
    20:  52:  switch (rand() % 5) {<br>
     -:  53:   case 0:<br>
     4:  54:    a += rand();<br>
@@ -71,7 +71,7 @@<br>
    20:  66: }<br>
     -:  67:<br>
     2:  68: A thing;<br>
-17179869188:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+8589934594:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
 8589934592:  70:  thing.B();<br>
     -:  71:<br>
     2:  72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/Inputs/test_paths.cpp.gcov Thu Sep 20 09:09:30 2018<br>
@@ -35,8 +35,8 @@<br>
    12:  30:}<br>
     -:  31:<br>
     -:  32:void initialize_grid() {<br>
-Â Â Â Â 21:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
-Â Â Â Â 36:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
+Â Â Â Â 9:Â Â 33:Â for (int ii = 0; ii < 2; ii++)<br>
+Â Â Â Â 18:Â Â 34:Â Â for (int jj = 0; jj < 2; jj++)<br>
    18:  35:   assign(ii, jj);<br>
     3:  36:}<br>
     -:  37:<br>
@@ -53,7 +53,7 @@<br>
   #####:  48:  a += rand();<br>
     -:  49: }<br>
     -:  50:<br>
-Â Â Â Â 66:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
+Â Â Â Â 33:Â Â 51:Â for (int ii = 0; ii < 10; ++ii) {<br>
    30:  52:  switch (rand() % 5) {<br>
     -:  53:   case 0:<br>
     6:  54:    a += rand();<br>
@@ -71,7 +71,7 @@<br>
    30:  66: }<br>
     -:  67:<br>
     3:  68: A thing;<br>
-25769803782:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
+12884901891:Â Â 69:Â for (uint64_t ii = 0; ii < 4294967296; ++ii)<br>
 12884901888:  70:  thing.B();<br>
     -:  71:<br>
     3:  72: return a + 8 + grid[2][3] + len;<br>
<br>
Modified: llvm/trunk/test/tools/llvm-cov/range_based_for.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/range_based_for.cpp?rev=342657&r1=342656&r2=342657&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/range_based_for.cpp?rev=342657&r1=342656&r2=342657&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/tools/llvm-cov/range_based_for.cpp (original)<br>
+++ llvm/trunk/test/tools/llvm-cov/range_based_for.cpp Thu Sep 20 09:09:30 2018<br>
@@ -20,7 +20,7 @@<br>
<br>
 int main(int argc, const char *argv[]) { // GCOV: 1:  [[@LINE]]:int main(<br>
  int V[] = {1, 2};           // GCOV: 1:  [[@LINE]]: int V[]<br>
-Â for (int &I : V) {Â Â Â Â Â Â Â Â Â Â Â // GCOV: 10:Â Â [[@LINE]]:Â for (<br>
+Â for (int &I : V) {Â Â Â Â Â Â Â Â Â Â Â // GCOV: 5:Â Â [[@LINE]]:Â for (<br>
  }                   // GCOV: 2:  [[@LINE]]: }<br>
  return 0;               // GCOV: 1:  [[@LINE]]: return<br>
 }                    // GCOV: -:  [[@LINE]]:}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>