Re: [PATCH 3/3] add hash_map class

2014-06-24 Thread Martin Liška
On 06/20/2014 12:52 PM, tsaund...@mozilla.com wrote: From: Trevor Saunders tsaund...@mozilla.com Hi, This patch adds a hash_map class so we can consolidate the boiler plate around using hash_table as a map, it also allows us to get rid of pointer_map which I do in this patch by converting its

Re: [PATCH 3/3] add hash_map class

2014-06-24 Thread Martin Liška
On 06/24/2014 02:40 PM, Trevor Saunders wrote: On Tue, Jun 24, 2014 at 02:29:53PM +0200, Martin Liška wrote: On 06/20/2014 12:52 PM, tsaund...@mozilla.com wrote: From: Trevor Saunders tsaund...@mozilla.com Hi, This patch adds a hash_map class so we can consolidate the boiler plate around

Re: [PATCH 3/3] add hash_map class

2014-06-25 Thread Martin Liška
On 06/24/2014 09:31 PM, Richard Biener wrote: On June 24, 2014 9:16:34 PM CEST, Trevor Saunders tsaund...@mozilla.com wrote: On Tue, Jun 24, 2014 at 08:23:49PM +0200, Jan Hubicka wrote: On 06/20/2014 12:52 PM, tsaund...@mozilla.com wrote: From: Trevor Saunders tsaund...@mozilla.com Hi,

Re: [PATCH] IPA REF: refactoring

2014-06-25 Thread Martin Liška
On 06/24/2014 08:21 PM, Jan Hubicka wrote: Hello, this patch changes IPA REF API to c++ style. Changes were suggested and consulted with Honza. Patch has been pre approved, will be committed if no comments. Bootstrapped on x86_64-pc-linux-gnu, no regressions. Thanks, Martin ChangeLog:

[PATCH] Devirtualization dump functions fix

2014-06-26 Thread Martin Liška
Hello, I encountered similar issue to PR ipa/61462 where location_t locus = gimple_location (e-call_stmt) is called for e-call_stmt == NULL (Firefox with -flto -fdump-ipa-devirt). So that, I decided to introduce new function that is called for all potentially unsafe locations. I am

Re: [PATCH] Devirtualization dump functions fix

2014-06-26 Thread Martin Liška
On 06/26/2014 03:20 PM, Richard Biener wrote: On Thu, Jun 26, 2014 at 3:01 PM, Martin Liška mli...@suse.cz wrote: Hello, I encountered similar issue to PR ipa/61462 where location_t locus = gimple_location (e-call_stmt) is called for e-call_stmt == NULL (Firefox with -flto -fdump-ipa

Re: [PATCH] Devirtualization dump functions fix

2014-06-26 Thread Martin Liška
On 06/26/2014 04:18 PM, Jakub Jelinek wrote: On Thu, Jun 26, 2014 at 04:10:03PM +0200, Richard Biener wrote: On Thu, Jun 26, 2014 at 3:43 PM, Martin Liška mli...@suse.cz wrote: On 06/26/2014 03:20 PM, Richard Biener wrote: On Thu, Jun 26, 2014 at 3:01 PM, Martin Liška mli...@suse.cz wrote

Re: [PATCH] Devirtualization dump functions fix

2014-06-26 Thread Martin Liška
On 06/26/2014 04:29 PM, Jakub Jelinek wrote: On Thu, Jun 26, 2014 at 04:27:49PM +0200, Martin Liška wrote: Well yes - it is of course similar broken in spirit but at least a lot simpler ;) I'd put a comment there why we do check g for NULL. But it increases overhead, there are hundreds

Re: [PATCH 3/5] IPA ICF pass

2014-06-26 Thread Martin Liška
On 06/24/2014 10:31 PM, Jeff Law wrote: On 06/13/14 04:44, mliska wrote: Hello, this is core of IPA ICF patchset. It adds new pass and registers all needed stuff related to a newly introduced interprocedural optimization. Algorithm description: In LGEN, we visit all read-only

Re: [PATCH] Devirtualization dump functions fix

2014-06-27 Thread Martin Liška
On 06/27/2014 10:38 AM, Richard Biener wrote: On Thu, Jun 26, 2014 at 5:58 PM, Martin Liška mli...@suse.cz wrote: On 06/26/2014 04:29 PM, Jakub Jelinek wrote: On Thu, Jun 26, 2014 at 04:27:49PM +0200, Martin Liška wrote: Well yes - it is of course similar broken in spirit but at least a lot

[PATCH] IPA REF: alias refactoring

2014-06-27 Thread Martin Liška
Hi, this patch enhances alias manipulation for symtab_node. Honza suggested following changes. Patch is pre approved, will be committed if no comments and regressions. Bootstrapped on x86_64-pc-linux-gnu, regression tests have been running. Thanks, Martin gcc/ChangeLog: * cgraph.h

Re: [PATCH 2/5] Existing call graph infrastructure enhancement

2014-06-30 Thread Martin Liška
On 06/17/2014 10:00 PM, Jeff Law wrote: On 06/13/14 04:26, mliska wrote: Hi, this small patch prepares remaining needed infrastructure for the new pass. Changelog: 2014-06-13 Martin Liska mli...@suse.cz Honza Hubicka hubi...@ucw.cz * ipa-utils.h

Re: [PATCH 4/5] Existing tests fix

2014-06-30 Thread Martin Liška
On 06/17/2014 09:52 PM, Jeff Law wrote: On 06/13/14 04:48, mliska wrote: Hi, many tests rely on a precise number of scanned functions in a dump file. If IPA ICF decides to merge some function and(or) read-only variables, counts do not match. Martin Changelog: 2014-06-13 Martin Liska

Re: [PATCH 5/5] New tests introduction

2014-06-30 Thread Martin Liška
On 06/17/2014 09:53 PM, Jeff Law wrote: On 06/13/14 05:16, mliska wrote: Hi, this is a new collection of tests for IPA ICF pass. Martin Changelog: 2014-06-13 Martin Liska mli...@suse.cz Honza Hubicka hubi...@ucw.cz * gcc/testsuite/g++.dg/ipa/ipa-se-1.C: New test. *

Re: [PATCH] IPA REF: alias refactoring

2014-06-30 Thread Martin Liška
On 06/28/2014 08:49 AM, Jan Hubicka wrote: Hi, this patch enhances alias manipulation for symtab_node. Honza suggested following changes. Patch is pre approved, will be committed if no comments and regressions. Bootstrapped on x86_64-pc-linux-gnu, regression tests have been running.

Re: [PATCH] IPA REF: alias refactoring

2014-07-01 Thread Martin Liška
On 07/01/2014 12:21 AM, Jan Hubicka wrote: gcc/ChangeLog: * cgraph.h (iterate_direct_aliases): New function. (FOR_EACH_ALIAS): New macro iterates all direct aliases for a node. * cgraph.c (cgraph_for_node_thunks_and_aliases): Usage of FOR_EACH_ALIAS added.

[PATCH, DOC]: Fix for Options That Control Optimization section

2014-07-11 Thread Martin Liška
Hello, I fixed Options That Control Optimization section according to 'gcc -Q --help=optimizers' and after consultation with Jakub, I added missing -foptimize-strlen option. Ready for trunk? Martin ChangeLog: 2014-07-11 Martin Liska mli...@suse.cz * doc/invoke.texi: Added missing

Re: [RFC, PATCH 1/n] IPA C++ refactoring

2014-07-14 Thread Martin Liška
Hello On 07/11/2014 12:07 PM, Jan Hubicka wrote: Hi, this first patch continues with rafactoring of IPA infrastructure so that we will have C++ API. In the patch, I transformed many global functions to members of symtab_node and cgraph_node. Example: cgraph_remove_node (struct

Re: [PATCH 2/5] Existing call graph infrastructure enhancement

2014-07-17 Thread Martin Liška
On 06/30/2014 08:54 PM, Jeff Law wrote: On 06/30/14 05:49, Martin Liška wrote: On 06/17/2014 10:00 PM, Jeff Law wrote: On 06/13/14 04:26, mliska wrote: Hi, this small patch prepares remaining needed infrastructure for the new pass. Changelog: 2014-06-13 Martin Liska mli...@suse.cz

Re: [PATCH, go]: Restore bootstrap

2014-07-24 Thread Martin Liška
On 07/24/2014 07:57 PM, Uros Bizjak wrote: Hello! 2014-07-24 Uros Bizjak ubiz...@gmail.com * go/go-gcc.cc (Gcc_backend::global_variable_set_init): Rename symtab_get_node to symtab_node::get. Tested on x86_64-linux-gnu and committed to mainline SVN. Uros. Hello, thank you for

Re: [PATCH, go]: Restore bootstrap

2014-07-25 Thread Martin Liška
On 07/25/2014 03:51 AM, Ian Lance Taylor wrote: On Thu, Jul 24, 2014 at 12:21 PM, Martin Liška mli...@suse.cz wrote: On 07/24/2014 07:57 PM, Uros Bizjak wrote: Hello! 2014-07-24 Uros Bizjak ubiz...@gmail.com * go/go-gcc.cc (Gcc_backend::global_variable_set_init): Rename

Re: [PATCH, go]: Restore bootstrap

2014-07-29 Thread Martin Liška
On 07/28/2014 05:24 PM, Mike Stump wrote: On Jul 28, 2014, at 3:29 AM, Gerald Pfeifer ger...@pfeifer.com wrote: On Fri, 25 Jul 2014, Martin Liška wrote: Yes, --enable-languages=all is the default, so it only builds the frontends that are enabled by default, so it does not build the Go or Ada

Re: [PATCH, go]: Restore bootstrap

2014-07-29 Thread Martin Liška
On 07/29/2014 07:01 PM, Mike Stump wrote: On Jul 29, 2014, at 2:10 AM, Martin Liška mli...@suse.cz wrote: I am not a configure script guru, but what do you think about suggested patch? Looks exactly like what I would do. All right, I'll send the patch, as well as documentation enhancement

Re: [PATCH] LTO streamer reorg - try to reduce WPA memory use

2014-07-30 Thread Martin Liška
On 07/30/2014 11:41 AM, Richard Biener wrote: On Wed, 30 Jul 2014, Richard Biener wrote: On Wed, Jul 30, 2014 at 7:51 AM, Markus Trippelsdorf mar...@trippelsdorf.de wrote: On 2014.07.29 at 15:10 +0200, Richard Biener wrote: On Tue, 29 Jul 2014, Richard Biener wrote: This re-organizes the

[PATCH] Fix for ipa/63795, ipa/63622

2014-11-11 Thread Martin Liška
Hello. Following patch adds checking for aliasing support. Patch can bootstrap on x86_64-apple-darwin1 and is part of patches needed for bootstrap restory on the target. I plan to introduce additional patch that will cover testsuite failures for the target. Ready for trunk? Thanks, Martin

Re: [PATCH] Fix some ICF gimple_call handling issues

2014-11-11 Thread Martin Liška
On 11/11/2014 12:11 AM, Jakub Jelinek wrote: On Mon, Nov 10, 2014 at 10:08:54PM +0100, Richard Biener wrote: @@ -662,9 +662,49 @@ func_checker::compare_gimple_call (gimpl t1 = gimple_call_fndecl (s1); t2 = gimple_call_fndecl (s2); Just drop these and compare gimple_call_fn only. +

Re: [PATCH 1/4] cgraph_summary data structure introduction.

2014-11-13 Thread Martin Liška
On 11/13/2014 03:33 PM, Richard Biener wrote: On Thu, Nov 13, 2014 at 3:10 PM, mliska mli...@suse.cz wrote: Following patchset introduces cgraph_summary template class that should replace custom implementation of cgraph related summaries. Idea behind the patch is to provide a generic interface

Re: [PATCH 2/4] New data structure for cgraph_summary introduced.

2014-11-13 Thread Martin Liška
On 11/13/2014 03:48 PM, Markus Trippelsdorf wrote: On 2014.11.13 at 15:11 +0100, mliska wrote: Just two remarks: +template class T +class GTY((user)) cgraph_summary T * +{ +public: + /* Default construction takes SYMTAB as an argument. */ + cgraph_summary (symbol_table *symtab, bool ggc =

Re: [PATCH 2/4] New data structure for cgraph_summary introduced.

2014-11-14 Thread Martin Liška
On 11/13/2014 04:50 PM, Jan Hubicka wrote: gcc/ChangeLog: 2014-11-12 Martin Liska mli...@suse.cz * Makefile.in: New object file is added. * cgraph.h (symbol_table::allocate_cgraph_symbol): Summary UID is filled up. * cgraph_summary.c: New file. *

Re: [PATCH 4/4] Data structure is used for inline_summary struct.

2014-11-14 Thread Martin Liška
On 11/13/2014 05:04 PM, Jan Hubicka wrote: + if (!inline_summary_summary) +inline_summary_summary = (inline_summary_cgraph_summary *) inline_summary_cgraph_summary::create_ggc (symtab); Hehe, this is funny naming scheme. Peraps inline_summary_d and inline_summary_t for the data and type?

Re: [PATCH 2/4] New data structure for cgraph_summary introduced.

2014-11-14 Thread Martin Liška
On 11/14/2014 03:04 PM, Martin Liška wrote: On 11/13/2014 04:50 PM, Jan Hubicka wrote: gcc/ChangeLog: 2014-11-12 Martin Liska mli...@suse.cz * Makefile.in: New object file is added. * cgraph.h (symbol_table::allocate_cgraph_symbol): Summary UID is filled up

Re: [PATCH 4/4] Data structure is used for inline_summary struct.

2014-11-14 Thread Martin Liška
On 11/14/2014 03:09 PM, Martin Liška wrote: On 11/13/2014 05:04 PM, Jan Hubicka wrote: + if (!inline_summary_summary) +inline_summary_summary = (inline_summary_cgraph_summary *) inline_summary_cgraph_summary::create_ggc (symtab); Hehe, this is funny naming scheme. Peraps

Re: [PATCH 4/4] Data structure is used for inline_summary struct.

2014-11-18 Thread Martin Liška
On 11/14/2014 05:06 PM, Jan Hubicka wrote: In a way I would like to see these to be methods of the underlying type rather than virtual methods of the summary, becuase these are operations on the data themselves. I was thinking to model these by specual constructor and copy constructor (taking

Re: [PATCH 4/4] Data structure is used for inline_summary struct.

2014-11-19 Thread Martin Liška
On 11/18/2014 11:25 PM, Martin Jambor wrote: On Tue, Nov 18, 2014 at 07:59:26PM +0100, Jan Hubicka wrote: Hi, On Tue, Nov 18, 2014 at 04:39:00PM +0100, Jan Hubicka wrote: On Fri, Nov 14, 2014 at 08:59:10PM +0100, Jan Hubicka wrote: b) with GTY, we cannot call destructor Everything in

[PATCH] PR lto/63968: 175.vpr from cpu2000 fails to build with LTO

2014-11-20 Thread Martin Liška
Hello. As I reimplemented fibheap to C++ template, Honza told me that replace_key method actually supports just decrement operation. Old implementation suppress any feedback if we try to increase key: fibheap.c: ... /* If we wanted to, we could actually do a real increase by redeleting and

[PATCH] PR ipa/63909 ICE: SIGSEGV in ipa_icf_gimple::func_checker::compare_bb()

2014-11-20 Thread Martin Liška
Hello. Following patch fixes ICE in IPA ICF. Problem was that number of non-debug statements in a BB can change (for instance by IPA split), so that the number is recomputed. Patch can bootstrap on x86_64-linux-pc and no regression has been seen. Ready for trunk? Thanks, Martin gcc/ChangeLog:

Re: [PATCH] PR lto/63968: 175.vpr from cpu2000 fails to build with LTO

2014-11-21 Thread Martin Liška
On 11/20/2014 10:13 PM, Jan Hubicka wrote: Hello. As I reimplemented fibheap to C++ template, Honza told me that replace_key method actually supports just decrement operation. Old implementation suppress any feedback if we try to increase key: fibheap.c: ... /* If we wanted to, we could

Re: [PATCH 8/9] Negative numbers added for sreal class.

2014-11-21 Thread Martin Liška
On 11/14/2014 11:48 AM, Richard Biener wrote: On Thu, Nov 13, 2014 at 1:35 PM, mliska mli...@suse.cz wrote: gcc/ChangeLog: 2014-11-13 Martin Liska mli...@suse.cz * predict.c (propagate_freq): More elegant sreal API is used. (estimate_bb_frequencies): New static constants

Re: [PATCH] PR ipa/63909 ICE: SIGSEGV in ipa_icf_gimple::func_checker::compare_bb()

2014-11-21 Thread Martin Liška
On 11/20/2014 05:41 PM, Richard Biener wrote: On Thu, Nov 20, 2014 at 5:30 PM, Martin Liška mli...@suse.cz wrote: Hello. Following patch fixes ICE in IPA ICF. Problem was that number of non-debug statements in a BB can change (for instance by IPA split), so that the number is recomputed. Huh

Re: [PATCH 8/9] Negative numbers added for sreal class.

2014-11-21 Thread Martin Liška
On 11/21/2014 01:03 PM, Richard Biener wrote: On Fri, Nov 21, 2014 at 12:21 PM, Martin Liška mli...@suse.cz wrote: On 11/14/2014 11:48 AM, Richard Biener wrote: On Thu, Nov 13, 2014 at 1:35 PM, mliska mli...@suse.cz wrote: gcc/ChangeLog: 2014-11-13 Martin Liska mli...@suse.cz

Re: [PATCH 8/9] Negative numbers added for sreal class.

2014-11-21 Thread Martin Liška
On 11/21/2014 04:02 PM, Richard Biener wrote: On Fri, Nov 21, 2014 at 3:39 PM, Martin Liška mli...@suse.cz wrote: Hello. Ok, this is simplified, one can use sreal a = 12345 and it works ;) that's a new API, right? There is no max () and I think that using LONG_MIN here is asking

[PATCH] IPA ICF: memory leak fix

2014-11-22 Thread Martin Liška
Hello. Following patch removes memory leak that was introduced by very first IPA ICF patch. I would like to thank David for hunting the leak. Patch an bootstrap on x86_86-linux-pc and no regression is introduced. Thanks, Martin From f959905e984a84d0353fb1e32ba83db2b6dfe4d2 Mon Sep 17 00:00:00

Re: [PATCH] IPA ICF: memory leak fix

2014-11-22 Thread Martin Liška
On 11/22/2014 10:09 AM, Markus Trippelsdorf wrote: On 2014.11.22 at 09:05 +0100, Martin Liška wrote: Hello. Following patch removes memory leak that was introduced by very first IPA ICF patch. I would like to thank David for hunting the leak. Patch an bootstrap on x86_86-linux-pc

[PATCH] sreal class fix for PR64050 and PR64060

2014-11-25 Thread Martin Liška
Hello. Following patch is fix sreal problems that are mentioned in PR64050, PR64060. I added new GCC plugin test where I test sreal arithmetics and number comparison. Patch can bootstrap on ppc64-linux-pc and x86_64-linux-pc and can pass regression tests. Thanks, Martin gcc/ChangeLog:

Re: [PATCH] IPA ICF: memory leak fix

2014-11-27 Thread Martin Liška
On 11/23/2014 10:01 AM, Markus Trippelsdorf wrote: On 2014.11.22 at 17:46 +0100, Markus Trippelsdorf wrote: On 2014.11.22 at 16:04 +0100, Martin Liška wrote: On 11/22/2014 10:09 AM, Markus Trippelsdorf wrote: On 2014.11.22 at 09:05 +0100, Martin Liška wrote: Following patch removes memory

Re: [PATCH 8/9] Negative numbers added for sreal class.

2014-11-27 Thread Martin Liška
On 11/21/2014 04:21 PM, Martin Liška wrote: On 11/21/2014 04:02 PM, Richard Biener wrote: On Fri, Nov 21, 2014 at 3:39 PM, Martin Liška mli...@suse.cz wrote: Hello. Ok, this is simplified, one can use sreal a = 12345 and it works ;) that's a new API, right? There is no max () and I think

Re: [PATCH 2/5] Existing call graph infrastructure enhancement

2014-09-26 Thread Martin Liška
On 09/24/2014 05:01 PM, Jan Hubicka wrote: Hi. Following patch enhances API functions to be ready for main patch of this patchset. Ready for thunk? Thank you, Martin gcc/ChangeLog: 2014-09-21 Martin Liška mli...@suse.cz * cgraph.c (cgraph_node::release_body): New argument

Re: [PATCH 3/5] IPA ICF pass

2014-09-26 Thread Martin Liška
On 07/17/2014 05:05 PM, Martin Liška wrote: On 07/06/2014 12:53 AM, Jan Hubicka wrote: On Fri, 20 Jun 2014, Trevor Saunders wrote: +@item -fipa-icf +@opindex fipa-icf +Perform Identical Code Folding for functions and read-only variables. I would perhaps explicitly say that the optimizations

Re: [PATCH 4/5] Existing tests fix

2014-09-26 Thread Martin Liška
On 06/30/2014 02:11 PM, Martin Liška wrote: On 06/17/2014 09:52 PM, Jeff Law wrote: On 06/13/14 04:48, mliska wrote: Hi, many tests rely on a precise number of scanned functions in a dump file. If IPA ICF decides to merge some function and(or) read-only variables, counts do not match

Re: [PATCH 3/5] IPA ICF pass

2014-09-27 Thread Martin Liška
On 09/27/2014 01:27 AM, Jan Hubicka wrote: While a plain Firefox -flto build works fine. LTO/PGO build fails with: lto1: internal compiler error: in ipa_merge_profiles, at ipa-utils.c:540 0x7d6165 ipa_merge_profiles(cgraph_node*, cgraph_node*) ../../gcc/gcc/ipa-utils.c:540 0xf10c41

Re: [PATCH 3/5] IPA ICF pass

2014-09-27 Thread Martin Liška
On 09/27/2014 07:59 AM, Markus Trippelsdorf wrote: On 2014.09.27 at 01:27 +0200, Jan Hubicka wrote: While a plain Firefox -flto build works fine. LTO/PGO build fails with: lto1: internal compiler error: in ipa_merge_profiles, at ipa-utils.c:540 0x7d6165 ipa_merge_profiles(cgraph_node*,

Re: [PATCH 3/5] IPA ICF pass

2014-09-27 Thread Martin Liška
On 09/27/2014 09:47 AM, Markus Trippelsdorf wrote: On 2014.09.27 at 07:59 +0200, Markus Trippelsdorf wrote: It seems that in this case we reject too many of equality candidates? It think the original numbers was about 4-5% but later some equivalences was disabled because of devirt/aliasing

Re: [PATCH, DOC]: New value 'default' for --enable-languages

2014-10-03 Thread Martin Liška
On 08/21/2014 01:57 PM, Martin Liška wrote: Ping. There was no explicit agreement that I can commit the change to trunk? Thanks, Martin On 07/30/2014 08:19 PM, Martin Liška wrote: On 07/30/2014 06:38 PM, Mike Stump wrote: On Jul 30, 2014, at 6:20 AM, Richard Biener richard.guent

[PATCH] lto.c: add ARG_UNUSED for an argument

2014-10-06 Thread Martin Liška
Hello. In lto.c, if #ifdef HAVE_WORKING_FORK isn't defined, 'last' argument is unused and in that case GCC cannot bootstrap due to a warning. Ready for trunk? Built on x86_64-linux-gnu. Thanks, Martin gcc/lto/ChangeLog: 2014-10-06 Martin Liska mli...@suse.cz * lto.c (stream_out):

[PATCH] PR/63376

2014-10-10 Thread Martin Liška
Hello. This is a oneline patch that fixed the issue in PR63376. This was a mechanical error and I will commit it as obivous. Thank you, Martin gcc/ChangeLog: 2014-10-11 Martin Liska mli...@suse.cz PR/63376 * cgraphunit.c (symbol_table::process_new_functions): Missing call

Re: [PATCH 3/5] IPA ICF pass

2014-10-10 Thread Martin Liška
On 09/28/2014 03:20 AM, Jan Hubicka wrote: Hi. Thank you Markus for presenting numbers, it corresponds with I measured. If I see correctly, IPA ICF pass takes about 7 seconds, the rest is distributed in verifier (not interesting for release version of the compiler) and 'phase opt and

Re: [PATCH 3/5] IPA ICF pass

2014-10-10 Thread Martin Liška
On 09/26/2014 09:46 PM, Jan Hubicka wrote: Hi, this is on ipa-icf-gimple.c @@ -2827,11 +2829,19 @@ cgraph_node::verify_node (void) { if (verify_edge_corresponds_to_fndecl (e, decl)) { -

Re: [PATCH 3/5] IPA ICF pass

2014-10-10 Thread Martin Liška
On 09/26/2014 11:27 PM, Jan Hubicka wrote: diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c new file mode 100644 index 000..f3472fe --- /dev/null +++ b/gcc/ipa-icf.c @@ -0,0 +1,2841 @@ +/* Interprocedural Identical Code Folding pass + Copyright (C) 2014 Free Software Foundation, Inc. + +

Re: [PATCH 3/5] IPA ICF pass

2014-10-13 Thread Martin Liška
On 10/11/2014 10:19 AM, Jan Hubicka wrote: After few days of measurement and tuning, I was able to get numbers to the following shape: Execution times (seconds) phase setup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 1412 kB ( 0%) ggc phase opt and generate :

Re: [PATCH 3/5] IPA ICF pass

2014-10-13 Thread Martin Liška
On 10/11/2014 02:05 AM, Martin Liška wrote: On 09/26/2014 09:46 PM, Jan Hubicka wrote: Hi, this is on ipa-icf-gimple.c @@ -2827,11 +2829,19 @@ cgraph_node::verify_node (void) { if (verify_edge_corresponds_to_fndecl (e, decl

[RFC, PATCH]: Introduction of callgraph annotation class

2014-10-15 Thread Martin Liška
Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related to a cgraph_node. As you know, symbol_table provides hooks for creation, deletion and duplication of a cgraph_node. If

Re: [PATCH 3/5] IPA ICF pass

2014-10-15 Thread Martin Liška
On 10/14/2014 06:04 PM, Jan Hubicka wrote: diff --git a/gcc/cgraph.h b/gcc/cgraph.h index fb41b01..2de98b4 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -172,6 +172,12 @@ public: /* Dump referring in list to FILE. */ void dump_referring (FILE *); + /* Get number of references for

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 01:31 PM, Richard Biener wrote: On Wed, Oct 15, 2014 at 6:26 PM, Martin Liška mli...@suse.cz wrote: Hello. Following patch introduces a new class called callgraph_annotation. Idea behind the patch is to provide a generic interface one can use to register custom info related

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective that it cannot be used as a index to a vector. It

Re: [RFC, PATCH]: Introduction of callgraph annotation class

2014-10-16 Thread Martin Liška
On 10/16/2014 02:05 PM, Martin Liška wrote: On 10/16/2014 02:01 PM, Jan Hubicka wrote: Hello. If I recall correctly, we recycle cgraph_nodes and it's possible that an UID is given to different nodes: symbol_table::allocate_cgraph_symbol (void). Such uid is problematic from perspective

IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Martin Liška
Hello. Following patch fixes i586 bootstrap failure: https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘std::listipa_icf::congruence_class*::size_type

Re: IPA ICF fallout: i586 bootstrap failure fix

2014-10-16 Thread Martin Liška
On 10/16/2014 02:45 PM, Jakub Jelinek wrote: On Thu, Oct 16, 2014 at 02:41:36PM +0200, Martin Liška wrote: Hello. Following patch fixes i586 bootstrap failure: https://gcc.gnu.org/ml/gcc-testresults/2014-10/msg01713.html ../../src-trunk/gcc/ipa-icf.c:2096:23: error: format ‘%lu’ expects

IPA ICF fallout: fix for two ipa-icf-*.C tests

2014-10-16 Thread Martin Liška
Hello. I forgot that RUNTESTFLAGS=ipa.exp does not execute *.C tests cases residing in testsuite/g++.dg/ipa/ folder. The patch fixes two of my newly added tests. Considered as obvious. Thank you, Martin gcc/testsuite/ChangeLog: 2014-10-16 Martin Liska mli...@suse.cz *

IPA ICF fallout: fox for libasan and pr43077-1.c

2014-10-16 Thread Martin Liška
Hello. After IRC discussion with Jakub, I disable IPA ICF for ASAN. Second part of the patch contains fix for pr43077-1.c. Considered as pre-approved. Thanks, Martin gcc/testsuite/ChangeLog: 2014-10-16 Martin Liska mli...@suse.cz * gcc.dg/guality/pr43077-1.c: IPA ICF disabled

[PATCH,i686]: Temporary fir for PR63566

2014-10-17 Thread Martin Liška
Hello. After IRC discussion, IPA ICF will set local flag to false for both original and node that becomes an alias. That will enforce equal calling convention to be use. i686-pc-linux bootstrap has been still running, I will commit the fix as soon as it finishes. I consider it as

[PATCH] Fix for PR63569

2014-10-17 Thread Martin Liška
Hello. Following patch fixes PR63569. Bootstrap executed on ppc64-linux and no regression seen on x86_64-pc-linux. Ready for trunk? Thank you, Martin gcc/testsuite/ChangeLog: 2014-10-17 Martin Liska mli...@suse.cz * gcc.dg/ipa/ipa-icf-31.c: New test. gcc/ChangeLog: 2014-10-17

[PATCH] Fix for PR63583

2014-10-19 Thread Martin Liška
Hello. I added missing gimple_asm_string comparison for a function with an asm statement. Bootstrap and regression tests still running, ready for trunk after it finishes? Thank you, Martin gcc/ChangeLog: 2014-10-19 Martin Liska mli...@suse.cz * ipa-icf-gimple.c

[PATCH] g++.dg: add ipa.exp file

2014-03-28 Thread Martin Liška
Hi, I would like to add corresponding ipa.exp file for g++ that let me run: make -k check RUNTESTFLAGS=ipa.exp Changelog: 2014-03-28 Martin Liska mli...@suse.cz * g++.dg/ipa.epx: Anologous file added to g++.dg folder. OK for trunk? Thank you, Martin diff --git

Re: Fix indirect call profiling for COMDAT symbols

2014-04-11 Thread Martin Liška
On 04/11/2014 08:00 AM, Jan Hubicka wrote: Hi, while looking into firefox profiles, I noticed that we miss devirtualizations to comdat symbols, because we manage to get different profile_id in each unit. This is easily fixed by the following patch that makes profiled_id to by crc32 of the

Re: Avoid unnecesary GGC runs during LTO

2014-04-11 Thread Martin Liška
On 04/11/2014 08:07 AM, Jan Hubicka wrote: Hi, while looking into -ftime-report, I noticed that ggc can take up to 10% of WPA memory while it does almost nothing: it is run just after streaming that explicitly frees memory that becomes unreachable. The first GGC run usually saves at most 1% of

Re: ipa-visibility TLC 2/n

2014-05-26 Thread Martin Liška
On 05/25/2014 07:54 AM, Jan Hubicka wrote: Hi, this patch adds code to rerite references in vtable initializers to local aliases when doing so is a win. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-visibility.c (can_replace_by_local_alias_in_vtable): New function.

[PATCH 1/4] Make coverage_compute_cfg_checksum callable with an argument

2014-05-30 Thread Martin Liška
Hello, this is a small patchset that prepares API for new IPA Identical code folding pass. The patch adds an argument for coverage_compute_cfg_checksum. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-05-29 Martin Liska mli...@suse.cz * coverage.h

[PATCH 2/4] Enhancement of call graph API

2014-05-30 Thread Martin Liška
Hello, this patch enhances callgraph API to enable more precise control of expand_thunk; another function becomes global. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-05-29 Martin Liska mli...@suse.cz * cgraph.h (expand_thunk): New argument added.

[PATCH 3/4] New attribute lookup function addition

2014-05-30 Thread Martin Liška
Hi, this patch introduces a new function lookup_attribute_starting that can find all attributes starting with a specified string. Purpose of the function is to be able to identify e.g. if a function has any 'omp' attribute. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks,

Re: [PATCH 1/4] Make coverage_compute_cfg_checksum callable with an argument

2014-06-02 Thread Martin Liška
On 05/30/2014 06:28 PM, Jeff Law wrote: On 05/30/14 00:47, Martin Liška wrote: Hello, this is a small patchset that prepares API for new IPA Identical code folding pass. The patch adds an argument for coverage_compute_cfg_checksum. Bootstrapped and tested on x86_64-linux. OK for trunk

Re: [PATCH 2/4] Enhancement of call graph API

2014-06-02 Thread Martin Liška
On 05/30/2014 06:42 PM, Jeff Law wrote: On 05/30/14 00:47, Martin Liška wrote: Hello, this patch enhances callgraph API to enable more precise control of expand_thunk; another function becomes global. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2014-05-29

Re: [PATCH 3/4] New attribute lookup function addition

2014-06-02 Thread Martin Liška
On 05/30/2014 06:37 PM, Jeff Law wrote: On 05/30/14 00:49, Martin Liška wrote: Hi, this patch introduces a new function lookup_attribute_starting that can find all attributes starting with a specified string. Purpose of the function is to be able to identify e.g. if a function has any 'omp

[PATCH] PR 61642

2014-06-11 Thread Martin Liška
Hello, I send patch for PR61642. Changelog: 2014-06-11 Martin Liska mli...@suse.cz * ipa-prop.c (ipa_make_edge_direct_to_target): Check that gimple call statement is reachable. Bootstrapped and regtested on x86_64-unknown-linux-gnu. Ready for trunk? Martin diff --git

Re: [PATCH] PR 61642

2014-06-11 Thread Martin Liška
On 06/11/2014 02:01 PM, Richard Biener wrote: On Wed, Jun 11, 2014 at 1:58 PM, Martin Liška mli...@suse.cz wrote: Hello, I send patch for PR61642. 61462? Hello, that's bogus, I am not a visionary that creates a patch for a future bug :) Thanks, Martin Changelog: 2014-06-11

Re: Make ipa-ref somewhat less stupid

2014-06-13 Thread Martin Liška
On 06/10/2014 08:34 AM, Jan Hubicka wrote: Hi, ipa-reference is somewhat stupid and builds its data sets for all variables including addressable and public one just to prune them out after all bitmaps are constructed. This used to make sense when the profile generation happened at compile

Re: Make ipa-ref somewhat less stupid

2014-06-17 Thread Martin Liška
On 06/16/2014 10:01 AM, Jan Hubicka wrote: On 06/10/2014 08:34 AM, Jan Hubicka wrote: Hi, ipa-reference is somewhat stupid and builds its data sets for all variables including addressable and public one just to prune them out after all bitmaps are constructed. This used to make sense when

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Martin Liška
On 06/17/2014 10:14 PM, David Malcolm wrote: On Fri, 2014-06-13 at 12:24 +0200, mliska wrote: [...snip...] Statistics about the pass: Inkscape: 11.95 MB - 11.44 MB (-4.27%) Firefox: 70.12 MB - 70.12 MB (-3.07%) FWIW, you wrote 70.12 MB here for both before and after for Firefox, but

Re: [PATCH 1/5] New Identical Code Folding IPA pass

2014-06-18 Thread Martin Liška
On 06/17/2014 10:09 PM, Paolo Carlini wrote: Hi, On 13/06/14 12:24, mliska wrote: The optimization is inspired by Microsoft /OPT:ICF optimization (http://msdn.microsoft.com/en-us/library/bxwfs976.aspx) that merges COMDAT sections with each function reside in a separate section. In terms

Re: [PATCH 4/5] Existing tests fix

2014-06-18 Thread Martin Liška
On 06/17/2014 10:50 PM, Rainer Orth wrote: Jeff Law l...@redhat.com writes: On 06/13/14 04:48, mliska wrote: Hi, many tests rely on a precise number of scanned functions in a dump file. If IPA ICF decides to merge some function and(or) read-only variables, counts do not match. Martin

[PATCH] Fix gimple-fold

2014-03-18 Thread Martin Liška
Hello, I found ICE in Chromium compiled with LTO. There's a call that is proved by ipa-devirt as __builtin_unreachable; same decision is done by gimple-fold and this call is replaced by GIMPLE_CALL and GIMPLE_ASSIGN (in this order). After that condition for

Re: [PATCH] Fix gimple-fold

2014-03-18 Thread Martin Liška
Thank you for feedback, new changelog: 2014-03-18 Martin Liska mli...@suse.cz * cgraph.c (cgraph_update_edges_for_call_stmt_node): Added case when gimple call statement is update. * gimple-fold.c (gimple_fold_call): Changed order for GIMPLE_ASSIGN and

Re: [PATCH] Fix gimple-fold

2014-03-18 Thread Martin Liška
Patch passes bootstrap and regtest. I fixed indentation according to discussion with Jakub. OK for trunk? Thanks, Martin On 03/18/2014 02:55 PM, Richard Biener wrote: On Tue, Mar 18, 2014 at 2:29 PM, Martin Liška mli...@suse.cz wrote: Thank you for feedback, Ok if it passes bootstrap

Re: [PATCH] Avoid ggc_collect () after WPA forking

2014-03-19 Thread Martin Liška
On 03/19/2014 03:55 PM, Richard Biener wrote: On Wed, 19 Mar 2014, Martin Liška wrote: There are stats for Firefox with LTO and -O2. According to graphs it looks that memory consumption for parallel WPA phase is similar. When I disable parallel WPA, wpa footprint is ~4GB, but ltrans memory

Re: [testsuite] Fix gcc.dg/ipa/ipa-icf-2[18].c on Solaris

2014-10-23 Thread Martin Liška
On 10/23/2014 11:38 AM, Jakub Jelinek wrote: On Thu, Oct 23, 2014 at 11:35:44AM +0200, Rainer Orth wrote: The testcase is clearly i?86/x86_64 specific, so it must be guarded with { target i?86-*-* x86_64-*-* }, and as it is a compile time test, no need Right, that's what my patch already

Re: [PATCH 5/5] New tests introduction

2014-10-23 Thread Martin Liška
On 10/19/2014 09:50 AM, Andreas Schwab wrote: Martin Liška mli...@suse.cz writes: diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c new file mode 100644 index 000..7358e43 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c @@ -0,0 +1,27

Re: [testsuite] Fix gcc.dg/ipa/ipa-icf-2[18].c on Solaris

2014-10-23 Thread Martin Liška
On 10/23/2014 04:03 PM, Uros Bizjak wrote: On Thu, Oct 23, 2014 at 3:54 PM, Uros Bizjak ubiz...@gmail.com wrote: Ok, will try that. Still no idea why Linux/x86 and Solaris/x86 are different here. Why do you think so? I certainly have: FAIL: gcc.dg/ipa/ipa-icf-21.c (test for excess errors)

[PATCH] Fix for PR63595

2014-10-24 Thread Martin Liška
Hello. Following patch contains addition of PHI result comparison in IPA ICF. Boostrap works on x86_64-linux-pc, no regression observed. Ready for trunk? Thanks, Martin gcc/testsuite/ChangeLog: 2014-10-24 Martin Liska mli...@suse.cz * gcc.dg/ipa/pr63595.c: New test. gcc/ChangeLog:

Re: [PATCH, IPA ICF] Fix PR63664, PR63574 (segfault in ipa-icf pass)

2014-10-29 Thread Martin Liška
On 10/29/2014 02:45 PM, Ilya Enkovich wrote: On 29 Oct 10:34, Richard Biener wrote: On Tue, Oct 28, 2014 at 5:14 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch fixes PR63664 and PR63574. Problem is in NULL types for labels not handled by ICF properly. I assume it is OK for

[PATCH] Fix for PR63587

2014-10-29 Thread Martin Liška
Hello. Following patch fixes PR63587, where we put DECL_RESULT in cgraph_node::expand_thunk to local_decls. Patch has been tested on x86_64-linux-pc without any regression and boostrap works correctly. Ready for thunk? Thanks, Martin gcc/testsuite/ChangeLog: 2014-10-29 Martin Liska

Re: [PATCH, IPA ICF] Fix PR63664, PR63574 (segfault in ipa-icf pass)

2014-10-29 Thread Martin Liška
On 10/29/2014 03:07 PM, Ilya Enkovich wrote: 2014-10-29 17:01 GMT+03:00 Martin Liška mli...@suse.cz: On 10/29/2014 02:45 PM, Ilya Enkovich wrote: On 29 Oct 10:34, Richard Biener wrote: On Tue, Oct 28, 2014 at 5:14 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, This patch fixes

  1   2   3   4   5   6   7   8   9   10   >