decompiler
1.0.0
|
The topological scope of a variable within a basic block. More...
#include <cover.hh>
Public Member Functions | |
int4 | intersect (const CoverBlock &op2) const |
Compute intersection with another CoverBlock. More... | |
bool | contain (const PcodeOp *point) const |
Check containment of given point. More... | |
int4 | boundary (const PcodeOp *point) const |
Characterize given point as boundary. More... | |
void | merge (const CoverBlock &op2) |
Merge another CoverBlock into this. More... | |
void | print (ostream &s) const |
Dump a description to stream. More... | |
Static Public Member Functions | |
static uintm | getUIndex (const PcodeOp *op) |
Get the comparison index for a PcodeOp. More... | |
Private Attributes | |
const PcodeOp * | start |
Beginning of the range. | |
const PcodeOp * | stop |
End of the range. | |
The topological scope of a variable within a basic block.
Within a basic block, the topological scope of a variable can be considered a contiguous range of p-code operations. This range can be described with a start and stop PcodeOp object, indicating all p-code operations between the two inclusive. The start and stop may hold special encodings meaning:
int4 CoverBlock::boundary | ( | const PcodeOp * | point | ) | const |
Characterize given point as boundary.
Return:
point | is the given PcodeOp point |
References getUIndex(), start, and stop.
bool CoverBlock::contain | ( | const PcodeOp * | point | ) | const |
Check containment of given point.
If the given PcodeOp or boundary point is contained in this range, return true.
point | is the given PcodeOp |
References getUIndex(), start, and stop.
Referenced by Cover::addRefPoint(), and merge().
|
static |
Get the comparison index for a PcodeOp.
PcodeOp objects and a CoverBlock start/stop boundaries have a natural ordering that can be used to tell if a PcodeOp falls between boundary points and if CoverBlock objects intersect. Ordering is determined by comparing the values returned by this method.
op | is the PcodeOp and/or boundary point |
References CPUI_INDIRECT, CPUI_MULTIEQUAL, and PcodeOp::getOpFromConst().
Referenced by Cover::addRefPoint(), Cover::addRefRecurse(), boundary(), Merge::collectCorrectable(), contain(), intersect(), merge(), and print().
int4 CoverBlock::intersect | ( | const CoverBlock & | op2 | ) | const |
Compute intersection with another CoverBlock.
Characterize the intersection of this range with another CoverBlock. Return:
op2 | is the other CoverBlock to compare |
References getUIndex(), start, and stop.
void CoverBlock::merge | ( | const CoverBlock & | op2 | ) |
Merge another CoverBlock into this.
Compute the union of this with the other given CoverBlock, replacing this in place.
op2 | is the other given CoverBlock |
References contain(), getUIndex(), start, and stop.
void CoverBlock::print | ( | ostream & | s | ) | const |
Dump a description to stream.
Print a description of the covered range of ops in this block
s | is the output stream |
References getUIndex(), start, and stop.