use more IR_RESOURCE_TYPE_VISITED, remove pointless inc_master_type_visited calls
authorMatthias Braun <matze@braunis.de>
Thu, 4 Feb 2010 20:32:44 +0000 (20:32 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 4 Feb 2010 20:32:44 +0000 (20:32 +0000)
[r27045]

ir/be/arm/bearch_arm.c
ir/be/ia32/bearch_ia32.c
ir/be/mips/bearch_mips.c
ir/tr/tr_inheritance.c

index 217a88d..5e0324c 100644 (file)
@@ -712,12 +712,6 @@ static arch_env_t *arm_init(FILE *file_handle) {
        be_emit_cstring(".Ltext0:\n");
        be_emit_write_line();
 
-       /* we mark referenced global entities, so we can only emit those which
-        * are actually referenced. (Note: you mustn't use the type visited flag
-        * elsewhere in the backend)
-        */
-       inc_master_type_visited();
-
        inited = 1;
        return &isa->arch_env;
 }
index f1b2ece..2d79b09 100644 (file)
@@ -1713,12 +1713,6 @@ static arch_env_t *ia32_init(FILE *file_handle)
        be_emit_cstring(".Ltext0:\n");
        be_emit_write_line();
 
-       /* we mark referenced global entities, so we can only emit those which
-        * are actually referenced. (Note: you mustn't use the type visited flag
-        * elsewhere in the backend)
-        */
-       inc_master_type_visited();
-
        return &isa->arch_env;
 }
 
index 5f74430..585d68c 100644 (file)
@@ -341,12 +341,6 @@ static arch_env_t *mips_init(FILE *file_handle) {
        mips_create_opcodes(&mips_irn_ops);
        // mips_init_opcode_transforms();
 
-       /* we mark referenced global entities, so we can only emit those which
-        * are actually referenced. (Note: you mustn't use the type visited flag
-        * elsewhere in the backend)
-        */
-       inc_master_type_visited();
-
        return &isa->arch_env;
 }
 
index cba4fdc..33d77a2 100644 (file)
@@ -337,6 +337,7 @@ void compute_inh_transitive_closure(void) {
        free_inh_transitive_closure();
 
        /* The 'down' relation */
+       irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
        inc_master_type_visited();  /* Inc twice: one if on stack, second if values computed. */
        inc_master_type_visited();
        for (i = 0; i < n_types; ++i) {
@@ -385,6 +386,7 @@ void compute_inh_transitive_closure(void) {
        }
 
        irp->inh_trans_closure_state = inh_transitive_closure_valid;
+       irp_free_resources(irp, IR_RESOURCE_TYPE_VISITED);
 }
 
 /** Free memory occupied by the transitive closure information. */