On 10/26/06, Devang Patel <[EMAIL PROTECTED]> wrote:
On 10/25/06, Steven Bosscher <[EMAIL PROTECTED]> wrote:
> You could use TREE_USED, but your suggestion implies that dead code
> should be retained in the program,
May be I misunderstood, but it is not dead code. Here is what Zdenek said,
"
...
To keep the information valid, we need
> > to prevent optimizations from destroying it (e.g., if the number
> > is n_1 = n_2 - 1, and this is the last use of n_1, we do not want
> > DCE to remove it);
..."
So you would mark n_1 with TREE_USED, and never let it be removed?
What would happen if e.g. the entire loop turns out to be dead code?
Or if the loop is rewritten (e.g. vectorized) in a way that changes
the number of iterations of the loop? Then the assignment to n_1 would
be _really_ dead, but there wouldn't be any way to tell.
The nice thing about the LOOP_HEADER node is that it makes these uses
of SSA names explicit.
Gr.
Steven