This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: LOOP_HEADER tree code?


On 10/26/06, Jeffrey Law <law@redhat.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]