X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Fstructure.h;h=b558127fb0d1a2bef477883d10e72bdd7248dacb;hb=34c916bd6b2cb50de22a67a00919bb3ef2486db6;hp=44917778ecdcd19d82c4f5b76e2bc0d73b99ba9f;hpb=acbdf295cc01d5b69b1cb8ea2c7764dca1e7b8ac;p=libfirm diff --git a/include/libfirm/structure.h b/include/libfirm/structure.h index 44917778e..b558127fb 100644 --- a/include/libfirm/structure.h +++ b/include/libfirm/structure.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -29,6 +29,8 @@ #include "firm_types.h" +#include "begin.h" + /** * This enum describes the different regions constructed by the structural analysis. */ @@ -112,7 +114,7 @@ typedef enum ir_region_kind { * * @param reg the region */ -void *get_region_link(const ir_region *reg); +FIRM_API void *get_region_link(const ir_region *reg); /** * Sets the link of a region. @@ -120,14 +122,14 @@ void *get_region_link(const ir_region *reg); * @param reg the region * @param data the data */ -void set_region_link(ir_region *reg, void *data); +FIRM_API void set_region_link(ir_region *reg, void *data); /** * Get the immediate region of a block. * * @param block a block node */ -ir_region *get_block_region(const ir_node *block); +FIRM_API ir_region *get_block_region(const ir_node *block); /** * Sets the immediate region of a block. @@ -135,28 +137,28 @@ ir_region *get_block_region(const ir_node *block); * @param block a block node * @param reg the region */ -void set_block_region(ir_node *block, ir_region *reg); +FIRM_API void set_block_region(ir_node *block, ir_region *reg); /** * Get the immediate region of a node. * * @param n a Firm IR node */ -ir_region *get_irn_region(ir_node *n); +FIRM_API ir_region *get_irn_region(ir_node *n); /** * Return non-if a given firm thing is a region. * * @param thing a Firm object address */ -int is_region(const void *thing); +FIRM_API int is_region(const void *thing); /** * Return the number of predecessors in a region. * * @param reg the region */ -int get_region_n_preds(const ir_region *reg); +FIRM_API size_t get_region_n_preds(const ir_region *reg); /** * Return the predecessor region at position pos. @@ -164,7 +166,7 @@ int get_region_n_preds(const ir_region *reg); * @param reg the region * @param pos the position number */ -ir_region *get_region_pred(const ir_region *reg, int pos); +FIRM_API ir_region *get_region_pred(const ir_region *reg, size_t pos); /** * Set the predecessor region at position pos. @@ -173,14 +175,14 @@ ir_region *get_region_pred(const ir_region *reg, int pos); * @param pos the position number * @param n the new predecessor region */ -void set_region_pred(ir_region *reg, int pos, ir_region *n); +FIRM_API void set_region_pred(ir_region *reg, size_t pos, ir_region *n); /** * Return the number of successors in a region. * * @param reg the region */ -int get_region_n_succs(const ir_region *reg); +FIRM_API size_t get_region_n_succs(const ir_region *reg); /** * Return the successor region at position pos. @@ -188,7 +190,7 @@ int get_region_n_succs(const ir_region *reg); * @param reg the region * @param pos the position number */ -ir_region *get_region_succ(const ir_region *reg, int pos); +FIRM_API ir_region *get_region_succ(const ir_region *reg, size_t pos); /** * Set the successor region at position pos. @@ -197,7 +199,7 @@ ir_region *get_region_succ(const ir_region *reg, int pos); * @param pos the position number * @param n the new successor region */ -void set_region_succ(ir_region *reg, int pos, ir_region *n); +FIRM_API void set_region_succ(ir_region *reg, size_t pos, ir_region *n); /** * Construct the region tree of a graph by doing @@ -209,7 +211,7 @@ void set_region_succ(ir_region *reg, int pos, ir_region *n); * * @return the region tree */ -ir_reg_tree *construct_region_tree(ir_graph *irg); +FIRM_API ir_reg_tree *construct_region_tree(ir_graph *irg); /** * Walk over the region tree. @@ -219,6 +221,9 @@ ir_reg_tree *construct_region_tree(ir_graph *irg); * @param post walker function, executed after the children of a tree node are visited * @param env environment, passed to pre and post */ -void region_tree_walk(ir_reg_tree *tree, irg_reg_walk_func *pre, irg_reg_walk_func *post, void *env); +FIRM_API void region_tree_walk(ir_reg_tree *tree, irg_reg_walk_func *pre, + irg_reg_walk_func *post, void *env); + +#include "end.h" #endif