public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sandeep K Chaudhary <babbusandy2006@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: GIMPLE pass - Assignment evaluation
Date: Tue, 02 Jul 2013 03:24:00 -0000	[thread overview]
Message-ID: <CAEEAEzWhzF=4hQ-CNybsHSENWvGTEDXtmCGaMy1YC8DN9GXuOA@mail.gmail.com> (raw)

Hi guys,

I am writing a GIMPLE pass in which I need to inspect the assignments.
For example, for the below statements, I need to find the value of the
second and third assignments which are '2' and '7'.

VAR1 = 1;
VAR1++;
VAR1 = VAR1 + 5;

But the GIMPLE IR only has the following statements i.e. no optimization.

  VAR1_2 = 1;
  VAR1_3 = VAR1_2 + 1;
  VAR1_4 = VAR1_3 + 5;

How can I make it perform calculations on RHS? Are there some flags
that I can enable?

Also, I thought of going with RTL passes but RTL IR seems too complex
for my use and also it's not suitable for high level optimizations.
Please suggest.

--
Thanks and regards,
Sandeep K Chaudhary.

             reply	other threads:[~2013-07-02  3:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02  3:24 Sandeep K Chaudhary [this message]
2013-07-02  5:44 ` Marc Glisse
2013-07-02 17:09   ` Sandeep K Chaudhary
2013-07-10  8:18     ` Sandeep K Chaudhary
2013-12-09 23:05 Sandeep K Chaudhary
2013-12-16 21:10 Sandeep K Chaudhary
2013-12-17  1:33 ` David Malcolm
2013-12-17  6:24   ` Sandeep K Chaudhary
2013-12-17  6:41     ` Uday P. Khedker
2013-12-17  7:26       ` Sandeep K Chaudhary

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='CAEEAEzWhzF=4hQ-CNybsHSENWvGTEDXtmCGaMy1YC8DN9GXuOA@mail.gmail.com' \
    --to=babbusandy2006@gmail.com \
    --cc=gcc-help@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).