This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Make CSE path following use the CFG
> What do you think of the attached patch?
I think that the gcc_assert is too strong: set_unique_reg_note can
legitimately punt and, in this case, everything will be fine, so no need to
stop the compiler. You should also make the guard more consistent with
/* With non-call exceptions, if this was an insn that could
trap, we may have made it non-throwing now. For example
we may have replaced a load with a register. */
&& insn == BB_END (BLOCK_FOR_INSN (insn)))
purge_dead_edges (BLOCK_FOR_INSN (insn));
a few lines above: either both invoke may_trap_p (1 or 2 times), or both don't
However it seems to me that there are more cases in cse_insn that could cause
the compiler to stop on
/* If there are dead edges to purge, we haven't properly updated
the CFG incrementally. */
gcc_assert (!purge_all_dead_edges ());
Hence the question: can't we devise a general mechanism to update the CFG
incrementally in all cases, instead of handling them one by one?