Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
A set of PcodeOps that can be tested for Cover intersections. More...
#include <cover.hh>
Public Member Functions | |
bool | isPopulated (void) const |
Return true if this set is populated. | |
virtual void | populate (void)=0 |
Populate the PcodeOp object in this set. | |
virtual bool | affectsTest (PcodeOp *op, Varnode *vn) const =0 |
(Secondary) test that the given PcodeOp affects the Varnode | |
void | clear (void) |
Clear all PcodeOps in this. | |
Static Public Member Functions | |
static bool | compareByBlock (const PcodeOp *a, const PcodeOp *b) |
Compare PcodeOps for this set. | |
Protected Member Functions | |
void | addOp (PcodeOp *op) |
Add a PcodeOp into the set. | |
void | finalize (void) |
Sort ops in the set into blocks. | |
Private Attributes | |
vector< PcodeOp * > | opList |
Ops in this set, sorted on block index, then SeqNum::order. | |
vector< int4 > | blockStart |
Index of first op in each non-empty block. | |
bool | is_pop |
Has the populate() method been called. | |
Friends | |
class | Cover |
A set of PcodeOps that can be tested for Cover intersections.
This is a set of PcodeOp objects, designed for quick intersection tests with a Cover. The set is lazily constructed via its populate() method at the time the first intersection test is needed. Once an intersection has been established between a PcodeOp in this set and a Varnode Cover, affectsTest() can do secondary testing to determine if the intersection should prevent merging.
(Secondary) test that the given PcodeOp affects the Varnode
This method is called after an intersection of a PcodeOp in this set with a Varnode Cover has been determined. This allows the owner to make a final determination if merging should be prevented.
op | is the PcodeOp that intersects with the Varnode Cover |
vn | is the Varnode whose Cover is intersected |
Implemented in ghidra::StackAffectingOps.
Referenced by ghidra::Cover::intersect().
Compare PcodeOps for this set.
Compare first by index of the containing basic blocks, then by SeqNum ordering (within the block)
References ghidra::FlowBlock::getIndex(), ghidra::SeqNum::getOrder(), ghidra::PcodeOp::getParent(), and ghidra::PcodeOp::getSeqNum().
Referenced by finalize().
|
pure virtual |
Populate the PcodeOp object in this set.
Call-back to the owner to lazily add PcodeOps to this set. The override method calls addOp() for each PcodeOp it wants to add, then calls finalize() to make this set ready for intersection tests.
Implemented in ghidra::StackAffectingOps.