Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

OneDimArrayConverter Class Reference

This class provides some utility functions that help with conversion of single-dimantional to multi-dimentional array types. More...

#include <array_dismantlers.h>

List of all members.

Public Methods

 OneDimArrayConverter (SuifEnv* the_suif_env)
 ~OneDimArrayConverter ()
MultiDimArrayType* array_type2multi_array_type (ArrayType* at)
 Convert an array type to a multidimentional array type. More...

void convert_array_expr2multi_array_expr (ArrayReferenceExpression* top_array)
 Convert ArrayReferenceExpression top_array to a MultiDimArrayExpression.

void remove_all_one_dim_array_types ()
 Remove all the array types collected by all the calls to array_type2multi_array_type. More...


Protected Attributes

suif_map<ArrayType*, MultiDimArrayType*>* type_map
suif_vector<ArrayType*>* all_array_types
SuifEnvsuif_env
TypeBuildertb


Detailed Description

This class provides some utility functions that help with conversion of single-dimantional to multi-dimentional array types.


Constructor & Destructor Documentation

OneDimArrayConverter::OneDimArrayConverter ( SuifEnv * the_suif_env)

OneDimArrayConverter::~OneDimArrayConverter ()


Member Function Documentation

MultiDimArrayType * OneDimArrayConverter::array_type2multi_array_type ( ArrayType * at)

Convert an array type to a multidimentional array type.

The value is first looked up in a cache to avoid creating multiple multidim. array types representing the same thing.

All the types we encounter here get recorded and you can remove them from the IR completely by using remove_all_one_dim_array_types.

See also:
remove_all_one_dim_array_types()

void OneDimArrayConverter::convert_array_expr2multi_array_expr ( ArrayReferenceExpression * top_array)

Convert ArrayReferenceExpression top_array to a MultiDimArrayExpression.

void OneDimArrayConverter::remove_all_one_dim_array_types ()

Remove all the array types collected by all the calls to array_type2multi_array_type.

See also:
array_type2multi_array_type()

Member Data Documentation

suif_vector<ArrayType *>* OneDimArrayConverter::all_array_types [protected]

SuifEnv * OneDimArrayConverter::suif_env [protected]

TypeBuilder * OneDimArrayConverter::tb [protected]

suif_map<ArrayType *,MultiDimArrayType *>* OneDimArrayConverter::type_map [protected]


The documentation for this class was generated from the following files:
Generated at Mon Jul 31 13:44:12 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000