On 09/12/14 08:15, Jason Merrill wrote:
On 09/11/2014 08:51 PM, Aldy Hernandez wrote:
- timevar_start (TV_PHASE_DEFERRED);
- timevar_stop (TV_PHASE_DEFERRED);
- timevar_start (TV_PHASE_OPT_GEN);
Why?
TV_PHASE_OPT_GEN is now in compile_file(), where we call
finalize_compilation_unit directly.
TV_PHASE_DEFERRED, on the other hand, is a bit problematic because it
was originally wrapping the code inside LANG_HOOKS_WRITE_GLOBALS, which
will now reside inside the parser (and is thus included in
TV_PHASE_PARSING now). Originally it was mutually exclusive with
TV_PHASE_PARSING, but now resides within the parser, so I decided to get
rid of it since it's all technically in the parser.
There is code in timevar*.c that makes sure that TV_PHASE_* elapsed
times add up to the total time. So we either get rid of
TV_PHASE_DEFERRED and include its time in TV_PHASE_PARSING (avoiding
double counting), or we include a separate, non PHASE timer for it, with
timevar_push(TV_blah) where "blah" is NOT "PHASE".
Up to you, but I'm highly in favor of getting rid of things ;-).
/* Generate hidden aliases for Java. */
- if (candidates)
+ if (java_hidden_aliases)
{
- build_java_method_aliases (candidates);
- delete candidates;
+ build_java_method_aliases (java_hidden_aliases);
+ delete java_hidden_aliases;
}
Didn't it work to move this before finalize? I think the VTV stuff is
all that really needs to come after it, and that can move out of the
front end if this hook is a problem (which I don't really think it is).
I was too chicken to try. I will do so as a follow up.
I am committing the patch to the branch, and will address both issues
you speak of in followups. Let me know what you prefer for the timevar
issue.
Thanks.
Aldy