[PATCH 7/9] cprop: Leave RTX_FRAME_RELATED_P instructions alone
Segher Boessenkool
segher@kernel.crashing.org
Mon Aug 1 01:57:00 GMT 2016
Doing cprop on frame-related instructions blows up spectacularly.
So don't.
2016-06-07 Segher Boessenkool <segher@kernel.crashing.org>
* regcprop.c (copyprop_hardreg_forward_1): Don't change
RTX_FRAME_RELATED_P instructions.
---
gcc/regcprop.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 1498300..6aea74f 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -829,6 +829,10 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
}
}
+ /* Don't change prologue instructions. */
+ if (RTX_FRAME_RELATED_P (insn))
+ set = NULL;
+
/* Special-case plain move instructions, since we may well
be able to do the move from a different register class. */
if (set && REG_P (SET_SRC (set)))
--
1.9.3
More information about the Gcc-patches
mailing list