libFirm 1.20
libfirm/compound_path.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
00003  *
00004  * This file is part of libFirm.
00005  *
00006  * This file may be distributed and/or modified under the terms of the
00007  * GNU General Public License version 2 as published by the Free Software
00008  * Foundation and appearing in the file LICENSE.GPL included in the
00009  * packaging of this file.
00010  *
00011  * Licensees holding valid libFirm Professional Edition licenses may use
00012  * this file in accordance with the libFirm Commercial License.
00013  * Agreement provided with the Software.
00014  *
00015  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017  * PURPOSE.
00018  */
00019 
00027 #ifndef FIRM_COMPOUND_PATHS_H
00028 #define FIRM_COMPOUND_PATHS_H
00029 
00030 #include "firm_types.h"
00031 #include "begin.h"
00032 
00037 typedef struct compound_graph_path  compound_graph_path;
00038 
00043 FIRM_API compound_graph_path *new_compound_graph_path(ir_type *tp, size_t length);
00044 
00049 FIRM_API int is_compound_graph_path(const void *thing);
00050 
00055 FIRM_API void free_compound_graph_path(compound_graph_path *gr);
00056 
00061 FIRM_API size_t get_compound_graph_path_length(const compound_graph_path *gr);
00062 
00067 ir_entity *get_compound_graph_path_node(const compound_graph_path *gr, size_t pos);
00068 
00073 FIRM_API void set_compound_graph_path_node(compound_graph_path *gr, size_t pos,
00074                                            ir_entity *node);
00075 
00080 FIRM_API long get_compound_graph_path_array_index(const compound_graph_path *gr, size_t pos);
00081 
00086 FIRM_API void set_compound_graph_path_array_index(compound_graph_path *gr, size_t pos, long index);
00087 
00092 FIRM_API ir_type *get_compound_graph_path_type(const compound_graph_path *gr);
00093 
00099 FIRM_API int is_proper_compound_graph_path(compound_graph_path *gr, size_t pos);
00100 
00106 FIRM_API void add_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path);
00111 FIRM_API void set_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path, size_t pos);
00112 
00117 FIRM_API compound_graph_path *get_compound_ent_value_path(const ir_entity *ent, size_t pos);
00118 
00124 FIRM_API ir_node *get_compound_ent_value_by_path(const ir_entity *ent,
00125                                                  compound_graph_path *path);
00126 
00133 FIRM_API void remove_compound_ent_value(ir_entity *ent, ir_entity *value_ent);
00134 
00142 FIRM_API void add_compound_ent_value(ir_entity *ent, ir_node *val, ir_entity *member);
00143 
00148 FIRM_API ir_entity *get_compound_ent_value_member(const ir_entity *ent, size_t pos);
00149 
00154 FIRM_API void set_compound_ent_value(ir_entity *ent, ir_node *val,
00155                                      ir_entity *member, size_t pos);
00156 
00166 FIRM_API void set_array_entity_values(ir_entity *ent, ir_tarval **values, size_t num_vals);
00167 
00177 FIRM_API unsigned get_compound_ent_value_offset_bit_remainder(const ir_entity *ent, size_t pos);
00178 
00189 FIRM_API unsigned get_compound_ent_value_offset_bytes(const ir_entity *ent, size_t pos);
00190 
00196 FIRM_API size_t get_compound_ent_n_values(const ir_entity *ent);
00197 
00202 FIRM_API ir_node *get_compound_ent_value(const ir_entity *ent, size_t pos);
00203 
00208 FIRM_API int entity_has_compound_ent_values(const ir_entity *entity);
00209 
00210 #include "end.h"
00211 
00212 #endif