This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make CSE path following use the CFG


Hi,

The TER changes uncovered a bug in libjava with my patch (it made the
compiler trip over the purge_all_dead_edges gcc_assert), so I've added
this hunk to deal with insns that may be trapping before the
validate_change (e.g. a load, where the load is replaced with a reg):

*************** cse_insn (rtx insn, rtx libcall_insn)
*** 4862,4867 ****
--- 4862,4875 ----

             validate_change (insn, &SET_SRC (sets[i].rtl), new, 1);
             apply_change_group ();
+
+             /* With non-call exceptions, if this was an insn that could
+                trap, me may have made it non-throwing now.  For example
+                we may have replaced a load with a register.  */
+             if (flag_non_call_exceptions
+                 && insn == BB_END (BLOCK_FOR_INSN (insn)))
+               purge_dead_edges (BLOCK_FOR_INSN (insn));
+
             break;
           }


I've re-retested it on i686 and x86_64, and I'm going to commit the patch tomorrow.

Gr.
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]