public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Tomasz Jankowski <tomcioj@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Extending GCC with new optimization
Date: Wed, 22 Aug 2012 07:51:00 -0000	[thread overview]
Message-ID: <CAKOQZ8xwyiu7WNwqQFerD1arHB6QEFh0o8Kwnw_4ueVSMnsRYQ@mail.gmail.com> (raw)
In-Reply-To: <CAMxYpJzO0wE6bw+bpWq9Yo-SpKCk=TF+=4Y0P_4S6pVP2r5HDQ@mail.gmail.com>

On Tue, Aug 21, 2012 at 2:10 PM, Tomasz Jankowski <tomcioj@gmail.com> wrote:
>
> I'm investigating where to start and I'm overwhelmed with compilation
> process, so I'd like to ask you on which passes I should focus and
> where I actually should start.
>
> I have to find arithmetical operations in input source code and
> implement them using specific processor instructions on my CPU.

That sounds like a machine-specific issue that could be implemented in
your CPU.md file.  It depends on what you mean by "arithmetical
operations," I suppose.

> First of all I don't see any pass related to RTL representation in GCC
> plugin events (file plugin.def), so is it possible to create GC plugin
> modifying RTL representation at all?

Call register_pass.

> 1. Add somehow (so far I don't know how) custom CPU instructions to GCC code.

Adding new CPU instructions is entirely a function of the CPU.md file.
 That is something that you can not do using a plugin.

> 2. Operate on RTL representation of basic blocks (I can modify RTL
> representations by adding and removing instructions?).

Yes.

Ian

      reply	other threads:[~2012-08-21 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17  8:38 Tomasz Jankowski
2012-08-18 17:09 ` Ian Lance Taylor
2012-08-21 22:57   ` Tomasz Jankowski
2012-08-22  7:51     ` Ian Lance Taylor [this message]

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=CAKOQZ8xwyiu7WNwqQFerD1arHB6QEFh0o8Kwnw_4ueVSMnsRYQ@mail.gmail.com \
    --to=iant@google.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=tomcioj@gmail.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).