On Mon, Oct 26, 2009 at 09:40:06AM -0700, Andrew Pinski wrote:
> Except (b) is correct as fold should not be modifiying the tree at
> all. That is the whole point of fold_checksum_tree. We allow some
> things to change like TYPE_VARIANTs and such but we should not allow a
The TYPE_VARIANTs case
On Mon, Oct 26, 2009 at 10:42 PM, Aldy Hernandez wrote:
>> Certainly better. But I fail to see why a different location would be
>> better than the original here. I assume all tokens have a correct initial
>> location. Then why is for example for int i; in (int) i the location of
>> the conver
> Certainly better. But I fail to see why a different location would be
> better than the original here. I assume all tokens have a correct initial
> location. Then why is for example for int i; in (int) i the location of
> the conversion a better location than the one of i in the folded result
On Mon, Oct 26, 2009 at 6:28 PM, Aldy Hernandez wrote:
>> That wasn't my question.
>>
>> tem = fold_build2_loc (loc, code, type,
>> fold_convert_loc (loc, TREE_TYPE (op0),
>> TREE_OPERAND (arg0, 1)), op1);
>> prote
> That wasn't my question.
>
> tem = fold_build2_loc (loc, code, type,
> fold_convert_loc (loc, TREE_TYPE (op0),
> TREE_OPERAND (arg0, 1)), op1);
> protected_set_expr_location (tem, loc);
>
> here tem is built by
On Mon, Oct 26, 2009 at 5:37 PM, Aldy Hernandez wrote:
>> > ? ? ?tem = fold_build2_loc (loc, code, type,
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? fold_convert_loc (loc, TREE_TYPE (op0),
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TREE_OPERAND (arg0, 1)),
>> > op1);
>> > ? ? ?protected_set_expr_loc
On Mon, Oct 26, 2009 at 9:37 AM, Aldy Hernandez wrote:
> We have two options:
>
> a) Allow locus changes in fold_checksum_tree.
> b) Fix fold-const throughout to make a copy of the result of fold_build*
> calls if we're about to change it's location-- in case fold is returning
> any of the origina
> > ? ? ?tem = fold_build2_loc (loc, code, type,
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? fold_convert_loc (loc, TREE_TYPE (op0),
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TREE_OPERAND (arg0, 1)), op1);
> > ? ? ?protected_set_expr_location (tem, loc);
> >
> > When --enable-checking=fold, fold verifi
On Mon, Oct 26, 2009 at 4:39 PM, Aldy Hernandez wrote:
> Hi folks.
>
> In this PR the problem is that a call to fold_build2_loc() returns one
> of the original arguments unchanged. In the code below we take this
> result and change its location before returning it.
>
> tem = fold_build2_loc
Hi folks.
In this PR the problem is that a call to fold_build2_loc() returns one
of the original arguments unchanged. In the code below we take this
result and change its location before returning it.
tem = fold_build2_loc (loc, code, type,
fold_convert_loc (lo
10 matches
Mail list logo