[05/22] Describe condition_info

Message ID 20231004123921.634024-6-j@lambda.is
State Unresolved
Headers
Series [01/22] Add condition coverage profiling |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jørgen Kvalsvik Oct. 4, 2023, 12:39 p.m. UTC
  From: Jørgen Kvalsvik <jorgen.kvalsvik@woven.toyota>

---
 gcc/gcov.cc | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/gcc/gcov.cc b/gcc/gcov.cc
index 21a6da1a7fa..274f2fc5d9f 100644
--- a/gcc/gcov.cc
+++ b/gcc/gcov.cc
@@ -135,6 +135,8 @@  public:
   vector<unsigned> lines;
 };
 
+/* Describes a single conditional expression and the (recorded) conditions
+ * shown to independently affect the outcome.  */
 class condition_info
 {
 public:
@@ -142,9 +144,12 @@  public:
 
   int popcount () const;
 
+  /* Bitsets storing the independently significant outcomes for true and false,
+   * respectively.  */
   gcov_type_unsigned truev;
   gcov_type_unsigned falsev;
 
+  /* Number of terms in the expression; if (x) -> 1, if (x && y) -> 2 etc.  */
   unsigned n_terms;
 };