Re: [GOOGLE] Remove overly-aggressive LIPO assert

2015-12-08 Thread Xinliang David Li
ok. David On Fri, Dec 4, 2015 at 11:29 AM, Teresa Johnson wrote: > Ping. > Thanks, Teresa > > On Wed, Dec 2, 2015 at 12:46 PM, Teresa Johnson wrote: >> Remove an assert that was overly-strict and already partially redundant >> with an immediately prior assert. In this case we had a hidden visib

Re: [google gcc-4_9] Fix bad LIPO profile produced by gcov-tool

2015-12-01 Thread Xinliang David Li
both lengths. So now it is > also needed. > > On Tue, Dec 1, 2015 at 4:46 PM, Xinliang David Li wrote: >> Not sure about this line: >> >> mod_info->combined_strlen = saved_compressed_len; >> >> This did not exist for the compiler path before. >> >

Re: [google][gcc-4_9] encode and compress cc1 option strings in gcov_module_info

2015-10-06 Thread Xinliang David Li
> It's 1:3 to 1:4 in the programs I tested. But it really depends on how >> the options are used. I think your idea of using combined strlen works >> better. >> I just make the code a little clumsy but it does not cause any >> performance issue. >> >> On Tue,

Re: [google][gcc-4_9] encode and compress cc1 option strings in gcov_module_info

2015-10-06 Thread Xinliang David Li
On Tue, Oct 6, 2015 at 9:26 AM, Rong Xu wrote: > On Mon, Oct 5, 2015 at 5:33 PM, Xinliang David Li wrote: >>unsigned ggc_memory = gcov_read_unsigned (); >> + unsigned marker = 0, len = 0, k; >> + char **string_array, *saved_cc1_strings; >> + >>

Re: [google][gcc-4_9] encode and compress cc1 option strings in gcov_module_info

2015-10-05 Thread Xinliang David Li
unsigned ggc_memory = gcov_read_unsigned (); + unsigned marker = 0, len = 0, k; + char **string_array, *saved_cc1_strings; + for (unsigned j = 0; j < 7; j++) Do not use hard coded number. Use the enum defined in coverage.c. +string_array[j] = xstrdup (gcov_read_s

Re: [google][gcc-4_9] Remove unused key field in gcov_fn_info

2015-09-29 Thread Xinliang David Li
ok. David On Tue, Sep 29, 2015 at 4:08 PM, Rong Xu wrote: > You are right. I attached the updated patch to this email. > > On Tue, Sep 29, 2015 at 3:10 PM, Xinliang David Li wrote: >>else >> { >>gfi_ptr = gi_ptr->functions[f_

Re: [google][gcc-4_9] Remove unused key field in gcov_fn_info

2015-09-29 Thread Xinliang David Li
else { gfi_ptr = gi_ptr->functions[f_ix]; - if (gfi_ptr && gfi_ptr->key == gi_ptr) + if (gfi_ptr) length = GCOV_TAG_FUNCTION_LENGTH; - else -length = 0; } The removal of 'else' path seems wrong. David On Tue

Re: Patch GCC for profile-func-internal-id=0 coverage-callback=1

2015-09-02 Thread Xinliang David Li
Sorry for the wrong advice. I thought the feature was in trunk. Rong, can you submit the callback support to trunk? David On Wed, Sep 2, 2015 at 1:41 PM, Rong Xu wrote: > Matt, > > It seems this patch is for google branch, rather the trunk. The code for > coverage callback function is not in tr

Re: [GOOGLE] Reset lambda scope information when popping module for LIPO

2015-08-15 Thread Xinliang David Li
ok. David On Fri, Aug 14, 2015 at 11:13 PM, Teresa Johnson wrote: > This patch resets the lambda scope based sequence numbering used to assign > numbers to lambdas during parsing when we pop a module scope. This resets > the numbering for subsequent modules imported during LIPO compilation. > >

Re: [PATCH, Google] Backport trunk patch r220860 to google/4.9 branch

2015-06-17 Thread Xinliang David Li
ok. David On Wed, Jun 17, 2015 at 3:06 PM, Carrot Wei wrote: > Hi > > In aarch64 backend of google/4.9 branch, the split pattern for insn > aarch64_lshr_sisd_or_int_3 destroys one of the source operands, > causes the later usage of the operand get a wrong value (google bug > 17907351). > > The b

Re: [PATCH, Google] Notify df framework when removing an insn in simplify-got

2015-06-09 Thread Xinliang David Li
ok. David On Tue, Jun 9, 2015 at 4:46 PM, Carrot Wei wrote: > Hi > > I forgot to notify df framework when I removed an insn, it caused df > verification failure described in google bug b/16155462. > > The following patch passed regression test on arm qemu in both thumb > and arm modes. > OK for

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-06-02 Thread Xinliang David Li
On Tue, Jun 2, 2015 at 1:56 PM, Ramana Radhakrishnan wrote: > On Tue, Jun 2, 2015 at 7:15 PM, Sriraman Tallam wrote: >> On Mon, Jun 1, 2015 at 1:33 PM, Ramana Radhakrishnan >> wrote: >>> On Mon, Jun 1, 2015 at 7:55 PM, Sriraman Tallam wrote: On Mon, Jun 1, 2015 at 11:41 AM, Ramana Radhakri

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-21 Thread Xinliang David Li
We have -finstrument-functions-exclude-function-list=.. in GCC, though it is not using mangled names. David On Thu, May 21, 2015 at 2:58 PM, Jakub Jelinek wrote: > On Thu, May 21, 2015 at 10:51:50PM +0100, Pedro Alves wrote: >> On 05/21/2015 10:12 PM, Sriraman Tallam wrote: >> > >> > My original

Re: [RFC] COMDAT Safe Module Level Multi versioning

2015-05-19 Thread Xinliang David Li
> > Hm. But which options are unsafe? Also wouldn't it be better to simply > _not_ have unsafe options produce comdats but always make local clones > for them (thus emit the comdat with "unsafe" flags dropped)? Always localize comdat functions may lead to text size increase. It does not work if

Re: [PATCH, GOOGLE] Backport patch r212222 to google 4.9 branch

2015-05-13 Thread Xinliang David Li
ok. David On Wed, May 13, 2015 at 11:00 AM, Carrot Wei wrote: > Hi > > The more strict devirtualization condition in this patch helps to fix > google bug b/19872411. > > Bootstraped and regression tested on x86-64. > OK for google 4.9 branch?

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-04 Thread Xinliang David Li
yes -- a full solution that supports lazy binding will be nice. David On Mon, May 4, 2015 at 9:58 AM, Michael Matz wrote: > Hi, > > On Mon, 4 May 2015, Xinliang David Li wrote: > >> The use case proposed by Sri allows user to selectively eliminate PLT >> overhead for

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-04 Thread Xinliang David Li
The use case proposed by Sri allows user to selectively eliminate PLT overhead for hot external calls only. In such scenarios, lazy binding won't be something matters to the user. David On Mon, May 4, 2015 at 7:45 AM, Michael Matz wrote: > Hi, > > On Thu, 30 Apr 2015, Sriraman Tallam wrote: > >>

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-01 Thread Xinliang David Li
yes -- it is good to turn this on by default in LTO mode without requiring user to specify the option. David On Fri, May 1, 2015 at 9:23 AM, H.J. Lu wrote: > On Fri, May 1, 2015 at 9:19 AM, Xinliang David Li wrote: >> On Fri, May 1, 2015 at 8:01 AM, Andi Kleen wrote: >>&g

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-01 Thread Xinliang David Li
On Fri, May 1, 2015 at 8:01 AM, Andi Kleen wrote: > Sriraman Tallam writes: >> >> This comes with caveats. This cannot be generally done for all >> functions marked extern as it is impossible for the compiler to say if >> a function is "truly extern" (defined in a shared library). If a >> funct

Re: [GOOGLE] Avoid calling walk_aliased_vdefs in O0 function

2015-03-23 Thread Xinliang David Li
ok. On Mon, Mar 23, 2015 at 5:37 PM, Carrot Wei wrote: > This patch fixes google internal bug b/19277289. It can only be > reproduced in google 4.9 branch. > > In function param_change_prob, there is following function call > > walk_aliased_vdefs (&refd, gimple_vuse (stmt), record_modified, &info

Re: [GOOGLE] Fixes for TLS wrapper and init functions in LIPO mode

2015-03-20 Thread Xinliang David Li
suite/g++.dg/tree-prof/lipo/tls_1.C (working copy) > @@ -0,0 +1,38 @@ > +// { dg-options "-std=c++11 -O2 --param=lipo-sampling-period=1" } > +#include > +#include > +#include > +#include "tls.h" > +TLSClass* NextTLSClass() { > + return new TLSClas

Re: [GOOGLE] Fixes for TLS wrapper and init functions in LIPO mode

2015-03-19 Thread Xinliang David Li
On Thu, Mar 19, 2015 at 9:57 PM, Teresa Johnson wrote: > On Thu, Mar 19, 2015 at 8:00 PM, Xinliang David Li wrote: >> ok -- then there is an over assertion in get_local_tls_init_fn. The >> method can be called for aux module -- the decl created will also be >> promoted. >

Re: [GOOGLE] Fixes for TLS wrapper and init functions in LIPO mode

2015-03-19 Thread Xinliang David Li
at 5:51 PM, Teresa Johnson wrote: > On Thu, Mar 19, 2015 at 4:45 PM, Xinliang David Li wrote: >> does generate_tls_wrapper also need to be suppressed for aux module? > > No, we generate the wrapper in the aux module and use it to access the > TLS variable and invoke it's

Re: [GOOGLE] Fixes for TLS wrapper and init functions in LIPO mode

2015-03-19 Thread Xinliang David Li
> === > --- testsuite/g++.dg/tree-prof/lipo/tls_1.C (revision 0) > +++ testsuite/g++.dg/tree-prof/lipo/tls_1.C (working copy) > @@ -0,0 +1,32 @@ > +// { dg-options "-std=c++11 -O2 --param=lipo-sampling-peri

Re: [GOOGLE] Disable overflow warning of the offset

2015-02-19 Thread Xinliang David Li
ok david On Thu, Feb 19, 2015 at 11:07 AM, Dehao Chen wrote: > The offset overflow warning would cause build fails when function's > start line is missing(0). Until the start line issues is fixed, we > will suppress this warning. > > Testing on-going. OK for google-4_9? > > Thanks, > Dehao > > I

Re: [GOOGLE] Refine LIPO aux function removal

2015-01-02 Thread Xinliang David Li
ok. David On Fri, Jan 2, 2015 at 10:19 PM, Teresa Johnson wrote: > Fixes a problem caused by my recent change to allow aux functions to > be removed. They need to be kept until after LIPO linking/static > promotion, since they affect the promoted names of any static > variables defined within th

Re: [GOOGLE] Make LIPO aux function removal consistent

2014-12-26 Thread Xinliang David Li
Ok (perhaps merge DECL_EXTERNAL and cgraph_is_aux_decl_external checks together). David On Mon, Dec 22, 2014 at 4:57 PM, Teresa Johnson wrote: > Ping. > Teresa > > On Fri, Dec 19, 2014 at 5:40 PM, Teresa Johnson wrote: >> Passes regression tests, ok for google 4_9? >> >> Thanks, >> Teresa >> >

Re: [GOOGLE] Do not promote indirect call for AutoFDO in the callee body definition is not available

2014-12-16 Thread Xinliang David Li
lem, but is also reasonable because > if callee's definition is not available, we should not promote the > indirect call anyway. > It depends. If there is a wrong DFE before the promotion, we will end up missing opportunities. David > Dehao > > On Tue, Dec 16, 2014 at 2

Re: [GOOGLE] Do not promote indirect call for AutoFDO in the callee body definition is not available

2014-12-16 Thread Xinliang David Li
Does it paper over the real bug? David On Tue, Dec 16, 2014 at 2:38 PM, Dehao Chen wrote: > This patch fixes the bug for undefined symbol in AutoFDO build. > > Testing on going. OK for google-4_9 branch? > > Thanks, > Dehao > > Index: gcc/auto-profile.c >

Re: [GOOGLE] Sync google-4_9 autofdo to trunk

2014-12-16 Thread Xinliang David Li
ok. David On Tue, Dec 16, 2014 at 2:15 PM, Dehao Chen wrote: > This patch syncs google-4_9 autofdo implementation to trunk (as much > as possible). > > Bootstrapped and passed regression test and performance test. > > OK for google-4_9? > > Thanks, > Dehao

Re: [Google] Port patch r215585 to Google/4.9 branch

2014-12-16 Thread Xinliang David Li
The fix is already in upstream gcc-4.9 branch? If yes, we just need a merge. David On Tue, Dec 16, 2014 at 11:30 AM, Carrot Wei wrote: > Hi > > In Google application we hit the same problem as > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63341, so we also need > the patch r215585 for Google/4.

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-17 Thread Xinliang David Li
>> We do not do sophisticated recursive call detection in einline phase. >> It only happens in ipa-inline phase. >> >> Dehao >> >> On Thu, Nov 13, 2014 at 3:18 PM, Xinliang David Li >> wrote: >>> On Thu, Nov 13, 2014 at 2:57 PM, Dehao Chen

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
On Thu, Nov 13, 2014 at 2:57 PM, Dehao Chen wrote: > IIRC, AutoFDO the actual iteration for AutoFDO is mostly <3. But it > should not harm to set max iter as 10. > > On Thu, Nov 13, 2014 at 2:51 PM, Xinliang David Li wrote: >> After inline summary is recomputed, the larg

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
After inline summary is recomputed, the large code growth problem will also be better controlled, right? David On Thu, Nov 13, 2014 at 2:48 PM, Xinliang David Li wrote: > Is there a need to have 10 iterations of early inline for autofdo? > > David > > On Thu, Nov 13, 2014 at 2:25

Re: [GOOGLE] Fix AutoFDO size issue

2014-11-13 Thread Xinliang David Li
Is there a need to have 10 iterations of early inline for autofdo? David On Thu, Nov 13, 2014 at 2:25 PM, Dehao Chen wrote: > In AutoFDO, we increase einline iterations. This could lead to > extensive code bloat if we have recursive calls like: > > dtor() { > destroy(node); > } > > destroy(nod

Re: [google gcc-4.9] FDO build for linux kernel

2014-11-13 Thread Xinliang David Li
ok. (the way to detect kernel build looks unpolished, but there does not seem to be a consistent way of doing it. Some targets have kernel specific flags ..) On Thu, Nov 13, 2014 at 10:40 AM, Rong Xu wrote: > Here is patch that ports our work on FDO linux kernel build support to > gcc-4_9. With

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Xinliang David Li
missing test case? David On Wed, Nov 12, 2014 at 2:13 PM, Teresa Johnson wrote: > This patch fixes an issue where tree-strlen was incorrectly removing a > store of 0 into a string because it thought a prior CLOBBER (which is > an empty constructor with no elements) was zero-initializing the > st

Re: [google gcc-4_9] make ifunc support available for BIONIC

2014-10-27 Thread Xinliang David Li
ok. David On Mon, Oct 27, 2014 at 11:04 AM, Rong Xu wrote: > ifunc support is hard-coded as false for BIONIC. This patch removes > this check and let > configure decide whether it should have ifunc support. > > Thanks, > > -Rong

Re: [GOOGLE] Fix LIPO resolved node reference fixup

2014-10-27 Thread Xinliang David Li
tains ADDR and update it to the real callee's decl. */ > + fixup_decl_info info; > + info.orig_decl = addr; > + info.new_decl = real_callee->decl; > + fixup_all_refs (&op, &info); > } >return false; > } > > > On Fri, Oct 24,

Re: [GOOGLE] Fix LIPO resolved node reference fixup

2014-10-24 Thread Xinliang David Li
When orgin_addr == addr, is there a guarantee that this assert: gcc_assert (TREE_OPERAND (op,0) == addr); is always true? David On Fri, Oct 24, 2014 at 10:21 AM, Teresa Johnson wrote: > This patch makes a fix to the reference fixups performed after LIPO > node resolution, to better handle t

Re: [PATCH] AutoFDO patch for trunk

2014-10-22 Thread Xinliang David Li
Can someone pre-approve the patch so that Dehao can check it in after basic testing? David On Wed, Oct 22, 2014 at 10:06 AM, David Edelsohn wrote: >> Rainer Orth writes: > >> As Joseph is repeating over and over again, *nothing* must be included >> before config.h, and auto-profile.c violate

Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538

2014-10-20 Thread Xinliang David Li
ok (for google branch). David On Mon, Oct 20, 2014 at 1:44 PM, Sriraman Tallam wrote: > On Mon, Oct 20, 2014 at 12:59 PM, Xinliang David Li > wrote: >> On Mon, Oct 20, 2014 at 11:59 AM, Sriraman Tallam >> wrote: >>> On Mon, Oct 20, 2014 at 10:51 AM, Andrew Pinski

Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538

2014-10-20 Thread Xinliang David Li
On Mon, Oct 20, 2014 at 11:59 AM, Sriraman Tallam wrote: > On Mon, Oct 20, 2014 at 10:51 AM, Andrew Pinski wrote: >> On Mon, Oct 20, 2014 at 10:46 AM, Sriraman Tallam >> wrote: >>> On Mon, Oct 20, 2014 at 10:42 AM, Xinliang David Li >>> wrote: >

Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538

2014-10-20 Thread Xinliang David Li
Perhaps explicitly allowing STRING_CST to go through the large data check, instead of removing the var-decl check? Do you see other opcodes that need to be handled too? David On Mon, Oct 20, 2014 at 10:46 AM, Sriraman Tallam wrote: > On Mon, Oct 20, 2014 at 10:42 AM, Xinliang David Li >

Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538

2014-10-20 Thread Xinliang David Li
Why removing the tree_code check? David On Mon, Oct 20, 2014 at 10:35 AM, Sriraman Tallam wrote: > Hi, > >This patch is under review for trunk GCC : > https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01638.html. > > In the mean time, is this ok for google/gcc-4_9 branch? Without > this, -m

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-20 Thread Xinliang David Li
On Mon, Oct 20, 2014 at 1:32 AM, Richard Biener wrote: > On Mon, Oct 20, 2014 at 12:02 AM, Xinliang David Li > wrote: >> On Sat, Oct 18, 2014 at 4:19 PM, Xinliang David Li >> wrote: >>> On Sat, Oct 18, 2014 at 3:27 PM, Jan Hubicka wrote: >>>>> Th

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-19 Thread Xinliang David Li
On Sat, Oct 18, 2014 at 4:19 PM, Xinliang David Li wrote: > On Sat, Oct 18, 2014 at 3:27 PM, Jan Hubicka wrote: >>> The difference in instrumentation runtime is huge -- as topn profiler >>> is pretty expensive to run. >>> >>> With FDO, it is probably better

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-19 Thread Xinliang David Li
No, Google branch is not yet synced to 4.9 head. David On Sun, Oct 19, 2014 at 1:11 PM, Jan Hubicka wrote: >> It was in upstream 4.9 branch, but got reverted in r215061 to fix >> PR/61214 and PR/62224. > > Was your tests done with this change or without? > > Honza

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-19 Thread Xinliang David Li
It was in upstream 4.9 branch, but got reverted in r215061 to fix PR/61214 and PR/62224. David On Sun, Oct 19, 2014 at 1:21 AM, Jan Hubicka wrote: >> Hi Honza, >> >> As David says, we will do some more experiments with the change you >> suggest and speculative devirtualization, but we needed to

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-19 Thread Xinliang David Li
On Sun, Oct 19, 2014 at 1:19 AM, Jan Hubicka wrote: >> > >> > I am surprised you hit the size limits with 4.9 only - for quite some time >> > we keep all virtual functions in callgarph until inlining. In fact 4.9 is >> > first >> > that works harder to drop them early (because I hit the problem w

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-18 Thread Xinliang David Li
On Sat, Oct 18, 2014 at 4:22 PM, Jan Hubicka wrote: >> >> The virtual functions will be emitted in some modules, right? If they >> are hot, they will be included with the auxiliary modules. Note that >> LIPO indirect call profile will point to the comdat copy that is >> picked by the linker in the

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-18 Thread Xinliang David Li
On Sat, Oct 18, 2014 at 4:26 PM, Jan Hubicka wrote: >> On Sat, Oct 18, 2014 at 3:27 PM, Jan Hubicka wrote: >> >> The difference in instrumentation runtime is huge -- as topn profiler >> >> is pretty expensive to run. >> >> >> >> With FDO, it is probably better to make early inlining more aggressi

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-18 Thread Xinliang David Li
On Sat, Oct 18, 2014 at 3:27 PM, Jan Hubicka wrote: >> The difference in instrumentation runtime is huge -- as topn profiler >> is pretty expensive to run. >> >> With FDO, it is probably better to make early inlining more aggressive >> in order to get more context sensitive profiling. > > I agree

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-18 Thread Xinliang David Li
On Sat, Oct 18, 2014 at 3:23 PM, Jan Hubicka wrote: >> Devirtualization needs more tuning to be usable internally. We have >> seen 1.6% size increase on average, but unnoticable performance > > Does that happen with -fno-devirtualize-speculatively? > Not sure -- I will do some experiment. >> imp

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-18 Thread Xinliang David Li
ok. David On Sat, Oct 18, 2014 at 9:26 AM, Teresa Johnson wrote: > Increasing the number of early inliner iterations from 1 to 2 enables more > indirect calls to be promoted/inlined before instrumentation. This in turn > reduces the instrumentation overhead, particularly for more expensive indir

Re: [GOOGLE] Increase max-early-inliner-iterations to 2 for profile-gen and use

2014-10-18 Thread Xinliang David Li
The difference in instrumentation runtime is huge -- as topn profiler is pretty expensive to run. With FDO, it is probably better to make early inlining more aggressive in order to get more context sensitive profiling. David On Sat, Oct 18, 2014 at 10:05 AM, Jan Hubicka wrote: >> Increasing the

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-18 Thread Xinliang David Li
Devirtualization needs more tuning to be usable internally. We have seen 1.6% size increase on average, but unnoticable performance improvement with this option on. I would rather use the size budget to make inliner more aggressive :) For instrumentation build, some of our builds will reach the bu

Re: [GOOGLE] Disable -fdevirtualize by default

2014-10-18 Thread Xinliang David Li
ok. David On Sat, Oct 18, 2014 at 9:25 AM, Teresa Johnson wrote: > Disabling devirtualization reduces code size, both for instrumentation > (because > many more virtual functions are kept longer and therefore instrumented) and > for > normal optimization. > > Patch attached. Passes internal te

Re: [GOOGLE] Treat artificial from aux modules as non-external

2014-10-16 Thread Xinliang David Li
Ok if large tests pass. David On Thu, Oct 16, 2014 at 9:16 AM, Teresa Johnson wrote: > The following patch fixes a LIPO issue with a virtual implicitly > instantiated destructor from an aux module that was needed when we > devirtualized a call from the primary module, but it was not available >

Re: [GOOGLE] recalculate dominance before update_ssa in AutoFDO pass

2014-10-15 Thread Xinliang David Li
- update_ssa (TODO_update_ssa); > >/* Local pure-const may imply need to fixup the cfg. */ > if (execute_fixup_cfg () & TODO_cleanup_cfg) > > Dehao > > On Wed, Oct 15, 2014 at 10:50 AM, Xinliang David Li > wrote: >> Is it destroyed by value pro

Re: [GOOGLE] recalculate dominance before update_ssa in AutoFDO pass

2014-10-15 Thread Xinliang David Li
Is it destroyed by value profile transformations? Can you move the dominance recomputing code closer to where it gets invalidated? David On Wed, Oct 15, 2014 at 10:37 AM, Dehao Chen wrote: > This patch recalculates dominance info before update_ssa call in > AutoFDO. This fixes bug when dominance

Re: [Patch] Fix PR61889 for the w64-mingw32 case

2014-10-13 Thread Xinliang David Li
Honza, not sure if this patch is idea, but this will unblock mingw build problems. Can this one get in? thanks, David On Wed, Sep 24, 2014 at 8:22 AM, Rainer Emrich wrote: > The following patch fixes PR61889 for x86_64-w64-mingw32. Details can be found > on https://gcc.gnu.org/bugzilla/show_bug

Re: [Google] Put time profiling under param, disable by default

2014-10-12 Thread Xinliang David Li
ok. David On Sun, Oct 12, 2014 at 2:59 PM, Teresa Johnson wrote: > Guard the new time profiling under a parameter, off by default for Google > since it isn't used and the extra instrumentation was adding bloat. > > Enabled time profiling for two test cases that explicitly test it. > > For func_r

Re: [GOOGLE] Handle missing BINFO for LIPO

2014-10-07 Thread Xinliang David Li
Ok (please also guard it with L_IPO_COMP_MODE). David On Tue, Oct 7, 2014 at 11:27 AM, Teresa Johnson wrote: > We may have missing BINFO on a type if that type is a builtin, since > in LIPO mode we will reset builtin types to their original tree nodes > before parsing subsequent modules. Handle

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Xinliang David Li
On Mon, Oct 6, 2014 at 1:31 PM, Jan Hubicka wrote: >> >> Yes. That's doable. I'm just not sure if top 2 entries are enough. I >> can see from your example that it will be useful for BBs having >> multiple case stmt. > > I suppose we want real histogram profiler here. I.e. something that is given

Re: [PATCH] Indirect-call topn targets profiler (instrumentation)

2014-10-06 Thread Xinliang David Li
On Mon, Oct 6, 2014 at 11:22 AM, Jan Hubicka wrote: > Rong, > Would be possible to use topn profiler to get resonale histograms for switch > expansion, too? In that case it may make sense to have value version of it > as well. The underlying topn_profiler can be used the same way as the current

Re: [GOOGLE] Skip fake LIPO edges when replacing calls with local alias

2014-10-03 Thread Xinliang David Li
oops -- misread it :) Ok. David On Fri, Oct 3, 2014 at 9:45 AM, Teresa Johnson wrote: > On Fri, Oct 3, 2014 at 9:31 AM, Xinliang David Li wrote: >> The name 'e' is used for both outer scope edge and inner scope one. > > No, the declaration was moved from the inner

Re: [GOOGLE] Skip fake LIPO edges when replacing calls with local alias

2014-10-03 Thread Xinliang David Li
The name 'e' is used for both outer scope edge and inner scope one. This is confusing. David On Fri, Oct 3, 2014 at 9:27 AM, Teresa Johnson wrote: > Adds handling in this block of code (new in gcc/4_9 and therefore > google/4_9) for LIPO fake edges for indirect calls, which don't have a > call_

Re: [google gcc-4_9] fix undefined references in debug_info

2014-10-03 Thread Xinliang David Li
This patch should be targeting trunk gcc? David On Fri, Oct 3, 2014 at 9:23 AM, Rong Xu wrote: > Hi, > > This patch fixed a bug exposed in build kernel with fdo. > > We cannot simply overwrite the bb footer in emit_barrier_after_bb as > the bb may already have a footer (in this case, a deleted

Re: [Patch AArch64] Fix extended register width

2014-10-01 Thread Xinliang David Li
On Wed, Oct 1, 2014 at 1:42 AM, Richard Earnshaw wrote: > On 30/09/14 21:30, Eric Christopher wrote: >> On Tue, Sep 30, 2014 at 5:57 AM, Marcus Shawcroft >> wrote: >>> On 22 September 2014 19:41, Carrot Wei wrote: Hi The extended register width in add/adds/sub/subs/cmp instruction

Re: [PATCH] Fix PR63422 to handle profile insanities

2014-10-01 Thread Xinliang David Li
Probably need to file a bug to track the copyrename2 problem. David On Wed, Oct 1, 2014 at 9:59 AM, Teresa Johnson wrote: > This patch removes some asserts my jump threading patch r215739 added. > An upstream pass (copyrename2) is introducing some bogus profile > counts, so we can't assert that

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-30 Thread Xinliang David Li
On Tue, Sep 30, 2014 at 9:28 PM, Nathan Sidwell wrote: > On 09/22/14 08:04, Teresa Johnson wrote: > > >> The approach we now take for LIPO builds is to propagate the counts > > LIPO? > See https://gcc.gnu.org/wiki/LightweightIpo It is a feature in google GCC branches. David >> for the profiled

Re: [GOOGLE] Fix new tests

2014-09-24 Thread Xinliang David Li
not sure if there is a better way, but ok. David On Wed, Sep 24, 2014 at 6:20 AM, Teresa Johnson wrote: > The new tests added for -mpatch-functions-for-instrumentation did not > correctly restrict themselves to x86_64 since tree-prof.exp doesn't > support dg-do. Work around this by using target

Re: [GOOGLE] Fix dynamic instrumentation patching for cold sections

2014-09-23 Thread Xinliang David Li
ok. David On Tue, Sep 23, 2014 at 10:27 AM, Teresa Johnson wrote: > This patch fixes the support for patching for instrumentation so that it > works with function splitting, by using the correct helper method for locating > the current section. > > Added a couple tests cloned from existing funct

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-22 Thread Xinliang David Li
On Mon, Sep 22, 2014 at 8:04 AM, Teresa Johnson wrote: > On Mon, Sep 22, 2014 at 1:36 AM, Nathan Sidwell wrote: >> On 09/21/14 18:58, Xinliang David Li wrote: >> >>>> the intent is that that points to the gcov_info object of the object file >>>> containi

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-22 Thread Xinliang David Li
On Mon, Sep 22, 2014 at 1:36 AM, Nathan Sidwell wrote: > On 09/21/14 18:58, Xinliang David Li wrote: > >>> the intent is that that points to the gcov_info object of the object file >>> containing the live version of the function. I couldn't quite get this >>

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-21 Thread Xinliang David Li
On Sun, Sep 21, 2014 at 5:48 AM, Nathan Sidwell wrote: > On 09/13/14 00:31, Teresa Johnson wrote: >> >> This patch addresses issues when running gcov-tool after performing >> COMDAT fixup during dyn-ipa. Functions that were previously all zero >> counts are marked, and the counts are discarded whe

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-16 Thread Xinliang David Li
1.5M increase is not big concern. Ok with that. David On Tue, Sep 16, 2014 at 10:51 AM, Teresa Johnson wrote: > On Tue, Sep 16, 2014 at 8:07 AM, Xinliang David Li wrote: >> The zero_counts array is passed to gcov_build_callgraph but not used >> until the dyn-cgraph is initial

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-16 Thread Xinliang David Li
ang David Li wrote: >> Is it necessary to declare zero_counts array at all? Can a flag field >> be added to dyn_cgraph_node structure to indicate if it is fixed up? > > The zero_counts array is used to pass info back to the caller in > libgcov-driver.cc (dyn_cgraph_nod

Re: [GOOGLE] Fix LIPO COMDAT fixup and gcov-tool interactions

2014-09-15 Thread Xinliang David Li
Is it necessary to declare zero_counts array at all? Can a flag field be added to dyn_cgraph_node structure to indicate if it is fixed up? David On Fri, Sep 12, 2014 at 4:31 PM, Teresa Johnson wrote: > This patch addresses issues when running gcov-tool after performing > COMDAT fixup during dyn

Re: [google/gcc-4_9] Fix static var promotion handling for LIPO

2014-09-15 Thread Xinliang David Li
ok. David On Mon, Sep 15, 2014 at 1:43 PM, Sharad Singhai wrote: > This patch is for the google/gcc-4_9 branch to fix a LIPO issue. > > This patch addresses handling for static initializer data during > static variable promotion in LIPO optimize phase. This is useful for > those targets which ac

Re: [GOOGLE] Fix gcda build info support

2014-09-11 Thread Xinliang David Li
ok. David On Thu, Sep 11, 2014 at 11:49 AM, Teresa Johnson wrote: > On Thu, Sep 11, 2014 at 10:17 AM, Xinliang David Li > wrote: >> Yes, that is what I meant. >> >> David >> >> On Thu, Sep 11, 2014 at 10:09 AM, Teresa Johnson >> wrote: >>>

Re: [GOOGLE] Fix gcda build info support

2014-09-11 Thread Xinliang David Li
Yes, that is what I meant. David On Thu, Sep 11, 2014 at 10:09 AM, Teresa Johnson wrote: > On Wed, Sep 10, 2014 at 3:31 PM, Xinliang David Li wrote: >> Can you share the buildinfo reader code with the merger by defininig >> some hooks for different callbacks? > > Do you

Re: [GOOGLE] Fix gcda build info support

2014-09-10 Thread Xinliang David Li
Can you share the buildinfo reader code with the merger by defininig some hooks for different callbacks? David On Wed, Sep 10, 2014 at 10:24 AM, Teresa Johnson wrote: > While porting recent support for a build info section in the gcda from > google/4_8 to 4_9 and doing manual testing, I discover

Re: [PATCH ARM] Fix PR target/63209

2014-09-10 Thread Xinliang David Li
Fixed the formatting and committed it to trunk: r215136. Will backport it to gcc-4_9 branch. thanks, David On Wed, Sep 10, 2014 at 11:24 AM, Richard Earnshaw wrote: > On 09/09/14 19:45, Xinliang David Li wrote: >> Richard, thanks for the review. The revised patch is attached. Is th

Re: [PATCH ARM] Fix PR target/63209

2014-09-10 Thread Xinliang David Li
With gcc regression test, no regressions are found. David On Tue, Sep 9, 2014 at 11:45 AM, Xinliang David Li wrote: > Richard, thanks for the review. The revised patch is attached. Is this > one OK (after testing is done)? > > David > > > 2014-09-08 Xinliang David Li

Re: [PATCH ARM] Fix PR target/63209

2014-09-09 Thread Xinliang David Li
Richard, thanks for the review. The revised patch is attached. Is this one OK (after testing is done)? David 2014-09-08 Xinliang David Li PR target/63209 * config/arm/arm.md (movcond_addsi): Handle case where source and target operands are the same 2014-09-08

[PATCH ARM] Fix PR target/63209

2014-09-09 Thread Xinliang David Li
=== --- ChangeLog (revision 215039) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2014-09-08 Xinliang David Li + + PR target/63209 + * config/arm/arm.md (movcond_addsi_1): New pattern. + (movcond_addsi): Add a constraint. + 2014-09-08 Trevor

Re: [GOOGLE] Fixup varpool references after LIPO linking

2014-08-28 Thread Xinliang David Li
ok. The patch is fine. On Thu, Aug 28, 2014 at 1:46 PM, Teresa Johnson wrote: > On Thu, Aug 28, 2014 at 1:40 PM, Xinliang David Li wrote: >> >> Do you know why the previous check is not enough ? >> >> cgraph_can_remove_if_no_direct_calls_and_refs_p (struct cgrap

Re: [GOOGLE] Fix AutoFDO LIPO ICE due to eliminated abstract origin

2014-08-23 Thread Xinliang David Li
e is none. Trunk > has the same code in these two locations, but the creation of a new > node after deleting the first does not cause any problems. > Teresa > > On Sat, Aug 23, 2014 at 11:50 AM, Xinliang David Li > wrote: >> Is it a problem specific to LIPO? >> >>

Re: [GOOGLE] Fix -fopt-info seg fault in AutoFDO LIPO mode

2014-08-23 Thread Xinliang David Li
ok. David On Sat, Aug 23, 2014 at 11:42 AM, Teresa Johnson wrote: > Fixes seg fault when using -fopt-info with AutoFDO LIPO. Ensure that the > mapping between module name and ident is setup. > > Tested with regression tests and internal benchmarks. Ok for google/4_9 > > 2014-08-23 Teresa Johnso

Re: [GOOGLE] Fix AutoFDO LIPO ICE due to eliminated abstract origin

2014-08-23 Thread Xinliang David Li
Is it a problem specific to LIPO? David On Sat, Aug 23, 2014 at 11:41 AM, Teresa Johnson wrote: > This patch ensures we don't prematurely delete an abstract origin node, > leading > to creating a new one after LIPO linking when we invoke similar handling in > symtab_remove_unreachable_nodes, wh

Re: [GOOGLE, AUTOFDO] Assign different discriminators to calls with the same lineno

2014-08-07 Thread Xinliang David Li
n? David > instead of where it is > inserted. This is also problematic. > > Wei. > > On Thu, Aug 7, 2014 at 12:11 PM, Xinliang David Li wrote: >> Is this >> >> [1.cc : 179:64] Reader::~Reader (&version); >> >> from an inline instance? >> >>

Re: [GOOGLE, AUTOFDO] Assign different discriminators to calls with the same lineno

2014-08-07 Thread Xinliang David Li
Is this [1.cc : 179:64] Reader::~Reader (&version); from an inline instance? David On Wed, Aug 6, 2014 at 10:18 AM, Wei Mi wrote: > We saw bb like this in the IR dump after pass_build_cfg: > > : > [1.cc : 205:45] D.332088 = table->_vptr.Table; > [1.cc : 205:45] D.332134 = D.332088 + 104;

Re: another gcov cleanup

2014-07-26 Thread Xinliang David Li
looks good. thanks. David On Sat, Jul 26, 2014 at 12:08 AM, Nathan Sidwell wrote: > This patch removes 2 global variables -- gi_filename and gcov_max_filename. > The relevant data is moved into the renamed gcov_filename structure and > length is calculated later in the process. > > One more chan

Re: FDO and source changes

2014-07-25 Thread Xinliang David Li
Ok. The internal benchmark testing also shows no change in behavior. David On Fri, Jul 25, 2014 at 2:55 PM, Jeff Law wrote: > On 07/23/14 15:52, Xinliang David Li wrote: >> >> Index: ChangeLog >> === >>

Re: gcov name cleanup

2014-07-24 Thread Xinliang David Li
On Wed, Jul 23, 2014 at 11:45 PM, Nathan Sidwell wrote: > This second patch cleans up some more global names. the three functions > should not be visible to the user. I'm not sure if they're attempting to > export an interface to the user but they're (a) undocumented and (b) don't > follow exist

Re: FDO and source changes

2014-07-23 Thread Xinliang David Li
ternal id based on assembler name and source location. */ +DEFPARAM (PARAM_PROFILE_FUNC_INTERNAL_ID, + "profile-func-internal-id", + "use internal function id in profile lookup", + 0, 0, 1) + /* Avoid SLP vectorization of large basic bl

Re: [GOOGLE] Use resolved node during AFDO vpt

2014-07-23 Thread Xinliang David Li
ok. David On Wed, Jul 23, 2014 at 1:46 PM, Teresa Johnson wrote: > AFDO invokes cgraph_node_for_asm during VPT to get the cgraph node for > a callee. Use the resolved node so we don't add a reference to the > un-resolved node after LIPO fixup. > > Passes regression tests and internal test. Ok fo

Re: FDO and source changes

2014-07-23 Thread Xinliang David Li
; something that's 64 bit long is enough to make sure collisions does > not happen. Maybe it's worth the trouble? > > On Wed, Jul 23, 2014 at 10:42 AM, Xinliang David Li > wrote: >> >> On Tue, Jul 22, 2014 at 8:14 PM, Jeff Law wrote: >> > On 07/16/14 14:32

  1   2   3   4   5   6   7   8   9   10   >