From: Christoph Mallon Date: Sat, 11 Oct 2008 20:58:42 +0000 (+0000) Subject: Remove the unused attribute const arch_env_t *arch_env from struct phi_handler and... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=847f1ac0bbca120c8238400e68cd00d52723bdca;p=libfirm Remove the unused attribute const arch_env_t *arch_env from struct phi_handler and also the then unused parameter be_main_env_t *env from be_phi_handler_new(). [r22758] --- diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 81f137e03..cbca78d07 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -406,7 +406,7 @@ static be_main_env_t *be_init_env(be_main_env_t *env, FILE *file_handle) memset(asm_constraint_flags, 0, sizeof(asm_constraint_flags)); env->arch_env = arch_env_init(isa_if, file_handle, env); - be_phi_handler_new(env); + be_phi_handler_new(); be_dbg_open(); return env; diff --git a/ir/be/benode.c b/ir/be/benode.c index 9245f4200..2f4c3f064 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -1249,9 +1249,8 @@ typedef struct { arch_irn_flags_t flags; } phi_attr_t; -struct { - arch_env_t *arch_env; - pmap *phi_attrs; +static struct { + pmap *phi_attrs; } phi_handler; #define get_phi_handler_from_ops(h) container_of(h, phi_handler_t, irn_ops) @@ -1426,9 +1425,8 @@ static const arch_irn_ops_t phi_irn_ops = { NULL, /* perform_memory_operand */ }; -void be_phi_handler_new(be_main_env_t *env) +void be_phi_handler_new(void) { - phi_handler.arch_env = env->arch_env; phi_handler.phi_attrs = pmap_create(); op_Phi->ops.be_ops = &phi_irn_ops; } diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index 023fd989a..7dc0e9765 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -495,9 +495,8 @@ void be_node_set_req_type(ir_node *irn, int pos, arch_register_req_type_t type); /** * Initialize the Phi handler. - * @param env The be_main environment. */ -void be_phi_handler_new(be_main_env_t *env); +void be_phi_handler_new(void); /** * Destroy the Phi handler.