This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: const warning...
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 04 Jul 2003 14:36:17 -0400
- Subject: Re: const warning...
- Organization: Red Hat Canada
- References: <200307041821.h64ILpb3016438@mururoa.inria.fr>
On Fri, 2003-07-04 at 14:21, Theodore Papadopoulo wrote:
> The (very broad) idea would be to add a new flag similar to
> tree_used, but that would track whether a variable is modified in a
> function (or whether a method modifies a class member for C++).
>
In theory, you should be able to get this information in the tree-ssa
branch. Every _DECL that has been written-to directly is marked. If
the _DECL survives the optimization passes, then you know it's used and
has been written to. If the _DECL is aliased and there are aliased
stores to it, you will also need to assume that it's been written to.
Tracking individual fields in an object will be more challenging,
though. We currently don't build an SSA form for fields.
Diego.