public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill  Tkachov <kyrylo.tkachov@foss.arm.com>
To: HEBBAL Yacine <y_hebbal@esi.dz>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Load and parse RTL from textual dump files
Date: Mon, 18 Dec 2017 12:31:00 -0000	[thread overview]
Message-ID: <5A37B508.4080209@foss.arm.com> (raw)
In-Reply-To: <CACEoar7HvfgxRSdAehVucm+0m8hRWVySPu3bmHCsGd=Ad0akFQ@mail.gmail.com>

Hi,

On 18/12/17 10:30, HEBBAL Yacine wrote:
> Hello,
> In one of my projects, I need to determine automatically what are the 
> names
> and types of data fields manipulated by functions in binary code of a 
> given
> program (e.g. Linux kernel).
> I found that RTL dumps contains most of information I need in a form very
> close to the one of the binary code.
> For this end, I need to parse generated RTL expressions in order to 
> extract
> operands properties.
> Is it possible to load and parse RTL expressions from textual dump files
> using existing code in GCC ? Thanks

Since version 7 GCC does contain functionality to parse RTL input.
This is mostly used for writing more targeted unit tests for the RTL passes.
Have a look at https://gcc.gnu.org/onlinedocs/gccint/RTL-Tests.html or 
grep for "__RTL"
in the gcc testsuite (gcc/testsuite in the source tree) to see examples 
of how it's used.

Not sure how useful it will be for large-scale analysis of source code 
though.
You may want to write/use a GCC plugin for that.

Kyrill

P.S. This list is used for discussions about the development of GCC itself.
For help using GCC please use the gcc-help list in the future.

  reply	other threads:[~2017-12-18 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 10:30 HEBBAL Yacine
2017-12-18 12:31 ` Kyrill Tkachov [this message]
2017-12-20  9:44   ` HEBBAL Yacine

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=5A37B508.4080209@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=y_hebbal@esi.dz \
    /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).