This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa]: Easy way to get default def of a variable?
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 04 Jun 2003 18:21:42 -0400
- Subject: Re: [tree-ssa]: Easy way to get default def of a variable?
- Organization: Red Hat Canada
- References: <D7768A7A-96CD-11D7-9AB1-000A95A34564@dberlin.org>
On Wed, 2003-06-04 at 16:48, Daniel Berlin wrote:
> This works, but it's slow, and it *seems* there should be a table or
> something of the "first versions" of variables.
>
That wouldn't be hard to register. It could be stored in a hash table
indexed by VAR_DECL. If it's only useful for a single pass, we should
probably trigger it with a flag. If you think it could be useful in
other parts, we could then enable it by default.
> I believe this is what Open64 refers to as the "zero version", and it
> has such a table, but i may be wrong.
>
They use zero versions to avoid the explosion of SSA names generated in
the presence of heavy aliasing. They run a pass that goes through the
variables and when there are many versions of a variable that are only
used in MUs/CHIs (ie, no real references), they just create a zero
version for the variable that essentially means that the variable is
used and defined in unknown ways. It's a mechanism for handling the
explosion of version numbers. Apparently to speed up optimizers so that
they don't have to chase long UD chains for things that aren't worth it.
That's what I vaguely remember, anyway. It's been a few months.
Diego.