On Tue, Jan 29, 2013 at 04:00:22PM +0100, Jakub Jelinek wrote:
> @@ -1464,23 +1726,39 @@ transform_statements (void)
>  
>    FOR_EACH_BB (bb)
>      {
> +      get_mem_ref_hash_table ().dispose ();
> +
>        if (bb->index >= saved_last_basic_block) continue;
>       for (i = gsi_start_bb (bb); !gsi_end_p (i);)

> +           if (is_gimple_call (s))
> +             get_mem_ref_hash_table ().dispose ();
> +

Two more things.  IMHO the hash table should be a global var,
not a static inside get_mem_ref_hash_table (), because otherwise
all these 3 calls just create an empty hash table and immediately
destroy it.  And, at BB boundaries and for calls, you shouldn't
use .dispose (), but .empty () method.
So my preference would be
  if (asan_mem_ref_ht.is_created ())
    asan_mem_ref_ht.empty ();
(for the two above occurrences, resp. .dispose () for the one below).

+             gsi_next (&i);
            }
-         gsi_next (&i);
        }
     }
+  get_mem_ref_hash_table ().dispose ();
 }
 

        Jakub

Reply via email to