LLVM  5.0.0
Public Member Functions | Static Public Attributes | List of all members
fuzzer::ValueBitMap Struct Reference

#include "Fuzzer/FuzzerValueBitMap.h"

Collaboration diagram for fuzzer::ValueBitMap:
[legend]

Public Member Functions

void Reset ()
 
ATTRIBUTE_NO_SANITIZE_ALL bool AddValue (uintptr_t Value)
 
ATTRIBUTE_NO_SANITIZE_ALL bool AddValueModPrime (uintptr_t Value)
 
bool Get (uintptr_t Idx)
 
size_t GetNumBitsSinceLastMerge () const
 
ATTRIBUTE_TARGET_POPCNT bool MergeFrom (ValueBitMap &Other)
 
template<class Callback >
ATTRIBUTE_NO_SANITIZE_ALL void ForEach (Callback CB) const
 

Static Public Attributes

static const size_t kMapSizeInBits = 1 << 16
 
static const size_t kMapPrimeMod = 65371
 
static const size_t kBitsInWord = (sizeof(uintptr_t) * 8)
 
static const size_t kMapSizeInWords = kMapSizeInBits / kBitsInWord
 

Detailed Description

Definition at line 20 of file FuzzerValueBitMap.h.

Member Function Documentation

ATTRIBUTE_NO_SANITIZE_ALL bool fuzzer::ValueBitMap::AddValue ( uintptr_t  Value)
inline
ATTRIBUTE_NO_SANITIZE_ALL bool fuzzer::ValueBitMap::AddValueModPrime ( uintptr_t  Value)
inline

Definition at line 44 of file FuzzerValueBitMap.h.

References AddValue(), and kMapPrimeMod.

Referenced by fuzzer::TracePC::HandleCallerCallee().

template<class Callback >
ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::ValueBitMap::ForEach ( Callback  CB) const
inline

Definition at line 79 of file FuzzerValueBitMap.h.

References kMapSizeInWords.

bool fuzzer::ValueBitMap::Get ( uintptr_t  Idx)
inline

Definition at line 48 of file FuzzerValueBitMap.h.

References assert(), kBitsInWord, and kMapSizeInBits.

size_t fuzzer::ValueBitMap::GetNumBitsSinceLastMerge ( ) const
inline

Definition at line 55 of file FuzzerValueBitMap.h.

ATTRIBUTE_TARGET_POPCNT bool fuzzer::ValueBitMap::MergeFrom ( ValueBitMap &  Other)
inline

Definition at line 60 of file FuzzerValueBitMap.h.

References kMapSizeInWords.

void fuzzer::ValueBitMap::Reset ( )
inline

Definition at line 28 of file FuzzerValueBitMap.h.

Referenced by fuzzer::TracePC::ResetMaps().

Member Data Documentation

const size_t fuzzer::ValueBitMap::kBitsInWord = (sizeof(uintptr_t) * 8)
static

Definition at line 23 of file FuzzerValueBitMap.h.

Referenced by AddValue(), and Get().

const size_t fuzzer::ValueBitMap::kMapPrimeMod = 65371
static

Definition at line 22 of file FuzzerValueBitMap.h.

Referenced by AddValueModPrime().

const size_t fuzzer::ValueBitMap::kMapSizeInBits = 1 << 16
static

Definition at line 21 of file FuzzerValueBitMap.h.

Referenced by AddValue(), and Get().

const size_t fuzzer::ValueBitMap::kMapSizeInWords = kMapSizeInBits / kBitsInWord
static

Definition at line 24 of file FuzzerValueBitMap.h.

Referenced by ForEach(), and MergeFrom().


The documentation for this struct was generated from the following file: