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] for PR 14229


Zdenek Dvorak wrote:
this patch should fix the problem, by preventing us from trying
to eliminate the jumps with side effects in try_simplify_condjump.

	PR optimization/14229
	* cfgcleanup.c (try_simplify_condjump): Do not try to clean up
	jump with side effects.

I don't see why this is necessary.


You said it is to prevent a condjump with side-effects from being deleted, but I don't see where that is happening. It looks like the only things we do to cbranch_insn is invert_jump and tidy_fallthru_edges. invert_jump won't delete the branch, it just inverts the branch. And tidy_fallthru_edges won't delete the branch, as rtl_tidy_fallthru_edges already has a test for onlyjump_p.

So what is the real problem here?

Your patch makes sense, and the fact that it works is good, but I'd like to be convinced that it is necessary to disable the optimization in this case. I haven't seen that yet. I need an analysis of the problem, and why the patch fixes it.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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