This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: tree-ssa-sink breaks stack layout


On Wed, Apr 01, 2009 at 11:12:51AM +0200, Richard Guenther wrote:
> This alias sets are conflicting check was added for the very same reason - to
> paper over bugs that may appear otherwise due to RTL scheduling of loads/stores
> which may make life-ranges of stack variables which share their stack slot
> overlapping.  The theory is that the scheduler won't do such thing if the
> alias sets conflict (which is of course not exactly true if you can disambiguate
> using offsets, so you can still get overlapping lifetime of a whole struct just
> not individual parts ... if that will break anything is another question).

Maybe this is hopelessly naive of me... but doesn't the above sound
like one of these uses is "must conflict" and the other is "may
conflict"?  In other words, the previous paper could be moved and
avoid this bug without reintroducing the previous one.

alias_sets_must_conflict_p is used directly for type-punning warnings.
objects_must_conflict_p is used for stack slot sharing in cfgexpand
and to find an available temporary slot in assign_stack_temp_for_type.
The only way that any other uses pass through
alias_sets_must_conflict_p is via alias_sets_conflict_p.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]