Re: [patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-16 Thread Steven Bosscher
On Thu, Aug 16, 2012 at 4:24 PM, Michael Matz wrote: > Btw, then the comment is still wrong. You're returning the innermost > common outer loop, not the outermost (which would be trivial). I'll fix the comment. Ciao! Steven

Re: [patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-16 Thread Michael Matz
Hi, On Thu, 16 Aug 2012, Steven Bosscher wrote: > 2. In find_sibling_superloop the first step is to align the loop depth: >... > 3. Now that USE_LOOP and DEF_LOOP are at the same nesting depth, Ah, that's the crucial point I missed, the while loops starts out with loops at the same depth; yes

Re: [patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-16 Thread Steven Bosscher
On Thu, Aug 16, 2012 at 2:56 PM, Michael Matz wrote: > Hi, > > On Wed, 15 Aug 2012, Steven Bosscher wrote: > > Please convince me that this : > > +/* Return the outermost superloop LOOP of USE_LOOP that is a superloop of > + both DEF_LOOP and USE_LOOP. */ > +static inline struct loop * > +find_

Re: [patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-16 Thread Michael Matz
Hi, On Wed, 15 Aug 2012, Steven Bosscher wrote: Please convince me that this : +/* Return the outermost superloop LOOP of USE_LOOP that is a superloop of + both DEF_LOOP and USE_LOOP. */ +static inline struct loop * +find_sibling_superloop (struct loop *use_loop, struct loop *def_loop) +{ +

Re: [patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-16 Thread Richard Guenther
On Wed, Aug 15, 2012 at 6:26 PM, Steven Bosscher wrote: > Hello, > > This patch rewrites the rewriting part of > rewrite_into_loop_closed_ssa. This function took ~300s on the > simplified test case for PR54146, walking around the many thousands of > loops in the >400,000 basic blocks in the CFG, i

[patch] PR54146 - rewrite rewrite_into_loop_closed_ssa

2012-08-15 Thread Steven Bosscher
Hello, This patch rewrites the rewriting part of rewrite_into_loop_closed_ssa. This function took ~300s on the simplified test case for PR54146, walking around the many thousands of loops in the >400,000 basic blocks in the CFG, in compute_global_livein. For rewriting into LC-SSA, we can do bette