[libFuzzer] simplify HandleTrace again, start re-running interesting units and collecting their features.

llvm-svn: 282316
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.h b/llvm/lib/Fuzzer/FuzzerTracePC.h
index bf890211..facd98d 100644
--- a/llvm/lib/Fuzzer/FuzzerTracePC.h
+++ b/llvm/lib/Fuzzer/FuzzerTracePC.h
@@ -50,6 +50,9 @@
     memset(Counters, 0, sizeof(Counters));
   }
 
+  void UpdateFeatureSet(size_t CurrentElementIdx, size_t CurrentElementSize);
+  void PrintFeatureSet();
+
   void ResetGuards();
 
   void PrintModuleInfo();
@@ -84,6 +87,15 @@
 
   ValueBitMap CounterMap;
   ValueBitMap ValueProfileMap;
+
+  struct Feature {
+    size_t Count;
+    size_t SmallestElementIdx;
+    size_t SmallestElementSize;
+  };
+
+  static const size_t kFeatureSetSize = ValueBitMap::kNumberOfItems;
+  Feature FeatureSet[kFeatureSetSize];
 };
 
 extern TracePC TPC;