decompiler 1.0.0
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ghidra::ConsistencyChecker::UniqueState Class Reference

Container of OptimizeRecords for possibly overlapping temporary registers. More...

Public Member Functions

void clear (void)
 Clear all records.
 
void set (OptimizeRecord &rec)
 Add a new record to the collection. More...
 
void getDefinitions (vector< OptimizeRecord * > &result, uintb offset, int4 size)
 Get any definitions overlapping the given range. More...
 
map< uintb, OptimizeRecord >::const_iterator begin (void) const
 Get starting iterator to all records.
 
map< uintb, OptimizeRecord >::const_iterator end (void) const
 Get ending iterator to all records.
 

Private Member Functions

map< uintb, OptimizeRecord >::iterator lesserIter (uintb offset)
 Get last record less than the given offset. More...
 

Static Private Member Functions

static uintb endOf (map< uintb, OptimizeRecord >::iterator &iter)
 Get ending offset record.
 

Private Attributes

map< uintb, OptimizeRecord > recs
 Map from unique space offset to OptimizeRecord.
 

Detailed Description

Container of OptimizeRecords for possibly overlapping temporary registers.

Member Function Documentation

◆ getDefinitions()

void ghidra::ConsistencyChecker::UniqueState::getDefinitions ( vector< OptimizeRecord * > &  result,
uintb  offset,
int4  size 
)

Get any definitions overlapping the given range.

Parameters
resultholds all the overlapping records
offsetis the start of the given range
sizeis the number of bytes in the range

Referenced by ghidra::ConsistencyChecker::examineVn(), and ghidra::ConsistencyChecker::optimizeGather2().

◆ lesserIter()

map< uintb, ConsistencyChecker::OptimizeRecord >::iterator ghidra::ConsistencyChecker::UniqueState::lesserIter ( uintb  offset)
private

Get last record less than the given offset.

Parameters
offsetis the given offset
Returns
an iterator to the last record before offset or end() if no records come before

◆ set()

void ghidra::ConsistencyChecker::UniqueState::set ( OptimizeRecord &  rec)

Add a new record to the collection.

Any overlaps with the new record are merged, maintaining a disjoint collection of records

Parameters
recis the record to add

References ghidra::ConsistencyChecker::OptimizeRecord::offset, and ghidra::ConsistencyChecker::OptimizeRecord::size.

Referenced by ghidra::ConsistencyChecker::examineVn().


The documentation for this class was generated from the following files: