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]

[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


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