more general multi-file testing support for FDO

2011-05-01 Thread Xinliang David Li
I need this support for LIPO but it might be also useful for trunk. The support is 'borrowed' from lib/lto.exp. I have tested with it and it works fine. The only limitation is for any subdirectory with a multi-source test case, all the other single source test case need also to follow the same nam

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

2011-05-02 Thread Xinliang David Li
thanks. Will correct. David On Mon, May 2, 2011 at 2:03 AM, Rainer Orth wrote: > David, > >> 2011-05-01  David Li   >> >>       * testsuite/lib/profopt.exp (proc): Multiple source file support. >                                     ^ > > This is wrong, t

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-02 Thread Xinliang David Li
On Mon, May 2, 2011 at 2:11 AM, Richard Guenther wrote: > On Fri, Apr 29, 2011 at 6:23 PM, Xinliang David Li wrote: >> Here is the background for this feature: >> >> 1) People relies on function multi-version to explore hw features and >> squeeze performance, but t

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-02 Thread Xinliang David Li
n to make sure it is > available for our internal use at Google in order to materialize some > optimization opportunities. Let us continue this dicussion as I make > changes and submit this for review for trunk. > > Thanks, > -Sri. > > > On Mon, May 2, 2011 at 9:41 AM,

Re: [google]: initialize language field for clone function struct

2011-05-02 Thread Xinliang David Li
Is this one ok? David On Fri, Apr 29, 2011 at 4:38 PM, Xinliang David Li wrote: > During function cloning, the language field of the src func is not > copied. This can lead to null dereference when gcc calls into langhook > functions.  Unfortunately, I lost track of the test case. &

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-02 Thread Xinliang David Li
On Mon, May 2, 2011 at 2:33 PM, Richard Guenther wrote: > On Mon, May 2, 2011 at 6:41 PM, Xinliang David Li wrote: >> On Mon, May 2, 2011 at 2:11 AM, Richard Guenther >> wrote: >>> On Fri, Apr 29, 2011 at 6:23 PM, Xinliang David Li >>> wrote: >>>

Re: [google]: initialize language field for clone function struct

2011-05-03 Thread Xinliang David Li
In trunk, this is guarded -- but not setting language field for clone probably just hide the problem. Thanks, David > > Honza >> >> David >> >> On Fri, Apr 29, 2011 at 4:38 PM, Xinliang David Li >> wrote: >> > During function cloning, the langua

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-03 Thread Xinliang David Li
On Tue, May 3, 2011 at 3:00 AM, Richard Guenther wrote: > On Tue, May 3, 2011 at 1:07 AM, Xinliang David Li wrote: >> On Mon, May 2, 2011 at 2:33 PM, Richard Guenther >> wrote: >>> On Mon, May 2, 2011 at 6:41 PM, Xinliang David Li >>> wrote: >>>

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-04 Thread Xinliang David Li
> > I can think of some more-or-less obvious high-level forms, one would > for example simply stick a new DISPATCH tree into gimple_call_fn > (similar to how we can have OBJ_TYPE_REF there), the DISPATCH > tree would be of variable length, first operand the selector function > and further operands

Re: PR 47793 - Support relative paths using -fprofile-generate

2011-05-04 Thread Xinliang David Li
Is this patch ok for trunk? Allowing relative path in -fprofile-generate= is very useful when running the program remotely -- the profile data will be just dumped in the dir relative to the working dir in the remote machine. Using GCOV_PREFIX_STRIP can workaround the problem, but it is not always

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-05 Thread Xinliang David Li
On Thu, May 5, 2011 at 2:16 AM, Richard Guenther wrote: > On Thu, May 5, 2011 at 12:19 AM, Xinliang David Li wrote: >>> >>> I can think of some more-or-less obvious high-level forms, one would >>> for example simply stick a new DISPATCH tree into gimple_call_fn &

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-06 Thread Xinliang David Li
>> I want propose a more general solution. >> >> 1) Generic Annotation Support for gcc IR -- it is used attach to >> application/optimization specific annotation to gimple statements and >> annotations can be passed around across passes. In gcc, I only see >> HISTOGRAM annotation for value profilin

Re: PR 47793 - Support relative paths using -fprofile-generate

2011-05-06 Thread Xinliang David Li
Honza, what do you think of the patch? It actually fixed a regression. Thanks, David On Wed, May 4, 2011 at 4:40 PM, Xinliang David Li wrote: > Is this patch ok for trunk? > > Allowing relative path in -fprofile-generate= is very useful when > running the program remotely -- the

Re: [google] Patch to support calling multi-versioned functions via new GCC builtin. (issue4440078)

2011-05-07 Thread Xinliang David Li
On Sat, May 7, 2011 at 5:46 AM, Richard Guenther wrote: > On Fri, May 6, 2011 at 7:57 PM, Xinliang David Li wrote: >>>> I want propose a more general solution. >>>> >>>> 1) Generic Annotation Support for gcc IR -- it is used attach to >>>> app

Re: [google]Implement an optimization based on reuse distance profiling (issue4517049)

2011-05-09 Thread Xinliang David Li
Ok. The instrumentation and optimization runtime has not been open sourced yet -- will need to be done later at some point. (For reference, see Silvius's CGO2011 paper). Thanks, David On Mon, May 9, 2011 at 2:49 PM, Easwaran Raman wrote: > This patch by Silvius Rus replaces calls to  certain

[google] temporary fix to lipo build problems using check enabled compiler

2011-05-10 Thread Xinliang David Li
The following patch temporarily disable some of the checking which is not fully 'lipo' aware. It will be checked into google/main and further cleanups will follow. David 2011-05-10 David Li * cgraphunit.c (revision 173635) (verify_cgraph_node): (cgraph_mark_functions_to_output

Re: [google] support for building Linux kernel with FDO (issue4523061)

2011-05-13 Thread Xinliang David Li
On Fri, May 13, 2011 at 5:54 AM, Paolo Bonzini wrote: > On 05/13/2011 03:03 AM, Rong Xu wrote: >> >>        * gcc/coverage.c        (revision 173717): set a flag if building >> for Linux kernel. >>        * gcc/tree-profile.c    (revision 173717): don't emit TLS >> declarations for Linux kernel bu

Re: [google] support for building Linux kernel with FDO (issue4523061)

2011-05-16 Thread Xinliang David Li
Agreed. David On Sun, May 15, 2011 at 3:27 AM, Jan Hubicka wrote: >> On Fri, May 13, 2011 at 5:54 AM, Paolo Bonzini wrote: >> > On 05/13/2011 03:03 AM, Rong Xu wrote: >> >> >> >>        * gcc/coverage.c        (revision 173717): set a flag if building >> >> for Linux kernel. >> >>        * gcc/

Re: [google] support for building Linux kernel with FDO (issue4523061)

2011-05-16 Thread Xinliang David Li
On Mon, May 16, 2011 at 3:38 PM, Andi Kleen wrote: > Jan Hubicka writes: >> Yep, >> I think it does make sense to share the implementation, but we need to find >> resonable way to do so. > > I doubt this will be very popular with the kernel community, which > prefers self contained code. Won't b

Re: [google] Parameterize function overhead estimate for inlining

2011-05-17 Thread Xinliang David Li
You will have a followup patch to override arm defaults, right? Ok for google/main. Thanks, David On Tue, May 17, 2011 at 9:29 PM, Mark Heffernan wrote: > This tiny change improves the size estimation for inlining and results in an > average 1% size reduction and a small (maybe 0.25% geomean) p

Re: [google] Increase inlining limits with FDO/LIPO

2011-05-17 Thread Xinliang David Li
To make consistent inline decisions between profile-gen and profile-use, probably better to check these two: flag_profile_arcs and flag_branch_probabilities. -fprofile-use enables profile-arcs, and value profiling is enabled only when edge/branch profiling is enabled (so no need to be checked).

Re: [google] Increase inlining limits with FDO/LIPO

2011-05-18 Thread Xinliang David Li
39 AM, Mark Heffernan wrote: > On Tue, May 17, 2011 at 11:34 PM, Xinliang David Li > wrote: >> >> To make consistent inline decisions between profile-gen and >> profile-use, probably better to check these two: >> >> flag_profile_arcs and flag_branch_probabilitie

Re: [google] Increase inlining limits with FDO/LIPO

2011-05-18 Thread Xinliang David Li
Ok with that change to google/main with some retesting. David On Wed, May 18, 2011 at 11:34 AM, Mark Heffernan wrote: > On Wed, May 18, 2011 at 10:52 AM, Xinliang David Li > wrote: >> The new change won't help those. Your original place will be ok if you >>

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

2011-05-18 Thread Xinliang David Li
Thanks for the comment. Will fix those. David On Wed, May 18, 2011 at 12:30 PM, Joseph S. Myers wrote: > On Wed, 18 May 2011, David Li wrote: > >> +      error ("Unrecognized option %s", is_enable ? "-fenable" : >> "-fdisable"); >

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

2011-05-18 Thread Xinliang David Li
Will fix the Changelog, and add documentation. Thanks, David On Wed, May 18, 2011 at 1:26 PM, Richard Guenther wrote: > On Wed, May 18, 2011 at 8:37 PM, David Li wrote: >> >> In gcc, not all passes have user level control to turn it on/off, and >> there is no way to fli

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

2011-05-18 Thread Xinliang David Li
The attached is the revised patch. Bootstrap and regression tested in trunk on x86-64/linux. Ok for checkin? Thanks, David On Wed, May 18, 2011 at 1:34 PM, Xinliang David Li wrote: > Will fix the Changelog, and add documentation. > > Thanks, > > David > > > > On W

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

2011-05-19 Thread Xinliang David Li
On Thu, May 19, 2011 at 11:04 AM, Andi Kleen wrote: > davi...@google.com (David Li) writes: > >> -fdisable-tree-ccp1    <--- disable ccp1 for all functions >> -fenable-tree-cunroll=1   <--- enable complete unroll for the function >>                      

Re: [google] Increase inlining limits with FDO/LIPO

2011-05-19 Thread Xinliang David Li
11081 0.92% 179.art29792884 -3.18% On Wed, May 18, 2011 at 12:53 PM, Mark Heffernan wrote: > Verified identical binaries created and submitted. > > Mark > > On Wed, May 18, 2011 at 11:37 AM, Xinliang David Li >

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

2011-05-19 Thread Xinliang David Li
On Thu, May 19, 2011 at 11:17 AM, Andi Kleen wrote: > On Thu, May 19, 2011 at 11:10:24AM -0700, Xinliang David Li wrote: >> On Thu, May 19, 2011 at 11:04 AM, Andi Kleen wrote: >> > davi...@google.com (David Li) writes: >> > >> >> -fdisable-tree-ccp1

Re: [google] Increase inlining limits with FDO/LIPO

2011-05-20 Thread Xinliang David Li
On Fri, May 20, 2011 at 2:12 AM, Richard Guenther wrote: > On Thu, May 19, 2011 at 8:26 PM, Xinliang David Li wrote: >> I have done some SPEC testing evaluating the performance impact of >> your patch.  They look very positive.  LIPO got helped even more than >> FDO (I

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

2011-05-20 Thread Xinliang David Li
Ok to check in this one? Thanks, David On Wed, May 18, 2011 at 12:30 PM, Joseph S. Myers wrote: > On Wed, 18 May 2011, David Li wrote: > >> +      error ("Unrecognized option %s", is_enable ? "-fenable" : >> "-fdisable"); >

fix for pr47837

2011-03-08 Thread Xinliang David Li
forever (whole night already) to finish possibly because the lto test in c-torture ..). Ok for trunk? David 2011-03-08 Xinliang David Li PR c/47837 * tree-ssa-uninit.c (pred_chain_length_cmp): New function. (normalize_preds): New function

Re: fix for pr47837

2011-03-08 Thread Xinliang David Li
On Tue, Mar 8, 2011 at 9:54 AM, Xinliang David Li wrote: > Please review the attached patch, it does some simplification of the > complicated logical or expressions (x1 or x2 or x3 ...) constructed > from control flow analysis into simpler form. > > Bootstraps and works on

Re: fix for pr47837

2011-03-08 Thread Xinliang David Li
On Tue, Mar 8, 2011 at 10:55 AM, Diego Novillo wrote: > On 03/08/2011 12:54 PM, Xinliang David Li wrote: >> >> Please review the attached patch, it does some simplification of the >> complicated logical or expressions (x1 or x2 or x3 ...) constructed >> from control

Re: fix for pr47837

2011-03-08 Thread Xinliang David Li
On Tue, Mar 8, 2011 at 2:04 PM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/08/11 11:55, Diego Novillo wrote: >> On 03/08/2011 12:54 PM, Xinliang David Li wrote: >>> Please review the attached patch, it does some simplification of the

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
Diego Novillo wrote: >>> On 03/08/2011 12:54 PM, Xinliang David Li wrote: >>>> Please review the attached patch, it does some simplification of the >>>> complicated logical or expressions (x1 or x2 or x3 ...) constructed >>>> from control flow anal

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/09/11 02:45, Richard Guenther wrote: >> On Tue, Mar 8, 2011 at 11:04 PM, Jeff Law wrote: > >> True.  I've been repeatedly thinking of building some on-the-side CFG >> with value-numbered pr

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
On Wed, Mar 9, 2011 at 8:29 AM, Richard Guenther wrote: > On Wed, Mar 9, 2011 at 5:24 PM, Xinliang David Li wrote: >> On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 03/09/11 02:45, Ric

Re: fix for pr47837

2011-03-09 Thread Xinliang David Li
9:54 AM, Richard Guenther wrote: > On Wed, Mar 9, 2011 at 6:34 PM, Xinliang David Li wrote: >> On Wed, Mar 9, 2011 at 8:29 AM, Richard Guenther >> wrote: >>> On Wed, Mar 9, 2011 at 5:24 PM, Xinliang David Li >>> wrote: >>>> On Wed, Mar 9, 2011 at 6

Re: fix for pr47837

2011-03-11 Thread Xinliang David Li
On Fri, Mar 11, 2011 at 11:50 AM, Jeff Law wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 03/09/11 09:24, Xinliang David Li wrote: >> On Wed, Mar 9, 2011 at 6:03 AM, Jeff Law wrote: >> On 03/09/11 02:45, Richard Guenther wrote: >>>>> On

Re: fix for pr47837

2011-03-14 Thread Xinliang David Li
On Mon, Mar 14, 2011 at 6:16 AM, Diego Novillo wrote: > On Fri, Mar 11, 2011 at 14:32, Jeff Law wrote: > >>> Regarding this particular patch, I hope it can be checked in to make >>> the test clean. It is a simple enhancement to a wheel that is already >>> there. It also serves as a case that can

Simple enhancement to -dA dump

2011-04-03 Thread Xinliang David Li
-tree-xxx-blocks so the same post-processing tools can be shared to generate the .dot file. To see bb layout, the BB sequence number is also dumped. Bootstrapped on x86-64/linux. Regression test is on going. Ok for checkin? Thanks, David 2011-04-03 Xinliang David Li * final.c

FDO usability patch -- correct insane profile data

2011-04-07 Thread Xinliang David Li
Hi please review the attached patch. Ok when bootstrap and test finish? Thanks, David 2011-04-07 Xinliang David Li * ipa-cp.c (ipcp_update_profiling): Correct negative scale factor due to insane profile data. Index: ipa-cp.c

new option -Wno-maybe-uninitialized

2011-04-07 Thread Xinliang David Li
: -Wno-error=maybe-uninitialized This is useful for users who only care about definite uninitialized variable warnings. Ok for trunk? thanks, David 2011-04-07 Xinliang David Li * tree-ssa-uninit.c (warn_uninitialized_phi): Pass warning code. * c-family/c-opts.c

FDO usability -- sanity check indirect call target

2011-04-07 Thread Xinliang David Li
04-07 Xinliang David Li * value-profile.c (function_decl_num_args): New function. (check_ic_target): New function. (gimple_ic_transform): Sanity check indirect call target. check_ic.p Description: Binary data

Re: Simple enhancement to -dA dump

2011-04-07 Thread Xinliang David Li
Ping? On Sun, Apr 3, 2011 at 5:54 PM, Xinliang David Li wrote: > For an assembly dump, it is very useful to examine the control flow > graph with frequency and profile count information. This requires > dumping the .s file with more control flow annotations. This patch > does ju

Re: Simple enhancement to -dA dump

2011-04-08 Thread Xinliang David Li
On Fri, Apr 8, 2011 at 5:04 AM, Diego Novillo wrote: > On 04/03/2011 08:54 PM, Xinliang David Li wrote: > >> + >> +      fprintf (file, "# BLOCK %d", bb->index); >> +      if (bb->frequency) >> +        fprintf (file, " freq:%d", bb->fre

Re: FDO usability -- sanity check indirect call target

2011-04-08 Thread Xinliang David Li
Please review this patch. Regression test is ok. I will do more application testing to make sure the check is not too strict (filtering out legal ic targets). Thanks, David 2011-04-07 Xinliang David Li * value-profile.c (function_decl_num_args): New function

Fix PR48484

2011-04-08 Thread Xinliang David Li
Hi, this patch fixes the test failure. OK after bootstrap and regression test? Thanks, David 2011-04-08 Xinliang David Li PR tree-optimization/PR48484 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Set has_valid_pred lazily 2011-04-08 Xinliang David

Re: FDO usability -- sanity check indirect call target

2011-04-09 Thread Xinliang David Li
SPEC06 build with FDO is ok with the patch -- no abnormality was found. David On Fri, Apr 8, 2011 at 2:42 PM, Xinliang David Li wrote: > Please review this patch. Regression test is ok. I will do more > application testing to make sure the check is not too strict > (filtering out

Re: FDO usability -- sanity check indirect call target

2011-04-10 Thread Xinliang David Li
Is this patch OK? Thanks, David On Sat, Apr 9, 2011 at 9:34 AM, Xinliang David Li wrote: > SPEC06 build with FDO is ok with the patch -- no abnormality was found. > > David > > On Fri, Apr 8, 2011 at 2:42 PM, Xinliang David Li wrote: >> Please review this patch. Regressi

<    6   7   8   9   10   11