aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-int.h
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2018-12-14 11:49:28 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2018-12-14 11:49:28 +0000
commitf961ec70ee07768f87e9e2ce2b3cac4160fd065e (patch)
tree126a1387fed88b90136c7fc4ca7555804788d726 /gcc/lra-int.h
parent65e0a92b2353927e50a26a3a0628a36aebc85b40 (diff)
downloadgcc-f961ec70ee07768f87e9e2ce2b3cac4160fd065e.zip
gcc-f961ec70ee07768f87e9e2ce2b3cac4160fd065e.tar.gz
gcc-f961ec70ee07768f87e9e2ce2b3cac4160fd065e.tar.bz2
Fix LRA bug
This patch fixes an ICE building libgfortran/random.c. The problem was an adddi3 instruction that had an eliminable frame pointer. GCN adddi3 includes a match_scratch, which LRA substitutes with a REG, and checks if it can be converted back to a scratch afterwards. In the meantime, the add was converted to a move, meaning that the instruction pattern completely changed, thus causing a segfault when the instruction is revisited in restore_scratches. 2018-12-14 Andrew Stubbs <ams@codesourcery.com> gcc/ * gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter. * gcc/lra-remat.c (update_scratch_ops): Pass icode to lra_register_new_scratch_op. * gcc/lra.c (struct sloc): Add icode field. (lra_register_new_scratch_op): Add icode parameter. Use icode to skip insns that have changed beyond recognition. From-SVN: r267132
Diffstat (limited to 'gcc/lra-int.h')
-rw-r--r--gcc/lra-int.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lra-int.h b/gcc/lra-int.h
index dc365d7..6e0eb96 100644
--- a/gcc/lra-int.h
+++ b/gcc/lra-int.h
@@ -336,7 +336,7 @@ extern void lra_create_copy (int, int, int);
extern lra_copy_t lra_get_copy (int);
extern bool lra_former_scratch_p (int);
extern bool lra_former_scratch_operand_p (rtx_insn *, int);
-extern void lra_register_new_scratch_op (rtx_insn *, int);
+extern void lra_register_new_scratch_op (rtx_insn *, int, int);
extern int lra_new_regno_start;
extern int lra_constraint_new_regno_start;