From c391bd50824e79a4639490952e08f5f98fb0029a Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Wed, 11 Apr 2018 17:36:04 +0300 Subject: sched-deps: respect deps->readonly in macro-fusion (PR 84566) PR rtl-optimization/84566 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking sched_macro_fuse_insns. From-SVN: r259322 --- gcc/ChangeLog | 6 ++++++ gcc/sched-deps.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b24df79..39230d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2018-04-11 Alexander Monakov + PR rtl-optimization/84566 + * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking + sched_macro_fuse_insns. + +2018-04-11 Alexander Monakov + PR target/84301 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here... (compute_block_dependences): ... from here. diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 9a5cbeb..120b5f0 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2897,7 +2897,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn) && code == SET); /* Group compare and branch insns for macro-fusion. */ - if (targetm.sched.macro_fusion_p + if (!deps->readonly + && targetm.sched.macro_fusion_p && targetm.sched.macro_fusion_p ()) sched_macro_fuse_insns (insn); -- cgit v1.1