PandA-2024.02
|
A constraint like sink = phi(src1, src2, ..., srcN) More...
Public Member Functions | |
PhiOpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst) | |
~PhiOpNode () override=default | |
PhiOpNode (const PhiOpNode &)=delete | |
PhiOpNode (PhiOpNode &&)=delete | |
PhiOpNode & | operator= (const PhiOpNode &)=delete |
PhiOpNode & | operator= (PhiOpNode &&)=delete |
void | addSource (const VarNode *newsrc) |
Add source to the vector of sources. More... | |
const VarNode * | getSource (size_t index) const |
Return source identified by index. More... | |
size_t | getNumSources () const |
return the number of sources More... | |
std::vector< tree_nodeConstRef > | getSources () const override |
OperationId | getValueId () const override |
void | print (std::ostream &OS) const override |
Prints the content of the operation. More... | |
void | printDot (std::ostream &OS) const override |
Public Member Functions inherited from OpNode | |
virtual | ~OpNode ()=default |
The dtor. It's virtual because this is a base class. More... | |
OpNode (const OpNode &)=delete | |
OpNode (OpNode &&)=delete | |
OpNode & | operator= (const OpNode &)=delete |
OpNode & | operator= (OpNode &&)=delete |
const tree_nodeConstRef & | getInstruction () const |
Return the instruction that originated this op node. More... | |
void | solveFuture (VarNode *future) |
Replace symbolic intervals with hard-wired constants. More... | |
ValueRangeConstRef | getIntersect () const |
Returns the range of the operation. More... | |
void | setIntersect (const RangeConstRef &newIntersect) |
Changes the interval of the operation. More... | |
VarNode * | getSink () const |
Returns the target of the operation, that is, where the result will be stored. More... | |
std::string | ToString () const |
Static Public Member Functions | |
static bool | classof (PhiOpNode const *) |
static bool | classof (OpNode const *BO) |
static std::function< OpNode *(NodeContainer *)> | opCtorGenerator (const tree_nodeConstRef &stmt, unsigned int, const FunctionBehaviorConstRef &FB, const tree_managerConstRef &TM, const application_managerRef &AppM) |
Static Public Member Functions inherited from OpNode | |
static bool | classof (OpNode const *) |
Private Member Functions | |
RangeRef | eval () const override |
Computes the interval of the sink based on the interval of the sources, the operation and the interval associated to the operation. More... | |
Private Attributes | |
std::vector< const VarNode * > | sources |
Additional Inherited Members | |
Public Types inherited from OpNode | |
enum | OperationId { OperationId::UnaryOpId, OperationId::SigmaOpId, OperationId::BinaryOpId, OperationId::TernaryOpId, OperationId::PhiOpId, OperationId::ControlDepId, OperationId::LoadOpId, OperationId::StoreOpId } |
Data Fields inherited from OpNode | |
enum OpNode::OperationId | __attribute__ |
Static Public Attributes inherited from OpNode | |
static int | debug_level = DEBUG_LEVEL_NONE |
Protected Member Functions inherited from OpNode | |
OpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst) | |
We do not want people creating objects of this class, but we want to inherit from it. More... | |
A constraint like sink = phi(src1, src2, ..., srcN)
Definition at line 2346 of file Range_Analysis.cpp.
PhiOpNode::PhiOpNode | ( | const ValueRangeRef & | intersect, |
VarNode * | sink, | ||
const tree_nodeConstRef & | inst | ||
) |
Definition at line 2411 of file Range_Analysis.cpp.
Referenced by opCtorGenerator().
|
overridedefault |
|
delete |
|
delete |
|
inline |
Add source to the vector of sources.
Definition at line 2364 of file Range_Analysis.cpp.
Definition at line 2392 of file Range_Analysis.cpp.
Definition at line 2396 of file Range_Analysis.cpp.
References OpNode::getValueId(), OpNode::PhiOpId, OpNode::print(), and OpNode::printDot().
|
overrideprivatevirtual |
Computes the interval of the sink based on the interval of the sources, the operation and the interval associated to the operation.
Computes the interval of the sink based on the interval of the sources.
The result of evaluating a phi-function is the union of the ranges of every variable used in the phi.
Implements OpNode.
Definition at line 2419 of file Range_Analysis.cpp.
References OpNode::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, Empty, GET_CONST_NODE, OpNode::getIntersect(), OpNode::getSink(), INDENT_DBG_MEX, result, sources, test(), THROW_ASSERT, and OpNode::ToString().
|
inline |
return the number of sources
Definition at line 2374 of file Range_Analysis.cpp.
Return source identified by index.
Definition at line 2369 of file Range_Analysis.cpp.
References index.
|
inlineoverridevirtual |
Implements OpNode.
Definition at line 2379 of file Range_Analysis.cpp.
|
inlineoverridevirtual |
|
static |
Definition at line 2452 of file Range_Analysis.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, GET_CONST_NODE, INDENT_DBG_MEX, phi, PhiOpNode(), OpNode::sink, and STR.
Referenced by UnaryOpNode::getSources(), and LoadOpNode::printDot().
|
overridevirtual |
Prints the content of the operation.
Implements OpNode.
Definition at line 2488 of file Range_Analysis.cpp.
References GET_CONST_NODE, OpNode::getSink(), sources, and OpNode::ToString().
Referenced by UnaryOpNode::getSources().
|
overridevirtual |
Implements OpNode.
Definition at line 2499 of file Range_Analysis.cpp.
References GET_CONST_NODE, tree_helper::GetConstValue(), OpNode::getSink(), VarNode::getValue(), and sources.
Referenced by UnaryOpNode::getSources().
|
private |
Definition at line 2350 of file Range_Analysis.cpp.
Referenced by eval(), print(), and printDot().