This is the mail archive of the
mailing list for the GCC project.
Re: COND_EXPR lowering patch
On Mon, 2003-08-25 at 18:00, Zdenek Dvorak wrote:
> No, it will happen always -- you cannot create a condition in lowered
> for that would not be marked useful.
sure we can.
> uh? Then you probably have other idea about the shape "lowered
> COND_EXPRs" should have. In what I do, this would look like
> if (a)
> goto x;
> goto y;
> goto z;
If we change the algorithm to not use parent_stmt, and instead use
control dependence information, I see no reason why this wouldn't be
explicit GOTO's will never be marked as necessary by the algorithm. They
are implicited marked based on whether the edge remains or not.
so If i understand what this is going to look like:
(void)0 // A
(void)0 // B
Marking 'stmt' as necessary is not going to mark any control stmts as
necessary. When using control dependancies, only *conditional* control
flow on dependant edges gets marked, so the goto's are not.
If we had a stmt in location A or B, then the if (a) would be marked as
necessary since it is a conditional control flow stmt on a control
Right now, if there is a PHI node in block 3, then we would mark the
conditional as necessayr because the PHI node may have to insert copies
on one or both of the conditional 's branches. That then only condition
under which the if() in block 0 would remain.