diff options
author | Peter Bergner <bergner@gcc.gnu.org> | 2018-10-04 08:36:20 -0500 |
---|---|---|
committer | Peter Bergner <bergner@gcc.gnu.org> | 2018-10-04 08:36:20 -0500 |
commit | 82957a739c9ed37cc78d3cabfc61d04549e65867 (patch) | |
tree | c6391a013b017f1777208b69af63b59bb49804f7 /gcc/ira-lives.c | |
parent | ac712e4eb43f3dd8d7f12624ea4014ecb2a9cf34 (diff) |
re PR rtl-optimization/87466 (IRA and LRA spill all pseudos that are live across setjmp calls)
gcc/
PR rtl-optimization/87466
* target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
* doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
* doc/tm.texi: Regenerate.
* ira-lives.c (process_bb_node_lives): Use the new target hook.
* lra-lives.c (process_bb_lives): Likewise.
* config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
Define.
gcc/testsuite/
PR rtl-optimization/87466
* gcc.target/powerpc/pr87466.c: New test.
From-SVN: r264842
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r-- | gcc/ira-lives.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index ab8ad4a0589..f1a7d2797b2 100644 --- a/gcc/ira-lives.c +++ b/gcc/ira-lives.c @@ -1207,8 +1207,9 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node) call, if this function receives a nonlocal goto. */ if (cfun->has_nonlocal_label - || find_reg_note (insn, REG_SETJMP, - NULL_RTX) != NULL_RTX) + || (!targetm.setjmp_preserves_nonvolatile_regs_p () + && (find_reg_note (insn, REG_SETJMP, NULL_RTX) + != NULL_RTX))) { SET_HARD_REG_SET (OBJECT_CONFLICT_HARD_REGS (obj)); SET_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj)); |