This is the mail archive of the
mailing list for the GCC project.
Re: cgraph, unit-at-a-time, and the "used" attribute
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Gary Funck <gary at intrepid dot com>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Mon, 08 Oct 2007 14:50:06 -0700
- Subject: Re: cgraph, unit-at-a-time, and the "used" attribute
- References: <20071007024859.GG9118@intrepid.com>
- Reply-to: janis187 at us dot ibm dot com
On Sat, 2007-10-06 at 19:48 -0700, Gary Funck wrote:
> While working on UPC, we ran into an interesting problem
> where if -O1 is enabled, and -funit-at-a-time is disabled
> (which is not the default configuration) a static variable
> declaration was not emitted by the assembler. I haven't
> quite worked out why this is the case, but reading the
> code did notice some awkwardness in how "used" variables
> are detected and handled by the call graph (cgraph) pass(es).
> All of this is somewhat specific to UPC's use of the gimplify
> pass to implement language semantics and the particular nature
> of the code it generates. However, I think the general
> observation of the way that the "used" attribute is queried
> directly, and how it interacts with the presence/absence
> of flag_unit_at_a_time might be worth some level of review
> and possible rework.
Might this be related to http://gcc.gnu.org/PR33645?