This is the mail archive of the 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] Trivial cleanup


On Mon, 30 Sep 2013, Jeff Law wrote:

> >   - the compiler better do an awesome job of sharing stack  space for
> > user variables in a function... I wouldn't want to blow up the stack
> > with a bazillion unrelatd temps each wit their own location.
> If the objects have the same type and disjoint lifetimes, they can be easily
> shared.
> Things are more difficult if the types are different

Not anymore.  We adjust the alias machinery when merging differently typed 
variables into the same stack slot, see update_alias_info_with_stack_vars.

> -- IIRC, the root 
> of the problem is the optimizers can interchange a load of one type with 
> a later store of the other -- the aliasing code says "hey, they're 
> different types, so they don't alias, feel free to move them around as 
> desired" and all hell breaks loose.

That was the problem once, yes.  Meanwhile we should have fairly decent 
stack slot reuse, especially with variables declared in different scopes 
(since the end-of-scope CLOBBERs), for non-SSA_NAME temps that is.  For 
the others it's the register allocator anyway that has to do a decent job 
(and it does).


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