]> git.ipfire.org Git - thirdparty/gcc.git/commit
gOlogy: fix debug binds in auto-inc-dec
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 6 Nov 2018 05:33:40 +0000 (05:33 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 6 Nov 2018 05:33:40 +0000 (05:33 +0000)
commit91c03124fcd1e652e225e16dde954efbb994543c
tree4933a94e1769bcaf6f900d46f2aadc5c98d0f3a6
parentce2ad8cc8f080890966b594453ff01e875605e66
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.

From-SVN: r265828
gcc/ChangeLog
gcc/auto-inc-dec.c