ANN: gcc-python-plugin 0.10

2012-08-30 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings for C/C++ in Python, generate code visualizations, etc. It comes with cpychecker: a tool for static analysis tool of CPython extensions. Tarball releases

gcc-c-api

2012-09-07 Thread David Malcolm
After a hiatus, I've restarted work on an API for GCC plugins - specifically, a C API (given that my plugin is written in C, I have more interest in that than a C++ API). BTW, how many other GCC plugins are written in C? It's still a work-in-progress, but can be seen here:

Re: gcc-c-api

2012-09-10 Thread David Malcolm
On Mon, 2012-09-10 at 13:54 +0200, Michael Matz wrote: Hi, On Mon, 10 Sep 2012, Richard Guenther wrote: Thoughts? Micha was also working on the proposed introspection API, I blame him for not posting anything about this despite it's being ready since a few months... He. I

Re: gcc-c-api

2012-09-10 Thread David Malcolm
On Mon, 2012-09-10 at 17:20 +0200, Michael Matz wrote: Hi David, On Mon, 10 Sep 2012, David Malcolm wrote: Is it possible for you to post your work-in-progress code somewhere? Attached. Many thanks for posting this! Various comments inline below. I know that you don't feel it's

Re: gcc-c-api

2012-09-19 Thread David Malcolm
On Tue, 2012-09-11 at 11:17 +0200, Richard Guenther wrote: Sorry for the belated response; various comments inline throughout... On Tue, Sep 11, 2012 at 3:10 AM, David Malcolm dmalc...@redhat.com wrote: On Mon, 2012-09-10 at 17:20 +0200, Michael Matz wrote: Hi David, On Mon, 10 Sep 2012

DECL_STRUCT_FUNCTION(cgraphnode-decl) == NULL when attempting Link-Time Optimization in plugin

2012-10-08 Thread David Malcolm
I'm working on a static analysis extension to GCC via my gcc-python-plugin [1] The analysis is interprocedural (memory leak detection, as it happens). I have it working on one translation unit at a time, and I'm attempting to get it to work within Link Time Optimization so that it can see the

Re: DECL_STRUCT_FUNCTION(cgraphnode-decl) == NULL when attempting Link-Time Optimization in plugin

2012-10-08 Thread David Malcolm
On Mon, 2012-10-08 at 18:21 +0200, Richard Guenther wrote: On Mon, Oct 8, 2012 at 5:17 PM, David Malcolm dmalc...@redhat.com wrote: I'm working on a static analysis extension to GCC via my gcc-python-plugin [1] The analysis is interprocedural (memory leak detection, as it happens). I

Re: testing that a Gimple call argument is a string...

2012-10-18 Thread David Malcolm
On Thu, 2012-10-18 at 22:33 +0200, Basile Starynkevitch wrote: Hello I'm coding in MELT the ex06/ of https://github.com/bstarynk/melt-examples/ which should typecheck calls to variadic functions json_pack json_unpack from http://www.digip.org/jansson (a JSON library in C). I'm working on

Re: GCC 4.8.0 Status Report (2012-10-29), Stage 1 to end soon

2012-11-05 Thread David Malcolm
On Wed, 2012-10-31 at 11:13 +0100, Richard Biener wrote: On Mon, Oct 29, 2012 at 6:56 PM, Jakub Jelinek ja...@redhat.com wrote: Status == I'd like to close the stage 1 phase of GCC 4.8 development on Monday, November 5th. If you have still patches for new features you'd like to

ANN: gcc-python-plugin 0.11

2012-11-29 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with gcc-with-cpychecker, which implements static analysis passes for GCC aimed at finding bugs in

Re: Ways to add source annotations to a loop

2012-12-03 Thread David Malcolm
On Mon, 2012-12-03 at 12:19 +0100, Richard Biener wrote: On Mon, Dec 3, 2012 at 11:05 AM, Alexey Kravets mr.kayr...@gmail.com wrote: Hello, I am looking for a way to implement source annotation (or something similar) for a for loops. Basically, I need some mechanism to mark certain for

Re: Long term viability of GCC (was Re: gcc : c++11 : full support : eta?)

2013-01-24 Thread David Malcolm
On Wed, 2013-01-23 at 19:59 +, Alec Teal wrote: On 23/01/13 19:38, Diego Novillo wrote: [ We have drifted way off the original subject. ] On Wed, Jan 23, 2013 at 2:16 PM, Uday Khedker u...@cse.iitb.ac.in wrote: Yes, absolutely. And GCC community should consider it important to

RFC: firehose : an interchange format (and code) for static code analysis results

2013-01-30 Thread David Malcolm
[I hope this is sufficiently on-topic for the gcc ML: it is likely to be of interest to people using gcc plugins to do static analysis, and also touches on gcc output; my apologies if it isn't] I've been working on running various static analysis tools on a large subset of the packages in Fedora,

Re: gengtype and inheritance

2013-04-03 Thread David Malcolm
On Thu, 2013-03-28 at 10:06 -0400, Diego Novillo wrote: On Thu Mar 28 08:53:03 2013, Richard Biener wrote: Eh - in fact you _promised_ to do that in trade for accepting the C++ conversion! Never trust promises from google ... *sigh* You need to calm down. This childish attitude is

Re: gengtype and inheritance

2013-04-03 Thread David Malcolm
On Wed, 2013-04-03 at 12:29 -0400, Diego Novillo wrote: On 2013-04-03 12:09 , David Malcolm wrote: I tried grepping for these, but didn't see any. Where are these? Is this in svn trunk, or in a branch? vec and edge_def. You need to grep for 'GTY((user))'. Many thanks; got it now. [I

ANN: gcc-python-plugin 0.12

2013-04-04 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with gcc-with-cpychecker, which implements static analysis passes for GCC aimed at finding bugs in

Identifying global state within GCC

2013-05-01 Thread David Malcolm
I had a go at writing a custom pass to try to locate places where GCC makes use of global state. You can see the pass here (which I implemented using gcc-python-plugin): https://gcc-python-plugin.readthedocs.org/en/latest/working-with-c.html#finding-global-variables A build log from recompiling

Re: Identifying global state within GCC

2013-05-02 Thread David Malcolm
On Thu, 2013-05-02 at 12:38 -0400, David Malcolm wrote: On Thu, 2013-05-02 at 07:20 -0600, Jeff Law wrote: On 05/01/2013 02:32 PM, David Malcolm wrote: I had a go at writing a custom pass to try to locate places where GCC makes use of global state. You can see the pass here (which I

Plan for removing global state from GCC's internals

2013-06-26 Thread David Malcolm
I've been looking at removing global state from GCC with a view to making it be usable as a shared library. I've been posting various patches relating to this, but I thought it was time to post a comprehensive plan so you can see how I think it all ought to fit together. You can see an HTML

Re: Plan for removing global state from GCC's internals

2013-06-26 Thread David Malcolm
:46 PM, David Malcolm wrote: I've been looking at removing global state from GCC with a view to making it be usable as a shared library. I've been posting various patches relating to this, but I thought it was time to post a comprehensive plan so you can see how I think it all ought

Re: Plan for removing global state from GCC's internals

2013-06-26 Thread David Malcolm
On Wed, 2013-06-26 at 20:21 +, Joseph S. Myers wrote: For a shared library you need a well-defined namespace for GCC functions / variables so it doesn't interfere with users. Are you going to put everything inside a gcc namespace or similar? FWIW I deliberately avoided talking about

Re: Plan for removing global state from GCC's internals

2013-06-27 Thread David Malcolm
On Thu, 2013-06-27 at 14:50 +, Joseph S. Myers wrote: On Wed, 26 Jun 2013, David Malcolm wrote: FWIW I wonder to what extent the discussions that follow all exhibit a tradeoff between the desire to provide a clean API vs the desire to minimize the size of the patch (to reduce

Re: Plan for removing global state from GCC's internals

2013-07-01 Thread David Malcolm
On Thu, 2013-06-27 at 20:23 +, Joseph S. Myers wrote: On Thu, 27 Jun 2013, David Malcolm wrote: I want to focus on removal of global state, and I want that to be separate from cleanups of internal APIs. There are several interpretations of the word global in this conversation, and I

Re: Plan for removing global state from GCC's internals

2013-07-02 Thread David Malcolm
On Mon, 2013-07-01 at 19:43 +, Joseph S. Myers wrote: On Mon, 1 Jul 2013, David Malcolm wrote: [...] Would you be in favor killing off these macros: #define input_line LOCATION_LINE (input_location) #define input_filename LOCATION_FILE (input_location) #define in_system_header

Re: Plan for removing global state from GCC's internals

2013-07-02 Thread David Malcolm
it but no one was interested. On 1 July 2013 20:43, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 1 Jul 2013, David Malcolm wrote: As for accessing globals directly versus via APIs: yes, I suppose you do still have an access to a global class instance in each place you formerly

Re: List of dead links.

2013-07-10 Thread David Malcolm
On Wed, 2013-07-10 at 16:00 +0200, Ondřej Bílka wrote: Dead link: http://fedora.linux.duke.edu/fc1_x86_64 FWIW, this link occurs in historical notes at the top of these files: zlib/contrib/inflate86/inffas86.c zlib/contrib/masmx64/inffas8664.c dated Dec-29-2003 describing specific testing

Re: converting rtx object to the assembly instruction.

2013-08-14 Thread David Malcolm
On Wed, 2013-08-14 at 11:53 +0300, Viktor Pobedin wrote: On 8/13/2013 10:37 PM, Richard Sandiford wrote: Viktor Pobedinviktor.pobe...@gmail.com writes: Is there a simple way to convert rtx object to the assemble insutruction? Ideally I would like to have function something like:

Re: Recent libstdc++-v3 regressions (PCHs related?!?)

2013-08-20 Thread David Malcolm
On Tue, 2013-08-20 at 14:03 +0200, Paolo Carlini wrote: Hi, sorry it the issue is by now well known but... I see many libstdc++-v3 regressions on at least x86_64-linux. When running the libstdc++-v3 testsuite (which uses PCHs) one gets tons of new fails like the below. That's annoying, a

Re: Recent libstdc++-v3 regressions (PCHs related?!?)

2013-08-20 Thread David Malcolm
On Tue, 2013-08-20 at 10:41 -0400, David Malcolm wrote: On Tue, 2013-08-20 at 14:03 +0200, Paolo Carlini wrote: Hi, sorry it the issue is by now well known but... I see many libstdc++-v3 regressions on at least x86_64-linux. When running the libstdc++-v3 testsuite (which uses PCHs

Re: Recent libstdc++-v3 regressions (PCHs related?!?)

2013-08-20 Thread David Malcolm
On Tue, 2013-08-20 at 17:02 +0200, Paolo Carlini wrote: Hi, On 08/20/2013 04:41 PM, David Malcolm wrote: On Tue, 2013-08-20 at 14:03 +0200, Paolo Carlini wrote: Hi, sorry it the issue is by now well known but... I see many libstdc++-v3 regressions on at least x86_64-linux. When

Re: Recent libstdc++-v3 regressions (PCHs related?!?)

2013-08-20 Thread David Malcolm
On Tue, 2013-08-20 at 21:26 -0400, David Malcolm wrote: On Tue, 2013-08-20 at 17:02 +0200, Paolo Carlini wrote: Hi, On 08/20/2013 04:41 PM, David Malcolm wrote: On Tue, 2013-08-20 at 14:03 +0200, Paolo Carlini wrote: Hi, sorry it the issue is by now well known but... I see many

Re: [PR43721] Failure to optimise (a/b) and (a%b) into single call

2013-09-03 Thread David Malcolm
On Tue, 2013-09-03 at 12:57 +0200, Richard Biener wrote: On Fri, Jun 21, 2013 at 4:12 AM, Kugan kugan.vivekanandara...@linaro.org wrote: On 17/06/13 19:07, Richard Biener wrote: On Mon, 17 Jun 2013, Kugan wrote: Hi, I am attempting to fix Bug 43721 - Failure to optimise (a/b) and

Re: where to insert a new Simple IPA [measuring] pass from a plugin ?

2013-09-30 Thread David Malcolm
On Mon, 2013-09-30 at 15:49 +0200, Basile Starynkevitch wrote: Hello, I want to insert, thru a plugin, a new IPA pass which won't change any internal representation but will just count Gimples and functions at the IPA level. (for what it is worth, the plugin is MELT http://gcc-melt.org/

Re: Getting the ARC port reviewed and accepted

2013-10-02 Thread David Malcolm
On Wed, 2013-10-02 at 15:59 +0200, Richard Biener wrote: On Wed, Oct 2, 2013 at 3:49 PM, Andrew Haley a...@redhat.com wrote: On 10/02/2013 01:46 PM, David Edelsohn wrote: On Wed, Oct 2, 2013 at 4:31 AM, Andrew Haleya...@redhat.com wrote: On 10/02/2013 12:47 AM, David Edelsohn wrote:

libgccjit.so: an embeddable JIT-compilation library based on GCC

2013-10-09 Thread David Malcolm
As some may have seen I posted a patch to gcc-patches that adds a way to embed GCC as a shared library, for Just-In-Time compilation, for use e.g. by bytecode interpreters: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00228.html I've gone ahead and created a git-only on the mirror as branch

Re: libgccjit.so: an embeddable JIT-compilation library based on GCC

2013-10-10 Thread David Malcolm
On Thu, 2013-10-10 at 09:56 -0400, David Edelsohn wrote: On Wed, Oct 9, 2013 at 5:31 PM, David Malcolm dmalc...@redhat.com wrote: Some questions for the GCC steering committee: * is this JIT work a good thing? (I think so, obviously, but can I go ahead and e.g. add it to the wiki

Mailing list for the JIT project

2013-10-14 Thread David Malcolm
The libgccjit project now has a mailing list: jit AT gcc.gnu.org (am crossposting this there) This is intended for both users and developers of the library. You can subscribe by emailing jit-subscribe AT gcc.gnu.org The archives (not much there yet) can be seen at:

Re: GIMPLE pass - Assignment evaluation

2013-12-16 Thread David Malcolm
On Mon, 2013-12-16 at 16:10 -0500, Sandeep K Chaudhary wrote: Hi Guys, I am writing a GIMPLE pass in which I need to inspect the assignments. For example, for the below statements, I need to find the value of the second and third assignments which are '2' and '7'. VAR1 = 1; VAR1++; VAR1

Re: Remove spam in GCC mailing list

2013-12-19 Thread David Malcolm
On Fri, 2013-12-20 at 00:04 +, Jonathan Wakely wrote: On 19 December 2013 23:15, Tae Wong wrote: More spam posts to be removed! Using an email address with seo in it makes you look like a spammer. Posting links to spam makes you look like a spammer. Posting meaningless crap about

Re: checking GPL compatibility in MELT meta-plugin

2014-01-23 Thread David Malcolm
On Thu, 2014-01-23 at 22:28 +0100, Basile Starynkevitch wrote: Hello All, [GCC list, MELT group, and David Malcolm -python plugin- and Diego Novillo -plugin enthusiast maintainer] Reminder: IANAL, ie I (Basile) am not a lawyer! But I am a free software enthusiast and I like a lot the GPLv3

Re: Can Some one please help me on this gcc plugin..

2014-03-05 Thread David Malcolm
On Wed, 2014-03-05 at 21:58 +0530, Mohsin Khan wrote: Hi, I am developing plugins for the GCC-4.8.2. I am a newbie in plugins. I wrote a plugin and tried to count and see the Goto Statements using the gimple_stmt_iterator. I get gimple statements printed on my stdout, but I am not able to

Re: use of sphinx/rest as source for GNAT doc

2014-05-23 Thread David Malcolm
On Fri, 2014-05-23 at 17:23 +0200, Arnaud Charlet wrote: At AdaCore, we have switched most of our product documentation the rest/sphinx format: http://sphinx-doc.org/ which provides most of the advantages of texinfo (text format, can generate output in multiple formats, supported by free

mn10300, invariants on DEP_PRO/DEP_CON and on TARGET_SCHED_ADJUST_COST params

2014-07-08 Thread David Malcolm
[CCing nickc, who wrote the mn10300 hook in question] I'm experimenting with separating out instructions from expressions in RTL; see [1] for more info on that. I noticed that mn10300 has this implementation of a target hook: #define TARGET_SCHED_ADJUST_COST mn10300_adjust_sched_cost Within

Re: mn10300, invariants on DEP_PRO/DEP_CON and on TARGET_SCHED_ADJUST_COST params

2014-07-11 Thread David Malcolm
On Fri, 2014-07-11 at 10:13 +1200, Maxim Kuvyrkov wrote: On Jul 9, 2014, at 8:21 AM, David Malcolm dmalc...@redhat.com wrote: [CCing nickc, who wrote the mn10300 hook in question] I'm experimenting with separating out instructions from expressions in RTL; see [1] for more info

Slides from Cauldron talks

2014-07-23 Thread David Malcolm
I didn't see a place to post slides for Cauldron talks, so am posting links to them here. Just-In-Time compilation using GCC (libgccjit.so) === HTML slides: http://dmalcolm.fedorapeople.org/presentations/cauldron-2014/jit/ Source code used for

Re: Symtab node table introduction and GGC issues

2014-07-24 Thread David Malcolm
my last two changes, r201865 and r201864 2013-08-20 David Malcolm dmalc...@redhat.com Revert my last two changes, r201865 and r201864: Revert r201865: 2013-08-20 David Malcolm dmalc...@redhat.com Make opt_pass and gcc::pass_manager be GC

Prototype of a --report-bug option

2014-07-29 Thread David Malcolm
. at Red Hat we have our own bugzilla instance, with a different set of custom fields). Thoughts? Dave # Copyright 2014 David Malcolm dmalc...@redhat.com # Copyright 2014 Red Hat, Inc. # # This is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public

Re: [GNU Tools Cauldron 2014] libgccjit.so

2014-08-06 Thread David Malcolm
On Tue, 2014-08-05 at 03:18 +0530, Prathamesh Kulkarni wrote: Hi, Please find attached my notes on libgccjit.so - An experimental JIT library using GCC as backend. I would be grateful if you would review it for me. Looks good to me Dave

Re: [GNU Tools Cauldron 2014] A proposal for type-safe RTL

2014-08-06 Thread David Malcolm
On Tue, 2014-08-05 at 03:20 +0530, Prathamesh Kulkarni wrote: Hi, Please find attached my notes on A proposal on type-safe RTL. I would be grateful if you would review it for me. Thanks, Prathamesh A proposal for type-safe RTL Author: David Malcolm RTL is a low-level

Re: [PATCH] gcc parallel make check

2014-09-10 Thread David Malcolm
On Wed, 2014-09-10 at 11:19 -0700, Mike Stump wrote: On Sep 9, 2014, at 8:14 AM, VandeVondele Joost joost.vandevond...@mat.ethz.ch wrote: Attached is a further revision of the patch, now dealing with check-c++. So when last I played in this area, I wanted a command line tool that would

Re: Is this a compiler bug?

2014-09-22 Thread David Malcolm
On Sun, 2014-09-21 at 22:15 -0700, Andrew Pinski wrote: On Sun, Sep 21, 2014 at 8:08 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: On Sun, Sep 21, 2014 at 07:57:45PM -0700, Andrew Pinski wrote: On Sun, Sep 21, 2014 at 6:56 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote:

Re: Is this a compiler bug?

2014-09-22 Thread David Malcolm
On Mon, 2014-09-22 at 16:32 +0200, Jakub Jelinek wrote: On Mon, Sep 22, 2014 at 10:22:59AM -0400, David Malcolm wrote: On Sun, 2014-09-21 at 22:15 -0700, Andrew Pinski wrote: On Sun, Sep 21, 2014 at 8:08 PM, Steve Kargl s...@troutmask.apl.washington.edu wrote: On Sun, Sep 21, 2014

ANN: gcc-python-plugin 0.13

2014-09-30 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with gcc-with-cpychecker, which implements static analysis passes for GCC aimed at finding bugs in

Re: plugins header file

2014-10-15 Thread David Malcolm
On Tue, 2014-10-14 at 15:40 -0400, Andrew MacLeod wrote: On 09/15/2014 02:18 PM, Andrew MacLeod wrote: During the re-architecture session at Cauldron, I mentioned the possibility of introducing a plugin-headers.h. This would be a file which plugins could use which would protect them

Re: GCC 5.0 Status Report (2014-11-03), Stage 1 ends Nov 15th

2014-11-03 Thread David Malcolm
On Mon, 2014-11-03 at 10:18 +0100, Jakub Jelinek wrote: Status == The trunk is scheduled to transition from Stage 1 to Stage 3 at the end of Saturday, November 15th (use your timezone to your advantage). We have been in Stage 1 for almost 7 months now with a fortnight

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread David Malcolm
On Sat, 2014-11-08 at 13:07 +0100, Richard Biener wrote: On Fri, Nov 7, 2014 at 10:01 PM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Nov 7, 2014 at 4:21 PM, David Malcolm dmalc...@redhat.com wrote: gcc/ChangeLog.gimple-classes: * tree-ssa-tail-merge.c (same_succ_hash

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-10 Thread David Malcolm
On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: To be constructive here - the above case is from within a GIMPLE_ASSIGN case label and thus I'd have expected case GIMPLE_ASSIGN: { gassign *a1

Merge of jit branch to svn trunk as r217374

2014-11-11 Thread David Malcolm
I've merged the dmalcolm/jit git branch into svn trunk, as r217374. [1] The git branch is now retired; future bugfixing will happen on svn trunk. I've created a jit component within the gcc.gnu.org/bugzilla, within the gcc product, with dmalc...@gcc.gnu.org as the default assignee. Please let me

Re: libgomp: GNU OpenMP Runtime Library (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost))

2014-11-12 Thread David Malcolm
On Wed, 2014-11-12 at 12:33 +0100, Jakub Jelinek wrote: On Wed, Nov 12, 2014 at 12:18:13PM +0100, Thomas Schwinge wrote: On Wed, 12 Nov 2014 11:06:26 +0100, Jakub Jelinek ja...@redhat.com wrote: On Tue, Nov 11, 2014 at 01:53:23PM +, Julian Brown wrote: --- a/libgomp/configure.ac

Re: libgomp: GNU OpenMP Runtime Library (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost))

2014-11-12 Thread David Malcolm
On Wed, 2014-11-12 at 14:47 +0100, Jakub Jelinek wrote: On Wed, Nov 12, 2014 at 08:33:34AM -0500, David Malcolm wrote: Apologies for bikeshedding, and I normally dislike cute names, but renaming it to GNU Offloading and Multi Processing library would allow a backronym of libgomp

Re: libgomp: GNU OpenMP Runtime Library (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost))

2014-11-12 Thread David Malcolm
On Wed, 2014-11-12 at 21:30 +0100, Jakub Jelinek wrote: On Wed, Nov 12, 2014 at 03:22:21PM -0500, David Malcolm wrote: On Wed, 2014-11-12 at 14:47 +0100, Jakub Jelinek wrote: On Wed, Nov 12, 2014 at 08:33:34AM -0500, David Malcolm wrote: Apologies for bikeshedding, and I normally dislike

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-12 Thread David Malcolm
On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: On Sat, Nov 08, 2014 at 01:07:28PM +0100

[PATCH] Add gimple-compat.h (was Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign)

2014-11-14 Thread David Malcolm
On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm dmalc...@redhat.com wrote: On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Nov 10, 2014 at 05:27

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-15 Thread David Malcolm
On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm dmalc...@redhat.com wrote: On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Nov 10, 2014 at 05:27

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-17 Thread David Malcolm
On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm dmalc...@redhat.com wrote: On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm dmalc...@redhat.com wrote: On Tue, 2014-11-11 at 11:43

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-18 Thread David Malcolm
On Tue, 2014-11-18 at 10:53 +0100, Richard Biener wrote: On Tue, Nov 18, 2014 at 2:59 AM, David Malcolm dmalc...@redhat.com wrote: On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm dmalc...@redhat.com wrote: On Thu, 2014-11-13 at 11

Re: David Malcolm as JIT subsystem maintainer

2014-12-01 Thread David Malcolm
On Wed, 2014-11-26 at 10:17 -0700, Jeff Law wrote: I'm pleased to announce that David Malcolm been appointed as maintainer for the GCC JIT subsystem. David, please add yourself as the maintainer for that code in the MAINTAINERS file. I believe you have some patches to review and approve

ANN: gcc-python-plugin 0.6

2011-08-02 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. Tarball releases are available at: https://fedorahosted.org/releases/g/c/gcc-python-plugin/

gcc-python-plugin finds its first bug in itself

2011-08-05 Thread David Malcolm
gcc-python-plugin [1] now provides a gcc-with-cpychecker harness that runs gcc with an additional pass that checks CPython API calls (internally, it's using the gcc python plugin to run a python script that does the work). I tried rebuilding the plugin using make

Re: role of dump_file notably for/in plugins?

2011-08-31 Thread David Malcolm
On Wed, 2011-08-31 at 16:28 +0200, Richard Guenther wrote: On Wed, Aug 31, 2011 at 4:24 PM, Basile Starynkevitch bas...@starynkevitch.net wrote: Hello Folks What is the intended role of the dump_file [the one known in tree-pass.h near line 101] for plugins? May plugins print their

Re: adding destroyable objects into Ggc

2011-10-19 Thread David Malcolm
On Wed, 2011-10-19 at 00:45 -0500, Gabriel Dos Reis wrote: On Wed, Oct 19, 2011 at 12:22 AM, Chiheng Xu chiheng...@gmail.com wrote: I recommend people interested in automatic dynamic memory management to read this book: Garbage Collection: Algorithms For Automatic Dynamic Memory

ANN: gcc-python-plugin 0.7

2011-11-29 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with cpychecker, which implements static analysis passes for GCC aimed at finding bugs in CPython

Working with frontend-specific aspects of GCC from a GCC plugin

2011-11-30 Thread David Malcolm
I maintain gcc-python-plugin [1]. I'm hoping to expose the function decl_as_string() from the C++ frontend from within my plugin. Unfortunately, given that that symbol is defined within gcc/cp/error.c, it is only defined within the C++ frontend: cc1plus. This works OK when my plugin is

Re: Working with frontend-specific aspects of GCC from a GCC plugin

2011-11-30 Thread David Malcolm
On Wed, 2011-11-30 at 15:06 -0500, David Malcolm wrote: [...snip...] Any thoughts on how to address this? Are there any other approaches I've missed? Answering my own question, Dave Korn pointed out in another thread: http://gcc.gnu.org/ml/gcc/2011-01/msg00310.html that one can use dlsym

Re: Suspicion of regression in uninitialized value detection

2011-12-06 Thread David Malcolm
On Tue, 2011-12-06 at 16:40 +0100, David Brown wrote: On 06/12/2011 16:27, Robert Dewar wrote: On 12/6/2011 10:18 AM, David Brown wrote: Unfortunately, there are no such tools available that compare with gcc and its warnings. ... And there are large, expensive commercial tools that

Access to unused global variable declarations from a plugin

2012-01-05 Thread David Malcolm
I'm working on a GCC plugin which performs static analysis of Python extension code [1] In various places I need access to a VAR_DECL for various globals from C code, many of which potentially aren't used directly within the compilation unit. For example, I may need to reference this global:

ANN: gcc-python-plugin 0.8

2012-01-10 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with gcc-with-cpychecker, which implements static analysis passes for GCC aimed at finding bugs in

Re: New GCC plugin: gcc-python-plugin

2012-01-14 Thread David Malcolm
On Wed, 2011-06-22 at 08:19 +0200, Jakub Jelinek wrote: Hi! On Tue, Jun 21, 2011 at 07:52:27PM -0400, David Malcolm wrote: I'm not yet familiar with the details of the gcc GC, but it appears that GTY() annotations are preprocessed to generate traversal code used by a mark-and-sweep

Re: Access to source code from an analyser

2012-01-19 Thread David Malcolm
On Thu, 2012-01-19 at 14:06 +0100, Alberto Lozano Alelu wrote: Hello. Thanks for your fast response. With expand_location I get struct expanded_location which has these fields: type = struct { const char *file; int line; int column; unsigned char sysp; } But it

ANN: gcc-python-plugin 0.9

2012-02-06 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings in Python, generate code visualizations, etc. It ships with gcc-with-cpychecker, which implements static analysis passes for GCC aimed at finding bugs in

Re: GCC GCOV

2012-02-10 Thread David Malcolm
On Thu, 2012-02-09 at 15:52 -0800, Satya Prakash Prasad wrote: Hi All, I am a new joinee to this group and a C/C++ developer for around 2 yrs. What interest me most is gcc / gcov combination output. It list the code execution details. Is there a possibility that gcc build binaries can

Re: GCC GCOV

2012-02-10 Thread David Malcolm
On Fri, 2012-02-10 at 12:14 -0800, Satya Prakash Prasad wrote: Thanks for the info Dave. I downloaded the tar ball but facing issues while building it: This is probably more appropriate for the plugin's mailing list: https://fedorahosted.org/mailman/listinfo/gcc-python-plugin rather than the

Re: Iterating over RTL in Graphite

2012-02-17 Thread David Malcolm
On Thu, 2012-02-16 at 19:17 -0400, Arnaldo wrote: Hello everyone, I'm working on an extension to the Graphite pass of GCC 4.4.0. My intention is to associate costs to RTL instructions by adding them as RTX attributes to a machine description file, and to read them back during the Graphite

Re: GCC 4.7.0RC: Mangled names in cc1

2012-03-09 Thread David Malcolm
On Fri, 2012-03-09 at 11:41 +0100, Ludovic Courtès wrote: Hi, Andrew Pinski pins...@gmail.com skribis: 2012/3/9 Ludovic Courtès ludovic.cour...@inria.fr: I believe this is not intentional, right? No, this is intentional. We bootstrap the compiler using the C++ front-end now. We

PyCon 2012 talk on gcc-python-plugin

2012-03-13 Thread David Malcolm
I gave a talk at PyCon 2012 on Friday about my Python plugin for GCC, how this lowers the barrier for entry to potential GCC hackers, and how I've been using this to find reference-counting errors in 3rd-party Python C extensions. A video of the talk can be seen here:

GCC 5? (was Re: GCC 4.7.0RC: Mangled names in cc1)

2012-03-16 Thread David Malcolm
On Fri, 2012-03-16 at 16:17 +0100, Ludovic Courtès wrote: Hello, Richard Guenther richard.guent...@gmail.com skribis: 2012/3/16 Ludovic Courtès ludovic.cour...@inria.fr: [...] Well, if you invent new paradigms Hmm, I didn’t invent anything here. in your plugin that are not

Configure-time testing for GCC plugins to determine C vs C++? (Was Re: status of GCC C++)

2012-03-26 Thread David Malcolm
On Sun, 2012-03-25 at 22:10 +0200, Basile Starynkevitch wrote: On Sun, 25 Mar 2012 20:30:31 +0200 Basile Starynkevitch bas...@starynkevitch.net wrote: How can a plugin know that cc1 was compiled with C++ or just with plain C? I don't really know (we do have GCCPLUGIN_VERSION, but should a

Re: Configure-time testing for GCC plugins to determine C vs C++? (Was Re: status of GCC C++)

2012-03-26 Thread David Malcolm
On Mon, 2012-03-26 at 17:07 +, Joseph S. Myers wrote: On Mon, 26 Mar 2012, David Malcolm wrote: Presumably a fix would be for the plugin's configuration phase to have a test that tries to build a test plugin and run it, first building with a C compiler, then a C++ compiler

Proposed plugin API for GCC

2012-03-29 Thread David Malcolm
I had a go at writing a possible plugin API for GCC, and porting parts of my python plugin to it: http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=36a0d6a45473c39db550915f8419a794f2f5653e It's very much at the crude early prototype stage - all I've wrapped is part of

Re: Proposed plugin API for GCC

2012-03-30 Thread David Malcolm
On Fri, 2012-03-30 at 09:05 +0900, Miles Bader wrote: David Malcolm dmalc...@redhat.com writes: I initially attempted an underscore_based_naming_convention but quickly found it difficult to get concise function names, so I switched to a CamelCaseBased_NamingConvention with an underscore

Re: Proposed plugin API for GCC

2012-03-30 Thread David Malcolm
On Fri, 2012-03-30 at 14:14 +0200, Richard Guenther wrote: On Thu, Mar 29, 2012 at 10:58 PM, David Malcolm dmalc...@redhat.com wrote: I had a go at writing a possible plugin API for GCC, and porting parts of my python plugin to it: http://git.fedorahosted.org/git/?p=gcc-python-plugin.git

Re: Proposed plugin API for GCC

2012-03-30 Thread David Malcolm
On Fri, 2012-03-30 at 15:08 +0200, Basile Starynkevitch wrote: On Fri, Mar 30, 2012 at 02:14:31PM +0200, Richard Guenther wrote: Btw, how ugly is it to make this API grokable by swig? Would that serve the python plugin? An alternative would be to have either some easily parsable API

Proposed gcc plugin plugin API mk 2 (this time without camel case!)

2012-04-02 Thread David Malcolm
I wrote a script and ported my proposed API for GCC plugins from my CamelCase naming convention to an underscore_based_convention (and manually fixed up things in a few places also). The result compiles and passes the full test suite for the Python plugin; that said, I'm still breaking the

Re: Proposed gcc plugin plugin API mk 2 (this time without camel case!)

2012-04-03 Thread David Malcolm
On Tue, 2012-04-03 at 12:03 +0200, Richard Guenther wrote: On Mon, Apr 2, 2012 at 7:21 PM, David Malcolm dmalc...@redhat.com wrote: I wrote a script and ported my proposed API for GCC plugins from my CamelCase naming convention to an underscore_based_convention (and manually fixed up things

Re: Proposed gcc plugin plugin API mk 2 (this time without camel case!)

2012-04-03 Thread David Malcolm
On Tue, 2012-04-03 at 15:23 +0200, Richard Guenther wrote: On Tue, Apr 3, 2012 at 12:03 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Apr 2, 2012 at 7:21 PM, David Malcolm dmalc...@redhat.com wrote: I wrote a script and ported my proposed API for GCC plugins from my

Re: self keyword

2012-06-14 Thread David Malcolm
FWIW self today is a perfectly good variable name, and practically all C and C++ code that interacts with Python (including the C implementation of Python itself) uses self to name variables throughout: many thousands of projects, many millions of lines of code. Having this snatched away as a

New GCC plugin: gcc-python-plugin

2011-06-21 Thread David Malcolm
I've been working on a new plugin for GCC, which supports embedding Python within GCC, exposing GCC's internal data structures as Python objects and classes. The plugin links against libpython, and (I hope) allows you to invoke arbitrary Python scripts from inside a compile. My aim is to allow

Re: New GCC plugin: gcc-python-plugin

2011-06-21 Thread David Malcolm
On Tue, 2011-06-21 at 21:02 +0200, Basile Starynkevitch wrote: On Tue, 21 Jun 2011 14:33:20 -0400 David Malcolm dmalc...@redhat.com wrote: It's still at the experimental proof-of-concept stage; expect crashes and tracebacks (I'm new to the insides of GCC, and I may have misunderstood

Re: New GCC plugin: gcc-python-plugin

2011-06-21 Thread David Malcolm
On Tue, 2011-06-21 at 22:30 +0200, Basile Starynkevitch wrote: On Tue, 21 Jun 2011 15:34:51 -0400 David Malcolm dmalc...@redhat.com wrote: I'm aware of MELT - as I understand it, it's a Lisp variant. Yes. However, I do have in the works an infix syntax of MELT called MILT. But it would

Re: New GCC plugin: gcc-python-plugin

2011-06-21 Thread David Malcolm
On Tue, 2011-06-21 at 22:31 +0200, Basile Starynkevitch wrote: On Tue, 21 Jun 2011 15:34:51 -0400 David Malcolm dmalc...@redhat.com wrote: When I mentioned the garbage collector, I was merely trying to convey the early, buggy nature of my code. This is a bug that I need to fix

  1   2   3   4   5   6   7   8   9   10   >