gOlogy: fix debug binds in auto-inc-dec
commitf21023fe45b35a62d8ce9e3fe0c0a99070488acc
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Nov 2018 05:33:40 +0000 (6 05:33 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Nov 2018 05:33:40 +0000 (6 05:33 +0000)
tree4933a94e1769bcaf6f900d46f2aadc5c98d0f3a6
parentaacb9bddd52eefaab4865f04f66460a20dde91bc
gOlogy: fix debug binds in auto-inc-dec

As auto_inc_dec pass combines incs and mems from different insns, it
often causes regs to temporarily hold a value different from the one
it would before the transformation.  Debug insns within that range
would therefore end up binding to the wrong expression after the
transformation.

This patch adjusts debug binds in the affected range.

for  gcc/ChangeLog

* auto-inc-dec.c: Include valtrack.h.  Improve comments.
(reg_next_debug_use): New.
(attempt_change): Propagate adjusted expression into affected
debug insns.
(merge_in_block): Track uses in debug insns.
(pass_inc_dec::execute): Allocate and release
reg_next_debug_use.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265828 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/auto-inc-dec.c