Re: [GSOC] LTO dump tool project - feedback

2018-08-26 Thread Hrishikesh Kulkarni
Hi, I have made changes for feedback points 3 and 10. With this I have completed/ made changes for points 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12. I have pushed the changes to the repo. Please find the diff file attached herewith. Regards, Hrishikesh On Thu, Aug 16, 2018 at 7:50 PM

Re: [GSOC] LTO dump tool project - feedback

2018-08-16 Thread Hrishikesh Kulkarni
Hi, Thanks for the feedback. I have made the corrections for the feedback points: 1, 4, 5, 6, 7, 8, 9, 11, 12. I am working on the remaining points. I have pushed the changes to the repo (lto-dump-tool-v4 branch) and attached the diff file herewith. Regards, Hrishikesh On Wed, Aug 15,

Re: [GSOC] LTO dump tool project - feedback

2018-08-15 Thread Martin Liška
Hi. After last update of the branch, there's a feedback that will be needed before we can adept to have it merged into trunk: 1) there's patch for lto-dump proper install: diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index e474f85ebc6..e9d2659025c 100644 --- a/gcc/lto/Make-lang.in

Re: [GSOC] LTO dump tool project - feedback

2018-08-03 Thread Hrishikesh Kulkarni
Hi, Thanks for inputs and feedback. As per feedback, I have made all the corrections/changes to the best of my understanding. Please find details of the same given below.: 1) options of lto-dump: a) removed the no-demangle command line option as it is default. b) exit added after every dump. (to

Re: [GSOC] LTO dump tool project

2018-07-18 Thread Hrishikesh Kulkarni
Hi, I tried doing as suggested + dfi.pflags = 0; + dump_switch_p_1 (arg, , false); 1.> the value of dfi.pflags is not changing even if different command line options are passed like -fdump-blocks or -fdump-vops 2.> what is the significance of bool doglob? Please find the diff file attached

Re: [GSOC] LTO dump tool project

2018-07-17 Thread Martin Liška
On 07/16/2018 05:44 PM, Hrishikesh Kulkarni wrote: > Hi, > > As suggested I have created command line option -optimized=[none, > blocks, stats, vops] to dump the respective gimple bodies of all > functions. > > for example: > > -optimized=blocks will dump Hi. The name does not make much

Re: [GSOC] LTO dump tool project

2018-07-16 Thread Hrishikesh Kulkarni
Hi, As suggested I have created command line option -optimized=[none, blocks, stats, vops] to dump the respective gimple bodies of all functions. for example: -optimized=blocks will dump Gimple body of function: main main () { ;; basic block 2, loop depth 0 ;;pred: ENTRY printf

Re: [GSOC] LTO dump tool project

2018-07-13 Thread Martin Liška
On 07/12/2018 08:05 PM, Hrishikesh Kulkarni wrote: > Hi, > > I have added command line options: > > -body= > To dump gimple body (TDF_NONE) of specific function. > > -optimized-blocks= > To dump gimple body (TDF_BLOCKS) of specific function. > > -optimized-stats= > To dump gimple body

Re: [GSOC] LTO dump tool project

2018-07-10 Thread Hrishikesh Kulkarni
Hi, Thanks for suggestions. I would start working on these points and will try to complete as early as possible. Regards, Hrishikesh On Mon, Jul 9, 2018 at 2:04 PM, Martin Liška wrote: > On 07/09/2018 09:50 AM, Hrishikesh Kulkarni wrote: >> Hi, >> >> The command line option -gimple-stats will

Re: [GSOC] LTO dump tool project

2018-07-09 Thread Martin Liška
On 07/09/2018 09:50 AM, Hrishikesh Kulkarni wrote: > Hi, > > The command line option -gimple-stats will dump the statistics of > gimple statements. > > For example: > > $ ../stage1-build/gcc/lto-dump test_hello.o -gimple-stats > > will dump: > > GIMPLE statements > Kind

Re: [GSOC] LTO dump tool project

2018-07-03 Thread Hrishikesh Kulkarni
Hi, Thanks for suggestions. I have started incorporating them. As a first: I have added command line options: -print-size to print the size of functions and variables size of variables is in bits and size of functions is represented as number of basic blocks. -print-value to print the value

Re: [GSOC] LTO dump tool project

2018-06-29 Thread Martin Liška
On 06/27/2018 10:06 PM, Hrishikesh Kulkarni wrote: > Hi, > > I have added new command line options: > -no-demangle -> for the default non demangled output > -no-sort -> for the list of symbols in order of their occurrence > -alpha-sort -> for the list of symbols in their alphabetical order >

Re: [GSOC] LTO dump tool project

2018-06-29 Thread Martin Liška
On 06/26/2018 09:45 PM, Hrishikesh Kulkarni wrote: > Hi, > > I have created another branch lto-dump-tool-improved as suggested. > I have applied the patch for separation to lto-dump binary, made a few > necessary changes in other files and it is running successfully. > I will keep on adding

Re: [GSOC] LTO dump tool project

2018-06-22 Thread Martin Liška
On 06/18/2018 10:45 AM, Martin Jambor wrote: > Hi, > > On Sun, Jun 17 2018, Hrishikesh Kulkarni wrote: >> Hi, >> >> I am trying to isolate the dump tool into real lto-dump tool. I have >> started with the copy of lto.c into lto-dump.c and done the >> changes to Make-lang.in and config-lang.in

Re: [GSOC] LTO dump tool project

2018-06-21 Thread Martin Liška
Hi. There were some questions from Hrishikesh about requested goals of the project. Thus I would like to specify what I'm aware of: 1) symbol table - list all symbols - print details info about a symbol (symtab_node::debug) - print GIMPLE body of a function - I would like to see

Re: [GSOC] LTO dump tool project

2018-06-21 Thread Martin Liška
On 06/20/2018 07:23 PM, Hrishikesh Kulkarni wrote: > Hi, > > Please find the diff file for dumping tree type stats attached here with. > > example: > > $ ../stage1-build/gcc/lto1 test_hello.o -fdump-lto-tree-type-stats > Reading object files: test_hello.o > integer_type3 >

Re: [GSOC] LTO dump tool project

2018-06-20 Thread Hrishikesh Kulkarni
Hi, Please find the diff file for dumping tree type stats attached here with. example: $ ../stage1-build/gcc/lto1 test_hello.o -fdump-lto-tree-type-stats Reading object files: test_hello.o integer_type3 pointer_type3 array_type1 function_type4 I have pushed the

Re: [GSOC] LTO dump tool project

2018-06-18 Thread Martin Jambor
Hi, On Sun, Jun 17 2018, Hrishikesh Kulkarni wrote: > Hi, > > I am trying to isolate the dump tool into real lto-dump tool. I have > started with the copy of lto.c into lto-dump.c and done the > changes to Make-lang.in and config-lang.in suggested by Martin (patch > attached). However when I try

Re: [GSOC] LTO dump tool project

2018-06-17 Thread Hrishikesh Kulkarni
Hi, I am trying to isolate the dump tool into real lto-dump tool. I have started with the copy of lto.c into lto-dump.c and done the changes to Make-lang.in and config-lang.in suggested by Martin (patch attached). However when I try to build, I get the following error: In file included from

Re: [GSOC] LTO dump tool project

2018-06-13 Thread Martin Liška
Hi. There's working patch that really generates lto-dump binary. Martin diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index 46950776dd2..502afe94851 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -21,10 +21,14 @@ # The name of the LTO compiler. LTO_EXE =

Re: [GSOC] LTO dump tool project

2018-06-12 Thread Martin Liška
On 06/12/2018 06:22 PM, Hrishikesh Kulkarni wrote: Hi, I tried tweaking the make file. I am probably missing something. Please advise. Hi. Next time please send diff. It's easier to read it. You'll need something like: diff --git a/gcc/lto/config-lang.in b/gcc/lto/config-lang.in index

Re: [GSOC] LTO dump tool project

2018-06-12 Thread Hrishikesh Kulkarni
Hi, I tried tweaking the make file. I am probably missing something. Please advise. Regards, Hrishikesh On Mon, Jun 11, 2018 at 1:36 PM, Martin Liška wrote: > On 06/08/2018 07:16 PM, Hrishikesh Kulkarni wrote: >> Hi, >> >> -fdump-lto-body=foo >> will dump gimple body of the function foo >> >>

Re: [GSOC] LTO dump tool project

2018-06-11 Thread Martin Liška
On 06/08/2018 07:16 PM, Hrishikesh Kulkarni wrote: > Hi, > > -fdump-lto-body=foo > will dump gimple body of the function foo > > foo (int a, int b) > { >[local count: 1073741825]: > _3 = a_1(D) + b_2(D); > return _3; > > } > > Please find the diff file attached herewith. > > Regards,

Re: [GSOC] LTO dump tool project

2018-06-08 Thread Prathamesh Kulkarni
On 8 June 2018 at 22:46, Hrishikesh Kulkarni wrote: > Hi, > > -fdump-lto-body=foo > will dump gimple body of the function foo > > foo (int a, int b) > { >[local count: 1073741825]: > _3 = a_1(D) + b_2(D); > return _3; > > } > > Please find the diff file attached herewith. @@ -53,10 +55,14

Re: [GSOC] LTO dump tool project

2018-06-08 Thread Hrishikesh Kulkarni
Hi, -fdump-lto-body=foo will dump gimple body of the function foo foo (int a, int b) { [local count: 1073741825]: _3 = a_1(D) + b_2(D); return _3; } Please find the diff file attached herewith. Regards, Hrishikesh On Fri, Jun 8, 2018 at 7:15 PM, Martin Liška wrote: > On 06/08/2018

Re: [GSOC] LTO dump tool project

2018-06-08 Thread Martin Liška
On 06/08/2018 03:40 PM, Martin Liška wrote: > There's wrong declaration of the function in header file. I'll fix it soon > on trunk. Please carry on with following patch: Fixed in r261327. Martin

Re: [GSOC] LTO dump tool project

2018-06-08 Thread Martin Liška
On 06/08/2018 03:27 PM, Hrishikesh Kulkarni wrote: > Hi, > > Linking is not taking place as the debug_function() being used is in > tree-cfg.c. How should I go about on adding in make-file considering > the dependencies? Hi. There's wrong declaration of the function in header file. I'll fix it

Re: [GSOC] LTO dump tool project

2018-06-08 Thread Hrishikesh Kulkarni
Hi, Linking is not taking place as the debug_function() being used is in tree-cfg.c. How should I go about on adding in make-file considering the dependencies? Please find the diff file attached herewith. Regards, Hrishikesh On Tue, Jun 5, 2018 at 12:38 AM, Martin Liška wrote: > On 06/04/2018

Re: [GSOC] LTO dump tool project

2018-06-04 Thread Martin Liška
On 06/04/2018 08:13 PM, Hrishikesh Kulkarni wrote: Hi, -fdump-lto-list will dump all the symbol list I see extra new lines in the output: $ lto1 -fdump-lto-list main.o [..snip..] Symbol Table NameTypeVisibility fwrite/15function

Re: [GSOC] LTO dump tool project

2018-06-04 Thread Hrishikesh Kulkarni
Hi, -fdump-lto-list will dump all the symbol list -fdump-lto-list -demangle will dump all the list with symbol names demangled -fdump-lto-symbol=foo will dump details of foo The output(demangled) will be in tabular form like nm: Symbol Table Name Type Visibility

Re: [GSOC] LTO dump tool project

2018-06-04 Thread Martin Liška
On 06/01/2018 08:59 PM, Hrishikesh Kulkarni wrote: > Hi, > I have pushed the changes to github > (https://github.com/hrisearch/gcc). Added a command line option for > specific dumps of variables and functions used in IL e.g. > -fdump-lto-list=foo will dump: > Call Graph: > > foo/1 (foo) > Type:

Re: [GSOC] LTO dump tool project

2018-06-01 Thread Hrishikesh Kulkarni
Hi, I have pushed the changes to github (https://github.com/hrisearch/gcc). Added a command line option for specific dumps of variables and functions used in IL e.g. -fdump-lto-list=foo will dump: Call Graph: foo/1 (foo) Type: function visibility: default Regards, Hrishikesh On Tue, May 29,

Re: [GSOC] LTO dump tool project

2018-05-29 Thread Martin Liška
On 05/29/2018 07:38 PM, Martin Liška wrote: $ nm main.o  T main  T mystring  C pole Or we can be inspired by readelf: $ readelf -s a.out [snip] Symbol table '.symtab' contains 74 entries: Num:Value Size TypeBind Vis Ndx Name 66:

Re: [GSOC] LTO dump tool project

2018-05-29 Thread Martin Liška
On 05/29/2018 07:17 PM, Prathamesh Kulkarni wrote: Shouldn't fdump-lto-list be enabled only if fdump is enabled ? The option is dummy, and eventually all do options will be moved to a separate tool called lto-dump. Thus all the prefixed '-fdump-lto-foo' will be replaced with -foo is guess.

Re: [GSOC] LTO dump tool project

2018-05-29 Thread Martin Liška
On 05/29/2018 07:03 PM, Hrishikesh Kulkarni wrote: Hi, My exams have finally ended and I have started working on the GSOC project. I have forked GCC mirror (https://github.com/hrisearch/gcc) and created a option for dumping functions and variables used in IL. Please find the patch attached

Re: [GSOC] LTO dump tool project

2018-05-29 Thread Prathamesh Kulkarni
On 29 May 2018 at 22:33, Hrishikesh Kulkarni wrote: > Hi, > > My exams have finally ended and I have started working on the GSOC project. > I have forked GCC mirror (https://github.com/hrisearch/gcc) and > created a option for dumping functions and variables used in IL. > Please find the patch