This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa]: Easy way to get default def of a variable?
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: dnovillo at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 4 Jun 2003 16:48:05 -0400
- Subject: [tree-ssa]: Easy way to get default def of a variable?
Sometimes, when doing injury insertions, we need to know the default
definition of a variable.
IE the first version of the variable.
The SSA rename routines know what it is, since they create it.
However, outside of them, it appears there is no easy way to find it.
I currently have it walk back through all the definitions (skipping
ones we've seen to handle cyclic phi's properly) till it finds the one
whose SSA_NAME_DEF_STMT is an empty statement.
This works, but it's slow, and it *seems* there should be a table or
something of the "first versions" of variables.
I believe this is what Open64 refers to as the "zero version", and it
has such a table, but i may be wrong.
--Dan