[google] Handle incompatible cg options more generally in LIPO (issue6476057)

2012-08-23 Thread David Li
Index: coverage.c === --- coverage.c (revision 190369) +++ coverage.c (working copy) @@ -261,6 +261,56 @@ str_eq (const void *p1, const void *p2) return !strcmp (s1, s2); } +/* Command line option descriptor. */ + +struct opt_

[google] fix a static promotion bug -- not handling aliases in LIPO mode (issue4879042)

2011-08-11 Thread David Li
The following patch will be applied to google branches. 2011-08-11 David Li * l-ipo.c (process_module_scope_static_func): Promote aliases of static symbol in LIPO mode. Index: l-ipo.c === --- l-ipo.c

[google]: test case fixes (issue4553055)

2011-05-22 Thread David Li
modules -- we saw cases where funcdef_no is greater than 128k in a module leading to overflow and conflict. 2011-05-21 David Li * testsuite/gcc.dg/matrix/transpose-1.c: Do not inline mem_init. * testsuite/gcc.dg/matrix/transpose-2.c: Ditto. * testsuite/gcc.dg/matrix

[google] static function promotion improvement patch for LIPO (issue4517117)

2011-05-30 Thread David Li
modules. Those functions will be eliminated later (they are not called from global dtor/ctor) -- there existence is important to make sure address taken (etc) attributes for called dtor/ctors are consistent between profile-gen and use. 2011-05-30 David Li * cgraphunit.c (cgraph_optimize

[google] Backport r174536,174537,174762,174698 to google/main (issue4568059)

2011-06-07 Thread David Li
2011-06-07 David Li Backport trunk r174536,174537,174762,174698 Index: doc/invoke.texi === --- doc/invoke.texi (revision 174725) +++ doc/invoke.texi (working copy) @@ -5217,11 +5217,12 @@ appended with a

[google] Test case cleanup after pass name change (issue4528128)

2011-06-07 Thread David Li
Fix lipo test cases with new pass names. 2011-06-07 David Li * testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c: Pass name fix. * testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_1.c: Pass name fix. * testsuite/gcc.dg/tree-prof/lipo/val-prof-1_0.c: Pass name fix

[google] add module id in function header dump for lipo (issue4579046)

2011-06-07 Thread David Li
This is trivial change to allow module id to be displayed in LIPO mode in function header. 2011-06-07 David Li * tree-pretty-print.c (revision 174779) (dump_function_header): dump module id. Index: tree-pretty-print.c

[google] cprop pass's gate function cleanup (issue4572055)

2011-06-09 Thread David Li
The patch fixed the breakage due to the r174848 backport to google/main -- the gate function for cprop is in a different file from trunk. 2011-06-09 David Li * gcse.c (gate_rtl_cprop): Gate cleanup (execute_rtl_cprop): Gate cleanup Index: gcse.c

[google] Fix a bug leading to inconsistent comdat group in LIPO mode (issue4616041)

2011-06-14 Thread David Li
The patch will be committed to google/main to fix a problem in LIPO model that leads to 'reference to discarded comdat section' ld warning. The problem is caused by inconsistent comdat groups between primary and aux modules because thunks were skipped in aux module. 2011-06-14

[google] Fix lipo regression test failures after merge from trunk (issue4806053)

2011-07-26 Thread David Li
The patch is committed to google/main to fix lipo test regressions after trunk merge. 2011-07-26 David Li * value-prof.c (gimple_value_profile_transformations): Remove redundant code. * cgraphunit.c (cgraph_mark_functions_to_output): Fix assertion in lipo mode

[google] Do not declare pmu and sampling rate related vars for profile-use build (issue4832042)

2011-07-28 Thread David Li
The following trivial patch will be applied to google branches. Bootstrap and tessted on x86-64/linux 2011-07-28 David Li * coverage.c (coverage_init): Remove checking of profile-use flags. Index: coverage.c

[google] LIPO regression tests and bug fixes (issue4444076)

2011-04-28 Thread David Li
ssion test, and SPEC06 LIPO build. Will commit to google/main. Thanks, David 2011-04-28 David Li * testsuite/gcc.dg/tree-prof/lipo/inliner-1.c (revision 0): New test. * testsuite/gcc.dg/tree-prof/lipo/gdb_cmd (revision 0): Ditto. * testsuite/gcc.dg/tree-pr

[google] Multiple source LIPO test cases and bug fixes (issue4441084)

2011-05-01 Thread David Li
2011-05-01 David Li * testsuite/lib/profopt.exp (proc): Multiple source file support. * testsuite/gcc.dg/tree-prof/lipo/lipo.exp (load_lib): Multiple source file support. * testsuite/g++.dg/tree-prof/lipo/lipo.exp: Ditto. * testsuite/gcc.dg/tree-prof/lipo

[google] backport r17317,r17347,r17342 to google/main (issue4430080)

2011-05-03 Thread David Li
Backport patches r17342, r173177, and r173147 from trunk to google/main + some minor cleanups for problems found in test. Tested: bootstrap + regression test + SPEC06 LIPO testing. Backport r173177 2011-05-03 David Li * tree-profile.c (init_ic_make_global_vars): Set tls

[google] improves option mismatch handling for LIPO (issue4479045)

2011-05-04 Thread David Li
-05-04 David Li * coverage.c (incompatible_cl_args): Better handling of option mismatch. Index: coverage.c === --- coverage.c (revision 173353) +++ coverage.c (working copy) @@ -213,6 +213,27 @@ is_last_module

[google] revert 173158 (-fstrict-enum-precisions) (issue4503041)

2011-05-06 Thread David Li
The following patch reverted r173158 from google/main -- -fstrict-enums provides a better implementation. The test cases are kept with slight modification. Bootstrap and tested with related test cases. Ok for google/main? 2011-05-06 David Li Revert r173158. Index: tree-vrp.c

New options to disable/enable any pass for any functions (issue4550056)

2011-05-18 Thread David Li
k ? (There is a little LIPO specific change that can be removed). David 2011-05-18 David Li * final.c (rest_of_clean_state): Call function header dumper. * opts-global.c (handle_common_deferred_options): Handle new options. * tree-cfg.c (gimple_dump_cfg): Call functio

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

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

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

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

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

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

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

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

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

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

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: 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: 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: 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-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: 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: [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: [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: 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] 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: [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] 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
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] 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: 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: Revisit Core tunning flags

2013-09-21 Thread Xinliang David Li
On Sat, Sep 21, 2013 at 3:51 PM, Xinliang David Li wrote: > 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 f

Re: New GCC options for loop vectorization

2013-09-23 Thread Xinliang David Li
Thanks. I modified the patch so that the max allowed peel iterations can be specified via a parameter. Testing on going. Ok for trunk ? David On Mon, Sep 23, 2013 at 4:31 AM, Richard Biener wrote: > On Wed, Sep 18, 2013 at 10:21 PM, Xinliang David Li > wrote: >> On Tue, Sep 17,

Re: [PATCH] Bug fix: *var and MEM[(const int *)var] (var has int* type) are not treated as the same data ref.

2013-09-23 Thread Xinliang David Li
Basically GCC reports that the loop is vectorized, but the vectorized loop is never executed because of the bogus alias check ' a + 16 < a' generated. In trunk, the vectorized version is eliminated, but it remains as a dead code with gcc 48. David On Mon, Sep 23, 2013 at 5:26 PM, Cong Hou wrote:

Re: [GOOGLE] Disable aggressive loop peeling to prevent code bloat.

2013-09-25 Thread Xinliang David Li
I wish there is better heuristic in the future. For now it is ok. David On Wed, Sep 25, 2013 at 2:48 PM, Dehao Chen wrote: > This patch disables aggressive loop peeling when profile is available. > This prevents extensive code bloat which leads to increased i-cache > misses. > > Bootstrapped and

cost model patch

2013-09-25 Thread Xinliang David Li
I took the liberty to pick up Richard's original fvect-cost-model patch and made some modification. What has not changed: 1) option -ftree-vect-loop-version is removed; 2) three cost models are introduced: cheap, dynamic, and unlimited; 3) unless explicitly specified, cheap model is the default at

Re: [GOOGLE] max-lipo-group parameter for AutoFDO

2013-09-26 Thread Xinliang David Li
Looks ok. David On Thu, Sep 26, 2013 at 9:00 AM, Dehao Chen wrote: > This patch fix the bug when setting max-lipo-group in AutoFDO: > > Bootstrapped and passed regression test. > > OK for google branches? > > Thanks, > Dehao > > Index: gcc/auto-profile.c > ===

Re: [GOOGLE] Fix an ICE in lipo_cmp_type

2013-09-26 Thread Xinliang David Li
yes. David On Thu, Sep 26, 2013 at 9:26 AM, Dehao Chen wrote: > This fixes an ICE when lipo_cmp_type handles NULL_PTR_TYPE. > > Bootstrapped and regression test on going? > > OK for google branches? > > Thanks, > Dehao > > Index: gcc/l-ipo.c >

Re: cost model patch

2013-09-26 Thread Xinliang David Li
On Thu, Sep 26, 2013 at 7:37 AM, Richard Biener wrote: > On Thu, Sep 26, 2013 at 1:10 AM, Xinliang David Li wrote: >> I took the liberty to pick up Richard's original fvect-cost-model >> patch and made some modification. >> >> What has not changed: >>

Re: [google gcc-4_8] alternate hirate for builtin_expert

2013-09-26 Thread Xinliang David Li
This patch improves linux kernel performance with a large workload, so it is good to first submit this to trunk and backport it. thanks, David On Thu, Sep 26, 2013 at 3:27 PM, Jan Hubicka wrote: >> Hi, >> >> Current default probably for builtin_expect is 0.9996. >> This makes the freq of unlike

Re: [google gcc-4_8] alternate hirate for builtin_expert

2013-09-26 Thread Xinliang David Li
it might worth extend __builtin_expect to take more parameters: 1) argument to specify actual probability: __builtin_expect (x, 10, 0.6) 2) a more general way of doing this is to allow specifying multiple values, and the probability is determined by # of occurances: __builtin_expect (x, 10, 10, 20)

Re: Add value range support into memcpy/memset expansion

2013-09-27 Thread Xinliang David Li
Nice extension. Test cases would be great to have. thanks, David On Fri, Sep 27, 2013 at 7:50 AM, Jan Hubicka wrote: > Hi, > this patch makes it possible to access value range info from setmem/movstr > that > I plan to use in i386 memcpy/memset expansion code. It is all quite > straighforward

Re: cost model patch

2013-09-27 Thread Xinliang David Li
turned on at -O2. To override this, use option -fvect-cost-model=[cheap|dynamic|unlimited]. New Languages and Language specific improvements thanks, David On Thu, Sep 26, 2013 at 11:09 AM, Xinliang David Li wrote: > On Thu, Sep 26, 2013 at 7:37 AM, Richard Biener > wrote: >>

Re: [google/4_8] Disable -g/-gmlt during LIPO instrumentation

2013-09-27 Thread Xinliang David Li
On Fri, Sep 27, 2013 at 11:50 AM, Teresa Johnson wrote: > David and Rong, > > The following patch will disable -g/-gmlt when instrumenting for LIPO > since they will affect the recorded ggc_memory used in the module > grouping decision. Added -fripa-allow-debug to override this behavior. > > Passe

Re: [google/4_8] Disable -g/-gmlt during LIPO instrumentation

2013-09-27 Thread Xinliang David Li
ok. David On Fri, Sep 27, 2013 at 1:03 PM, Teresa Johnson wrote: > On Fri, Sep 27, 2013 at 12:01 PM, Xinliang David Li > wrote: >> On Fri, Sep 27, 2013 at 11:50 AM, Teresa Johnson >> wrote: >>> David and Rong, >>> >>> The following patch will

Re: [google/4_8] Disable -g/-gmlt during LIPO instrumentation

2013-09-27 Thread Xinliang David Li
The key is that grouping results should not dependent on the presence of -g flags. The downside of the patch is that it may slightly underestimate the memory pressure at profile-use time, but that should not be a big problem. David On Fri, Sep 27, 2013 at 1:18 PM, Rong Xu wrote: > I don't quite

Re: [Google] Adjust comdat-sharing-probability param for -Os

2013-09-27 Thread Xinliang David Li
d.growth -= (info->size * (100 - PARAM_VALUE (PARAM_COMDAT_SHARING_PROBABILITY)) + 50) / 100; What is the purpose of '50' here? The patch is fine for Google branch. Other tunings to think about -- I think the sharing probability should not be a fixed value -- but depending on the functio

Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-09-28 Thread Xinliang David Li
You can also add a test case of this form: int foo( int t, int n, int *dst) { int j = 0; int s = 1; t++; for (j = 0; j < n; j++) { dst[j] = t; s *= t; } return s; } where without the fix the loop vectorization is missed. David On Fri, Sep 27, 2013 at

Re: Add value range support into memcpy/memset expansion

2013-09-28 Thread Xinliang David Li
On Sat, Sep 28, 2013 at 3:05 PM, Jan Hubicka wrote: >> > Nice extension. Test cases would be great to have. >> Fore those you need i386 changes to actually use the info. I will post that >> after some cleanup and additional testing. > > Hi, > since I already caught your attention, here is the tar

Re: cost model patch

2013-09-30 Thread Xinliang David Li
Yes, that will do. Can you do it for me? I can't do testing easily on arm myself. thanks, David On Mon, Sep 30, 2013 at 3:29 AM, Kyrill Tkachov wrote: > Hi Richard, David, > >> In principle yes. Note that it changes the behavior of -O2 >> -ftree-vectorize >> as -ftree-vectorize does not i

Re: [PATCH] Improving uniform_vector_p() function.

2013-10-01 Thread Xinliang David Li
On Tue, Oct 1, 2013 at 10:31 AM, Cong Hou wrote: > The current uniform_vector_p() function only returns non-NULL when the > vector is directly a uniform vector. For example, for the following > gimple code: > > vect_cst_.15_91 = {_9, _9, _9, _9, _9, _9, _9, _9}; > > > The current implementation ca

Re: [PATCH] Improving uniform_vector_p() function.

2013-10-01 Thread Xinliang David Li
On Tue, Oct 1, 2013 at 2:37 PM, Xinliang David Li wrote: > On Tue, Oct 1, 2013 at 10:31 AM, Cong Hou wrote: >> The current uniform_vector_p() function only returns non-NULL when the >> vector is directly a uniform vector. For example, for the following >> gimple code: >&g

Re: [google 4.7] fix line number checksum mismatch in lipo-use (issue6566044)

2012-09-28 Thread Xinliang David Li
ok (for google-47 and google/main) thanks, David On Fri, Sep 28, 2012 at 10:22 AM, Rong Xu wrote: > Comments are inlined. > Attached is the new patch. > > Thanks, > > -Rong > > On Tue, Sep 25, 2012 at 2:25 PM, Xinliang David Li wrote: >> On Mon, Sep 24, 2012 at 2

Re: [PATCH] Fix powerpc breakage, was: Add option for dumping to stderr (issue6190057)

2012-10-01 Thread Xinliang David Li
On Mon, Oct 1, 2012 at 2:37 PM, Michael Meissner wrote: > I tracked down some of the other code that previously used REPORT_DETAILS, and > MSG_NOTE is the new way to do the same thing. This bootstraps and no > unexpected errors occur during make check. Is it ok to install? > > 2012-10-01 Michae

Re: [PATCH] Fix powerpc breakage, was: Add option for dumping to stderr (issue6190057)

2012-10-01 Thread Xinliang David Li
sier to read/maintain. > I find it confusing to be honest. The redundant check serves no purpose. David > Sharad > Sharad > > > On Mon, Oct 1, 2012 at 3:45 PM, Xinliang David Li wrote: >> On Mon, Oct 1, 2012 at 2:37 PM, Michael Meissner >> wrote: >>> I tracked

Re: Propagate profile counts during switch expansion

2012-10-03 Thread Xinliang David Li
What is the status of switch expansion GIMPLE rewrite? If it is not planned for 4.8, It will be desirable to include this fix into trunk. It also helps set up a good base line to test against regression. thanks, David On Tue, Oct 2, 2012 at 6:09 PM, Easwaran Raman wrote: > Hi, > This patch pr

Re: Propagate profile counts during switch expansion

2012-10-03 Thread Xinliang David Li
thanks for the update! David On Wed, Oct 3, 2012 at 10:37 AM, Steven Bosscher wrote: > On Wed, Oct 3, 2012 at 6:12 PM, Xinliang David Li wrote: >> What is the status of switch expansion GIMPLE rewrite? If it is not >> planned for 4.8, It will be desirable to include this fix in

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-10-05 Thread Xinliang David Li
Hi Jason, Sri has addressed the comments you had on FE part. Can you take a look if it is ok? Stage-1 is going to be closed soon, and we hope to get this major feature in 4.8. thanks, David On Tue, Sep 18, 2012 at 9:29 AM, Sriraman Tallam wrote: > Ping. > > On Fri, Aug 24, 2012 at 5:34 PM,

Re: [google] AutoFDO implementation

2012-10-05 Thread Xinliang David Li
thanks. That will be helpful. David On Fri, Oct 5, 2012 at 2:09 PM, Dehao Chen wrote: > Sure, I'll add a detailed documentation in a gcc wiki page. > > Dehao > > On Fri, Oct 5, 2012 at 2:01 PM, Xinliang David Li wrote: >> Dehao, the file auto-profile.c has some

Re: [google] Emit relative addresses to function patch sections instead of absolute addresses. (issue6572065)

2012-10-06 Thread Xinliang David Li
xray feature is not in trunk yet. David On Fri, Oct 5, 2012 at 3:53 PM, Diego Novillo wrote: > Harshit, why didn't you propose this patch for trunk? Why should we > make it a google-local patch? > > > Diego. > > On Fri, Sep 28, 2012 at 5:24 AM, Harshit Chopra wrote: >> commit fc3a55ccec9bc770c

Re: [google] Emit relative addresses to function patch sections instead of absolute addresses. (issue6572065)

2012-10-06 Thread Xinliang David Li
Ok for google branches. Please consider resend the original xray patch to trunk (gcc-4_8) You need to make the runtime bits available publicly though. thanks, David On Fri, Sep 28, 2012 at 2:24 AM, Harshit Chopra wrote: > commit fc3a55ccec9bc770c79f8a221f5abd397befc8f6 > Author: Harshit Chopra

Re: [asan] New transitional branch to port ASAN to trunk

2012-10-10 Thread Xinliang David Li
Is there an agreed way for file naming? David On Wed, Oct 10, 2012 at 1:48 PM, Steven Bosscher wrote: > On Wed, Oct 10, 2012 at 10:20 PM, Diego Novillo wrote: >> * tree-asan.c: New file. >> * tree-asan.h: New file. > > Nit: do we still need the "tree-" prefix? IMHO not. > > Ciao!

Re: [asan] New transitional branch to port ASAN to trunk

2012-10-10 Thread Xinliang David Li
On Wed, Oct 10, 2012 at 2:08 PM, Steven Bosscher wrote: > On Wed, Oct 10, 2012 at 11:00 PM, Xinliang David Li wrote: >> Is there an agreed way for file naming? > > It was not my intent to start a bike shed discussion. This was just > something I've been wondering for some

Re: Use conditional casting with symtab_node

2012-10-10 Thread Xinliang David Li
In a different thread, I proposed the following alternative to 'try_xxx': template T* symbol::cast_to(symbol* p) { if (p->is()) return static_cast(p); return 0; } cast: template T& symbol:as(symbol* p) { assert(p->is()) return static_cast(*p); } David On Wed, Sep 19, 2012

  1   2   3   4   5   6   7   8   9   10   >