misbehaviour with md5_process_bytes and maybe in optimization

2011-09-23 Thread Pierre Vittet
a patch correcting this issue (it does not correct the fact that we don't get the bug with an optimised libiberty): http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01098.html. It has not been reviewed, could someone reviews this? Thanks! Pierre Vittet md5sum_plugin.tar.gz Description: application

Re: misbehaviour with md5_process_bytes and maybe in optimization

2011-09-23 Thread Pierre Vittet
203. On 23/09/2011 17:13, Ian Lance Taylor wrote: Pierre Vittet pier...@pvittet.com writes: The bug appears when: 1) We use libiberty compiled with -O0 2) We first call md5_process_bytes with a less than 64 bits buffer (we call his size len1). 3) We make a new call

Re: [PATCH, libiberty] correct md5_process_bytes with unaligned pointers

2011-09-19 Thread Pierre Vittet
Hello, Ping! I would like to get a return on this patch. I don't know quite well the status of libiberty in GNU, please if I must this patch on another mailing list, please say me on which. Thanks! Pierre Vittet

[PATCH, MELT] correct meltgc_string_hex_md5sum_file_sequence

2011-09-19 Thread Pierre Vittet
with a multiple of 64 size, so we can call md5_process_block. We only call md5_process_bytes for the last data. Thanks! Pierre Vittet 2011-09-19 Pierre Vittet pier...@pvittet.com * melt-runtime.c (meltgc_string_hex_md5sum_file_sequence): Concatenate files stream to call md5_process_block

[PATCH, libiberty] correct md5_process_bytes with unaligned pointers

2011-09-16 Thread Pierre Vittet
the code. I searched on google, and it does not looks to be used. Does anyone want it or thing that it should not be removed? Ok for trunk ? Thanks! Pierre Vittet PS: I also write a small gcc plugin, allowing to easily test md5_process_bytes, if can change your environment in a way where

Re: role of dump_file notably for/in plugins?

2011-09-01 Thread Pierre Vittet
clear rules about this. Dump files can be quite useful to understand the compiler behavior (sometimes it is a huge task to search using the debugger). Thanks. Pierre Vittet

Re: [PATCH, MELT, minor] add a primitive read_strv

2011-08-30 Thread Pierre Vittet
of a strbuf. Pierre Vittet Index: gcc/melt/warmelt-base.melt === --- gcc/melt/warmelt-base.melt (revision 176434) +++ gcc/melt/warmelt-base.melt (working copy) @@ -272,6 +272,11 @@ number $NUM opaque location number $LOC.}# :doc

[PATCH, MELT] add primitive isnull_tree

2011-08-30 Thread Pierre Vittet
Hello, This is a small patch adding primitive isnull_tree (as there is already a primitive isnull_basicblock). Pierre Vittet Index: gcc/melt/xtramelt-ana-base.melt === --- gcc/melt/xtramelt-ana-base.melt (révision 178282

[PATCH, MELT] fixing upgrade-warmelt target

2011-08-27 Thread Pierre Vittet
beyond (but there are still issues. Pierre Vittet Index: melt-build.tpl === --- melt-build.tpl (révision 178131) +++ melt-build.tpl (copie de travail) @@ -579,7 +579,7 @@ ENDFOR melt_translator_file+] [+FOR melt_translator_file

[GSOC] code contribution + documentation

2011-08-18 Thread Pierre Vittet
and people interested by the plugin). Thanks! Pierre Vittet PS: I you want to know more about my plugin: http://gcc.gnu.org/ml/gcc/2011-08/msg00251.html https://gitorious.org/talpo/talpo/blobs/master/README

Re: [GSOC] Customizable warnings with a GCC plugin

2011-08-13 Thread Pierre Vittet
should look deeper at this)) to check if there is a test or no. For the moment my plugin's 'view' is limited to a single function but that should be something to improve. Pierre Vittet On 12/08/2011 18:00, Jonathan Wakely wrote: On 12 August 2011 15:54, Pierre Vittet wrote: For the moment

[GSOC] Customizable warnings with a GCC plugin

2011-08-12 Thread Pierre Vittet
://gitorious.org/talpo. I will focus on documentation and help next week. Thanks for your interest! Pierre Vittet

[PATCH, MELT] correct function meltgc_string_hex_md5sum_file_sequence

2011-07-27 Thread Pierre Vittet
Hello, this patch correct the function meltgc_string_hex_md5sum_file_sequence, it now returns the same than cat myfile1 myfile2 ... | md5sum. fread was not correctly used + it looks like you can't mix function md5_process_bytes and md5_process_blocks. Pierre Vittet Index: gcc/melt-runtime.c

write after approval status

2011-07-25 Thread Pierre Vittet
] correcting path error in the Makefile.in: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01232.html Pierre Vittet

[PATCH, MELT, minor] add a primitive read_strv

2011-07-19 Thread Pierre Vittet
Hello, This minor patch add a primitive to get a list of s-expression from a boxed C string of a strbuf. This is only the MELT part, as the called C code was already written. I compiled and test it. Thanks! Pierre Vittet 2011-07-18 Pierre Vittet pier...@pvittet.com * melt/warmelt

Re: [PATCH, MELT] Add PRE_GENERICIZE callback support in MELT

2011-07-16 Thread Pierre Vittet
Right, here is the new version of the patch (with the correct files). I added, a function register_pre_genericize_hook in melt/warmelt-base.melt to be called when we want to register a MELT function to handle the callback, so we don't manually set sysdata_pre_genericize field. Pierre Vittet

[PATCH, MELT] Add PRE_GENERICIZE callback support in MELT

2011-07-15 Thread Pierre Vittet
warmelt-upgrade must be run in order to regenerate generated melt files. The add_pre_genericize_hook patch add a function (in melt-runtime.c) to be called on PLUGIN_PRE_GENERICIZE, which call the closure sysdata_pre_genericize defined by the users. Thanks Pierre Vittet 2011-07-15 Pierre

Re: C++ mangling, function name to mangled name (or tree)

2011-07-14 Thread Pierre Vittet
). Basile Starynkevitch does not work this week (normally), however, I am sure, he will help us when he came back. Pierre Vittet

Re: IPA and LTO

2011-07-13 Thread Pierre Vittet
exactly how and when ld is called and which passes run after this. Pierre Vittet On 13/07/2011 17:54, AJM-2 wrote: What you say is in line with my understanding, however when I instrument the execute function of ipa-function-and-variable-visibility (local_function_and_variable_visibility()) I

Re: C++ mangling, function name to mangled name (or tree)

2011-07-13 Thread Pierre Vittet
Hello, sorry to answer that late (I didn't saw your mail in my mailbox + I was preparing me for RMLL/Libre software meeting). Your solution looks to be a nice one, I am goiing to try it and I will post the result of my experiment. I was not aware of that hook. Thanks! Pierre Vittet

Re: announce: MELT plugin 0.8rc2 for 4.6

2011-07-08 Thread Pierre Vittet
it looks to appear only on 32 bits when compiling the plugin. Pierre Vittet

[PATCH, MELT] new function register_data_handler

2011-07-07 Thread Pierre Vittet
with care, as we can only register a single pragma named melt (maybe we could use another function specially for 4.6 ?). Thanks! Pierre Vittet 2011-07-07 Pierre Vittet pier...@pvittet.com * melt/warmelt-base.melt (register_pragma_handler ): new function. Index: gcc/melt/warmelt-base.melt

Re: GSOC - Student Roundup

2011-07-06 Thread Pierre Vittet
Hi, I am Pierre Vittet, one of the GSOC students. I am writing a plugin which is a simple statical analysis tools. The idea is to write some tests (like testing that a function call is tested to return somethings (not) null, or testing that a call to a given function is followed by a call

C++ mangling, function name to mangled name (or tree)

2011-07-06 Thread Pierre Vittet
(_ZN11Application4testEi). But I don't know where I can find such translating. I have looked at cp/mangle.c, which has some interesting function, for exemple giving the mangle named from the corresponding tree, but in this case, how can I get the tree? If you have any idea, thanks! Cheers, Pierre Vittet

Re: C++ mangling, function name to mangled name (or tree)

2011-07-06 Thread Pierre Vittet
an important space complexity. Thanks! Pierre Vittet

Re: [PATCH, MELT] pragma support in MELT

2011-07-03 Thread Pierre Vittet
being registered. I also removed the PRAGMA_BAD macro as it was said to be less readable, and changed malformed pragma warnings into errors. I tested the patch without seing any error or regression. Pierre Vittet 2011-07-03 Pierre Vittet pier...@pvittet.com * melt-runtime.c: include c

[PATCH, MELT] pragma support in MELT

2011-06-24 Thread Pierre Vittet
of arguments as parameters. For GCC=4.6, there is a minimal pragma support, we can handle following pragma: #pragma GCCPLUGIN melt op (arg1,...argN) with only melt as name. ChangeLog: 2011-06-24 Pierre Vittet pier...@pvittet.com * melt-runtime.c (GCC_PRAGMA_BAD): Macro to return an error

[PATCH, MELT] correct meltgc_read_from_val without location

2011-06-24 Thread Pierre Vittet
it doesn't handle correctly the absence of file. This patch correct this, if there is no file, it create a virtual one which is named stringBuffer. Pierre Vittet Index: gcc/melt-runtime.c === --- gcc/melt-runtime.c (revision 175348

[PATCH, MELT] fix minor issue with meltgc_new_split_string

2011-06-21 Thread Pierre Vittet
. I took this opportunity to add a small comment to the function (in the second diff). ChangeLog 2011-06-21 Pierre Vittet pier...@pvittet.com * melt-runtime.c (meltgc_new_split_string): Fix issue. 2011-06-21 Pierre Vittet pier...@pvittet.com * melt-runtime.c

new wiki page: MELT performance

2011-06-15 Thread Pierre Vittet
Hello, I have written a new page on the wiki (http://gcc.gnu.org/wiki/MELTPerformanceTest) about the performance of GCC using a MELT plugin. This can be usefull to see what take too much time in MELT (it looks like we spend a lot of time in the garbage collector, this might be highly

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-10 Thread Pierre Vittet
thanks! I formatted as you requested. I cannot commit myself as I haven't a write after approval status, maye you can do it, or I can wait my GSOC mentor, Basile Starynkevitch to do this (He mights be busy for a few days). Pierre Vittet Index: gcc/c-family/c-pragma.c

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-10 Thread Pierre Vittet
I guess this is better now. Changelog (gcc/c-family): 2011-06-10 Pierre Vittet pier...@pvittet.com * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New handler. (gen_pragma_handler): New union. (internal_pragma_handler): New type. (c_register_pragma_with_data

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-09 Thread Pierre Vittet
You are right, the new version is in the diff. The diff for the test hasn't changed and is in the previous mail. In the previous version of the file, the registered_pragmas was not better freed. I don't know if it is really important (it would need a callback at the end of the front-end

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-08 Thread Pierre Vittet
, if there is a remark, please, send me it. Especially, I am not sure about the format of my ChangeLog, if there is an issue, I am ready to change it. Changelog gcc: 2011-06-08 Pierre Vittet pier...@pvittet.com * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg, gen_pragma_handler

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-03 Thread Pierre Vittet
to keep a more clear code. I can do it, if you think it is better. I have successfully compiled gcc with my patch and I have tried it with a modified version of gcc/testsuite/g++.dg/plugin/pragma_plugin.c. Pierre Vittet On 02/06/2011 19:51, Tom Tromey wrote: Pierre == Pierrep.vit

Re: [PATCH] c-pragma: adding a data field to pragma_handler

2011-06-03 Thread Pierre Vittet
comfortable with it for now ;). Pierre Vittet On 03/06/2011 17:47, Basile Starynkevitch wrote: On Fri, 03 Jun 2011 17:31:25 +0200 Pierre Vittetpier...@pvittet.com wrote: Thank you for your answer! I send you a new patch I have corrected the errors you raised. I have make my patch compatible

[PATCH, MELT] add pragma support in MELT plugin

2011-05-31 Thread Pierre Vittet
) ) (put_fields initial_system_data :sysdata_meltpragma_definer my_simple_pragma_handler ) Pierre Vittet Index: gcc/melt/warmelt-first.melt === --- gcc/melt/warmelt-first.melt (revision 174379) +++ gcc/melt/warmelt-first.melt (working

using plugin and lto: problem linking c-pragma symbol

2011-05-30 Thread Pierre Vittet
c_register_pragma and others related functions as weak references (however it mights not works for all plateform). What would be the better way to patch this? Pierre Vittet

Re: [PATCH, MELT] add dominance functions

2011-05-20 Thread Pierre Vittet
is that it puts an end of lines between the two informations. If you think there is a best way to do this, I am ok to try it. The new changelog: 2011-05-20 Pierre Vittet pier...@pvittet.com * melt/xtramelt-ana-base.melt (is_dominance_info_available, is_post_dominance_info_available

Re: [PATCH] comment precising need to use free_dominance_info

2011-05-17 Thread Pierre Vittet
So maybe this patch adding a comment on calculate_dominance_info is more adapted. ChangeLog: 2011-05-17 Pierre Vittetpier...@pvittet.com * dominance.c (calculate_dominance_info): Add comment precising when to free with free_dominance_info contributor number: 634276 Index:

[PATCH, MELT] correcting path error in the Makefile.in

2011-05-17 Thread Pierre Vittet
This patch correct a bug in the current revision of MELT, which was preventing MELT to run correctly. This was a path problem in gcc/Makefile.in (melt-modules/ and melt-modules.mk) were not found. My contributor number is 634276. changelog : 2011-05-17 Pierre Vittet pier...@pvittet.com

Re: basic bloc chaining: using dominance

2011-05-11 Thread Pierre Vittet
On 10/05/2011 16:23, Ian Lance Taylor wrote: Pierre Vittetpier...@pvittet.com writes: I am working on a plugin at the GIMPLE state, I am parsing basic blocks and I need to check that a call to foo() is only present once in a function. Howerver, it can be present several times if it is in

basic bloc chaining: using dominance

2011-05-10 Thread Pierre Vittet
will implement a primitive in MELT allowing to use dominated_by_p function in MELT. Thanks! Pierre Vittet My Google Summer Of Code projet: http://www.google-melange.com/gsoc/project/google/gsoc2011/piervit/15001

[PATCH, MELT] fix useless forcing of GCC garbage collector

2011-05-09 Thread Pierre Vittet
a MELT plugin with the patched version). I have also measured a small time improvement while compiling the file gcc.c (which is more that 8000 lines): Whithout the modification: usersys 1.563 0.145s With the modification: usersys 1.144 0.106s Changelog: 2011-05-09 Pierre Vittet pier

Re: [PATCH, MELT] fix useless forcing of GCC garbage collector

2011-05-09 Thread Pierre Vittet
. This is the copyright assignment legal document reference for Pierre Vittet. What does he (or me) have to do to get svn+ssh://gcc.melt.org/ write access? Cheers.

[MELT] a successful compilation of GCC using a plugin

2011-05-05 Thread Pierre Vittet
Hello, I would like to announce that I have been able to compile GCC while checking it with a simple MELT plugin that I have wrote. This plugin is integrated into GCC by using the MELT plugin. I guess this is the first successfull use of MELT with a huge real program like GCC. For those who

Re: [MELT] a successful compilation of GCC using a plugin

2011-05-05 Thread Pierre Vittet
On 05/05/2011 21:46, Diego Novillo wrote: On Thu, May 5, 2011 at 15:16, Diego Novillodnovi...@google.com wrote: I've always found MELT interesting as an exercise in impossibility and [ ... ] There was some confusion about my meaning here. It was meant as a compliment. Sorry for

customizable warnings with a GCC plugin

2011-04-29 Thread Pierre Vittet
Hi, My name is Pierre Vittet and my GSOC application as been selected. My project is about writing a plugin allowing GCC users to add some simple warnings, being useful in their particular project. The user should be able to add rules like when I got a call to a foo function, I would like

Re: customizable warnings with a GCC plugin

2011-04-29 Thread Pierre Vittet
languages that I've used. Pierre Vittet knows MELT quite well and has already successfully used it (and he did found some bugs in MELT that I was happy to correct). He is one of the most active posters on the gcc-melt-fre...@googlegroups.com list. We (Pierre me Basile) met regularily

[Patch] get an order number on -fdump-tree-all

2011-03-23 Thread Pierre Vittet
that the function print_current_pass is only called on a fail and that debug_pass doesn't appear to be called at all. Maybe in DEBUG, or at least with an f*_dump_all, we could print the order of the pass. thanks Pierre Vittet Index: gcc/tree-dump.c

MELT plugin: test fopen

2011-02-08 Thread Pierre Vittet
Hello, I would like to present you a small plugin, which could be a good exemple of a MELT use case. This plugin allows to monitor that after every call to the fopen function, we have a test on the pointer returned by fopen (monitoring that it is not null). It creates a pass after SSA and