From: Shubham Narlawar <gsocshubham@gmail.com>
To: GCC Development <gcc@gcc.gnu.org>
Subject: Query regarding generating NOTE instruction at GIMPLE level
Date: Mon, 7 Feb 2022 01:10:45 +0530 [thread overview]
Message-ID: <CAN=hqDDKgzBoh0nqrWbQ-4Diq7dp=c76q+msas1PuN+Zr4g23A@mail.gmail.com> (raw)
Hello,
Is it possible to generate a NOTE instruction at GIMPLE level?
My use case scenario is as below -
I want to create a note for __builtin_xyz(_x) such that there is a
placeholder just before function call and in RTL pass, I want to
modify/assign register number at this placeholder location.
_x = (unsigned int) _y;
__builtin_xyz(_x); //_x is constant expression
For above builtin function call, I want to insert a note just before the
function call. I tried generating GIMPLE_NOP instruction as below -
_x = (unsigned int) _y;
GIMPLE_NOP
__builtin_xyz(_x);
But as per my understanding, a NOTE instruction behaves similar to
GIMPLE_NOP that is to create a placeholder for some computation.
1. Is there any attribute that can be added to GIMPLE instruction? If yes,
then there must be a mechanism that translates those attributes to NOTE
instructions in the RTL pass?
2. Is there any different approach on achieving above goal?
Thanks and Regards,
Shubham
next reply other threads:[~2022-02-06 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 19:40 Shubham Narlawar [this message]
2022-02-07 9:17 ` Richard Biener
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='CAN=hqDDKgzBoh0nqrWbQ-4Diq7dp=c76q+msas1PuN+Zr4g23A@mail.gmail.com' \
--to=gsocshubham@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).