[Bug debug/54971] SRA pessimizes debug info by not creating debug stmts for fields without replacements

jamborm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 22 14:56:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54971

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-10-22 14:55:35 UTC ---
Unfortunately, the patch causes -fcompare-debug issues.  The problem
is that with it we create some declarations only when producing debug
info which can affect UIDs which then changes other stuff.

I tried producing DEBUG_EXPR_DECLs instead of regular decls but
SET_DECL_DEBUG_EXPR does not accept DEBUG_EXPR_DECLs as an argument,
it insists on VAR_DECLs.  I tried removing the checking restriction
but it turned out that using DEBUG_EXPR_DECLs does not fix the
testcase.  Jakub, do you think that can be fixed or are
DEBUG_EXPR_DECLs a completely different thing that principally canno
be used for this purpose?

Another alternative is to build full-fledged replacement decls even
when not producing debug info, even though we'd never use it.  That
seems slightly wasteful but can be done.  (Some reworking of
replacement building would be probably required so that we get rid of
lazy replacement building which is no longer necessary).



More information about the Gcc-bugs mailing list