Re: Extending GCC with new optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 21, 2012 at 2:10 PM, Tomasz Jankowski <tomcioj@xxxxxxxxx> 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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux