irtypeinfo.h \
irvrfy.h \
lowering.h \
- pseudo_irg.h \
rta.h \
seqnumbers.h \
structure.h \
#include "irtypeinfo.h"
#include "irvrfy.h"
#include "lowering.h"
-#include "pseudo_irg.h"
#include "rta.h"
#include "seqnumbers.h"
#include "structure.h"
* This is a rather strong criteria, so do not expect that a
* lot of functions will be found. Moreover, all of them might
* already be inlined if inlining is activated.
- * Anyway, it might be good for handling builtin's or pseudo-graphs,
+ * Anyway, it might be good for handling builtin's
* even if the later read/write memory (but we know how).
*
* This optimizations read the irg_const_function property of
/** Sets the ir graph at position pos. */
FIRM_API void set_irp_irg(int pos, ir_graph *irg);
-/** Gets the number of graphs _and_ pseudo graphs. */
-FIRM_API int get_irp_n_allirgs(void);
-
-/** Returns the ir graph at position pos of all graphs (including
- pseudo graphs). Visits first graphs, then pseudo graphs. */
-FIRM_API ir_graph *get_irp_allirg(int pos);
-
/**
* Returns the type containing the entities for a segment.
*
+++ /dev/null
-/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
- *
- * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-/**
- * @file
- * @brief interface to pseudo irgs
- * @author Goetz Lindenmaier, Boris Boesler
- * @date Oktober 2004
- * @version $Id$
- */
-#ifndef FIRM_IR_PSEUDO_IRG_H
-#define FIRM_IR_PSEUDO_IRG_H
-
-#include "firm_types.h"
-
-#include "begin.h"
-
-/** Create a new ir graph to build a pseudo representation of a procedure.
- *
- * The pseudo representation can only be used for analyses. It may not be
- * optimized. Pseudo graphs are kept in a separate graph list in irprog.
- */
-FIRM_API ir_graph *new_pseudo_ir_graph(ir_entity *ent, int n_loc);
-
-/** Returns non-zero ir ir_graph is pseudo graph.
- * Is irg a pseudo graph for analysis? */
-FIRM_API int is_pseudo_ir_graph(ir_graph *irg);
-
-/** Returns the number of pseudo graphs in the program. */
-FIRM_API int get_irp_n_pseudo_irgs(void);
-
-/** Add a graph as pseudo irg */
-FIRM_API void add_irp_pseudo_irg(ir_graph *irg);
-
-/** Returns the pos'th pseudo graph in the program. */
-FIRM_API ir_graph *get_irp_pseudo_irg(int pos);
-
-/** If set, get_irp_n_irgs() and get_irp_irg() behave as if all pseudo
- graphs are in the irg list. If not set, get_entity_irg() returns
- NULL if the entity refers to a pseudo irg. */
-FIRM_API void set_visit_pseudo_irgs(int x);
-FIRM_API int get_visit_pseudo_irgs(void);
-
-#include "end.h"
-
-#endif
ir/irprog.c \
ir/irssacons.c \
ir/irvrfy.c \
- ir/pseudo_irg.c \
ir/valueset.c \
libcore/lc_appendable.c \
libcore/lc_config_lexer.c \
void rta_init(void)
{
int n_runs = 0;
- int rem_vpi = get_visit_pseudo_irgs();
- set_visit_pseudo_irgs(1);
FIRM_DBG_REGISTER(dbg, "firm.ana.rta");
tr_vrfy();
}
# endif /* defined DEBUG_libfirm */
-
- set_visit_pseudo_irgs(rem_vpi);
}
/**
int i, n_dead_irgs, n_graphs = get_irp_n_irgs();
ir_graph *irg, *next_irg, *dead_irgs;
- int rem_vpi = get_visit_pseudo_irgs();
- set_visit_pseudo_irgs(1);
-
irp_reserve_resources(irp, IR_RESOURCE_IRG_LINK);
n_dead_irgs = 0;
DB((dbg, LEVEL_1, "RTA: dead methods = %i\n", n_dead_irgs));
irp_free_resources(irp, IR_RESOURCE_IRG_LINK);
- set_visit_pseudo_irgs(rem_vpi);
}
/* Clean up the RTA data structures. Call this after calling rta_init */
*/
#include "config.h"
-#include "pseudo_irg.h"
#include "irgwalk.h"
#include "irprog.h"
#include "irprintf.h"
*/
#include "config.h"
-#include "pseudo_irg.h"
#include "irgwalk.h"
#include "irprog.h"
#include "irprintf.h"
#include "lc_opts.h"
#include "lc_opts_enum.h"
-#include "pseudo_irg.h"
#include "irgwalk.h"
#include "irprog.h"
#include "irprintf.h"
}
#endif
- /* never build code for pseudo irgs */
- set_visit_pseudo_irgs(0);
-
be_main_loop(file_handle, cup_name);
if (be_options.timing == BE_TIME_ON) {
#include <math.h>
-#include "pseudo_irg.h"
#include "irarch.h"
#include "irgwalk.h"
#include "irprog.h"
#include "lc_opts.h"
#include "lc_opts_enum.h"
-#include "pseudo_irg.h"
#include "irgwalk.h"
#include "irprog.h"
#include "irprintf.h"
for (i = get_irp_n_irgs() - 1; i >= 0; --i)
free_ir_graph(get_irp_irg(i));
- for (i = get_irp_n_pseudo_irgs() - 1; i >= 0; --i)
- free_ir_graph(get_irp_pseudo_irg(i));
free_type_entities(get_glob_type());
for (i = get_irp_n_types() - 1; i >= 0; --i)
#include "irtypes.h"
#include "irprog.h"
-#include "pseudo_irg.h"
#include "type_t.h"
#include "entity_t.h"
#include "iredgekinds.h"
#include "irprog_t.h"
#include "irgraph_t.h"
#include "irpass_t.h"
-#include "pseudo_irg.h"
#include "array.h"
#include "error.h"
#include "obst.h"
res->kind = k_ir_prog;
res->graphs = NEW_ARR_F(ir_graph *, 0);
- res->pseudo_graphs = NEW_ARR_F(ir_graph *, 0);
res->types = NEW_ARR_F(ir_type *, 0);
res->modes = NEW_ARR_F(ir_mode *, 0);
res->opcodes = NEW_ARR_F(ir_op *, 0);
free_ir_graph(irp->const_code_irg);
DEL_ARR_F(irp->graphs);
- DEL_ARR_F(irp->pseudo_graphs);
DEL_ARR_F(irp->types);
DEL_ARR_F(irp->modes);
break;
}
}
- if (!found) {
- l = ARR_LEN(irp->pseudo_graphs);
- for (i = 0; i < l; i++) {
- if (irp->pseudo_graphs[i] == irg) {
- for (; i < l - 1; i++) {
- irp->pseudo_graphs[i] = irp->pseudo_graphs[i+1];
- }
- ARR_SETLEN(ir_graph*, irp->pseudo_graphs, l - 1);
- break;
- }
- }
- }
}
/* Removes irg from the list or irgs, shrinks the list by one. */
irp->graphs[pos] = irg;
}
-/* Gets the number of graphs _and_ pseudo graphs. */
-int get_irp_n_allirgs(void)
-{
- /* We can not call get_irp_n_irgs, as we end up in a recursion ... */
- return ARR_LEN(irp->graphs) + get_irp_n_pseudo_irgs();
-}
-
-/* Returns the ir graph at position pos of all graphs (including
- pseudo graphs). Visits first graphs, then pseudo graphs. */
-ir_graph *get_irp_allirg(int pos)
-{
- int n_irgs = ARR_LEN(irp->graphs);
- assert(0 <= pos);
- if (pos < n_irgs) {
- return irp->graphs[pos];
- } else {
- return get_irp_pseudo_irg(pos-n_irgs);
- }
-}
-
/* Adds type to the list of types in irp. */
void add_irp_type(ir_type *typ)
{
#include "irprog.h"
#include "irtypes.h"
-#include "pseudo_irg.h"
#include "ircgcons.h"
#include "irtypeinfo.h"
#include "irmemory.h"
static inline int _get_irp_n_irgs(void)
{
assert(irp && irp->graphs);
- if (get_visit_pseudo_irgs()) return get_irp_n_allirgs();
return ARR_LEN(irp->graphs);
}
static inline ir_graph *_get_irp_irg(int pos)
{
- if (get_visit_pseudo_irgs()) return get_irp_allirg(pos);
assert(0 <= pos && pos <= ARR_LEN(irp->graphs));
return irp->graphs[pos];
}
-
static inline int _get_irp_n_types(void)
{
assert(irp && irp->types);
ir_graph *main_irg; /**< The entry point to the compiled program
or NULL if no point exists. */
ir_graph **graphs; /**< A list of all graphs in the ir. */
- ir_graph **pseudo_graphs; /**< A list of all pseudo graphs in the ir. See pseudo_irg.c */
ir_graph *const_code_irg; /**< This ir graph gives the proper environment
to allocate nodes the represent values
of constant entities. It is not meant as
+++ /dev/null
-/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
- *
- * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-/**
- * @file
- * @brief pseudo irg implementation
- * @author Goetz Lindenmaier, Boris Boesler
- * @date Oktober 2004
- * @version $Id$
- */
-#include "config.h"
-
-
-#include "pseudo_irg.h"
-
-#include "irgraph_t.h"
-#include "irprog_t.h"
-#include "array.h"
-
-
-/* Returns the number of pseudo graphs in the program. */
-int get_irp_n_pseudo_irgs(void)
-{
- assert (irp && irp->pseudo_graphs);
- return ARR_LEN(irp->pseudo_graphs);
-}
-
-/* Returns the pos'th pseudo graph in the program. */
-ir_graph *get_irp_pseudo_irg(int pos)
-{
- assert(0 <= pos && pos <= get_irp_n_pseudo_irgs());
- return irp->pseudo_graphs[pos];
-}
-
-void add_irp_pseudo_irg(ir_graph *irg)
-{
- assert (irp && irp->pseudo_graphs);
- ARR_APP1(ir_graph *, irp->pseudo_graphs, irg);
-}
-
-
-/* Create a new ir graph to build a pseudo representation of a procedure.
- *
- * The pseudo representation can only be used for analyses. It may not be
- * optimized. Pseudo graphs are kept in a separate graph list in irprog.
- */
-ir_graph *new_pseudo_ir_graph(ir_entity *ent, int n_loc)
-{
- ir_graph *res = new_r_ir_graph(ent, n_loc);
- add_irp_pseudo_irg(res); /* remember this graph global. */
- return res;
-}
-
-/* Returns non-zero ir ir_graph is pseudo graph. */
-int is_pseudo_ir_graph(ir_graph *irg)
-{
- int i, n_pseudo_irgs;
-
- assert(irg && "nothing here");
- assert(is_ir_graph(irg) && "no ir_graph given");
-
- n_pseudo_irgs = get_irp_n_pseudo_irgs();
- for (i = 0; i < n_pseudo_irgs; ++i) {
- if (irg == get_irp_pseudo_irg(i))
- return 1;
- }
- return 0;
-}
-
-static int visit_pseudo_irgs = 0;
-
-void set_visit_pseudo_irgs(int x)
-{
- visit_pseudo_irgs = x;
-}
-
-int get_visit_pseudo_irgs(void)
-{
- return visit_pseudo_irgs;
-}
#include "typerep.h"
#include "type_t.h"
#include "ident.h"
-#include "pseudo_irg.h"
#include "compound_path.h"
typedef struct ir_initializer_base_t {
return NULL;
}
- irg = ent->attr.mtd_attr.irg;
- if (irg != NULL && !get_visit_pseudo_irgs() && is_pseudo_ir_graph(irg))
- return NULL;
- return irg;
+ return ent->attr.mtd_attr.irg;
}
static inline ir_visited_t _get_entity_visited(const ir_entity *ent)
<ClCompile Include="$(FirmRoot)\ir\ir\irprog.c" />\r
<ClCompile Include="$(FirmRoot)\ir\ir\irssacons.c" />\r
<ClCompile Include="$(FirmRoot)\ir\ir\irvrfy.c" />\r
- <ClCompile Include="$(FirmRoot)\ir\ir\pseudo_irg.c" />\r
<ClCompile Include="$(FirmRoot)\ir\ir\valueset.c" />\r
<ClInclude Include="$(FirmRoot)\ir\ir\gen_irnode.h" />\r
<ClInclude Include="$(FirmRoot)\ir\ir\instrument.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\irtypeinfo.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\irvrfy.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\lowering.h" />\r
- <ClInclude Include="$(FirmRoot)\include\libfirm\pseudo_irg.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\rta.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\seqnumbers.h" />\r
<ClInclude Include="$(FirmRoot)\include\libfirm\structure.h" />\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
<ImportGroup Label="ExtensionTargets">\r
</ImportGroup>\r
-</Project>
\ No newline at end of file
+</Project>\r
<ClCompile Include="$(FirmRoot)\ir\ir\irvrfy.c">\r
<Filter>ir\ir</Filter>\r
</ClCompile>\r
- <ClCompile Include="$(FirmRoot)\ir\ir\pseudo_irg.c">\r
- <Filter>ir\ir</Filter>\r
- </ClCompile>\r
<ClCompile Include="$(FirmRoot)\ir\ir\valueset.c">\r
<Filter>ir\ir</Filter>\r
</ClCompile>\r
<ClInclude Include="$(FirmRoot)\include\libfirm\lowering.h">\r
<Filter>include\libfirm</Filter>\r
</ClInclude>\r
- <ClInclude Include="$(FirmRoot)\include\libfirm\pseudo_irg.h">\r
- <Filter>include\libfirm</Filter>\r
- </ClInclude>\r
<ClInclude Include="$(FirmRoot)\include\libfirm\rta.h">\r
<Filter>include\libfirm</Filter>\r
</ClInclude>\r
<Filter>win32</Filter>\r
</ResourceCompile>\r
</ItemGroup>\r
-</Project>
\ No newline at end of file
+</Project>\r