This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix compilation time explosion in contains_label_p


> Isn't
>
> -  return (walk_tree (&st, contains_label_1 , NULL, NULL) != NULL_TREE);
> +  bool ret;
> +  struct pointer_set_t *visited = pointer_set_create ();
> +  ret = (walk_tree (&st, contains_label_1, NULL, visited) != NULL_TREE);
> +  pointer_set_destroy (visited);
> +  return ret;
>
> this just the same as using walk_tree_without_duplicates?

Indeed, I totally overlooked that.  Thanks for the tip.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]