1#ifndef ROSE_BinaryAnalysis_ReturnValueUsed_H
2#define ROSE_BinaryAnalysis_ReturnValueUsed_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6#include <Rose/BinaryAnalysis/CallingConvention/BasicTypes.h>
7#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
8#include <Rose/BinaryAnalysis/Partitioner2/ControlFlowGraph.h>
9#include <Rose/BinaryAnalysis/RegisterParts.h>
12namespace BinaryAnalysis {
17namespace ReturnValueUsed {
35 std::vector<Partitioner2::FunctionPtr> callees_;
39#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
41 friend class boost::serialization::access;
44 void serialize(S & s,
const unsigned ) {
45 s & BOOST_SERIALIZATION_NVP(didConverge_);
46 s & BOOST_SERIALIZATION_NVP(callees_);
47 s & BOOST_SERIALIZATION_NVP(returnRegistersUsed_);
48 s & BOOST_SERIALIZATION_NVP(returnRegistersUnused_);
68 const std::vector<Partitioner2::FunctionPtr>
callees()
const;
92 void callees(
const std::vector<Partitioner2::FunctionPtr>&);
106 bool assumeCallerReturnsValue_;
108#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
110 friend class boost::serialization::access;
113 void serialize(S &s,
const unsigned ) {
114 s & BOOST_SERIALIZATION_NVP(defaultCallingConvention_);
115 s & BOOST_SERIALIZATION_NVP(callSites_);
116 s & BOOST_SERIALIZATION_NVP(assumeCallerReturnsValue_);
187 const Partitioner2::ControlFlowGraph::ConstVertexIterator&);
192 std::vector<Partitioner2::FunctionPtr>
197 std::vector<Partitioner2::ControlFlowGraph::ConstVertexIterator>
199 const Partitioner2::ControlFlowGraph::ConstVertexIterator &callSite);
Holds a set of registers without regard for register boundaries.
bool assumeCallerReturnsValue() const
Property: Assume caller returns value(s).
CallingConvention::Definition::Ptr defaultCallingConvention() const
Property: Default calling convention.
Analysis()
Default constructor.
CallSiteResults analyzeCallSite(const Partitioner2::PartitionerConstPtr &, const Partitioner2::ControlFlowGraph::ConstVertexIterator &)
Analyze a call site to see if a function's return value is used.
void assumeCallerReturnsValue(bool)
Property: Assume caller returns value(s).
void defaultCallingConvention(const CallingConvention::DefinitionPtr &)
Property: Default calling convention.
void clearResults()
Clear analysis results.
RegisterParts & returnRegistersUnused()
Property: Return registers that are unused in the caller.
const RegisterParts & returnRegistersUsed() const
Property: Return registers that are used in the caller.
RegisterParts & returnRegistersUsed()
Property: Return registers that are used in the caller.
const RegisterParts & returnRegistersUnused() const
Property: Return registers that are unused in the caller.
bool didConverge() const
Property: Did the analysis converge to a solution.
const std::vector< Partitioner2::FunctionPtr > callees() const
Property: Functions called at this site.
void returnRegistersUsed(const RegisterParts &)
Property: Return registers that are used in the caller.
void didConverge(bool)
Property: Did the analysis converge to a solution.
void returnRegistersUnused(const RegisterParts &)
Property: Return registers that are unused in the caller.
Container associating values with keys.
void initDiagnostics()
Initialize diagnostics.
Sawyer::Message::Facility mlog
Facility for diagnostic output.