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: Making a variable addressable in GIMPLE


Yoav Etsion <etsman@gmail.com> writes:

> The pointer variable's address is used as the pointer's unique ID in
> a database, collecting information about each pointer variable -
> mostly its legal bounds.  That way I can test when a pointer crosses
> its object's bounds.

If I understand correctly, you mean to figure out the legally
reachable address ranges of individual pointer variables.  I don't
know what identifying the pointer *declarations* will do for you though.
After all, many such declarations may be manufactured for temporary
address values.

You might instead hook up only to the "mudflap2" pass that tracks
actual pointer dereferences.  You could analyze the operand of the
INDIRECT_REF etc. nodes to figure out which source-level spot caused
the dereference.  You may be able to follow the links back to a
pointer declaration, should one exist.

But I may misunderstand the nature of checking you intend.  Could you
summarize your intended overall algorithm?

- FChE


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