This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Interprocedural detection of readonly and non-addressable static variables
On Wed, Jun 29, 2005 at 03:49:51PM -0400, Kenneth Zadeck wrote:
> Diego Novillo wrote:
> >>+/* Return a INPUT_BITMAP for the asm inputs and OUTPUT_BITMAP for the
> >>+ asm outputs of static variables written by the asm STMT. */
> >>+
> >>
> >This is not what this function is doing. It's adding *any* decl
> >it finds to the bitmaps. Why not just check for statics instead
> >of relying on set intersection later on?
> I modified the comment to remove the word "static". I need to rely on
> the intersection because the set of static variables that it is
> intersected against is a subset of all of the static variables. The
> intersected set are the variables that satisfy a bunch of constraints
> such as not escaping, not have their address taken, having a type that
> we are willing to promote and not having any silly attributes that few
> people know about or understand. Thus at best, the single intersection
> (per call to this function) could be replace by a bitmap lookup for each
> variable found. This does not seem profitable.
Wouldn't it still be cheaper to add only statics at this point? Reduce
the number of operations in later set intersections.
--
Daniel Jacobowitz
CodeSourcery, LLC