PandA-2024.02
|
A constraint like sink = operation(source) [l, u] Examples: unary instructions such as truncation, sign extensions, zero extensions. More...
Public Member Functions | |
UnaryOpNode (const ValueRangeRef &intersect, VarNode *sink, const tree_nodeConstRef &inst, VarNode *source, kind opcode) | |
~UnaryOpNode () override=default | |
UnaryOpNode (const UnaryOpNode &)=delete | |
UnaryOpNode (UnaryOpNode &&)=delete | |
UnaryOpNode & | operator= (const UnaryOpNode &)=delete |
UnaryOpNode & | operator= (UnaryOpNode &&)=delete |
OperationId | getValueId () const override |
kind | getOpcode () const |
Return the opcode of the operation. More... | |
VarNode * | getSource () const |
Returns the source of the operation. More... | |
std::vector< tree_nodeConstRef > | getSources () 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 (UnaryOpNode 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 | |
VarNode * | source |
kind | opcode |
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 = operation(source) [l, u] Examples: unary instructions such as truncation, sign extensions, zero extensions.
Definition at line 2531 of file Range_Analysis.cpp.
UnaryOpNode::UnaryOpNode | ( | const ValueRangeRef & | intersect, |
VarNode * | sink, | ||
const tree_nodeConstRef & | inst, | ||
VarNode * | source, | ||
kind | opcode | ||
) |
Definition at line 2589 of file Range_Analysis.cpp.
Referenced by opCtorGenerator().
|
overridedefault |
|
delete |
|
delete |
|
inlinestatic |
Definition at line 2556 of file Range_Analysis.cpp.
Definition at line 2560 of file Range_Analysis.cpp.
References OpNode::getValueId(), OpNode::SigmaOpId, and OpNode::UnaryOpId.
|
overrideprivatevirtual |
Computes the interval of the sink based on the interval of the sources, the operation and the interval associated to the operation.
Implements OpNode.
Reimplemented in SigmaOpNode.
Definition at line 2597 of file Range_Analysis.cpp.
References abs, CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_CST_NODES, CASE_DECL_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_MISCELLANEOUS, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, OpNode::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, Empty, GET_CONST_NODE, VarNode::getBitWidth(), OpNode::getIntersect(), getOpcode(), VarNode::getRange(), OpNode::getSink(), tree_node::GetString(), VarNode::getValue(), INDENT_DBG_MEX, result, RESULT_DISABLED_OPTION, source, test(), THROW_ASSERT, THROW_UNREACHABLE, OpNode::ToString(), and Unknown.
|
inline |
Return the opcode of the operation.
Definition at line 2566 of file Range_Analysis.cpp.
Referenced by eval(), and print().
|
inline |
Returns the source of the operation.
Definition at line 2571 of file Range_Analysis.cpp.
Referenced by SigmaOpNode::eval(), print(), SigmaOpNode::print(), printDot(), and SigmaOpNode::printDot().
|
inlineoverridevirtual |
Implements OpNode.
Reimplemented in SigmaOpNode.
Definition at line 2575 of file Range_Analysis.cpp.
References VarNode::getValue(), PhiOpNode::opCtorGenerator(), PhiOpNode::print(), and PhiOpNode::printDot().
Referenced by SigmaOpNode::getSources().
|
inlineoverridevirtual |
Implements OpNode.
Reimplemented in SigmaOpNode.
Definition at line 2552 of file Range_Analysis.cpp.
References OpNode::UnaryOpId.
Referenced by SigmaOpNode::classof().
|
static |
Definition at line 2731 of file Range_Analysis.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, GET_CONST_NODE, INDENT_DBG_MEX, OpNode::sink, and UnaryOpNode().
Referenced by SigmaOpNode::markUnresolved(), and LoadOpNode::printDot().
|
delete |
|
delete |
|
overridevirtual |
Prints the content of the operation.
Implements OpNode.
Reimplemented in SigmaOpNode.
Definition at line 2777 of file Range_Analysis.cpp.
References GET_CONST_NODE, getOpcode(), OpNode::getSink(), getSource(), and tree_node::GetString().
Referenced by SigmaOpNode::markUnresolved().
|
overridevirtual |
Implements OpNode.
Reimplemented in SigmaOpNode.
Definition at line 2783 of file Range_Analysis.cpp.
References GET_CONST_NODE, VarNode::getBitWidth(), tree_helper::GetConstValue(), OpNode::getIntersect(), OpNode::getSink(), getSource(), VarNode::getValue(), opcode, source, THROW_UNREACHABLE, and test_panda::type.
Referenced by SigmaOpNode::markUnresolved().
|
private |
Definition at line 2537 of file Range_Analysis.cpp.
Referenced by BinaryOpNode::getOpcode(), and printDot().
|
private |
Definition at line 2535 of file Range_Analysis.cpp.
Referenced by eval(), SigmaOpNode::opCtorGenerator(), and printDot().