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


> 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.  */
	      if (flag_non_call_exceptions
		  && 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 
invoke it.

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?

-- 
Eric Botcazou


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