------- Additional Comments From dberlin at gcc dot gnu dot org 2005-08-14
03:40 -------
Subject: Re: New: [4.1 Regression]
tree-ssa-alias creates a new virtual variable for malloc each time
may_alias is run (HEAP)
On Sun, 2005-08-14 at 03:36 +0000, pinskia at gcc dot gnu dot org wrote:
> ----
> In .alias1:
> i.0_18 = i_1;
> # HEAP.7_46 = V_MAY_DEF <HEAP.7_22>;
> b_6->a1[i.0_18] = i_1;
> i.0_19 = i_1;
> # HEAP.8_47 = V_MAY_DEF <HEAP.8_23>;
> c_8->a1[i.0_19] = i_1;
> i_20 = i_1 + 1;
>
> In .alias2:
> # HEAP.19_14 = V_MAY_DEF <HEAP.19_21>;
> b_5->a1[i_65] = i_65;
> # HEAP.20_73 = V_MAY_DEF <HEAP.20_10>;
> c_7->a1[i_65] = i_65;
> i_20 = i_65 + 1;
Uh, so?
This is because we recompute all the alias info, which means we really
recompute the alias info.
>
> ---
> I don't know how much harm in compile time does this hurt in normal code but
> we then keep on adding
> them to clobbered variables:
> # HEAP.6_27 = V_MAY_DEF <HEAP.6_24>;
> # HEAP.7_28 = V_MAY_DEF <HEAP.7_25>;
> # HEAP.8_29 = V_MAY_DEF <HEAP.8_26>;
> # HEAP.18_6 = V_MAY_DEF <HEAP.18_9>;
> # HEAP.19_8 = V_MAY_DEF <HEAP.19_64>;
> # HEAP.20_1 = V_MAY_DEF <HEAP.20_4>;
> a_3 = malloc1 (1028);
This is wrong. malloc functions don't *clobber* anything, AFAIK.
--Dan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23382