diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-11-24 14:46:23 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-11-24 09:46:23 -0500 |
commit | 3eebae0bb1d8b63654facfd9fbad7bbe69e49ba5 (patch) | |
tree | 01ff430a15b7d8a7738ce4596cf0c4dd0e967fa8 /gcc/tree-ssa-alias.c | |
parent | 4f514514983790765b026a90ef68be2e14304407 (diff) | |
download | gcc-3eebae0bb1d8b63654facfd9fbad7bbe69e49ba5.zip gcc-3eebae0bb1d8b63654facfd9fbad7bbe69e49ba5.tar.gz gcc-3eebae0bb1d8b63654facfd9fbad7bbe69e49ba5.tar.bz2 |
tree-ssa-alias.c (merge_pointed_to_info): Fix comment regarding PT_MALLOC.
* tree-ssa-alias.c (merge_pointed_to_info): Fix comment
regarding PT_MALLOC.
From-SVN: r91164
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 46778fa..0e30f12 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1714,20 +1714,17 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig) ... P_j = P_i + X; - P_j would be marked as PT_MALLOC, which is wrong because - PT_MALLOC implies that the pointer may not point to another - variable. - - FIXME 1: Subsequent analysis may determine that P_j - cannot alias anything else, but we are being conservative - here. - - FIXME 2: If the merging comes from a copy assignment, we - ought to merge PT_MALLOC, but then both pointers would end up - getting different name tags because create_name_tags is not - smart enough to determine that the two come from the same - malloc call. Copy propagation before aliasing should cure - this. */ + P_j would be marked as PT_MALLOC, however we currently do not + handle cases of more than one pointer pointing to the same + malloc'd area. + + FIXME: If the merging comes from an expression that preserves + the PT_MALLOC attribute (copy assignment, address + arithmetic), we ought to merge PT_MALLOC, but then both + pointers would end up getting different name tags because + create_name_tags is not smart enough to determine that the + two come from the same malloc call. Copy propagation before + aliasing should cure this. */ gcc_assert (orig_pi != dest_pi); dest_pi->pt_malloc = 0; |