On 10/26/06, Jeffrey Law <[EMAIL PROTECTED]> wrote:
> So, the passes that maniuplate loop structure need to know about > LOOP_HEADER and others do not need to worry about LOOP_HEADER. Passes which do code motions may need to know about it -- they don't need to update its contents, but they may need to be careful about how statements are moved around in the presence of a LOOP_HEADER note.
It is not a note, it's a statement. The problem with RTL loop notes was that they were not statements, but rather markers, e.g. "a loop starts/ends here". The LOOP_HEADER node, on the other hand, is more like a placeholder for the result of the number of iterations computation. Basically it is a statement that does not produce a result, but does have uses. I don't see why a code motion pass would have to worry about the LOOP_HEADER node. The LOOP_HEADER node is before the loop, IIUC, so any code moved out of the loop would not affect the value of the use operand for the LOOP_HEADER (by definition, because we're in SSA form so DEFs inside the loop can't reach the LOOP_HEADER node). Gr. Steven