diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-26 12:48:05 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-26 12:48:05 +0100 |
commit | 45399fdc7c120342bb1b84595e0d54deb58c7235 (patch) | |
tree | 26b1069c17b0e7061e660af8f998563a8d4a12e3 /gcc/dce.c | |
parent | 79fbdeb87e6e91a8179465ea56007e493c7ca751 (diff) | |
download | gcc-45399fdc7c120342bb1b84595e0d54deb58c7235.zip gcc-45399fdc7c120342bb1b84595e0d54deb58c7235.tar.gz gcc-45399fdc7c120342bb1b84595e0d54deb58c7235.tar.bz2 |
re PR rtl-optimization/83985 (Compile time hog for 32-bit BE powerpc targets)
PR rtl-optimization/83985
* dce.c (deletable_insn_p): Return false for separate shrink wrapping
REG_CFA_RESTORE insns.
(delete_unmarked_insns): Don't ignore separate shrink wrapping
REG_CFA_RESTORE insns here.
* gcc.dg/pr83985.c: New test.
From-SVN: r257087
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -131,6 +131,12 @@ deletable_insn_p (rtx_insn *insn, bool fast, bitmap arg_stores) && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER) return false; + /* Callee-save restores are needed. */ + if (RTX_FRAME_RELATED_P (insn) + && crtl->shrink_wrapped_separate + && find_reg_note (insn, REG_CFA_RESTORE, NULL)) + return false; + body = PATTERN (insn); switch (GET_CODE (body)) { @@ -592,15 +598,6 @@ delete_unmarked_insns (void) if (!dbg_cnt (dce)) continue; - if (crtl->shrink_wrapped_separate - && find_reg_note (insn, REG_CFA_RESTORE, NULL)) - { - if (dump_file) - fprintf (dump_file, "DCE: NOT deleting insn %d, it's a " - "callee-save restore\n", INSN_UID (insn)); - continue; - } - if (dump_file) fprintf (dump_file, "DCE: Deleting insn %d\n", INSN_UID (insn)); |