From patchwork Fri Sep 16 07:04:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: do not copy DEBUG_EXPRs in copy_insn Date: Thu, 15 Sep 2011 21:04:54 -0000 From: Alexandre Oliva X-Patchwork-Id: 114893 Message-Id: To: gcc-patches@gcc.gnu.org copy_rtx avoids duplicating DEBUG_EXPRs, so that they map one-to-one to DEBUG_EXPR_DECLs, but copy_insn lacks these smarts. This was exposed by a patch I'm working on, that uses RTL flags in DEBUG_EXPRs to speed up expansion of var location notes within var-tracking. Regstrapped on i686-pc-linux-gnu and x86_64-linux-gnu. Ok to install? for gcc/ChangeLog from Alexandre Oliva * emit-rtl.c (copy_insn_1): Do not copy DEBUG_EXPRs. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c.orig 2011-09-15 03:51:41.982777588 -0300 +++ gcc/emit-rtl.c 2011-09-15 03:51:50.767633680 -0300 @@ -5269,6 +5269,7 @@ copy_insn_1 (rtx orig) switch (code) { case REG: + case DEBUG_EXPR: case CONST_INT: case CONST_DOUBLE: case CONST_FIXED: