This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tree sharing issues...
> In message <20031119225619.GR11681@kam.mff.cuni.cz>, Jan Hubicka writes:
> >> In message <20031119224619.GP11681@kam.mff.cuni.cz>, Jan Hubicka writes:
> >> >> >OK, I will extend my sharing test by is_gimple_min_invariant. Does t
> >hat
> >> >> >look right?
> >> >> is_gimple_min_invariant (blah) && ! IS_EMPTY_STMT (blah) since I
> >> >> believe the empty statement is (void) 0, but is not shared.
> >> >>
> >> >> Ugh.
> >> >OK, another positive:
> >> >../../gcc/caller-save.c:370: error: Wrong sharing of tree nodes
> >> ># hard_regs_to_save_6 = VDEF <hard_regs_to_save_624>;
> >> >hard_regs_to_save[1] = T.329_1370;
> >> >
> >> >hard_regs_to_save[1];
> >> >
> >> >../../gcc/caller-save.c:370: error: Wrong sharing of tree nodes
> >> ># hard_regs_to_save_143 = VDEF <hard_regs_to_save_81>;
> >> >hard_regs_to_save[1] = T.339_1393;
> >> >
> >> >hard_regs_to_save[1];
> >> >
> >> >../../gcc/caller-save.c:370: error: Wrong sharing of tree nodes
> >> ># hard_regs_to_save_623 = VDEF <hard_regs_to_save_488>;
> >> >hard_regs_to_save[1] = T.349_1416;
> >> >
> >> >hard_regs_to_save[1];
> >> >
> >> >../../gcc/caller-save.c:370: error: Wrong sharing of tree nodes
> >> ># hard_regs_to_save_80 = VDEF <hard_regs_to_save_5>;
> >> >hard_regs_to_save[1] = T.357_1437;
> >> >
> >> >hard_regs_to_save[1];
> >> >
> >> >
> >> >This looks wrong. Seems to happen during jump threading...
> >> I'm not sure why we wouldn't be sharing that node
> >> (hard_regs_to_save[1]).
> >>
> >> Diego?
> >I can add it into my definition of shareable nodes, if you tell me how
> >to recognize these.
>
> TREE_ADDRESSABLE (var)
> || decl_function_context (var) != current_function_decl
> || may_aliases (var)
>
> Or something close to that.
I am already allowing sharing of all DECL_P nodes. The node above is
ARRAY_REF with constant operand, isn't it? So I need some kind of test
"if array_ref is having all arguments constant, then it can be shared"
or am I wrong?
Honza
>
> Jeff
>
>