This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa]: Interprocedural aliasing and function local results
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Sun, 18 Jan 2004 17:52:44 -0500
- Subject: [tree-ssa]: Interprocedural aliasing and function local results
I hit a PTA "bug" today I figured had always existed, but never
actually saw in practice.
Due to PTA being able to do interprocedural analysis of statics, it can
tell when things alias variables in another function (due to function
calls)
We ended up with two things that same_points_to_set would return false
for, because one aliased a variable in another function, and one
didn't. So they got different memory tags, but were on either side of
an assignment (A = B, A and B had different memory tags), so it
propagated them, and all hell broke loose.
If you excluded the variable in the other function, the points-to sets
were both empty.
It's not technically a bug because the result is correct. They don't
have the same points-to set, just the same function local points-to
set.
Obviously. for purposes of intraprocedural analysis, I need to filter
out these variables so that tree-dfa gets what it wants.
But before I just do it for same_points_to_set, I want to know if this
information is or would eventually be useful for anything.
IE is it interesting to know that one variable can alias a variable in
another function?
If it is useful info, I'll just filter them out on the fly in
same_points_to_set.
If not, i'd rather than do it for all variables right after PTA runs,
since it's probably a bit cheaper then doing it on the fly repeatedly.
--Dan