GCC Middle and Back End API Reference
ana::symbolic::scalar_manager< ConcreteValueType > Class Template Reference

#include <symbolic-scalars.h>

Inheritance diagram for ana::symbolic::scalar_manager< ConcreteValueType >:
Collaboration diagram for ana::symbolic::scalar_manager< ConcreteValueType >:

Public Member Functions

 scalar_manager (node_manager &node_mgr)
 scalar_manager (const scalar_manager &)=delete
const concrete_scalar< ConcreteValueType > & get_concrete (const ConcreteValueType &value)
const scalar< ConcreteValueType > & get_sum (std::vector< const scalar< ConcreteValueType > * > addends)
const scalar< ConcreteValueType > & get_difference (const scalar< ConcreteValueType > &lhs, const scalar< ConcreteValueType > &rhs)
const scalar< ConcreteValueType > & get_negation (const scalar< ConcreteValueType > &s)
const scalar< ConcreteValueType > & get_product (const scalar< ConcreteValueType > &lhs, const scalar< integer > &factor)
const scalar< ConcreteValueType > & get_scalar_from_svalue (const svalue &sval)
const symbolic_bit_size & get_bits_from_bytes (const symbolic_byte_size &bytes)
const scalar< ConcreteValueType > & get_unknown ()
unsigned alloc_node_id ()
node_manager & get_node_manager ()
scalar_manager< integer > & get_unitless_manager ()
const symbolic_bit_size & get_bits_from_bytes (const symbolic_byte_size &bytes)

Private Types

using sum_memoization_key = typename sum<ConcreteValueType>::memoization_key

Private Member Functions

const scalar< ConcreteValueType > * maybe_from_unitless (const ConcreteValueType &concrete_lhs, const scalar< integer > &unitless_rhs)
const scalar< ConcreteValueType > * maybe_from_unitless_for_unit (const ConcreteValueType &concrete_lhs, const scalar< integer > &unitless_rhs)
const scalar< ConcreteValueType > & get_sum_unmemoized (const sum_memoization_key &memo_key)
const scalar< ConcreteValueType > * maybe_fold_product (const typename product< ConcreteValueType >::key &k)
const scalar< ConcreteValueType > * maybe_fold_scalar_from_svalue (const typename scalar_from_svalue< ConcreteValueType >::key &k)
const symbolic_bit_size * maybe_fold_bits_from_bytes (const symbolic_byte_size &bytes)

Private Attributes

node_manager & m_node_mgr
std::map< ConcreteValueType, std::unique_ptr< const concrete_scalar< ConcreteValueType > > > m_concrete_map
std::map< typename sum< ConcreteValueType >::memoization_key, const scalar< ConcreteValueType > * > m_memoized_sums
std::map< typename sum< ConcreteValueType >::creation_key, std::unique_ptr< scalar< ConcreteValueType > > > m_sum_map
std::map< typename product< ConcreteValueType >::key, std::unique_ptr< const product< ConcreteValueType > > > m_product_map
std::map< typename scalar_from_svalue< ConcreteValueType >::key, std::unique_ptr< const scalar_from_svalue< ConcreteValueType > > > m_scalar_from_svalue_map
std::map< typename bits_from_bytes_scalar::key, std::unique_ptr< bits_from_bytes_scalar > > m_bits_from_bytes_map

Detailed Description

template<typename ConcreteValueType>
class ana::symbolic::scalar_manager< ConcreteValueType >
A class with responsibility for allocating/consolidating
scalar<ConcreteValueType> instances.   

Member Typedef Documentation

◆ sum_memoization_key

template<typename ConcreteValueType>
using ana::symbolic::scalar_manager< ConcreteValueType >::sum_memoization_key = typename sum<ConcreteValueType>::memoization_key
private

Constructor & Destructor Documentation

◆ scalar_manager() [1/2]

template<typename ConcreteValueType>
ana::symbolic::scalar_manager< ConcreteValueType >::scalar_manager ( node_manager & node_mgr)
inline

References m_node_mgr.

Referenced by scalar_manager().

◆ scalar_manager() [2/2]

template<typename ConcreteValueType>
ana::symbolic::scalar_manager< ConcreteValueType >::scalar_manager ( const scalar_manager< ConcreteValueType > & )
delete

References scalar_manager().

Member Function Documentation

◆ alloc_node_id()

template<typename ConcreteValueType>
unsigned ana::symbolic::scalar_manager< ConcreteValueType >::alloc_node_id ( )
inline

References m_node_mgr.

◆ get_bits_from_bytes() [1/2]

const symbolic_bit_size & ana::symbolic::scalar_manager< concrete_bit_size >::get_bits_from_bytes ( const symbolic_byte_size & bytes)

◆ get_bits_from_bytes() [2/2]

template<typename ConcreteValueType>
const symbolic_bit_size & ana::symbolic::scalar_manager< ConcreteValueType >::get_bits_from_bytes ( const symbolic_byte_size & bytes)

◆ get_concrete()

template<typename ConcreteValueType>
const concrete_scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_concrete ( const ConcreteValueType & value)

◆ get_difference()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_difference ( const scalar< ConcreteValueType > & lhs,
const scalar< ConcreteValueType > & rhs )

◆ get_negation()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_negation ( const scalar< ConcreteValueType > & s)

◆ get_node_manager()

template<typename ConcreteValueType>
node_manager & ana::symbolic::scalar_manager< ConcreteValueType >::get_node_manager ( )
inline

References m_node_mgr.

◆ get_product()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_product ( const scalar< ConcreteValueType > & lhs,
const scalar< integer > & factor )

◆ get_scalar_from_svalue()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_scalar_from_svalue ( const svalue & sval)

◆ get_sum()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_sum ( std::vector< const scalar< ConcreteValueType > * > addends)

◆ get_sum_unmemoized()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_sum_unmemoized ( const sum_memoization_key & memo_key)
private

◆ get_unitless_manager()

template<typename ConcreteValueType>
scalar_manager< integer > & ana::symbolic::scalar_manager< ConcreteValueType >::get_unitless_manager ( )

◆ get_unknown()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > & ana::symbolic::scalar_manager< ConcreteValueType >::get_unknown ( )

◆ maybe_fold_bits_from_bytes()

template<typename ConcreteValueType>
const symbolic_bit_size * ana::symbolic::scalar_manager< ConcreteValueType >::maybe_fold_bits_from_bytes ( const symbolic_byte_size & bytes)
private

◆ maybe_fold_product()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > * ana::symbolic::scalar_manager< ConcreteValueType >::maybe_fold_product ( const typename product< ConcreteValueType >::key & k)
private

◆ maybe_fold_scalar_from_svalue()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > * ana::symbolic::scalar_manager< ConcreteValueType >::maybe_fold_scalar_from_svalue ( const typename scalar_from_svalue< ConcreteValueType >::key & k)
private

◆ maybe_from_unitless()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > * ana::symbolic::scalar_manager< ConcreteValueType >::maybe_from_unitless ( const ConcreteValueType & concrete_lhs,
const scalar< integer > & unitless_rhs )
private

◆ maybe_from_unitless_for_unit()

template<typename ConcreteValueType>
const scalar< ConcreteValueType > * ana::symbolic::scalar_manager< ConcreteValueType >::maybe_from_unitless_for_unit ( const ConcreteValueType & concrete_lhs,
const scalar< integer > & unitless_rhs )
private

Field Documentation

◆ m_bits_from_bytes_map

template<typename ConcreteValueType>
std::map<typename bits_from_bytes_scalar::key, std::unique_ptr<bits_from_bytes_scalar> > ana::symbolic::scalar_manager< ConcreteValueType >::m_bits_from_bytes_map
private

◆ m_concrete_map

template<typename ConcreteValueType>
std::map<ConcreteValueType, std::unique_ptr<const concrete_scalar<ConcreteValueType> > > ana::symbolic::scalar_manager< ConcreteValueType >::m_concrete_map
private

◆ m_memoized_sums

template<typename ConcreteValueType>
std::map<typename sum<ConcreteValueType>::memoization_key, const scalar<ConcreteValueType> *> ana::symbolic::scalar_manager< ConcreteValueType >::m_memoized_sums
private

◆ m_node_mgr

template<typename ConcreteValueType>
node_manager& ana::symbolic::scalar_manager< ConcreteValueType >::m_node_mgr
private

◆ m_product_map

template<typename ConcreteValueType>
std::map<typename product<ConcreteValueType>::key, std::unique_ptr<const product<ConcreteValueType> > > ana::symbolic::scalar_manager< ConcreteValueType >::m_product_map
private

◆ m_scalar_from_svalue_map

template<typename ConcreteValueType>
std::map<typename scalar_from_svalue<ConcreteValueType>::key, std::unique_ptr<const scalar_from_svalue<ConcreteValueType> > > ana::symbolic::scalar_manager< ConcreteValueType >::m_scalar_from_svalue_map
private

◆ m_sum_map

template<typename ConcreteValueType>
std::map<typename sum<ConcreteValueType>::creation_key, std::unique_ptr<scalar<ConcreteValueType> > > ana::symbolic::scalar_manager< ConcreteValueType >::m_sum_map
private

The documentation for this class was generated from the following files: