Re: [GOOGLE] More strict checking for call args

2013-06-05 Thread Xinliang David Li
Right, except that in the context of FDO/autoFDO, where this happens the most (note in FDO case, it can happen with fresh profile too for multi-threaded programs), it is not that important to handle -- the mismatch path will never be executed, so why bother to inline and bloat the code for it? if

Re: [GOOGLE] More strict checking for call args

2013-06-06 Thread Xinliang David Li
gimple_check_call_matching_types is called by check_ic_target. Instead of moving the check out of this guard function, may be enhancing the interface to allow it to guard with different strictness? David On Thu, Jun 6, 2013 at 8:10 AM, Dehao Chen wrote: > Hi, Martin, > > Yes, your patch can fix

Re: [GOOGLE] More strict checking for call args

2013-06-06 Thread Xinliang David Li
On Thu, Jun 6, 2013 at 7:11 AM, Martin Jambor wrote: > Hi, > > On Tue, Jun 04, 2013 at 05:19:02PM -0700, Dehao Chen wrote: >> attached is a testcase that would cause problem when source has changed: >> >> $ g++ test.cc -O2 -fprofile-generate -DOLD >> $ ./a.out >> $ g++ test.cc -O2 -fprofile-use >>

Re: [google gcc-4_8] Restore max peeled instructions to old default

2013-06-06 Thread Xinliang David Li
We should make the default setting right for our environment. The patch is trivial to maintain. thanks, David On Thu, Jun 6, 2013 at 1:26 PM, Diego Novillo wrote: > On 2013-06-06 16:22 , Teresa Johnson wrote: >> >> The default for the max instructions in peeled loops was reduced on >> trunk in

Re: [google gcc-4_8] Restore max peeled instructions to old default

2013-06-06 Thread Xinliang David Li
ok. Wht is the rational for dropping the limit in trunk? Ideally, the limit should be lifted up and to enable other heuristics to kick in. David On Thu, Jun 6, 2013 at 1:22 PM, Teresa Johnson wrote: > The default for the max instructions in peeled loops was reduced on > trunk in r193570. This

Re: [GOOGLE] More strict checking for call args

2013-06-06 Thread Xinliang David Li
_ic_target): Likewise. > * ipa-inline.c (early_inliner): Likewise. > * ipa-prop.c (update_indirect_edges_after_inlining): Likewise. > * cgraph.c (cgraph_create_edge_1): Likewise. > (cgraph_make_edge_direct): Likewise. >

Re: [GOOGLE] More strict checking for call args

2013-06-07 Thread Xinliang David Li
On Fri, Jun 7, 2013 at 2:05 AM, Richard Biener wrote: > On Thu, Jun 6, 2013 at 5:10 PM, Dehao Chen wrote: >> Hi, Martin, >> >> Yes, your patch can fix my case. Thanks a lot for the fix. >> >> With the fix, value profiling will still promote the wrong indirect >> call target. Though it will not be

Re: [GOOGLE] More strict checking for call args

2013-06-07 Thread Xinliang David Li
On Fri, Jun 7, 2013 at 6:47 AM, Richard Biener wrote: > On Fri, Jun 7, 2013 at 3:30 PM, Xinliang David Li wrote: >> On Fri, Jun 7, 2013 at 2:05 AM, Richard Biener >> wrote: >>> On Thu, Jun 6, 2013 at 5:10 PM, Dehao Chen wrote: >>>> Hi, Martin, >>>&

Re: [GOOGLE] Avoid emitting duplicated weakref

2013-06-08 Thread Xinliang David Li
Guard also with L_IPO_COMP_MODE as this is lipo specific. David On Sat, Jun 8, 2013 at 8:29 PM, Dehao Chen wrote: > This patch fixes a bug when two weakref symbols are mapped to a same > assembler name. > > Testing on going. > > OK for google branches if test is fine? > > Thanks, > Dehao > > Ind

Re: [GOOGLE] More strict checking for call args

2013-06-13 Thread Xinliang David Li
On Thu, Jun 13, 2013 at 1:43 AM, Richard Biener wrote: > On Sat, Jun 8, 2013 at 2:26 AM, Xinliang David Li wrote: >> On Fri, Jun 7, 2013 at 6:47 AM, Richard Biener >> wrote: >>> On Fri, Jun 7, 2013 at 3:30 PM, Xinliang David Li >>> wrote: >>>> O

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Xinliang David Li
Can you create a helper function to flag the error and perhaps also put that check inside can_inline_edge_p ? David On Wed, Jun 12, 2013 at 6:00 PM, Sriraman Tallam wrote: > Hi Honza, > >I have isolated the ipa-inline.c part into a separate patch with a > test and attached it here. The patc

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Xinliang David Li
If you want to flag errors for all possible wrongly used always_inline attribute, should this change be done in can_inline_edge_p? Or keep your current change, but also add a warning (something like 'always inline function is ignored etc') in inline_always_inline_functions when inline transformatio

Re: GCC does not support *mmintrin.h with function specific opts

2013-06-13 Thread Xinliang David Li
yes, what you said makes sense. thanks, David On Thu, Jun 13, 2013 at 12:45 PM, Jan Hubicka wrote: >> If you want to flag errors for all possible wrongly used always_inline >> attribute, should this change be done in can_inline_edge_p? Or keep >> your current change, but also add a warning (som

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

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-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: [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: [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-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/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 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] 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-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-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-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-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 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 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 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: [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: [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: [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: [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] 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: [PATCH] PR57518, RA generated redundent code

2013-06-19 Thread Xinliang David Li
Should the patch be ported to in 48 branch? thanks, David On Wed, Jun 19, 2013 at 11:46 AM, Vladimir Makarov wrote: > On 13-06-19 1:23 AM, Wei Mi wrote: >> >> Ping. >> >> On Wed, Jun 12, 2013 at 2:44 PM, Wei Mi wrote: >>> >>> Hi, >>> >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57518 >>> >>

Re: [PATCH] PR57518, RA generated redundent code

2013-06-19 Thread Xinliang David Li
+jakub who manages GCC 4.8 releases. David On Wed, Jun 19, 2013 at 2:28 PM, Wei Mi wrote: > Yes, I think so. > > Regards, > Wei. > > On Wed, Jun 19, 2013 at 2:00 PM, Xinliang David Li wrote: >> Should the patch be ported to in 48 branch? >> >> thanks, >&

Re: [google gcc-4_8] fix bad merge in r199218

2013-06-19 Thread Xinliang David Li
lgtm. On Wed, Jun 19, 2013 at 3:41 PM, Rong Xu wrote: > Hi, > > This patch fixes a bad merge in r199218. > Removing cgraph noded in early-ipa should be allowed. > Otherwise, we got ICE in tree-eipa_sra with > -freorder-funtions=callgraph (without -fripa) > > Tested with regressions and google ban

Re: [google gcc-4_8] Change size accounting during inlining in lipo mode

2013-06-20 Thread Xinliang David Li
Looks good. thanks, David On Thu, Jun 20, 2013 at 10:38 AM, Easwaran Raman wrote: > In lipo mode, this patch updates the overall unit size only when the > eventual function to which the callee is inlined is in primary module. > This is to avoid the situation where the module growth budget is us

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

2013-06-24 Thread Xinliang David Li
To avoid printing twice, can you just do opt_type = (warn_conversion ? OPT_Wconversion : OPT_Wreal_conversion); warning_at (loc, opt_type, ...); David On Mon, Jun 24, 2013 at 6:08 PM, Sharad Singhai wrote: > Hi, > > This patch forward ports the -Wreal-conversion warning to > google/gcc-4_8 bran

Re: [wwwdocs] Release note for x86 intrinsics usability

2013-06-24 Thread Xinliang David Li
Perhaps provide a tiny example showing the change (user level) before and after? David On Mon, Jun 24, 2013 at 2:55 PM, Gerald Pfeifer wrote: > On Mon, 24 Jun 2013, Sriraman Tallam wrote: >> IA-32/x86-64 > ^ > Ahem, no. :-) Please use id="x86" instead. > >> >> It is now poss

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

2013-06-24 Thread Xinliang David Li
ok. David On Mon, Jun 24, 2013 at 10:03 PM, Sharad Singhai wrote: > On Mon, Jun 24, 2013 at 9:14 PM, Xinliang David Li wrote: >> To avoid printing twice, can you just do >> >> opt_type = (warn_conversion ? OPT_Wconversion : OPT_Wreal_conversion); >> warning_at (loc,

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

2013-06-26 Thread Xinliang David Li
10:03 PM, Sharad Singhai wrote: > On Mon, Jun 24, 2013 at 9:14 PM, Xinliang David Li wrote: >> To avoid printing twice, can you just do >> >> opt_type = (warn_conversion ? OPT_Wconversion : OPT_Wreal_conversion); >> warning_at (loc, opt_type, ...); > > Thanks for th

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

2013-06-26 Thread Xinliang David Li
Ok. David On Wed, Jun 26, 2013 at 10:16 PM, Sharad Singhai wrote: > I reverted the earlier broken patch. I am including an updated patch > which warns only for real conversion, not for integral conversions. I > also updated the test case to include an integral conversion (int to > char) which do

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

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

Re: Resolving an issue of bootstrap failure from vectorization.

2013-07-09 Thread Xinliang David Li
; Date: Tue, Jul 9, 2013 at 1:10 PM > Subject: Resolving an issue of bootstrap failure from vectorization. > To: g...@gcc.gnu.org > Cc: David Li > > > Hi > > My name is Cong Hou, and I am a Noogler working in the compiler > optimization team at Google. > > When we we

Re: [GOOGLE] record compiler options before any compilation

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

Re: [GOOGLE] Remove unnecessary functions in AutoFDO

2013-07-17 Thread Xinliang David Li
ok. David On Wed, Jul 17, 2013 at 2:25 PM, Dehao Chen wrote: > This patch removes unnecessary functions in AutoFDO. > > Bootstrapped and passed regression/benchmark tests. > > OK for google-4_8 branch? > > Thanks, > Dehao

Re: Fix GCC bug causing bootstrap failure with vectorizer turned on

2013-07-18 Thread Xinliang David Li
The difference is that the relative order of DECL_UIDs do not change whether debug info is on or not, but there is no such guarantee when hashing is involved. David On Thu, Jul 18, 2013 at 9:45 AM, Jeff Law wrote: > On 07/12/2013 04:13 PM, Cong Hou wrote: >> >> GCC bootstrap failed with loop vec

Re: Fix GCC bug causing bootstrap failure with vectorizer turned on

2013-07-19 Thread Xinliang David Li
We all missed it when just staring at the code :) David On Fri, Jul 19, 2013 at 5:45 AM, Jeff Law wrote: > On 07/18/2013 10:49 AM, Xinliang David Li wrote: >> >> The difference is that the relative order of DECL_UIDs do not change >> whether debug info is on or not,

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

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

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

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

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

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

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

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

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

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

Re: [Google] Fix profiledbootstrap failure

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

Re: [Google] Fix profiledbootstrap failure

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

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

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

Re: [GOOGLE] Refactor AutoFDO

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

Re: [GOOGLE] Refactor AutoFDO

2013-07-31 Thread Xinliang David Li
}; > > /* Module profile. */ > class module_map { afdo_module_profile ? > public: > static module_map *create () > { > module_map *map = new module_map (); > if (map->read ()) > return map; > delete map; > return NULL;

Re: [Ping] [Google] Fix profiledbootstrap failure

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

Re: [GOOGLE] Refactor AutoFDO

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

New parameters to control stringop expansion libcall strategy

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

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

2013-08-03 Thread Xinliang David Li
gt; adds two new parameters to do that. Potential usage includes >> per-application libcall strategy min-size tuning based on summary data >> with FDO (e.g, instruction workset size). >> >> Bootstrap and tested on x86_64/linux. Ok for trunk? >> >

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

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

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

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

Re: New parameters to control stringop expansion libcall strategy

2013-08-04 Thread Xinliang David Li
unk? thanks, David 2013-08-02 Xinliang David Li * config/i386/stringop.def: New file. * config/i386/stringop.opt: New file. * config/i386/i386-opts.h: Include stringopt.def. * config/i386/i386.opt: Include stringopt.opt. * config/i386/i38

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

2013-08-05 Thread Xinliang David Li
On Mon, Aug 5, 2013 at 8:26 AM, H.J. Lu wrote: > On Sun, Aug 4, 2013 at 9:23 AM, Xinliang David Li wrote: >> On Sun, Aug 4, 2013 at 4:40 AM, Richard Biener >> wrote: >>> Xinliang David Li wrote: >>>>Hi, GCC/i386 currently has about 73 boolean parameters/knob

Re: New parameters to control stringop expansion libcall strategy

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

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

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

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

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

Re: New parameters to control stringop expansion libcall strategy

2013-08-06 Thread Xinliang David Li
On Tue, Aug 6, 2013 at 2:42 AM, Jan Hubicka wrote: >> >>> 2013-08-02 Xinliang David Li >> >>> >> >>> * config/i386/stringop.def: New file. >> >>> * config/i386/stringop.opt: New file. >> >>> * c

Re: New parameters to control stringop expansion libcall strategy

2013-08-06 Thread Xinliang David Li
probably you could tune existing > cost-models as well? Is it possible? the option is designed for purpose like this. thanks, David > > Michael > > On 5 August 2013 20:44, Xinliang David Li wrote: >> thanks. Updated patch attached. >> >> David >> >

Re: New parameters to control stringop expansion libcall strategy

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

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

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

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

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

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

2013-08-07 Thread Xinliang David Li
On Wed, Aug 7, 2013 at 8:37 AM, Jan Hubicka wrote: >> Ping? >> >> David >> >> On Sat, Aug 3, 2013 at 12:36 PM, Xinliang David Li >> wrote: >> > Hi, GCC/i386 currently has about 73 boolean parameters/knobs (defined >> > in ix86_tune_features[

Re: New parameters to control stringop expansion libcall strategy

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

Re: [GOOGLE] Refactor AutoFDO

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

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

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

Re: New parameters to control stringop expansion libcall strategy

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

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

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

Re: New parameters to control stringop expansion libcall strategy

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

Re: New parameters to control stringop expansion libcall strategy

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

Re: New parameters to control stringop expansion libcall strategy

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

Re: New parameters to control stringop expansion libcall strategy

2013-08-09 Thread Xinliang David Li
n do that in this patch. In the future, when we need to do tunings for those constants, we can revisit it. thanks, David > This has chance to do the right thing with optimize attribute specifying > algorithms > and with the longer term threading plan. > > Honza >> >> t

Re: Speculative call support in the callgraph

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

Re: Speculative call support in the callgraph

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

Re: Cost model for indirect call speculation

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

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

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

Re: [RFC] Bare bones of virtual call tracking

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

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

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

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

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

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

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

Fix potential uninitialized variable error

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

Re: Fix potential uninitialized variable error

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

Re: Fix potential uninitialized variable error

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

Re: [RFC] Bare bones of virtual call tracking

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

Re: [RFC] Bare bones of virtual call tracking

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

Re: [Google] X86_TUNE_USE_VECTOR_CONVERTS adjustment

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

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