Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
The set of CALL and STORE ops that might indirectly affect stack variables. More...
#include <merge.hh>
Public Member Functions | |
StackAffectingOps (Funcdata &fd) | |
Constructor. | |
virtual void | populate (void) |
Populate the PcodeOp object in this set. | |
virtual bool | affectsTest (PcodeOp *op, Varnode *vn) const |
(Secondary) test that the given PcodeOp affects the Varnode | |
![]() | |
bool | isPopulated (void) const |
Return true if this set is populated. | |
void | clear (void) |
Clear all PcodeOps in this. | |
Private Attributes | |
Funcdata & | data |
The function containing these ops. | |
Additional Inherited Members | |
![]() | |
static bool | compareByBlock (const PcodeOp *a, const PcodeOp *b) |
Compare PcodeOps for this set. | |
![]() | |
void | addOp (PcodeOp *op) |
Add a PcodeOp into the set. | |
void | finalize (void) |
Sort ops in the set into blocks. | |
The set of CALL and STORE ops that might indirectly affect stack variables.
Intersect tests between local address tied and non-address tied Varnodes need to check for possible uses of aliases to the address tied Varnode. This object is populated with the set of PcodeOps through which any stack Varnode might be modified through an alias. Given an intersection of the Cover of an address tied Varnode and a PcodeOp in this set, affectsTest() can do secondary testing of whether the Varnode is actually modified by the PcodeOp.
(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 |
Implements ghidra::PcodeOpSet.
References ghidra::PcodeOp::code(), ghidra::CPUI_STORE, data, ghidra::Varnode::getAddr(), ghidra::Funcdata::getStoreGuard(), and ghidra::LoadGuard::isGuarded().
|
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.
Implements ghidra::PcodeOpSet.
References ghidra::PcodeOpSet::addOp(), ghidra::CPUI_STORE, data, ghidra::PcodeOpSet::finalize(), ghidra::Funcdata::getCallSpecs(), ghidra::FuncCallSpecs::getOp(), ghidra::Funcdata::getStoreGuards(), and ghidra::Funcdata::numCalls().