I think it's just the way that it's written, as it was suggested to me 
offline that this annotation is describing a list of blocks: header -> end. 
If this is true then it makes far more sense! Saying 'loop up to' has 
certain connotations for me.

I do have other questions about the properties of loops too though:
- Does the header have exactly one predecessor outside of the loop? 
- Is loop_end guaranteed to contain a backedge to the header?
- Are other blocks allowed to have an edge back to the header?

Thanks.



On Wednesday, June 25, 2025 at 1:47:57 PM UTC+1 in...@bnoordhuis.nl wrote:

> On Wed, Jun 25, 2025 at 12:06 PM Sam Parker-Haynes <sam.p...@arm.com> 
> wrote:
> >
> > Hi!
> >
> > I'm looking at the backend and the terminology used for loops is really 
> confusing me. AFAICT, in the backend there may be two special blocks for 
> loops but I can't say it makes any sense to me! Here's the code that is 
> boggling my mind:
> >
> > if (block->IsLoopHeader()) {
> > buffer << " (loop up to " << block->loop_end().ToInt() << ")";
> > }
> >
> > This seems to suggest that block->loop_end() is the first block inside 
> the loop, is this true?! If so, I hope it's clear why this is confusing :)
> >
> > cheers,
> > sam
>
> Nodes are visited in reverse post-order. Is that the source of the 
> confusion?
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/11a763be-a680-43cd-b93f-1fe47c74f3b9n%40googlegroups.com.

Reply via email to