This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: better gimplification of compound literals
Hi,
On Thu, 14 Jun 2012, Jan Hubicka wrote:
> > if (!from_decl
> > ...
> > || (symtab_get_node (from_decl)->symbol.in_other_partition))
> > return true;
> >
> > in can_refer_decl_in_current_unit_p. Honza: I don't understand this
> > particular condition. If we have a from_decl (i.e. the decl we're
> > concerned about stems from the initializer of it) and it is in another
> > partition, then this says that we can freely refer to the decl itself?
> > That doesn't make sense to me. That decl might for instance also be in
> > that other partition and be hidden. Hence I'm unsure what to return if
> > the symtab isn't ready yet. In the patch below I'm returning false as in
> > "don't know". But I think the current behaviour is wrong?
>
> If the initializers is from other partition, we know that var promoting
> will make it part of the boundary so we can reffer to it.
Hmm, but why only when it's in a different partition? And what's "it"?
The initializer or the element we're concerned about (decl)? You're
saying that if the initializer is in a different partition we don't need
further checks for a certain reason, but we _do_ need further checks if
it's in the current partition?
Ciao,
Michael.