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][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path


On 10/08/2015 03:56 AM, Richard Biener wrote:
On Thu, Oct 8, 2015 at 12:00 AM, Jeff Law <law@redhat.com> wrote:
On 10/07/2015 02:26 AM, Richard Biener wrote:


Hmm, other passes avoid all this by not removing edges or blocks
themselves but leaving that to cfgcleanup.  They simply replace the
condition in GIMPLE_CONDs or the switch value in GIMPLE_SWITCHes and
let cleanup_control_expr_graph do the hard part of the job.

Now - I don't know how that would interact with jump threads
covering those paths, that is, what kind of "mess" jump threading
would produce with the conditions/switches mangled that way.

The other nice thing is that CFG cleanup properly deals with loop
structure changes.

Threading will handle it correctly as that's essentially how we handled it
until last week ;-)

The "problem" is the threader thread through those blocks.  And while that
works correctly, it is quite wasteful in terms of compile time and memory
consumption due to the block duplication required to preserve side effects.
It also churns the blocks & ssa-names used in the isolated regions which
makes comparing debugging dumps before/after threading much harder than it
ought to be.

Yes, but as you remove jump threading paths you could leave the CFG change to
cfg-cleanup anyway?  To get better behavior wrt loop fixup at least?
So go ahead and detect, remove the threading paths, but leave final fixup to cfg-cleanup. I can certainly try that.

It'd actually be a good thing to experiement with regardless -- I've speculated that removing the edges in DOM allows DOM to do a better job, but never did the instrumentation to find out for sure. Deferring the final cleanup like you've suggested ought to give me most of what I'd want to see if there's really any good secondary effects of cleaning up the edges in DOM.

jeff


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