This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: flow_d_f_o_compute misnamed? (was: if-conversion a performance...)
- To: Michael Matz <matzmich at cs dot tu-berlin dot de>
- Subject: Re: flow_d_f_o_compute misnamed? (was: if-conversion a performance...)
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Sat, 06 May 2000 14:04:39 +1200 (NZST)
- Cc: Jeffrey A Law <law at cygnus dot com>, Richard Henderson <rth at cygnus dot com>,gcc at gcc dot gnu dot org
- References: <6780.957571481@upchuck><Pine.SOL.4.10.10005060226560.4463-100000@platon>
Michael Matz writes:
> If DFS first detects inner loops (after some thinking I see that too :))
> then some comments in flow_loops_find() are wrong (some say, they are
> searching for outer first), and flow_depth_first_order_compute() should be
> corrected to do what the name promises ;) Or do I miss something obvious?
Even though I wrote this, I cannot remember the details and
unfortunately I do not have my work book with me at present.
It is quite possible that my depth first search algorithm is wrong as
I am naive when it comes to graph theory. I vaguely recall converting
my original recursive algorithm to an iterative algorithm so I could
easily have made a mistake.
> I mean it works somehow right now, I'm not really sure if I can believe
> that such a central function is incorrect and nobody noticed.
Although the DFS algorithm may be wrong, it may have no effect on the
loop finding algorithm. For the latter, it is not essential that all
the outer loops in the CFG are found first but that with nested loops,
an inner loop is found after its containing outer loop. Possibly
my `DFS' algorithm also has this property?
Michael.