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: [RFA] Switch cgraph to IPA_SSA state reliably


On 07/15/2010 12:03 PM, Richard Henderson wrote:
> I'm not sure of the logic behind switching cgraph_state in pass_all_early_optimizations.
> For whatever reason, it's not working.  Simply moving the state change to
> pass_early_local_passes does the trick, however.

I figured out why the state change in pass_all_early_optimizations wasn't working:
it's not run all the time.  Consider a compilation unit with no functions.  E.g.

  __thread int i __attribute__((common));

This test case requires a constructor, but since pass_all_early_optimizations
is run for each function and there are none, we never change state to IPA_SSA.

> Bootstrap is continuing on amd64-linux.  Ok for mainline if it passes?

Testing failed.

> -  /* If pass_all_early_optimizations was not scheduled, the state of
> -     the cgraph will not be properly updated.  Update it now.  */
> -  if (cgraph_state < CGRAPH_STATE_IPA_SSA)
> -    cgraph_state = CGRAPH_STATE_IPA_SSA;
> +  /* We should have run pass_early_local_passes, which updated this state.  */
> +  gcc_assert (cgraph_state >= CGRAPH_STATE_IPA_SSA);

Ignore this hunk for the moment; it fails for all LTO tests.  However, I suspect
that somewhere in the LTO path we should have set the state more correctly.


r~


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