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: Remove hash from remember_with_vars


On 31 August 2013 19:15:46 Richard Biener <rguenther@suse.de> wrote:
Jan Hubicka <hubicka@ucw.cz> wrote:
>Hi,
>remember_with_vars walks trees that are read from file (now unique)
>and looks for fields that can contain pointers to vars or functions and
>if so, it records them to global hashtable for later fixup.
>This is quite wasteful, because the hash is querried many times.
>We can simply walk all fields in a tree and record the tree once
>afterwards,
>moreover since streaming knows when tree is newly constructed, we don't
>need
>hash.
>
>Vectors do not allow deletable elements, but I think it makes no
>difference:
>the trees are all used from decl states.

Heh, indeed a cleanup possibility I missed.

Ok.

s/Trun/Turn/g
?
Thanks
Thanks,
Richard.

>	* lot.c (tree_with_vars): Turn into vector.
>	(MAYBE_REMEMBER_WITH_VARS): Change to...
>	(CHECK_VAR): ... this one.
>	(CHECK_NO_VAR): New macro.
>	(maybe_remember_with_vars_typed): Trun to ...
>	(mentions_vars_p_typed): ... this one.
>	(maybe_remember_with_vars_common): Trun to ...
>	(mentions_vars_p_comon): ... this one.
>	(maybe_remember_with_vars_decl_minimal): Trun to ...
>	(mentions_vars_p_decl_minmal): ... this one.
>	(maybe_remember_with_vars_decl_common): Trun to ...
>	(mentions_vars_p_decl_common): ... this one.
>	(maybe_remember_with_vars_decl_with_vis): Trun to ...
>	(mentions_vars_p_decl_with_vis): ... this one.
>	(maybe_remember_with_vars_decl_non_common): Trun to ...
>	(mentions_vars_p_decl_non_common): ... this one.
>	(maybe_remember_with_vars_function): Trun to ...
>	(mentions_vars_p_function): ... this one.
>	(maybe_remember_with_vars_field_decl): Trun to ...
>	(mentions_vars_p_field_decl): ... this one.
>	(maybe_remember_with_vars_type): Trun to ...
>	(mentions_vars_p_type): ... this one.
>	(maybe_remember_with_vars_binfo): Trun to ...
>	(mentions_vars_p_binfo): ... this one.
>	(maybe_remember_with_vars_constructor): Trun to ...
>	(mentions_vars_p_constructor): ... this one.
>	(maybe_remember_with_vars_expr): Trun to ...
>	(mentions_vars_p_expr): ... this one.
>	(maybe_remember_with_vars): Trun to ...
>	(mentions_vars_p): ... this one.
>	(lto_read_decls): Update.
>	(LTO_SET_PREVAIL): Do not call function for internal decls.
>	(lto_fixup_prevailing_decls): Update to match mentions_vars_p;
>	check that something was updated.
>	(lto_fixup_state): Do not care about internal decls.
>	(lto_fixup_decls): Update.
>	(read_cgraph_and_symbols): Update.


Sent with AquaMail for Android
http://www.aqua-mail.com



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