public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hanke Zhang <hkzhang455@gmail.com>
To: gcc@gcc.gnu.org
Subject: The order of loop traversal in gcc
Date: Mon, 25 Sep 2023 11:52:43 +0800	[thread overview]
Message-ID: <CAM_DAs-oM=-zYJajcTMeP2AsMQSb2q2k_RHCGq29XVCCT51vjg@mail.gmail.com> (raw)

Hi, I have recently been working on loops in gcc, and I have some
questions about the loop traversal.

I use loops_list(cfun, LI_ONLY_INNERMOST) to traverse the loops in my
pass to obtain the loop.

I found that the order of traversal and the order of actual
instruction execution will be different.

Sometimes it's the exact opposite, and sometimes it's sequential. I
would like to ask how to predict its behavior? And what method should
I use if I want to obtain sequential traversal?

Thanks.
Hanke Zhang.

             reply	other threads:[~2023-09-25  3:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25  3:52 Hanke Zhang [this message]
2023-09-25  5:46 ` Richard Biener
2023-09-25  8:11   ` Hanke Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM_DAs-oM=-zYJajcTMeP2AsMQSb2q2k_RHCGq29XVCCT51vjg@mail.gmail.com' \
    --to=hkzhang455@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).