-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/01/11 09:49, Jakub Jelinek wrote: > Hi! > > As discussed in the PR, in 4.7 we regressed some GDB testcases, > because previously unused addressable vars were first previously > optimized into non-addressable and only afterwards removed (which > results in correct debug stmts covering those assignments), but > after some recent changes it is CDDCE that removes them before they > are update_address_taken optimized. > > In the PR I've offered a patch to schedule another > update_address_taken pass before first cddce, but Michael is right > that perhaps some other DCE pass could have similar issue. > > So this patch instead, if the DCEd var stores have addressable lhs, > but with is_gimple_reg_type types, we add debug stmts even for > them. Such variables aren't target_for_debug_bind though, which > breaks var-tracking. So, the patch if all occurrences of the var > are optimized away, just clears TREE_ADDRESSABLE bit like > update_address_taken would, and, if that didn't happen until > expansion, just ignores those debug stmts so that var-tracking > isn't upset by seing non-tracked vars in debug insns. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2011-12-01 Jakub Jelinek <ja...@redhat.com> > > PR debug/50317 * tree-ssa-dce.c (remove_dead_stmt): Add a debug > stmt when removing as unnecessary a store to a variable with gimple > reg type. * tree-ssa-live.c (remove_unused_locals): Clear > TREE_ADDRESSABLE bit on local unreferenced variables. * cfgexpand.c > (expand_gimple_basic_block): Don't emit DEBUG_INSNs for > !target_for_debug_bind variables. OK. Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJO17rmAAoJEBRtltQi2kC7q8EH/1VnjCdoj8E59TJENYmD0Kx9 dP1zeN8uxlD0goVoSum8FbYArL4cbaajPgA+I1+hlGIBK2htl+fSwKiKaq7i6wNT r21GL27JVtGdPNjDh37Srb3DvgmtKBCP9iSqZDjaO8xAB0zjnoTsYwlx3EfdWi8C aSuJsAEqAshaU+GptWzG0CsXe5R+XQB10c+RGP5MFpsRpzWVHPXFOZ6yUmFF0EOO 4MI5eHM+C5j0W4NigpZL18YAjEQBsH+ricgO6xjg/XAU3ro5hOidlno4F71+6wCO q24Mr8RMTpEe+TZE18GLx9iNrIUShDXTqjAwt1fvYVxi96hGgwAyU4BywruXNII= =Eg48 -----END PGP SIGNATURE-----