[tree-ssa] Another bug in local static variables

Jan Hubicka hubicka@ucw.cz
Sat Oct 18 21:55:00 GMT 2003


> Rather than pile up hacks like this, we should fix the representation
> problem.  I would think that a simple fix would be to use the local decl
> for statics.  In copy_body_r, rather than use remap_decl for autos, we
> should just do a splay tree lookup and use the result if it's there.

As I understand it, we must duplicate the decls in BIND_EXPR to get
debugging right and also becuase single decl can not apepar in mulitple
BIND_EXPRs.

On the other hand if we duplicate decls inside the function body, we
will end up with single variable referred by multiple decls everywhere
(imagine two inline versions of function in one body) that will
completely confuse tree-ssa.  Having to look for abstract orgin each
time looks pretty expensive.

Do you have some better idea how to fix this?
Honza
> 
> Jason



More information about the Gcc-patches mailing list