This is the mail archive of the gcc@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: const warning...


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.


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