From a5491dee97d43bd7786a507e01f6def6b8ced347 Mon Sep 17 00:00:00 2001 From: Boris Boesler Date: Mon, 6 Dec 2004 14:48:38 +0000 Subject: [PATCH] moved pseudo_irg.[ch] to directory ir/ir [r4577] --- ir/external/Makefile.in | 5 ++-- ir/external/pseudo_irg.c | 61 ---------------------------------------- ir/external/pseudo_irg.h | 28 ------------------ 3 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 ir/external/pseudo_irg.c delete mode 100644 ir/external/pseudo_irg.h diff --git a/ir/external/Makefile.in b/ir/external/Makefile.in index 8ce551d3a..717286162 100644 --- a/ir/external/Makefile.in +++ b/ir/external/Makefile.in @@ -15,12 +15,11 @@ srcdir = @srcdir@ topdir = ../.. subdir := ir/external -INSTALL_HEADERS = read.h pseudo_irg.h +INSTALL_HEADERS = read.h SOURCES = $(INSTALL_HEADERS) -SOURCES += Makefile.in \ - read.c pseudo_irg.c +SOURCES += Makefile.in read.c include $(topdir)/MakeRules diff --git a/ir/external/pseudo_irg.c b/ir/external/pseudo_irg.c deleted file mode 100644 index 87eac1549..000000000 --- a/ir/external/pseudo_irg.c +++ /dev/null @@ -1,61 +0,0 @@ - - -#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 number of pseudo graphs 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(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 true ir ir_graph is pseudo graph. */ -int is_pseudo_ir_graph(ir_graph *irg) -{ - assert(irg && "nothing here"); - assert(is_ir_graph(irg) && "no ir_graph given"); - - int i, n_pseudo_irgs = get_irp_n_pseudo_irgs(); - for (i = 0; i < n_pseudo_irgs; ++i) { - if (irg == get_irp_pseudo_irg(i)) return true; - } - return false; -} - -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; -} diff --git a/ir/external/pseudo_irg.h b/ir/external/pseudo_irg.h deleted file mode 100644 index eb88836df..000000000 --- a/ir/external/pseudo_irg.h +++ /dev/null @@ -1,28 +0,0 @@ - -#include "entity.h" -#include "irgraph.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. - */ -ir_graph *new_pseudo_ir_graph(entity *ent, int n_loc); - -/** Returns true ir ir_graph is pseudo graph. - * Is irg a pseudo graph for analysis? */ -int is_pseudo_ir_graph(ir_graph *irg); - -/** Returns the number of pseudo graphs in the program. */ -int get_irp_n_pseudo_irgs(void); - -/** Returns the number of pseudo graphs in the program. */ -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. */ -void set_visit_pseudo_irgs(int x); -int get_visit_pseudo_irgs(void); -- 2.20.1