Re: Progress on GCC plugins ?

2007-11-25 Thread Taras Glek
Tom Tromey wrote: "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> And then, once the underlying problem is addressed and we Alexandre> have an API that is usable by regular users, maybe we will Alexandre> find out that we don't need plugins, after all. Plugin

GCC pretty printer + typedefs

2008-01-17 Thread Taras Glek
Hi, I am working on a static analysis plugin for Mozilla. I noticed the the C++ frontend has a very convenient pretty-printing API exposed through (decl|type)_as_string. I use decl_as_string() to get string representations of types. The scripts are interested in both kinds of types: the type n

GTY as attributes

2008-02-22 Thread Taras Glek
Hey Geoff, I've learned that you are the author of gengtype/GTY stuff from #gcc. Would you consider restructuring GTY markers to be more like GCC attributes? I'm writing code to generate code to convert GCC trees to JavaScript objects for my GCC plugin. Clearly this is similar to what gengtype

Re: New GCC ICI v0.9.5 (bug fixes + new examples)

2008-02-22 Thread Taras Glek
Hi Grigori, I work for Mozilla and recently we developed a few plugins for gcc and improvised a plugin interface to gcc to support it. So far we have been utilizing the C++ FE, but now I'm moving into yanking data out of the middleend. I think we should collaborate on the plugin interface and c

Re: [RFC] Remove -freorder-blocks-and-partition

2011-08-04 Thread Taras Glek
On 08/04/2011 06:39 AM, Jan Hubicka wrote: Also on the oriignal topic, Iknow that Mozlla folks experimented with this switch (and I do expect it should make noticeable reducion in the hot section footprint that is important for them). They are not using it at the moment because of problems with t

Re: Defining a common plugin machinery

2008-09-16 Thread Taras Glek
Basile STARYNKEVITCH wrote: Hello Diego and all, Diego Novillo wrote: After the FSF gives final approval on the plugin feature, we will need to coordinate towards one common plugin interface for GCC. I don't think we should be adding two different and incompatible plugin harnesses. What e

Re: Defining a common plugin machinery

2008-10-08 Thread Taras Glek
Grigori Fursin wrote: Thanks, Taras! I slightly updated this page, i.e. we would like to be able to load plugins through environment variables to be able to optimize programs transparently as it is done in MILEPOST GCC (without Makefile modifications). By the way, we plan to extend the Interacti

Re: Defining a common plugin machinery

2008-10-09 Thread Taras Glek
Hugh Leather wrote: Aye up all, I think the env var solution is easier for people to use and immediately understand. There would be nothing to stop those people who don't like env vars from using the shell wrapper approach. Why not allow both? I think the other replies addressed this que

Re: Defining a common plugin machinery

2008-10-09 Thread Taras Glek
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

Re: Defining a common plugin machinery

2008-10-10 Thread Taras Glek
Dave Korn Cc: 'Taras Glek'; 'Grigori Fursin'; 'Hugh Leather'; 'Basile STARYNKEVITCH'; gcc@gcc.gnu.org; 'Sean Callanan'; 'Cupertino Miranda'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; 'Taras Glek'; 'Diego Novillo'; 

Re: GCC Plug-in Framework ready to port

2009-01-31 Thread Taras Glek
Diego Novillo wrote: On Fri, Jan 30, 2009 at 23:01, Sean Callanan wrote: We've been off the ML for some time, but we're still out there. Is this something that is wanted, or have we been overtaken by events and should be porting to someone else's implementation? Thanks for raising th

Re: Plugin API Comments (was Re: GCC Plug-in Framework ready to port)

2009-02-02 Thread Taras Glek
Sean Callanan wrote: 1- Agree on a common API and document it in http://gcc.gnu.org/wiki/GCC_PluginAPI So to get the ball rolling, here are some comments on the API as documented: - (1) register_callback is an unnecessary API. It's already possible to use dlsym() to get a pointer to a s

Re: Plugin API Comments (was Re: GCC Plug-in Framework ready to port)

2009-02-02 Thread Taras Glek
Sean Callanan wrote: Benjamin, On Feb 2, 2009, at 2:15 PM, Benjamin Smedberg wrote: It's possible for the plugin to implement every possible dlsym entry point and then farm the calls out to each individual script pass internally, but since GCC is already going to have to maintain a list of ca

Re: Plugin API Comments (was Re: GCC Plug-in Framework ready to port)

2009-02-05 Thread Taras Glek
Le-Chun Wu wrote: Hi Sean, It's great that you updated the wiki page with the latest and more detailed API design. We (at Google) also started to look at the GCC plugin support a couple of weeks ago. We had a quick prototype implemented based on the original APIs that Taras put together in the

Re: [plugins] Comparison of plugin mechanisms

2009-02-17 Thread Taras Glek
Grigori Fursin wrote: Dear all, Zbigniew and I prepared a page on GCC Wiki comparing several current plugin mechanisms (some parts should be updated) with some suggestions to move forward: http://gcc.gnu.org/wiki/GCC_PluginComparison In case we mixed up or misunderstood something about other plu

Re: Restricted version for GCC?

2009-04-27 Thread Taras Glek
Adayadil Thomas wrote: Hi All, I was wondering if gcc had a restricted version which would enable me to write programs with a subset of C language. if you mean you want to prevent certain C features from being used, you can write a GCC plugin for it. See http://gcc.gnu.org/wiki/GCC_PluginAPI

plugin callbacks after compiler errors

2009-06-09 Thread Taras Glek
While developing my plugin I've noticed that many callbacks need to be guarded with "if (errorcount)" or the plugin will cause a gcc crash due to receiving less complete data than it expected. Should the plugin API guard callbacks in invoke_plugin_callbacks() to avoid 99% of plugins running in

Re: plugin callbacks after compiler errors

2009-06-09 Thread Taras Glek
Diego Novillo wrote: On Tue, Jun 9, 2009 at 15:33, Taras Glek wrote: While developing my plugin I've noticed that many callbacks need to be guarded with "if (errorcount)" or the plugin will cause a gcc crash due to receiving less complete data than it expected. More

[plugins] language makefiles and installing cp/ headers

2009-06-19 Thread Taras Glek
Hi, I tried to make my plugin compile using only installed headers and turned out that I needed more gcc headers to be installed. Unfortunately, I needed C++ headers which currently aren't installed. I modified the cp/Make-lang.in with logic copied from gcc/Makefile.in to add a c++.install-plu

Massive performance regression from switching to gcc 4.5

2010-06-24 Thread Taras Glek
Hi, Just wanted to give a heads up on what might be the biggest compiler-upgrade-related performance difference we've seen at Mozilla. We switched gcc4.3 for gcc4.5 and our automated benchmarking infrastructure reported 4-19% slowdown on most of our performance metrics on 32 and 64bit Linux.

Re: Massive performance regression from switching to gcc 4.5

2010-06-30 Thread Taras Glek
On 06/24/2010 12:06 PM, Andrew Pinski wrote: On Jun 24, 2010, at 11:50 AM, Taras Glek wrote: Hi, Just wanted to give a heads up on what might be the biggest compiler-upgrade-related performance difference we've seen at Mozilla. We switched gcc4.3 for gcc4.5 and our automated benchma

Re: Massive performance regression from switching to gcc 4.5

2010-06-30 Thread Taras Glek
On 06/30/2010 02:26 PM, Basile Starynkevitch wrote: On Wed, 2010-06-30 at 14:23 -0700, Taras Glek wrote: I tried 4.5 -O2 and it's actually faster than 4.3 -Os. I am happy that -O2 performance is actually pretty good, but -Os regression is going to hurt on mobile. Did you try gc

Crucial C++ inlining broken under -Os

2010-07-01 Thread Taras Glek
On 06/30/2010 03:06 PM, Jan Hubicka wrote: If you can find actual simple examples where -Os is losing size and speed we can try to do something about them. According to our code size reports, inlining is completely screwed for C++ wrapper classes like ones often used for smart pointers, arr

Re: Crucial C++ inlining broken under -Os

2010-07-01 Thread Taras Glek
On 07/01/2010 02:27 PM, Richard Guenther wrote: On Thu, Jul 1, 2010 at 10:29 PM, Taras Glek wrote: On 06/30/2010 03:06 PM, Jan Hubicka wrote: If you can find actual simple examples where -Os is losing size and speed we can try to do something about them. According to our code size reports

Re: Crucial C++ inlining broken under -Os

2010-07-01 Thread Taras Glek
On 07/01/2010 02:45 PM, Richard Guenther wrote: On Thu, Jul 1, 2010 at 11:36 PM, Taras Glek wrote: On 07/01/2010 02:27 PM, Richard Guenther wrote: On Thu, Jul 1, 2010 at 10:29 PM, Taras Glekwrote: On 06/30/2010 03:06 PM, Jan Hubicka wrote: If you can find actual simple examples where