16 #ifndef __CPUI_MERGE__ 17 #define __CPUI_MERGE__ 35 bool operator<(
const HighEdge &op2)
const {
if (a==op2.a)
return (b<op2.b);
return (a<op2.a); }
52 static int4 findFront(int4 blocknum,
const vector<BlockVarnode> &list);
82 map<HighEdge,bool> highedgemap;
83 vector<PcodeOp *> copyTrims;
90 static bool mergeTestBasic(
Varnode *vn);
91 static void findSingleCopy(
HighVariable *high,vector<Varnode *> &singlelist);
94 static bool shadowedVarnode(
const Varnode *vn);
95 static void findAllIntoCopies(
HighVariable *high,vector<PcodeOp *> ©Ins,
bool filterTemps);
97 bool collectCorrectable(
const vector<Varnode *> &vlist,list<PcodeOp *> &oplist,vector<int4> &slotlist,
100 void snipReads(
Varnode *vn,list<PcodeOp *> &markedop);
101 void snipIndirect(
PcodeOp *indop);
102 void eliminateIntersect(
Varnode *vn,
const vector<BlockVarnode> &blocksort);
103 void unifyAddress(VarnodeLocSet::const_iterator startiter,VarnodeLocSet::const_iterator enditer);
104 void trimOpOutput(
PcodeOp *op);
105 void trimOpInput(
PcodeOp *op,int4 slot);
106 void mergeRangeMust(VarnodeLocSet::const_iterator startiter,VarnodeLocSet::const_iterator enditer);
108 void mergeIndirect(
PcodeOp *indop);
109 void mergeLinear(vector<HighVariable *> &highvec);
112 void buildDominantCopy(
HighVariable *high,vector<PcodeOp *> ©,int4 pos,int4 size);
113 void markRedundantCopies(
HighVariable *high,vector<PcodeOp *> ©,int4 pos,int4 size);
121 bool mergeTest(
HighVariable *high,vector<HighVariable *> &tmplist);
123 void mergeOpcode(
OpCode opc);
124 void mergeByDatatype(VarnodeLocSet::const_iterator startiter,VarnodeLocSet::const_iterator enditer);
125 void mergeAddrTied(
void);
126 void mergeMarker(
void);
127 void mergeAdjacent(
void);
128 void mergeMultiEntry(
void);
130 void processCopyTrims(
void);
131 void markInternalCopies(
void);
132 #ifdef MERGEMULTI_DEBUG 133 void verifyHighCovers(
void);
151 int4 result = a->wholecover.
compareTo(b->wholecover);
162 else if ( def2 == (
PcodeOp *) 0 ) {
The base datatype class for the decompiler.
Definition: type.hh:62
OpCode
The op-code defining a specific p-code operation (PcodeOp)
Definition: opcodes.hh:35
Class for merging low-level Varnodes into high-level HighVariables.
Definition: merge.hh:80
const Address & getAddr(void) const
Get the instruction address associated with this op.
Definition: op.hh:151
bool operator<(const BlockVarnode &op2) const
Comparator.
Definition: merge.hh:49
Container for data structures associated with a single function.
Definition: funcdata.hh:45
HighEdge(HighVariable *c, HighVariable *d)
Constructor.
Definition: merge.hh:36
Varnode * getVarnode(void) const
Get the Varnode represented by this.
Definition: merge.hh:50
int4 getIndex(void) const
Get the Varnode's defining block index.
Definition: merge.hh:51
int4 compareTo(const Cover &op2) const
Give ordering of this and another Cover.
Definition: cover.cc:221
PcodeOp * getDef(void)
Get the defining PcodeOp of this Varnode.
Definition: varnode.hh:172
Helper class associating a Varnode with the block where it is defined.
Definition: merge.hh:44
Varnode * getInstance(int4 i) const
Get the i-th member Varnode.
Definition: variable.hh:93
Lowest level operation of the p-code language.
Definition: op.hh:58
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
A record for caching a Cover intersection test between two HighVariable objects.
Definition: merge.hh:29
const Address & getAddr(void) const
Get the storage Address.
Definition: varnode.hh:167
A high-level variable modeled as a list of low-level variables, each written once.
Definition: variable.hh:38
bool operator<(const HighEdge &op2) const
Comparator.
Definition: merge.hh:35
The PcodeOp and PcodeOpBank classes.
Merge(Funcdata &fd)
Construct given a specific function.
Definition: merge.hh:117