[tree-ssa]: Easy way to get default def of a variable?
Daniel Berlin
dberlin@dberlin.org
Wed Jun 4 20:56:00 GMT 2003
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
More information about the Gcc
mailing list