85 static const std::map<bit_lattice, std::map<bit_lattice, std::map<bit_lattice, std::deque<bit_lattice>>>>
91 static const std::map<bit_lattice, std::map<bit_lattice, std::map<bit_lattice, std::deque<bit_lattice>>>>
97 static const std::map<bit_lattice, std::map<bit_lattice, bit_lattice>>
bit_ior_expr_map;
137 unsigned int lsb_to_zero(
const addr_expr* ae,
bool safe)
const;
238 const DesignFlowManagerConstRef dfm);
This struct specifies the field bloc (basic block).
static const std::map< bit_lattice, std::map< bit_lattice, std::map< bit_lattice, std::deque< bit_lattice > > > > plus_expr_map
Map storing the implementation of the forward_transfer's plus_expr.
This struct specifies the statement_list node.
bool not_frontend
True if this step is not executed in the frontend.
std::deque< bit_lattice > backward_chain(const tree_nodeConstRef &ssa) const
RelationshipType
The relationship type.
This class manages the tree structures extracted from the raw file.
CustomOrderedMap< T, U > CustomMap
DesignFlowStep_Status InternalExec() override
perform the bit value analysis
void backward()
Applies the backward algorithm, as described in the paper, analyzing each assignment statement starti...
This class contains the base representation for a generic frontend flow step which works on a single ...
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapUnstable
Abstract pure class for the tree structure.
void print_bitstring_map(const CustomMap< unsigned int, std::deque< bit_lattice >> &map) const
Debugging function used to print the contents of the current and best maps.
std::deque< bit_lattice > backward_transfer(const gimple_assign *ga, unsigned int output_id) const
Compute the inputs back propagation values, given a gimple assignment and the uid of the output varia...
static const std::map< bit_lattice, std::map< bit_lattice, std::map< bit_lattice, std::deque< bit_lattice > > > > minus_expr_map
Map storing the implementation of the forward_transfer's minus_expr.
void forward()
Applies the forward algorithm, as described in the paper, analyzing each assignment statement followi...
~Bit_Value() override
Destructor.
unsigned long long pointer_resizing(unsigned int output_id) const
unsigned map[NUM_VERTICES]
This struct specifies the gimple_assign node (GCC 4.3 tree node).
unsigned int lsb_to_zero(const addr_expr *ae, bool safe) const
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
static const std::map< bit_lattice, std::map< bit_lattice, bit_lattice > > bit_and_expr_map
Map storing the implementation of the forward_transfer's bit_and_expr_map.
static const std::map< bit_lattice, std::map< bit_lattice, bit_lattice > > bit_ior_expr_map
Map storing the implementation of the forward_transfer's bit_ior_expr_map.
std::deque< bit_lattice > get_current(const tree_nodeConstRef &tn) const
Given an operand, returns its current bitvalue.
DesignFlowStep_Status
The status of a step.
bool update_IR()
Updates the bitvalues of the intermediate representation with the values taken from the input map...
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
REF_FORWARD_DECL(Bit_Value)
Template definition of refcount.
CustomUnorderedMapUnstable< unsigned int, unsigned int > direct_call_id_to_called_id
Maps the id of a gimple statement to the id of the function called in that statement.
void initialize()
Initializes best with C type as bitstring, signed_var and arguments using the information taken from ...
CONSTREF_FORWARD_DECL(tree_node)
std::deque< bit_lattice > forward_transfer(const gimple_assign *ga) const
Takes a gimple assignment, analyzes the operation performed from the rhs and its input bitstring...
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
std::vector< blocRef > bb_topological
Topologically ordered basic blocks.
void clear_current()
Clears all the entry in the current map, except for the input arguments.
This struct specifies the ssa_name node.
CustomUnorderedSet< unsigned int > arguments
Contains the input parameters of the function that's being analyzed.
struct definition of the binary node structures.
Full implementation of Bit Value analysis as described in BitValue Inference: Detecting and Exploitin...
static const std::map< bit_lattice, std::map< bit_lattice, bit_lattice > > bit_xor_expr_map
Map storing the implementation of the forward_transfer's bit_xor_expr_map.
Bit_Value(const ParameterConstRef Param, const application_managerRef AM, unsigned int f_id, const DesignFlowManagerConstRef dfm)
Constructor.
std::deque< bit_lattice > get_current_or_best(const tree_nodeConstRef &tn) const
Given an operand, returns its current bitvalue, or its best if current is not available.