Re: Revisit Core tunning flags

2013-09-21 Thread Xinliang David Li
On Sat, Sep 21, 2013 at 12:54 PM, Jan Hubicka wrote: > Hi, > this is upated version of patch discussed at > http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00841.html > > It makes CORE tuning to more follow the optimization guidelines. > In particular it removes some tuning flags for features I imple

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

2013-09-20 Thread Xinliang David Li
cleanup are moved after > annotation. So setting of cgraph node's count is still needed, right? > > Thanks, > Dehao > > On Thu, Sep 19, 2013 at 9:28 PM, Xinliang David Li wrote: >> I did not catch this in the last review. The cleanup CFG should be >> done be

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

2013-09-19 Thread Xinliang David Li
e_profiling_inlining_done = true; > - 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; > } &

Re: [GOOGLE] Sets cgraph_node count during annotation

2013-09-19 Thread Xinliang David Li
Looks good. David On Thu, Sep 19, 2013 at 1:15 PM, Dehao Chen wrote: > This patch sets cgraph_node count during AutoFDO annotation, otherwise > execute_fixup_cfg will clear all the BB counts. > > bootstrapped and passed regression test. > > OK for google-4_8 branch? > > Thanks, > Dehao > > Index

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

2013-09-19 Thread Xinliang David Li
/* Local pure-const may imply need to fixup the cfg. */ > + if (execute_fixup_cfg () & TODO_cleanup_cfg) > + cleanup_tree_cfg (); > + >current_function_decl = NULL; >pop_cfun (); > } > > - cgraph_pre_profiling_inlining_done = true; > -

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 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 branch? >

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 wrote: > On Mon, Sep 16, 2013 at 10:24 PM, Xinliang David Li > wrote: >> On Mon, Sep 16, 2013 at 3:13 AM, Richard Biener >> wrote: >>> On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li >>> wrote: >>&

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 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 (rev

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 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: New GCC options for loop vectorization

2013-09-17 Thread Xinliang David Li
On Tue, Sep 17, 2013 at 8:45 AM, Jakub Jelinek 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); >

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 wrote: > On Mon, Sep 16, 2013 at 10:24 PM, Xinliang David Li > wrote: >> On Mon, Sep 16, 2013 at 3:13 AM, Richard Biener >> wrote: >>> On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li >>> wrote: >>&

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 wrote: > On Sat, Sep 14, 2013 at 8:10 AM, Xinliang David Li wrote: >> tree if conversion is an enabler pass for vectorization, so by >> default, it is only turned on when vectorization is on, but may also &

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 wrote: > On Fri, Sep 13, 2013 at 5:16 PM, Xinliang David Li wrote: >> On Fri, Sep 13, 2013 at 1:30 AM, Richard Biener >> wrote: >>> On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li >>> wrote: >>>>

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 wrote: > On Fri, Sep 13, 2013 at 6:56 PM, Xinliang David Li wrote: >> Updated patch implementing the logic

Re: Dump framework newline cleanup

2013-09-16 Thread Xinliang David Li
ize without a profile. thanks, David On Mon, Sep 16, 2013 at 11:06 AM, Teresa Johnson wrote: > On Mon, Sep 16, 2013 at 10:57 AM, Xinliang David Li > wrote: >> I noticed there are a couple of dump_printf_loc instances in >> coverage.c not ended with newline. They should be

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 wrote: > On Mon, Sep 9, 2013 at 9:55 PM, Xinliang David Li wrote: >> looks fine to me. >> >> In the

tree if convert pass control

2013-09-13 Thread Xinliang David Li
revision 202229) +++ ChangeLog (working copy) @@ -1,3 +1,12 @@ +2013-09-13 Xinliang David Li + + * omp-low.c (expand_omp_simd): Build optimization cl + node if necessary. + * opts.c (finish_option): Enable/Disable tree if-cvt + if not explicitly set. +

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 wrote: > Ok -- then my updated patch is wrong then. The implementation in the > first version matches the requirement. > > thank

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 wrote: > On Fri, 13 Sep 2013, Richard Biener wrote: > >> @@ -1691,6 +1695,12 @@ common_handle_option (struct gcc_options >>

Re: New GCC options for loop vectorization

2013-09-13 Thread Xinliang David Li
, Xinliang David Li wrote: > On Fri, Sep 13, 2013 at 1:30 AM, Richard Biener > wrote: >> On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li >> wrote: >>> Currently -ftree-vectorize turns on both loop and slp vectorizations, >>> but there is no simple way to t

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 wrote: > On Thu, Sep 12, 2013 at 10:31 PM, Xinliang David Li > wrote: >> Currently -ftree-vectorize turns on both loop and slp vectorizations, >> but there is no simple way to turn on loop vectorization alone. The >> logi

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 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 wrote: >> On Thu, Sep 12, 2013 at 2:32 PM, Xinliang David Li >> wrote: &

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:20 PM, Xinliang David Li wrote: >> On Thu, Sep 12, 2013 at 1:06 PM, Teresa Johnson 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. &g

New GCC options for loop vectorization

2013-09-12 Thread Xinliang David Li
{ loop->force_vect = true; Index: ChangeLog === --- ChangeLog (revision 202481) +++ ChangeLog (working copy) @@ -1,3 +1,24 @@ +2013-09-12 Xinliang David Li + + * tree-if-conv.c (main_tree_if_conversio

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 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 > -fprofile-generate=, or to

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 6

[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. David

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 wrote: > I'

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

2013-09-09 Thread Xinliang David Li
+ >/* Be careful about integer to fp conversions. > These may overflow still. */ >if (FLOAT_TYPE_P (TREE_TYPE (arg0)) > Index: gcc/testsuite/gcc.c-torture/execute/20030125-1.c > ======= > --- gcc/t

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 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: >> http://www.cs.berkeley.edu/~fateman/gene

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 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 pasted as b

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 wrote: > On Tue, 3 Sep 2013, Cong Hou wrote: > >> + CASE_MAT

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 a

Re: Eliminate vectorizer analysis side effects

2013-08-30 Thread Xinliang David Li
On Fri, Aug 30, 2013 at 1:23 AM, Richard Biener wrote: > On Fri, Aug 30, 2013 at 1:28 AM, Xinliang David Li wrote: >> I was debugging a runtime failure of SPEC06 xalancbmk built with LIPO. >> Using -fdisable- option pinpoints the problem in slp vectorize >> pass on a partic

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 wrote: > On Fri, Aug 30, 2013 at 9:27 AM, Xinliang David Li wrote: >> Except that in this form, the dump will be extremely large and not >> suitable for very large applications. > > Yes. I did some measurements for both a fai

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 no

Re: [Google] Refine hot caller heuristic

2013-08-29 Thread Xinliang David Li
20, 2013 at 9:35 PM, Xinliang David Li 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. But I se

Eliminate vectorizer analysis side effects

2013-08-29 Thread Xinliang David Li
02088) +++ ChangeLog (working copy) @@ -1,5 +1,17 @@ 2013-08-29 Xinliang David Li + * 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): Add dbg_cnt su

Re: opt-info message change for vectorizer

2013-08-28 Thread Xinliang David Li
asic3.c:8:foo: note: loop with 7 iterations completely unrolled basic3.c:5:foo: note: loop with 7 iterations completely unrolled Is this version ok after testing? thanks, David On Wed, Aug 28, 2013 at 2:45 AM, Richard Biener wrote: > On Tue, Aug 27, 2013 at 10:30 PM, Xinliang David Li

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 wrote: > On Tue, 27 Aug 2013, Xinliang David Li wrote: > >> Richard, I have some comments about the patch. >> >> > -ftree-vectorizer-verbose=This switch is deprecated. Use >> > -fopt-info inst

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 wrote: > On Wed, Aug 28, 2013 at 4:01 AM, Richard Biener > wrote: >> On Wed, Aug 7, 2013 at 7:23 AM, Teresa Johnson wrote: >>> On Tue, Aug 6, 2013 at 9:29 AM, Teresa Johnson wrote: On Tue, Aug 6, 2013 at 9:01 AM, Martin Jambor wrote: > H

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=This 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 th

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 wrote: > On Aug 27, 2013, at 11:22 AM, Xinliang David Li wrote: >> Does this one look ok? > > We don't c

Re: opt-info message change for vectorizer

2013-08-27 Thread Xinliang David Li
eeds to be fixed to emit 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 > wrote: >> Does this one look ok? >> >> thanks, >> >> David >> >

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 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 enhanc

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 wrote: > Ping #3. > > Thanks, > Teresa > > On Mon, Aug 19, 2013 at 11:33 AM, Teresa Johnson wrote: >> Ping. >> Thanks, >> Teresa >> >> On Mon, Aug 12, 2013 at 6:54 AM, Teresa Johnson wrote: >>> On Tue, Aug 6, 2013 at 10:23 PM, Teresa John

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 wrote: > Patch updated. > > Thanks, > Dehao > > On Mon, Aug 26, 2013 at 4:11 PM, Xinliang David Li wrote: >> Can you add missing documentation on functions like ...:get_count_info >> -- documenting return value

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 wrote: > This patch h

opt-info message change for vectorizer

2013-08-22 Thread Xinliang David Li
URCE_FILE (current_function_decl), - DECL_SOURCE_LINE (current_function_decl)); + DECL_SOURCE_LINE (current_function_decl), + gimple_decl_printable_name (current_function_decl, 1)); } } Index: ChangeLog ==

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 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 > > > Index: l-i

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 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 > m_CORE_ALL. > > regr

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 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 -- ave

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 roots

Re: Fix potential uninitialized variable error

2013-08-14 Thread Xinliang David Li
input_ranges[n].max = maxs; input_ranges[n].alg = alg; if (!strcmp (align, "align")) Index: ChangeLog === --- ChangeLog (revision 201735) +++ ChangeLog (working copy) @@ -1,6 +1,12 @@ 2013-08-1

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 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: >> >

Fix potential uninitialized variable error

2013-08-14 Thread Xinliang David Li
lg alg; 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 + * config/i386/

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

2013-08-14 Thread Xinliang David Li
On Wed, Aug 14, 2013 at 9:01 AM, Jan Hubicka wrote: >> > 2013-08-07 Xinliang David Li >> > >> > * config/i386/i386.h: Adjust macro definition. >> > * config/i386/i386.opt: Define two new options. >> > * config/i386/x8

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 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 wrote: >>

[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: [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. Inh

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 wrote: > Hi, the attached is a follow up patch. The patch includes the following > changes: > > 1. new option

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 wrote: > Hi, > this patch adds s

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 wrote: >> On Fri, Aug 9, 2013 at 1:24 PM, Jan Hubicka 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 multip

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 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 the topn

Re: New parameters to control stringop expansion libcall strategy

2013-08-09 Thread Xinliang David Li
n do that in this patch. In the future, when we 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 >> >> t

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 wrote: > Updated. > > thanks, > > David > > On Thu, Aug 8, 2013 at 8:18 AM, Joseph S. Myers > wrote: >> On Wed, 7 Aug 2013, Xinliang David Li wrote: >> >

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 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

Re: New parameters to control stringop expansion libcall strategy

2013-08-07 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 wrote: > On Wed, 7 Aug 2013, Xinliang David Li wrote: > >> > Why the exception? This should only be used on

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

2013-08-07 Thread Xinliang David Li
default settings. 3. Added documentation to the 3 new options 4. Move the contents of inital_x86_tune_features into x86-tune.def to make sure they are always in sync 5. Some refactoring and handle the the tune features properly during target option restore. 2013-08-07 Xinliang David Li

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 wrote: > On Wed, 7 Aug 2013, Xinliang David Li wrote: > >> Index: config/i386/stringop.def >> === >> --- config/i386/stringop.def (revision 0) >>

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 wrote: > On Sun, 4 Aug 2013, Andi Kleen wrote: > >> Richard Biener writes: >> > >> > The patch fails to add documentation. >> >> That seems like a feature, it's likely not useful for the general >> public. More for specialized tools that automatical

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 wrote: > Patch updated. > > http://codereview.appspot.com/12079043 > > Thanks, > Dehao > > > On Fri, Aug 2, 2013 at 11:21 AM, Xinliang David Li wrote: >> More to follow. >> >&g

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 wrote: >> >>> 2013-08-02 Xinliang David Li >> >>> >> >>> * config/i386/stringop.def: New file. >&g

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 wrote: >> Ping? >> >> David >> >> On Sat, Aug 3, 2013 at 12:36 PM, Xinliang David Li >> wrote: >> > Hi, GCC/i386 currently has about 73 boolean parameters/knobs (defined >> > in ix86_tune_features[

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 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 are har

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

2013-08-06 Thread Xinliang David Li
yes -- if this is the place developers look at the most. David On Tue, Aug 6, 2013 at 10:18 AM, Sharad Singhai wrote: > On Tue, Aug 6, 2013 at 10:10 AM, Martin Jambor wrote: >> On Tue, Aug 06, 2013 at 09:22:02AM -0700, Sharad Singhai wrote: >>> On Tue, Aug 6, 2013 at 8:57 AM,

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 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 Zolo

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 wrote: >> thanks. Updated patch attached. >> >> David >> >

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 wrote: >> >>> 2013-08-02 Xinliang David Li >> >>> >> >>> * config/i386/stringop.def: New file. >> >>> * config/i386/stringop.opt: New file. >> >>> * c

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 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 would be a

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 wrote: > On Mon, Aug 5, 2013 at 9:33 AM, Xinliang David Li wrote: >> On Mon, Aug 5, 2013 at 8:26 AM, H.J. Lu wrote: >>> On Sun, Aug 4, 2013 at 9:23 AM,

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= >> -mmemse

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 wrote: > On Sun, Aug 4, 2013 at 9:23 AM, Xinliang David Li wrote: >> On Sun, Aug 4, 2013 at 4:40 AM, Richard Biener >> wrote: >>> Xinliang David Li wrote: >>>>Hi, GCC/i386 currently has about 73 boolean parameters/knob

Re: New parameters to control stringop expansion libcall strategy

2013-08-04 Thread Xinliang David Li
unk? thanks, David 2013-08-02 Xinliang David Li * 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/i38

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 wrote: > Xinliang David Li 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 s

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

2013-08-03 Thread Xinliang David Li
names of the features. Ok for trunk? thanks, David 2013-08-03 Xinliang David Li * 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: Backend specific params.def? (Was Re: New parameters to control stringop expansion libcall strategy)

2013-08-03 Thread Xinliang David Li
gt; adds two new 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? >> >

New parameters to control stringop expansion libcall strategy

2013-08-02 Thread Xinliang David Li
all 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 * params.def: New parameters. * config/i386/i386.c (ix86_option_override_inter

Re: [GOOGLE] Refactor AutoFDO

2013-08-02 Thread Xinliang David Li
given BB, return its execution count, and annotate value profile >>on statements. */ >> >> static gcov_type >> afdo_get_bb_count (basic_block bb) >> { >> gimple_stmt_iterator gsi; >> gcov_type max_count = 0; >> bool has_annotated = false; &

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 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
}; > > /* Module profile. */ > class module_map { afdo_module_profile ? > public: > static module_map *create () > { > module_map *map = new module_map (); > if (map->read ()) > return map; > delete map; > return NULL;

Re: [GOOGLE] Refactor AutoFDO

2013-07-30 Thread Xinliang David Li
gcov_type GetCallsiteTotalCount (struct cgraph_edge *edge) const; Missing documentation for the interfaces > > private: > typedef std::map NameSymbolMap; map from what to symbol? > > SymbolMap () {} > bool Read (); > const Symbol *GetSymbolByInlineStack (const InlineStack &

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 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 with googl

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 > wrote: >> I need to understand why this affects profile bootstrap -- is this due >> to file name conflict? >> >> The fix is wr

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 wrote: >

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

2013-07-26 Thread Xinliang David Li
CE_FILE (current_function_decl), > DECL_SOURCE_LINE (current_function_decl), > DECL_SOURCE_COLUMN (current_function_decl)); > > > Teresa > > On Fri, Jul 26, 2013 at 1:16 PM, Xinliang David Li wrote: >> is it better to hoist the newline

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

2013-07-26 Thread Xinliang David Li
le, "\n"); > } > > /* Dump gimple statement GS with SPC indentation spaces and > > On Fri, Jul 26, 2013 at 10:18 AM, Teresa Johnson wrote: >> Thanks. I'll work on a trunk patch to send next week. Teresa >> >> On Fri, Jul 26, 2013 at 10:05 AM, Xinli

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 wrote: > This patch ports the remaining -fopt-info messages that had been added > to google/gcc-4_7 using the original

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 wrote: > On Wed, Jul 24, 2013 at 3:21 PM, Xinliang David Li wrote: >> Can you collect some number on ggc_memory increase with this change >> in profile_gen build -- the value is recorded gcov_mod

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