From: Richard Biener <richard.guenther@gmail.com>
To: Qing Zhao <QING.ZHAO@oracle.com>
Cc: Richard Sandiford <richard.sandiford@arm.com>,
gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: How to traverse all the local variables that declared in the current routine?
Date: Tue, 24 Nov 2020 08:32:20 +0100 [thread overview]
Message-ID: <CAFiYyc3p19U9tJPCdch+GyDLdj9N9Eq3PWTFHwdguVfCAdW7zw@mail.gmail.com> (raw)
In-Reply-To: <EBAE1FD7-0440-42FA-AE07-7F98F9552610@ORACLE.COM>
On Tue, Nov 24, 2020 at 12:05 AM Qing Zhao via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> Does gcc provide an iterator to traverse all the local variables that are declared in the current routine?
>
> If not, what’s the best way to traverse the local variables?
Depends on what for. There's the source level view you get by walking
BLOCK_VARS of the
scope tree, theres cfun->local_variables (FOR_EACH_LOCAL_DECL) and
there's SSA names
(FOR_EACH_SSA_NAME).
Richard.
>
> Thanks.
>
> Qing
next prev parent reply other threads:[~2020-11-24 7:32 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 23:05 Qing Zhao
2020-11-24 7:32 ` Richard Biener [this message]
2020-11-24 15:47 ` Qing Zhao
2020-11-24 15:55 ` Richard Biener
2020-11-24 16:54 ` Qing Zhao
2020-11-25 9:11 ` Richard Biener
2020-11-25 17:41 ` Qing Zhao
2020-12-01 19:47 ` Qing Zhao
2020-12-02 8:45 ` Richard Biener
2020-12-02 15:36 ` Qing Zhao
2020-12-03 8:45 ` Richard Biener
2020-12-03 16:07 ` Qing Zhao
2020-12-03 16:36 ` Richard Biener
2020-12-03 16:40 ` Qing Zhao
2020-12-03 16:56 ` Richard Sandiford
2020-11-26 0:08 ` Martin Sebor
2020-11-30 16:23 ` Qing Zhao
2020-11-30 17:18 ` Martin Sebor
2020-11-30 23:05 ` Qing Zhao
2020-12-03 17:32 ` Richard Sandiford
2020-12-03 23:04 ` Qing Zhao
2020-12-04 8:50 ` Richard Biener
2020-12-04 16:19 ` Qing Zhao
2020-12-07 7:12 ` Richard Biener
2020-12-07 16:20 ` Qing Zhao
2020-12-07 17:10 ` Richard Sandiford
2020-12-07 17:36 ` Qing Zhao
2020-12-07 18:05 ` Richard Sandiford
2020-12-07 18:34 ` Qing Zhao
2020-12-08 7:35 ` Richard Biener
2020-12-08 7:40 ` Richard Biener
2020-12-08 19:54 ` Qing Zhao
2020-12-09 8:23 ` Richard Biener
2020-12-09 15:04 ` Qing Zhao
2020-12-09 15:12 ` Richard Biener
2020-12-09 16:18 ` Qing Zhao
2021-01-05 19:05 ` The performance data for two different implementation of new security feature -ftrivial-auto-var-init Qing Zhao
2021-01-05 19:10 ` Qing Zhao
2021-01-12 20:34 ` Qing Zhao
2021-01-13 7:39 ` Richard Biener
2021-01-13 15:06 ` Qing Zhao
2021-01-13 15:10 ` Richard Biener
2021-01-13 15:35 ` Qing Zhao
2021-01-13 15:40 ` Richard Biener
2021-01-14 21:16 ` Qing Zhao
2021-01-15 8:11 ` Richard Biener
2021-01-15 16:16 ` Qing Zhao
2021-01-15 17:22 ` Richard Biener
2021-01-15 17:57 ` Qing Zhao
2021-01-18 13:09 ` Richard Sandiford
2021-01-18 16:12 ` Qing Zhao
2021-02-01 19:12 ` Qing Zhao
2021-02-02 7:43 ` Richard Biener
2021-02-02 15:17 ` Qing Zhao
2021-02-02 23:32 ` Qing Zhao
2020-12-07 17:21 ` How to traverse all the local variables that declared in the current routine? Richard Sandiford
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=CAFiYyc3p19U9tJPCdch+GyDLdj9N9Eq3PWTFHwdguVfCAdW7zw@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=QING.ZHAO@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
/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).