re PR debug/77844 (Compilation of simple C++ example exhaust memory)
authorJakub Jelinek <jakub@redhat.com>
Wed, 14 Dec 2016 19:40:05 +0000 (20:40 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 14 Dec 2016 19:40:05 +0000 (20:40 +0100)
commit53cfcb2e281f62ed8ea272846cf4971f2b0df229
tree3a8f07bc391a8e8a2435cdfbce0090522f1158cb
parent474da67ef9ec3658e4da9deb5373353532b2a840
re PR debug/77844 (Compilation of simple C++ example exhaust memory)

PR debug/77844
* valtrack.c: Include rtl-iter.h.
(struct rtx_subst_pair): Add insn field.
(propagate_for_debug_subst): If pair->to contains at least 2
regs, create a DEBUG_INSN with a debug temp before pair->insn
and replace from with the debug temp instead of pair->to.
(propagate_for_debug): Initialize p.insn.
* combine.c (insn_uid_check): New inline function.
(INSN_COST, LOG_LINKS): Use it instead of INSN_UID.
(find_single_use, combine_instructions,
cant_combine_insn_p, try_combine): Use NONDEBUG_INSN_P instead of
INSN_P.

* g++.dg/opt/pr77844.C: New test.

From-SVN: r243662
gcc/ChangeLog
gcc/combine.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr77844.C [new file with mode: 0644]
gcc/valtrack.c