This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Defining a common plugin machinery
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Taras Glek'" <tglek at mozilla dot com>, "'Grigori Fursin'" <grigori dot fursin at inria dot fr>
- Cc: "'Hugh Leather'" <hughleat at hotmail dot com>, "'Brendon Costa'" <bcosta at avdat dot com dot au>, "'Basile STARYNKEVITCH'" <basile at starynkevitch dot net>, <gcc at gcc dot gnu dot org>, "'Sean Callanan'" <spyffe at cs dot sunysb dot edu>, "'Cupertino Miranda'" <cupertino dot miranda at inria dot fr>, <clattner at apple dot com>, <iant at google dot com>, "'Taras Glek'" <taras dot judge at shaw dot ca>, "'Diego Novillo'" <dnovillo at google dot com>, "'Mike O'Boyle'" <mob at inf dot ed dot ac dot uk>
- Date: Thu, 9 Oct 2008 17:42:43 +0100
- Subject: RE: Defining a common plugin machinery
- References: <48CF93F7.8010901@google.com> <48CF9C94.9010809@starynkevitch.net> <48D0286D.8020302@mozilla.com> <48e33659.0c58560a.6454.7b17@mx.google.com> <48E37481.7040803@hotmail.com> <BLU142-DAV64A066DB0D1D85765DD4BC1420@phx.gbl> <BLU142-DAV87E6265C2FA71995506F8C1420@phx.gbl> <48E39F49.7000109@starynkevitch.net> <BLU142-DAV8B305E041FCFFDCCDAA8FC1420@phx.gbl> <48E4180C.90103@avdat.com.au> <48E45457.2090408@starynkevitch.net> <48E461CA.9030808@avdat.com.au> <48E46A64.9060406@starynkevitch.net> <48EA89AB.6080707@mozilla.com> <48eda3c7.0405560a.7aa9.1031@mx.google.com> <48EDA48E.6060004@mozilla.com> <48EDA5D7.2050305@avdat.com.au> <48eda87d.0437560a.43f7.11c2@mx.google.com> <BLU142-DAV8F41EC60D9554F88946FAC13A0@phx.gbl> <48EE2D04.40503@mozilla.com> <48ee3113.1c365e0a.6675.0c91@mx.google.com> <48EE333A.9020708@mozilla.com>
Taras Glek wrote on 09 October 2008 17:37:
> Grigori Fursin wrote:
>> Well, we need to return values or even structures using plugins for our
>> MILEPOST project
>> to tune cost models. A simple example is loop unrolling: in our current
>> plugin implementation (MILEPOST GCC/ICI) we register a plugin function
>> that will predict loop unrolling and pass some
>> code features to it (code size, etc) whenever loop unrolling is
>> performed. Then the plugin communicates with the predictive model server
>> (implemented in MATLAB) and returns a loop unrolling factor (as an
>> integer). However, we will need to return more complex structures in
>> case of polyhedral optimizations in GCC 4.4 (GRAPHITE) or other
>> optimizations/code generation...
>>
> So what would you propose we do about return values? Some sort of
> pointer, or a code suggesting that the caller look up a variable some
> where? Or should we just suggest using void*event_data to pass a struct
> with fields to be used as outparams(I like this idea as it means no
> changes are needed :)?
Sounds like you're almost in need of a generic data marshalling interface
here.
It would be really neat if you could figure out a way to specify these
structs and their values as RTX. Any plugin API could then be passed an RTX
with all its args in a parallel, and could return an rtx likewise.
cheers,
DaveK
--
Can't think of a witty .sigline today....