Re: [GOOGLE] Patch to fix AutoFDO LIPO performance regression

2013-09-19 Thread Xinliang David Li
; - cgraph_process_module_scope_statics (); - /* Now perform link to allow cross module inlining. */ - cgraph_do_link (); - varpool_do_link (); - cgraph_unify_type_alias_sets (); - return TODO_rebuild_cgraph_edges; } On Wed, Sep 18, 2013 at 5:16 PM, Xinliang David Li davi...@google.com wrote: On Wed, Sep 18, 2013 at 4

Re: [GOOGLE] disable slp for AutoFDO

2013-09-18 Thread Xinliang David Li
Ok. David On Wed, Sep 18, 2013 at 10:21 AM, Dehao Chen de...@google.com wrote: This patch disables SLP for AutoFDO. Bootstrapped and passed unittests. OK for google-4_8? Thanks, Dehao Index: gcc/opts.c === --- gcc/opts.c

Re: New GCC options for loop vectorization

2013-09-18 Thread Xinliang David Li
On Tue, Sep 17, 2013 at 1:20 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Sep 16, 2013 at 10:24 PM, Xinliang David Li davi...@google.com wrote: On Mon, Sep 16, 2013 at 3:13 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li

Re: [GOOGLE] Patch to fix AutoFDO LIPO performance regression

2013-09-18 Thread Xinliang David Li
On Wed, Sep 18, 2013 at 4:51 PM, Dehao Chen de...@google.com wrote: This patch fixup the call graph edge targets during AutoFDO pass, so that when rebuilding call graph edges, it can find the correct callee. Bootstrapped and passed regression test. Benchmark tests on-going. Ok for google-4_8

Re: New GCC options for loop vectorization

2013-09-17 Thread Xinliang David Li
On Tue, Sep 17, 2013 at 1:20 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Sep 16, 2013 at 10:24 PM, Xinliang David Li davi...@google.com wrote: On Mon, Sep 16, 2013 at 3:13 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li

Re: New GCC options for loop vectorization

2013-09-17 Thread Xinliang David Li
On Tue, Sep 17, 2013 at 8:45 AM, Jakub Jelinek ja...@redhat.com wrote: On Tue, Sep 17, 2013 at 08:37:57AM -0700, Xinliang David Li wrote: char a[1]; void foo(int n) { int* b = (int*)(a+n); int i = 0; for (; i 1000; ++i) b[i] = 1; } int main(int argn, char

Re: [GOOGLE] AutoFDO should honor system paths in the profile

2013-09-17 Thread Xinliang David Li
ok. David On Tue, Sep 17, 2013 at 4:53 PM, Dehao Chen de...@google.com wrote: This patch makes AutoFDO honor system paths stored in the profile. Bootstrapped and passed regression tests. OK for google-4_8 branch? Thanks, Dehao Index: gcc/auto-profile.c

Re: Dump framework newline cleanup

2013-09-16 Thread Xinliang David Li
I noticed there are a couple of dump_printf_loc instances in coverage.c not ended with newline. They should be fixed. David On Tue, Sep 10, 2013 at 6:32 AM, Teresa Johnson tejohn...@google.com wrote: On Mon, Sep 9, 2013 at 9:55 PM, Xinliang David Li davi...@google.com wrote: looks fine to me

Re: Dump framework newline cleanup

2013-09-16 Thread Xinliang David Li
16, 2013 at 11:06 AM, Teresa Johnson tejohn...@google.com wrote: On Mon, Sep 16, 2013 at 10:57 AM, Xinliang David Li davi...@google.com wrote: I noticed there are a couple of dump_printf_loc instances in coverage.c not ended with newline. They should be fixed. I committed this change

Re: New GCC options for loop vectorization

2013-09-16 Thread Xinliang David Li
I incorporated all the comments and committed the change (also fixed a test failure with --help=optimizers). thanks, David On Mon, Sep 16, 2013 at 3:07 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Sep 13, 2013 at 6:56 PM, Xinliang David Li davi...@google.com wrote: Updated

Re: New GCC options for loop vectorization

2013-09-16 Thread Xinliang David Li
On Mon, Sep 16, 2013 at 3:13 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li davi...@google.com wrote: On Fri, Sep 13, 2013 at 1:30 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li

Re: tree if convert pass control

2013-09-16 Thread Xinliang David Li
Ok -- abandon the patch. On Mon, Sep 16, 2013 at 2:04 AM, Richard Biener richard.guent...@gmail.com wrote: On Sat, Sep 14, 2013 at 8:10 AM, Xinliang David Li davi...@google.com wrote: tree if conversion is an enabler pass for vectorization, so by default, it is only turned on when

tree if convert pass control

2013-09-14 Thread Xinliang David Li
Xinliang David Li davi...@google.com * tree-vect-slp.c (destroy_bb_vec_info): Data ref cleanup. Index: common.opt === --- common.opt (revision 202229) +++ common.opt (working copy) @@ -1308,7 +1308,7 @@ EnumValue Enum

Re: [Google] Fix test failure after porting __gcov_get_profile_prefix from google/4_7

2013-09-13 Thread Xinliang David Li
Ok. David On Fri, Sep 13, 2013 at 7:21 AM, Teresa Johnson tejohn...@google.com wrote: Testing passes, is the below patch ok for google/4_8? Thanks, Teresa On Thu, Sep 12, 2013 at 10:18 PM, Teresa Johnson tejohn...@google.com wrote: On Thu, Sep 12, 2013 at 2:32 PM, Xinliang David Li davi

Re: New GCC options for loop vectorization

2013-09-13 Thread Xinliang David Li
On Fri, Sep 13, 2013 at 1:30 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li davi...@google.com wrote: Currently -ftree-vectorize turns on both loop and slp vectorizations, but there is no simple way to turn on loop vectorization alone

Re: New GCC options for loop vectorization

2013-09-13 Thread Xinliang David Li
, Xinliang David Li davi...@google.com wrote: On Fri, Sep 13, 2013 at 1:30 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li davi...@google.com wrote: Currently -ftree-vectorize turns on both loop and slp vectorizations, but there is no simple

Re: New GCC options for loop vectorization

2013-09-13 Thread Xinliang David Li
Ok -- then my updated patch is wrong then. The implementation in the first version matches the requirement. thanks, David On Fri, Sep 13, 2013 at 9:45 AM, Joseph S. Myers jos...@codesourcery.com wrote: On Fri, 13 Sep 2013, Richard Biener wrote: @@ -1691,6 +1695,12 @@ common_handle_option

Re: New GCC options for loop vectorization

2013-09-13 Thread Xinliang David Li
Updated patch implementing the logic that more specific option wins. Ok for trunk? thanks, David On Fri, Sep 13, 2013 at 9:48 AM, Xinliang David Li davi...@google.com wrote: Ok -- then my updated patch is wrong then. The implementation in the first version matches the requirement. thanks

Re: [Google] Fix test failure after porting __gcov_get_profile_prefix from google/4_7

2013-09-12 Thread Xinliang David Li
On Thu, Sep 12, 2013 at 1:06 PM, Teresa Johnson tejohn...@google.com wrote: After porting r198033 from google/4_7 to google/4_8 a test case failed with an assert when trying to take the strlen of profile_data_prefix. In most cases this is either set from the directory specified to

New GCC options for loop vectorization

2013-09-12 Thread Xinliang David Li
; Index: ChangeLog === --- ChangeLog (revision 202481) +++ ChangeLog (working copy) @@ -1,3 +1,24 @@ +2013-09-12 Xinliang David Li davi...@google.com + + * tree-if-conv.c (main_tree_if_conversion): Check new flag. + * omp

Re: [Google] Fix test failure after porting __gcov_get_profile_prefix from google/4_7

2013-09-12 Thread Xinliang David Li
...@google.com wrote: On Thu, Sep 12, 2013 at 1:20 PM, Xinliang David Li davi...@google.com wrote: On Thu, Sep 12, 2013 at 1:06 PM, Teresa Johnson tejohn...@google.com wrote: After porting r198033 from google/4_7 to google/4_8 a test case failed with an assert when trying to take the strlen

Re: [PATCH] [vectorizer] Fixing a bug in tree-vect-patterns.c in GCC vectorizer.

2013-09-11 Thread Xinliang David Li
Can you add a test case to the regression suite? When the type of arguments are unsigned short/unsigned int, GCC does not vectorize the loop anymore -- this is worth a separate bug to track. punpcklwd instruction can be used to do zero extension of the short type. David On Wed, Sep 11, 2013 at

[google] record system paths (isystem) in module infos (LIPO mode)

2013-09-10 Thread Xinliang David Li
The following patch enables GCC to record system include paths in module infos. This allows more precise parsing context to be established when compiling auxiliary modules -- FE behaves slightly differently when parsing system headers. There are also a couple of other cleanups in the patch.

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-09 Thread Xinliang David Li
:26 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 4 Sep 2013, Xinliang David Li wrote: This patch submission still fails to pay attention to various of my comments. If you can provide inlined comments in the patch, that will be more useful and productive. I have explained

Re: Dump framework newline cleanup

2013-09-09 Thread Xinliang David Li
looks fine to me. In the long run, I wonder if the machinery in diagnostic messages can be reused for opt-info dumping -- i.e., support different streams. It has many nice features including %qD specifier for printing tree decls. David On Mon, Sep 9, 2013 at 12:01 PM, Teresa Johnson

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-04 Thread Xinliang David Li
On Wed, Sep 4, 2013 at 1:53 PM, Cong Hou co...@google.com wrote: I have made a new patch according to your comments. I found several references saying that the precision 2p+2 is OK for the sqrt conversion (one here: http://www.cs.berkeley.edu/~fateman/generic/algorithms.pdf). The new patch is

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-04 Thread Xinliang David Li
On Wed, Sep 4, 2013 at 1:59 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 4 Sep 2013, Cong Hou wrote: I have made a new patch according to your comments. I found several references saying that the precision 2p+2 is OK for the sqrt conversion (one here:

Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode.

2013-09-03 Thread Xinliang David Li
From Joseph: The conversion is not safe for sqrt if the two types are double and long double and long double is x86 extended, for example. This is not reflected in the patch. David On Tue, Sep 3, 2013 at 2:27 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Tue, 3 Sep 2013, Cong Hou

Re: Type inheritance graph analysis speculative devirtualization, part 7/7 (speculative devirtualizatoin)

2013-09-01 Thread Xinliang David Li
Missing test cases? Have you tested the optimization with SPEC2k and SPEC06? There are a couple of benchmarks benefit greatly from devirtualization, such as eon, povray etc. I believe astar will probably improve with this optimization at O2 (it has hot virtual functions that are not overridden

Re: [PATCH] Convert more passes to new dump framework

2013-08-30 Thread Xinliang David Li
Except that in this form, the dump will be extremely large and not suitable for very large applications. Besides, we might also want to use the same machinery (dump_printf_loc etc) for dump file dumping. The current behavior of using '-details' to turn on opt-info-all messages for dump files are

Re: [PATCH] Convert more passes to new dump framework

2013-08-30 Thread Xinliang David Li
On Fri, Aug 30, 2013 at 12:51 PM, Teresa Johnson tejohn...@google.com wrote: On Fri, Aug 30, 2013 at 9:27 AM, Xinliang David Li davi...@google.com wrote: Except that in this form, the dump will be extremely large and not suitable for very large applications. Yes. I did some measurements

Re: Eliminate vectorizer analysis side effects

2013-08-30 Thread Xinliang David Li
On Fri, Aug 30, 2013 at 1:23 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Aug 30, 2013 at 1:28 AM, Xinliang David Li davi...@google.com wrote: I was debugging a runtime failure of SPEC06 xalancbmk built with LIPO. Using -fdisable-pass option pinpoints the problem in slp

Eliminate vectorizer analysis side effects

2013-08-29 Thread Xinliang David Li
) +++ ChangeLog (working copy) @@ -1,5 +1,17 @@ 2013-08-29 Xinliang David Li davi...@google.com + * tree-vect-data-refs.c (vect_compute_data_ref_alignment): + Delay base decl alignment adjustment. + * tree-vectorizer.c (ensure_base_alignment): New function. + (vectorize_loops

Re: [Google] Refine hot caller heuristic

2013-08-29 Thread Xinliang David Li
: On Tue, Aug 20, 2013 at 9:35 PM, Xinliang David Li davi...@google.com wrote: Do you need to guard the jump function access with check if (ipa_node_params_vector.exists ())? I believe it is not necessary since, for example, ipa_analyze_node calls ipa_check_create_node_params that calls create

Re: [PATCH] Convert more passes to new dump framework

2013-08-28 Thread Xinliang David Li
On Wed, Aug 28, 2013 at 7:09 AM, Teresa Johnson tejohn...@google.com wrote: On Wed, Aug 28, 2013 at 4:01 AM, Richard Biener richard.guent...@gmail.com wrote: On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson tejohn...@google.com wrote: On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson

Re: [PATCH][2/n] 2nd try: Re-organize -fvect-cost-model, enable basic vectorization at -O2

2013-08-28 Thread Xinliang David Li
On Wed, Aug 28, 2013 at 12:59 AM, Richard Biener rguent...@suse.de wrote: On Tue, 27 Aug 2013, Xinliang David Li wrote: Richard, I have some comments about the patch. -ftree-vectorizer-verbose=numberThis switch is deprecated. Use -fopt-info instead. ftree-slp-vectorize

Re: opt-info message change for vectorizer

2013-08-28 Thread Xinliang David Li
, Xinliang David Li davi...@google.com wrote: If this is the convention, we should probably have another patch to fix all the existing opt-info messages. Yes please. Also ... b.c:16:A::foo: note: Loop is vectorized loop vectorized b.c:16:A::foo: note: Loop is versioned to remove aliases

Re: [GOOGLE] Update AutoFDO annotation

2013-08-27 Thread Xinliang David Li
Ok. David On Tue, Aug 27, 2013 at 7:36 AM, Dehao Chen de...@google.com wrote: Patch updated. Thanks, Dehao On Mon, Aug 26, 2013 at 4:11 PM, Xinliang David Li davi...@google.com wrote: Can you add missing documentation on functions like ...:get_count_info -- documenting return value etc

Re: [PATCH] Convert more passes to new dump framework

2013-08-27 Thread Xinliang David Li
+ Honza On Tue, Aug 27, 2013 at 10:56 AM, Teresa Johnson tejohn...@google.com wrote: Ping #3. Thanks, Teresa On Mon, Aug 19, 2013 at 11:33 AM, Teresa Johnson tejohn...@google.com wrote: Ping. Thanks, Teresa On Mon, Aug 12, 2013 at 6:54 AM, Teresa Johnson tejohn...@google.com wrote: On

Re: opt-info message change for vectorizer

2013-08-27 Thread Xinliang David Li
Does this one look ok? thanks, David On Thu, Aug 22, 2013 at 4:20 PM, Xinliang David Li davi...@google.com wrote: Hi, In this patch, loop alignment peeling and loop versioning transformation will be reported via -fopt-info by default. This will help vectorizer size tuning. It also enhances

Re: opt-info message change for vectorizer

2013-08-27 Thread Xinliang David Li
the function name before each block of messages, a la inform(). Thanks, Teresa On Tue, Aug 27, 2013 at 11:22 AM, Xinliang David Li davi...@google.com wrote: Does this one look ok? thanks, David On Thu, Aug 22, 2013 at 4:20 PM, Xinliang David Li davi...@google.com wrote: Hi, In this patch

Re: opt-info message change for vectorizer

2013-08-27 Thread Xinliang David Li
If this is the convention, we should probably have another patch to fix all the existing opt-info messages. thanks, David On Tue, Aug 27, 2013 at 1:23 PM, Mike Stump mikest...@comcast.net wrote: On Aug 27, 2013, at 11:22 AM, Xinliang David Li davi...@google.com wrote: Does this one look ok

Re: [PATCH][2/n] 2nd try: Re-organize -fvect-cost-model, enable basic vectorization at -O2

2013-08-27 Thread Xinliang David Li
Richard, I have some comments about the patch. -ftree-vectorizer-verbose=numberThis switch is deprecated. Use -fopt-info instead. ftree-slp-vectorize ! Common Report Var(flag_tree_slp_vectorize) Optimization Enable basic block vectorization (SLP) on trees The code dealing with

Re: [GOOGLE] Update AutoFDO annotation

2013-08-26 Thread Xinliang David Li
Can you add missing documentation on functions like ...:get_count_info -- documenting return value etc. Also it might be better to avoid using 'set' as the local variable name. Change it to something more specific. thanks, David On Thu, Aug 22, 2013 at 3:56 PM, Dehao Chen de...@google.com

opt-info message change for vectorizer

2013-08-22 Thread Xinliang David Li
=== --- ChangeLog (revision 201752) +++ ChangeLog (working copy) @@ -1,3 +1,13 @@ +2013-08-22 Xinliang David Li davi...@google.com + + * tree-vect-loop-manip.c (vect_do_peeling_for_alignment): + Emit alignment peeling message with default -fopt-info

Re: [Google] Refine hot caller heuristic

2013-08-20 Thread Xinliang David Li
Do you need to guard the jump function access with check if (ipa_node_params_vector.exists ())? Ideally, useful_cold_callee should be folded into the inline hints estimation. Question about the heuristic: why filtering out PASS_THROUGH parameter cases completely? Passing 'this' parameter in many

Re: [Google] fix a bug in lipo varpool node linking

2013-08-16 Thread Xinliang David Li
ok. David On Fri, Aug 16, 2013 at 1:28 PM, Rong Xu x...@google.com wrote: This patch fixed a bug in lipo varpool node linking. C++ FE drops the initializer if it's not used in this TU. For current varpool linking may resolve the varpool node to the one with null initializer. -Rong

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Xinliang David Li
Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; 2) add statistics dump -- average size of a hierarchy subgraph 3) Dump the graph using top-order -- starting from

Re: [RFC] Bare bones of virtual call tracking

2013-08-15 Thread Xinliang David Li
On Thu, Aug 15, 2013 at 9:46 AM, Jan Hubicka hubi...@ucw.cz wrote: Some suggestions for the future: 1) add summary info in the odr dump -- i.e. for each node, dump the number of direct bases, direct subtypes, number of all bases, all subtypes; OK, can add that. 2) add statistics dump --

Re: [Google] X86_TUNE_USE_VECTOR_CONVERTS adjustment

2013-08-15 Thread Xinliang David Li
yes. thanks, David On Thu, Aug 15, 2013 at 9:50 AM, Wei Mi w...@google.com wrote: Turning off X86_TUNE_USE_VECTOR_CONVERTS uses cvtss2sd instead of unpcklps+cvtps2pd, which is better for some recent intel micro arch such as westmere and sandybridge. So turn it off for m_GENERIC and

Re: -mtune-ctrl=.... support, round-2

2013-08-14 Thread Xinliang David Li
Ping? David On Mon, Aug 12, 2013 at 9:54 AM, Xinliang David Li davi...@google.com wrote: Fixed some formatting issues and typos. There are no regressions with the attached patch. Ok for trunk? thanks, David On Wed, Aug 7, 2013 at 10:12 PM, Xinliang David Li davi...@google.com wrote: Hi

Re: -mtune-ctrl=.... support, round-2

2013-08-14 Thread Xinliang David Li
On Wed, Aug 14, 2013 at 9:01 AM, Jan Hubicka hubi...@ucw.cz wrote: 2013-08-07 Xinliang David Li davi...@google.com * config/i386/i386.h: Adjust macro definition. * config/i386/i386.opt: Define two new options. * config/i386/x86-tune.def: Add arch selector field

Fix potential uninitialized variable error

2013-08-14 Thread Xinliang David Li
; char alg_name[128]; char align[16]; Index: ChangeLog === --- ChangeLog (revision 201732) +++ ChangeLog (working copy) @@ -1,4 +1,8 @@ 2013-08-14 Xinliang David Li davi...@google.com + * config/i386/i386.c

Re: Fix potential uninitialized variable error

2013-08-14 Thread Xinliang David Li
Ok. Will drop it in the next patch. David On Wed, Aug 14, 2013 at 11:23 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Aug 14, 2013 at 08:17:55PM +0200, Marek Polacek wrote: On Wed, Aug 14, 2013 at 11:12:27AM -0700, Xinliang David Li wrote: Index: ChangeLog

Re: Fix potential uninitialized variable error

2013-08-14 Thread Xinliang David Li
, align)) Index: ChangeLog === --- ChangeLog (revision 201735) +++ ChangeLog (working copy) @@ -1,6 +1,12 @@ 2013-08-14 Xinliang David Li davi...@google.com + + * config/i386/i386.c (ix86_option_override_internal

Re: -mtune-ctrl=.... support, round-2

2013-08-12 Thread Xinliang David Li
Fixed some formatting issues and typos. There are no regressions with the attached patch. Ok for trunk? thanks, David On Wed, Aug 7, 2013 at 10:12 PM, Xinliang David Li davi...@google.com wrote: Hi, the attached is a follow up patch. The patch includes the following changes: 1. new option

Re: [RFC] Bare bones of virtual call tracking

2013-08-12 Thread Xinliang David Li
It might be more flexible to represent the analysis results as a type/inheritance graph -- i.e. explicitly introduce inheritance edge class to capture the interitence relationship (offset, etc) between two class nodes. The 'method' should probably be augmented to include vtable slot index info.

[google] add a new parameter to control icall promotion strategy

2013-08-12 Thread Xinliang David Li
The attached patch defines a new parameter to decide if icall promotion (LIPO) is using a new hotness based heuristic or not. (See Honza's speculative call support patch for reference). David Index: params.def === --- params.def

Re: Cost model for indirect call speculation

2013-08-11 Thread Xinliang David Li
I like the approach in general -- in the past, indirect call promotion and function inlining heuristics are disconnected -- which can lead to either missing promotions or useless ones. This approach solves the problem. On Sun, Aug 11, 2013 at 4:11 PM, Jan Hubicka hubi...@ucw.cz wrote: Hi, this

Re: New parameters to control stringop expansion libcall strategy

2013-08-09 Thread Xinliang David Li
Is this version ok for trunk? thanks, David On Thu, Aug 8, 2013 at 9:31 AM, Xinliang David Li davi...@google.com wrote: Updated. thanks, David On Thu, Aug 8, 2013 at 8:18 AM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 7 Aug 2013, Xinliang David Li wrote: Updated patch

Re: New parameters to control stringop expansion libcall strategy

2013-08-09 Thread Xinliang David Li
need to do tunings for those constants, we can revisit it. thanks, David This has chance to do the right thing with optimize attribute specifying algorithms and with the longer term threading plan. Honza thanks, David On Thu, Aug 8, 2013 at 9:31 AM, Xinliang David Li davi

Re: Speculative call support in the callgraph

2013-08-09 Thread Xinliang David Li
On Fri, Aug 9, 2013 at 1:24 PM, Jan Hubicka hubi...@ucw.cz wrote: I have not looked at the details. One high level question: this form seems to only support one indirect target case. LIPO uses TOPN indirect target profiling (tracking multiple targets), which can be used by LTO as well (when

Re: Speculative call support in the callgraph

2013-08-09 Thread Xinliang David Li
On Fri, Aug 9, 2013 at 4:21 PM, Jan Hubicka hubi...@ucw.cz wrote: On Fri, Aug 9, 2013 at 1:24 PM, Jan Hubicka hubi...@ucw.cz wrote: I have not looked at the details. One high level question: this form seems to only support one indirect target case. LIPO uses TOPN indirect target profiling

Re: New parameters to control stringop expansion libcall strategy

2013-08-08 Thread Xinliang David Li
Updated patch attached (fixed header, buffer overflow, and warning -- error problems). Ok for trunk? thanks, David On Wed, Aug 7, 2013 at 6:04 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 7 Aug 2013, Xinliang David Li wrote: Why the exception? This should only be used

Re: New parameters to control stringop expansion libcall strategy

2013-08-08 Thread Xinliang David Li
Updated. thanks, David On Thu, Aug 8, 2013 at 8:18 AM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 7 Aug 2013, Xinliang David Li wrote: Updated patch attached (fixed header, buffer overflow, and warning -- error problems). You still have diagnostics starting with a capital

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-07 Thread Xinliang David Li
Ping? David On Sat, Aug 3, 2013 at 12:36 PM, Xinliang David Li davi...@google.com wrote: Hi, GCC/i386 currently has about 73 boolean parameters/knobs (defined in ix86_tune_features[], indexed by ix86_tune_indices) to perform micro-arch specific performance tuning. However such settings

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-07 Thread Xinliang David Li
On Wed, Aug 7, 2013 at 8:37 AM, Jan Hubicka hubi...@ucw.cz wrote: Ping? David On Sat, Aug 3, 2013 at 12:36 PM, Xinliang David Li davi...@google.com wrote: Hi, GCC/i386 currently has about 73 boolean parameters/knobs (defined in ix86_tune_features[], indexed by ix86_tune_indices

Re: New parameters to control stringop expansion libcall strategy

2013-08-07 Thread Xinliang David Li
Fixed the do while formatting. Ok for trunk with this version? thanks, David On Tue, Aug 6, 2013 at 2:42 AM, Jan Hubicka hubi...@ucw.cz wrote: 2013-08-02 Xinliang David Li davi...@google.com * config/i386/stringop.def: New file. * config/i386/stringop.opt: New file

Re: [GOOGLE] Refactor AutoFDO

2013-08-07 Thread Xinliang David Li
ok for google branch. David On Tue, Aug 6, 2013 at 3:41 PM, Dehao Chen de...@google.com wrote: Patch updated. http://codereview.appspot.com/12079043 Thanks, Dehao On Fri, Aug 2, 2013 at 11:21 AM, Xinliang David Li davi...@google.com wrote: More to follow. David static void

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-07 Thread Xinliang David Li
On Wed, Aug 7, 2013 at 4:54 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Sun, 4 Aug 2013, Andi Kleen wrote: Richard Biener richard.guent...@gmail.com writes: The patch fails to add documentation. That seems like a feature, it's likely not useful for the general public. More for

Re: New parameters to control stringop expansion libcall strategy

2013-08-07 Thread Xinliang David Li
On Wed, Aug 7, 2013 at 5:23 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 7 Aug 2013, Xinliang David Li wrote: Index: config/i386/stringop.def === --- config/i386/stringop.def (revision 0) +++ config/i386

Re: [PATCH] Convert more passes to new dump framework

2013-08-06 Thread Xinliang David Li
On Tue, Aug 6, 2013 at 5:37 AM, Martin Jambor mjam...@suse.cz wrote: Hi, On Mon, Aug 05, 2013 at 10:37:00PM -0700, Teresa Johnson wrote: This patch ports messages to the new dump framework, It would be great this new framework was documented somewhere. I lost track of what was agreed it

Re: New parameters to control stringop expansion libcall strategy

2013-08-06 Thread Xinliang David Li
On Tue, Aug 6, 2013 at 2:42 AM, Jan Hubicka hubi...@ucw.cz wrote: 2013-08-02 Xinliang David Li davi...@google.com * config/i386/stringop.def: New file. * config/i386/stringop.opt: New file. * config/i386/i386-opts.h: Include stringopt.def. * config

Re: New parameters to control stringop expansion libcall strategy

2013-08-06 Thread Xinliang David Li
, probably you could tune existing cost-models as well? Is it possible? the option is designed for purpose like this. thanks, David Michael On 5 August 2013 20:44, Xinliang David Li davi...@google.com wrote: thanks. Updated patch attached. David On Mon, Aug 5, 2013 at 3:57 AM, Michael V

Re: New parameters to control stringop expansion libcall strategy

2013-08-06 Thread Xinliang David Li
Forgot the patch. David On Tue, Aug 6, 2013 at 9:42 AM, Xinliang David Li davi...@google.com wrote: Corrected two small problems reported by the style checker (The warnings about the EnumValue for options in stringopt.opt are not valid). On Tue, Aug 6, 2013 at 1:46 AM, Michael Zolotukhin

Re: [PATCH] Convert more passes to new dump framework

2013-08-06 Thread Xinliang David Li
at 8:57 AM, Xinliang David Li davi...@google.com wrote: On Tue, Aug 6, 2013 at 5:37 AM, Martin Jambor mjam...@suse.cz wrote: Hi, On Mon, Aug 05, 2013 at 10:37:00PM -0700, Teresa Johnson wrote: This patch ports messages to the new dump framework, It would be great this new framework

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-05 Thread Xinliang David Li
On Mon, Aug 5, 2013 at 8:26 AM, H.J. Lu hjl.to...@gmail.com wrote: On Sun, Aug 4, 2013 at 9:23 AM, Xinliang David Li davi...@google.com wrote: On Sun, Aug 4, 2013 at 4:40 AM, Richard Biener richard.guent...@gmail.com wrote: Xinliang David Li davi...@google.com wrote: Hi, GCC/i386 currently has

Re: New parameters to control stringop expansion libcall strategy

2013-08-05 Thread Xinliang David Li
: afair, comments should end with dot-space-space. Michael On 04 Aug 20:01, Xinliang David Li wrote: The attached is a new patch implementing the stringop inline strategy control using two new -m options: -mmemcpy-strategy= -mmemset-strategy= See changes in doc/invoke.texi

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-05 Thread Xinliang David Li
ok -- makes sense. This can be done as a follow up patch. thanks, David On Mon, Aug 5, 2013 at 10:59 AM, H.J. Lu hjl.to...@gmail.com wrote: On Mon, Aug 5, 2013 at 9:33 AM, Xinliang David Li davi...@google.com wrote: On Mon, Aug 5, 2013 at 8:26 AM, H.J. Lu hjl.to...@gmail.com wrote: On Sun

Re: New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-04 Thread Xinliang David Li
On Sun, Aug 4, 2013 at 4:40 AM, Richard Biener richard.guent...@gmail.com wrote: Xinliang David Li davi...@google.com wrote: Hi, GCC/i386 currently has about 73 boolean parameters/knobs (defined in ix86_tune_features[], indexed by ix86_tune_indices) to perform micro-arch specific performance

Re: New parameters to control stringop expansion libcall strategy

2013-08-04 Thread Xinliang David Li
? thanks, David 2013-08-02 Xinliang David Li davi...@google.com * config/i386/stringop.def: New file. * config/i386/stringop.opt: New file. * config/i386/i386-opts.h: Include stringopt.def. * config/i386/i386.opt: Include stringopt.opt. * config/i386/i386.c

Re: Backend specific params.def? (Was Re: New parameters to control stringop expansion libcall strategy)

2013-08-03 Thread Xinliang David Li
parameters to do that. Potential usage includes per-application libcall strategy min-size tuning based on summary data with FDO (e.g, instruction workset size). Bootstrap and tested on x86_64/linux. Ok for trunk? thanks, David 2013-08-02 Xinliang David Li davi...@google.com

New option to do fine grain control [on|off] of micro-arch specific features : -mtune-ctrl=....

2013-08-03 Thread Xinliang David Li
and names of the features. Ok for trunk? thanks, David 2013-08-03 Xinliang David Li davi...@google.com * config/i386/i386.opt: New option -mtune-ctrl=. * config/i386/x86-tune.def: New file. * config/i386/i386.h: include x86-tune.def. * config/i386/i386.c

Re: [GOOGLE] Refactor AutoFDO

2013-08-02 Thread Xinliang David Li
= afdo_source_profile-get_function_instance_by_decl ( current_function_decl); need a new line after decls. On Thu, Aug 1, 2013 at 2:49 PM, Dehao Chen de...@google.com wrote: On Wed, Jul 31, 2013 at 10:14 AM, Xinliang David Li davi...@google.com wrote: Another round of documentation and naming

New parameters to control stringop expansion libcall strategy

2013-08-02 Thread Xinliang David Li
strategy min-size tuning based on summary data with FDO (e.g, instruction workset size). Bootstrap and tested on x86_64/linux. Ok for trunk? thanks, David 2013-08-02 Xinliang David Li davi...@google.com * params.def: New parameters. * config/i386/i386.c

Re: [Ping] [Google] Fix profiledbootstrap failure

2013-08-01 Thread Xinliang David Li
Sorry for the delay. The patch is ok and I have committed it to the google branch. thanks, David On Thu, Aug 1, 2013 at 4:51 PM, Dinar Temirbulatov di...@kugelworks.com wrote: Ping? Hi, Here is the patch, Tested by profiledbootstrap. Ok for google gcc-4.8? thanks, Dinar.

Re: [GOOGLE] Refactor AutoFDO

2013-07-31 Thread Xinliang David Li
...@google.com wrote: Patch updated to fix the code style and documentation. Thanks, Dehao On Tue, Jul 30, 2013 at 2:24 PM, Xinliang David Li davi...@google.com wrote: I have some preliminary comments. Mostly just related to code style and missing documentation. David #define

Re: [Google] Fix profiledbootstrap failure

2013-07-30 Thread Xinliang David Li
I need to understand why this affects profile bootstrap -- is this due to file name conflict? The fix is wrong -- please do not remove the parameter. If it is a problem, a better fix is to change the default parameter value to 0. David On Tue, Jul 30, 2013 at 11:56 AM, Teresa Johnson

Re: [Google] Fix profiledbootstrap failure

2013-07-30 Thread Xinliang David Li
mentioned, setting the default value of the parameter to 0). -Rong On Tue, Jul 30, 2013 at 12:02 PM, Xinliang David Li davi...@google.com wrote: I need to understand why this affects profile bootstrap -- is this due to file name conflict? The fix is wrong -- please do not remove

Re: [google gcc-4_8] Force cmd-line match for option -ansi in LIPO use

2013-07-30 Thread Xinliang David Li
On Tue, Jul 30, 2013 at 1:44 PM, Rong Xu x...@google.com wrote: The following patch forces the command line match for -ansi option in LIPO use build. Otherwise, it gets various undefined symbol errors. Parsing error as you have clarified. This is exposed in LIPO random grouping test. Tested

Re: [GOOGLE] Refactor AutoFDO

2013-07-30 Thread Xinliang David Li
; Missing documentation for the interfaces NameSymbolMap map_; }; class ModuleMap { Need documentation. On Tue, Jul 30, 2013 at 11:03 AM, Dehao Chen de...@google.com wrote: I just rebased the CL to head and updated the patch. Thanks, Dehao On Tue, Jul 30, 2013 at 10:09 AM, Xinliang David

Re: [GOOGLE] Port remaining -fopt-info messages from google/4_7 (plus dump infrastructure enhancement)

2013-07-26 Thread Xinliang David Li
Ok for google branches. Many changes in coverage.c (such as get_coverage_counts) and value-prof.c need to be in trunk too. David On Thu, Jul 25, 2013 at 10:02 AM, Teresa Johnson tejohn...@google.com wrote: This patch ports the remaining -fopt-info messages that had been added to google/gcc-4_7

Re: [GOOGLE] Port remaining -fopt-info messages from google/4_7 (plus dump infrastructure enhancement)

2013-07-26 Thread Xinliang David Li
indentation spaces and On Fri, Jul 26, 2013 at 10:18 AM, Teresa Johnson tejohn...@google.com wrote: Thanks. I'll work on a trunk patch to send next week. Teresa On Fri, Jul 26, 2013 at 10:05 AM, Xinliang David Li davi...@google.com wrote: Ok for google branches. Many changes in coverage.c

Re: [GOOGLE] Port remaining -fopt-info messages from google/4_7 (plus dump infrastructure enhancement)

2013-07-26 Thread Xinliang David Li
, Xinliang David Li davi...@google.com wrote: is it better to hoist the newline dump before all the branches? David On Fri, Jul 26, 2013 at 1:06 PM, Teresa Johnson tejohn...@google.com wrote: After converting so many more messages to the new dump framework with my previous change, I noticed a bug

Re: [google][4.8] Expose all target specific builtins unconditionally for LIPO builds

2013-07-25 Thread Xinliang David Li
the patch is ok. thanks, David On Thu, Jul 25, 2013 at 2:53 PM, Sriraman Tallam tmsri...@google.com wrote: On Wed, Jul 24, 2013 at 3:21 PM, Xinliang David Li davi...@google.com wrote: Can you collect some number on ggc_memory increase with this change in profile_gen build -- the value

Re: [google][4.8] Expose all target specific builtins unconditionally for LIPO builds

2013-07-24 Thread Xinliang David Li
Can you collect some number on ggc_memory increase with this change in profile_gen build -- the value is recorded gcov_module_info object in coverage.c. thanks, David On Wed, Jul 24, 2013 at 3:14 PM, Sriraman Tallam tmsri...@google.com wrote: The following test-case fails in LIPO mode during

Re: [GOOGLE] record compiler options before any compilation

2013-07-10 Thread Xinliang David Li
Ok after testing. David On Wed, Jul 10, 2013 at 4:59 PM, Dehao Chen de...@google.com wrote: This fix is need if you want to collect AutoFDO profile on AutoFDO+LIPO optimized binary. Testing on going. OK for google branches? Thanks, Dehao Index: gcc/toplev.c

Re: Resolving an issue of bootstrap failure from vectorization.

2013-07-09 Thread Xinliang David Li
You found the root cause of the bootstrap profile with vectorizer turned on, but the patch does not look correct to me. The sorting needs to make sure accesses with the same (base, size, offset, step, r_w_kind) are placed together (see how the sorted array is used to build the interleaving chain).

Re: [PATCH] Fix the bug to check if lookup_stmt_eh_lp returns positive instead of non-zero

2013-07-08 Thread Xinliang David Li
Is it possible to add a test case? David On Mon, Jul 8, 2013 at 5:55 PM, Dehao Chen de...@google.com wrote: In lookup_stmt_eh_lp, negative return value indicates a MUST_NOT_THROW region index. In this case, we should *not* add an EH edge during VPT. Bootstrapped and passed regression test.

Re: [google/gcc-4_8] Port -Wreal-conversion warning

2013-06-26 Thread Xinliang David Li
, Sharad Singhai sing...@google.com wrote: On Mon, Jun 24, 2013 at 9:14 PM, Xinliang David Li davi...@google.com wrote: To avoid printing twice, can you just do opt_type = (warn_conversion ? OPT_Wconversion : OPT_Wreal_conversion); warning_at (loc, opt_type, ...); Thanks for the suggestion. I have

<    1   2   3   4   5   6   7   8   9   10   >