Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-ssa-structalias.c @ 47:3bfb6c00c1e0
update it from 4.4.2 to 4.4.3.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Feb 2010 17:44:34 +0900 |
parents | a06113de4d67 |
children | 77e2b8dfacca |
comparison
equal
deleted
inserted
replaced
46:b85a337e5837 | 47:3bfb6c00c1e0 |
---|---|
2801 | 2801 |
2802 static void | 2802 static void |
2803 get_constraint_for_ptr_offset (tree ptr, tree offset, | 2803 get_constraint_for_ptr_offset (tree ptr, tree offset, |
2804 VEC (ce_s, heap) **results) | 2804 VEC (ce_s, heap) **results) |
2805 { | 2805 { |
2806 struct constraint_expr *c; | 2806 struct constraint_expr c; |
2807 unsigned int j, n; | 2807 unsigned int j, n; |
2808 unsigned HOST_WIDE_INT rhsunitoffset, rhsoffset; | 2808 unsigned HOST_WIDE_INT rhsunitoffset, rhsoffset; |
2809 | 2809 |
2810 /* If we do not do field-sensitive PTA adding offsets to pointers | 2810 /* If we do not do field-sensitive PTA adding offsets to pointers |
2811 does not change the points-to solution. */ | 2811 does not change the points-to solution. */ |
2852 VEC_iterate here. */ | 2852 VEC_iterate here. */ |
2853 n = VEC_length (ce_s, *results); | 2853 n = VEC_length (ce_s, *results); |
2854 for (j = 0; j < n; j++) | 2854 for (j = 0; j < n; j++) |
2855 { | 2855 { |
2856 varinfo_t curr; | 2856 varinfo_t curr; |
2857 c = VEC_index (ce_s, *results, j); | 2857 c = *VEC_index (ce_s, *results, j); |
2858 curr = get_varinfo (c->var); | 2858 curr = get_varinfo (c.var); |
2859 | 2859 |
2860 if (c->type == ADDRESSOF | 2860 if (c.type == ADDRESSOF |
2861 && !curr->is_full_var) | 2861 && !curr->is_full_var) |
2862 { | 2862 { |
2863 varinfo_t temp, curr = get_varinfo (c->var); | 2863 varinfo_t temp, curr = get_varinfo (c.var); |
2864 | 2864 |
2865 /* Search the sub-field which overlaps with the | 2865 /* Search the sub-field which overlaps with the |
2866 pointed-to offset. As we deal with positive offsets | 2866 pointed-to offset. As we deal with positive offsets |
2867 only, we can start the search from the current variable. */ | 2867 only, we can start the search from the current variable. */ |
2868 temp = first_vi_for_offset (curr, curr->offset + rhsoffset); | 2868 temp = first_vi_for_offset (curr, curr->offset + rhsoffset); |
2894 c2.var = temp->next->id; | 2894 c2.var = temp->next->id; |
2895 c2.type = ADDRESSOF; | 2895 c2.type = ADDRESSOF; |
2896 c2.offset = 0; | 2896 c2.offset = 0; |
2897 VEC_safe_push (ce_s, heap, *results, &c2); | 2897 VEC_safe_push (ce_s, heap, *results, &c2); |
2898 } | 2898 } |
2899 c->var = temp->id; | 2899 c.var = temp->id; |
2900 c->offset = 0; | 2900 c.offset = 0; |
2901 } | 2901 } |
2902 else if (c->type == ADDRESSOF | 2902 else if (c.type == ADDRESSOF |
2903 /* If this varinfo represents a full variable just use it. */ | 2903 /* If this varinfo represents a full variable just use it. */ |
2904 && curr->is_full_var) | 2904 && curr->is_full_var) |
2905 c->offset = 0; | 2905 c.offset = 0; |
2906 else | 2906 else |
2907 c->offset = rhsoffset; | 2907 c.offset = rhsoffset; |
2908 | |
2909 VEC_replace (ce_s, *results, j, &c); | |
2908 } | 2910 } |
2909 } | 2911 } |
2910 | 2912 |
2911 | 2913 |
2912 /* Given a COMPONENT_REF T, return the constraint_expr vector for it. | 2914 /* Given a COMPONENT_REF T, return the constraint_expr vector for it. |