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] Fix PR52756


On 04/02/2012 08:42 AM, Richard Guenther wrote:
On Mon, 2 Apr 2012, Richard Guenther wrote:


After going through a gazillion of candidate fixes for PR52756, a case where jump threading destroys loops in a non-recoverable way, I settled with the following. The issue is that we thread both the loop latch and the loop entry edge but the code is not prepared for that. Another possible fix would be to unconditionally throw away threadings if we threaded the latch based on the fact that the rest of the edges no longer are loop entry edges (but threading them may create one, I think even still one that will end up creating a multiple entry loop).

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

And revealed one missed optimization, gcc.dg/tree-ssa/ssa-dom-thread-2.c


Thus the following is another try to fix things.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2012-04-02 Richard Guenther<rguenther@suse.de>

	PR tree-optimization/52756
	* tree-ssa-threadupdate.c (def_split_header_continue_p): New function.
	(thread_through_loop_header): After threading through the loop latch
	remove the split part from the loop and clear further threading
	opportunities that would create a multiple entry loop.

* gcc.dg/torture/pr52756.c: New testcase.
No objections assuming it tests OK.

jeff


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