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 sing...@google.com 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

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 sing...@google.com wrote: Hi, This patch forward ports the -Wreal-conversion warning to

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 ger...@pfeifer.com wrote: On Mon, 24 Jun 2013, Sriraman Tallam wrote: h3 id=rxIA-32/x86-64/h3 ^ Ahem, no. :-) Please use id=x86 instead. ul

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 sing...@google.com wrote: On Mon, Jun 24, 2013 at 9:14 PM, Xinliang David Li davi...@google.com 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] 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 era...@google.com 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

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 vmaka...@redhat.com wrote: On 13-06-19 1:23 AM, Wei Mi wrote: Ping. On Wed, Jun 12, 2013 at 2:44 PM, Wei Mi w...@google.com wrote: Hi,

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 w...@google.com wrote: Yes, I think so. Regards, Wei. On Wed, Jun 19, 2013 at 2:00 PM, Xinliang David Li davi...@google.com wrote: Should the patch be ported to in 48 branch? thanks, David On Wed, Jun

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 x...@google.com 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

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 richard.guent...@gmail.com wrote: On Sat, Jun 8, 2013 at 2:26 AM, Xinliang David Li davi...@google.com wrote: On Fri, Jun 7, 2013 at 6:47 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Jun 7, 2013 at 3:30 PM, Xinliang David Li davi

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 tmsri...@google.com wrote: Hi Honza, I have isolated the ipa-inline.c part into a separate patch with a test and attached

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

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 hubi...@ucw.cz 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

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 de...@google.com 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

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 richard.guent...@gmail.com wrote: On Thu, Jun 6, 2013 at 5:10 PM, Dehao Chen de...@google.com 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

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 richard.guent...@gmail.com wrote: On Fri, Jun 7, 2013 at 3:30 PM, Xinliang David Li davi...@google.com wrote: On Fri, Jun 7, 2013 at 2:05 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Jun 6, 2013 at 5:10 PM, Dehao Chen de

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 de...@google.com wrote: Hi, Martin, Yes, your

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 mjam...@suse.cz 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 dnovi...@google.com wrote: On 2013-06-06 16:22 , Teresa Johnson wrote: The default for the max instructions in peeled loops was reduced

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 tejohn...@google.com wrote: The default for the max instructions in peeled loops was reduced on

Re: [GOOGLE] More strict checking for call args

2013-06-06 Thread Xinliang David Li
. * 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. On Thu, Jun 6, 2013 at 9:14 AM, Xinliang David Li davi...@google.com wrote

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-04 Thread Xinliang David Li
Richard's question is that inlining should deal with extra arguments just fine -- those paths (the insane profile case) won't be executed anyway. Do you have a case showing otherwise (i.e., the mismatch upsets the compiler?) David On Tue, Jun 4, 2013 at 8:07 AM, Dehao Chen de...@google.com

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-04 Thread Xinliang David Li
ok. David On Tue, Jun 4, 2013 at 9:51 AM, Dehao Chen de...@google.com wrote: Patch updated to set the iteration threshold to 10 for AutoFDO. Performance test shows ok. OK for google-4_8 branch? Thanks, Dehao Index: gcc/ipa-inline.c

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
wrote: OK, I'll commit the early inline part. Dehao On Wed, May 29, 2013 at 10:00 AM, Xinliang David Li davi...@google.com wrote: The early inlining part is ok. The tracer optimization should be revisited -- we should have more fine grain control on it (for instance, based on FDO summary

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
== NODE_FREQUENCY_UNLIKELY_EXECUTED)) Performance testing on-going... Dehao On Wed, May 29, 2013 at 3:44 PM, Dehao Chen de...@google.com wrote: OK, I'll commit the early inline part. Dehao On Wed, May 29, 2013 at 10:00 AM, Xinliang David Li davi...@google.com wrote: The early

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-06-02 Thread Xinliang David Li
(cgraph_node_name (callee)), callee-uid, + growth); +want_inline = false; + } else if (!cgraph_maybe_hot_edge_p (e)) { if (dump_file) Thanks, Dehao On Sun, Jun 2, 2013 at 9:08 PM, Xinliang David Li davi...@google.com wrote: If the purpose of the fix is to filter early

Re: [GOOGLE] Fix uninitialized memory in AutoFDO implementation

2013-06-01 Thread Xinliang David Li
ok. David On Sat, Jun 1, 2013 at 9:05 PM, Dehao Chen de...@google.com wrote: This patch fixes an uninitialized memory error and a hashtable comparison bug in AutoFDO. Bootstrapped and passed regression test. OK for google branches? Thanks, Dehao Index: gcc/auto-profile.c

Re: [GOOGLE] More strict checking for call args

2013-05-31 Thread Xinliang David Li
Those cases you mentioned may lead to problems in inlining, indirect target promotion transformations etc too, so it is better to use the new guard against them. David On Fri, May 31, 2013 at 1:15 AM, Duncan Sands baldr...@free.fr wrote: Hi Dehao, On 31/05/13 00:47, Dehao Chen wrote: This

Re: [GOOGLE] More strict checking for call args

2013-05-30 Thread Xinliang David Li
On Thu, May 30, 2013 at 3:47 PM, Dehao Chen de...@google.com wrote: This patch makes more strict check of call args to make sure the number of args match. Bootstrapped and passed regression tests. OK for google branches? Thanks, Dehao Index: gcc/gimple-low.c

Re: [google] Prune -fopt-info output

2013-05-30 Thread Xinliang David Li
Ok. I think this is a useful patch for trunk too. Thanks, David On Thu, May 30, 2013 at 7:03 PM, Teresa Johnson tejohn...@google.com wrote: Testing passed. I forgot to include the documentation change in the first patch: Index: doc/invoke.texi

Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO

2013-05-29 Thread Xinliang David Li
The early inlining part is ok. The tracer optimization should be revisited -- we should have more fine grain control on it (for instance, based on FDO summary -- but that should be common to FDO/LIPO). David On Wed, May 29, 2013 at 9:39 AM, Dehao Chen de...@google.com wrote: In gcc4-8, the max

Re: [GOOGLE] Remove records in powerpc64-grtev3-linux-gnu.xfail

2013-05-29 Thread Xinliang David Li
ok. David On Wed, May 29, 2013 at 5:18 PM, Carrot Wei car...@google.com wrote: Hi Since b/8397853 has been fixed, the related tests now passed, so we can remove them from powerpc64-grtev3-linux-gnu.xfail now. Tested with ./buildit --run_tests. OK for google 4.7 branch? thanks Carrot

Re: [google gcc-4_8] not mapping debug expr to a deleted varpool node (issue9760043)

2013-05-24 Thread Xinliang David Li
On Fri, May 24, 2013 at 4:26 PM, Rong Xu x...@google.com wrote: This patch fixes a bug in exposed in LIPO build (ICE in copy tree node). Tested with bookstrap and google internal benchmarks. -Rong 2013-05-24 Rong Xu x...@google.com Google ref b/8963414. *

Re: [patch][google/gcc-4.8] Port gcov intermediate format from google/gcc-4.7

2013-05-24 Thread Xinliang David Li
On Fri, May 24, 2013 at 2:32 PM, Sharad Singhai sing...@google.com wrote: if (flag_gcov_file) { - char *gcov_file_name -= make_gcov_file_name (file_name, src-coverage.name); + if (flag_intermediate_format) +/* Output the intermediate format without

Re: [google gcc-4_7] coverage callback instrumentation (issue9630043)

2013-05-22 Thread Xinliang David Li
Looks ok to me in general. 1) the parameter name is not ideal -- it is not callonce. 2) it might be better to extend the callonce parameter into -ftest-coverage option such as -ftest-coverage=exec_once? 3) need documentation in invoke.texi 4) watch out for long lines. cc Teresa. David On Tue,

Re: [PATCH] Dynamic dispatch of multiversioned functions and CPU mocks for code coverage.

2013-05-13 Thread Xinliang David Li
The MV testing support includes 3 logical parts: 1) runtime APIs to check mocked CPU types and features (__builtin_mock_cpu_supports ..) 2) runtime APIs to do CPU mocking; 3) compile time option to do lazy dispatching (instead of using IFUNC). 3) can be used to also support target without IFUNC

Re: [Google] AutoFDO cleanup patch

2013-05-11 Thread Xinliang David Li
Looks good. David On Sat, May 11, 2013 at 3:53 PM, Dehao Chen de...@google.com wrote: In AutoFDO, we early-inline callsites that was inlined in profiling runs regardless of the size limit. With this change, the existing ipa-inline tunings for AutoFDO is unnecessary: it's fine to just use the

Re: [Google] Suppress message when primary module entry cannot found

2013-05-10 Thread Xinliang David Li
ok. Would be nicer if there is a way to tell this from other error cases though. David On Fri, May 10, 2013 at 11:00 AM, Dehao Chen de...@google.com wrote: On Fri, May 10, 2013 at 10:47 AM, Teresa Johnson tejohn...@google.com wrote: Is it only auto fdo that doesn't store the module info if the

Re: [GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Xinliang David Li
This is not correct. current_module_id is used only in FE parsing. The real question is why the decl is created, neither static nor external? David On Thu, May 9, 2013 at 11:39 AM, Carrot Wei car...@google.com wrote: This patch fixed google bug entry 6124850. The usage of varpool_node has

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures (issue6823047)

2013-05-09 Thread Xinliang David Li
On Thu, May 9, 2013 at 3:40 PM, Steven Bosscher stevenb@gmail.com wrote: On Thu, May 9, 2013 at 11:42 PM, Diego Novillo wrote: On 2013-05-08 01:13 , Teresa Johnson wrote: -static void +void emit_barrier_after_bb (basic_block bb) { rtx barrier = emit_barrier_after (BB_END (bb)); -

Re: [GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Xinliang David Li
On Thu, May 9, 2013 at 4:46 PM, Carrot Wei car...@google.com wrote: On Thu, May 9, 2013 at 12:53 PM, Xinliang David Li davi...@google.com wrote: This is not correct. current_module_id is used only in FE parsing. Suppose the var decl has correct flags and varpool_node can accept it, a new

Re: [GOOGLE] Update the unittest and the doc for the record-compilation-info-in-elf flag

2013-05-08 Thread Xinliang David Li
ok. David On Tue, May 7, 2013 at 7:27 PM, Dehao Chen de...@google.com wrote: This patch updated the unittest and doc for the new -frecord-compilation-info-in-elf flag. Bootstrapped and passed regression test. OK for google-4_7 branch? Thanks, Dehao Index:

Re: [google][4.7] Move the building of gcov constructor function after initialization of gcov_info_var

2013-05-06 Thread Xinliang David Li
, Xinliang David Li davi...@google.com wrote: I suggest submitting the refactoring part of the changes to GCC trunk first. thanks, David On Thu, May 2, 2013 at 11:06 AM, Carrot Wei car...@google.com wrote: This patch fixes google bug 8397853 and targets google 4.7 branch. In LIPO mode

Re: [PATCH] Refactor coverage.c, outline the construction of gcov constructor

2013-05-03 Thread Xinliang David Li
Please do what Richard suggested. gcov_info_type can be obtained from gcov_info_var decl. David On Fri, May 3, 2013 at 11:31 AM, Carrot Wei car...@google.com wrote: On Fri, May 3, 2013 at 1:03 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, May 2, 2013 at 10:41 PM, Carrot Wei

Re: [google][4.7] Move the building of gcov constructor function after initialization of gcov_info_var

2013-05-02 Thread Xinliang David Li
I suggest submitting the refactoring part of the changes to GCC trunk first. thanks, David On Thu, May 2, 2013 at 11:06 AM, Carrot Wei car...@google.com wrote: This patch fixes google bug 8397853 and targets google 4.7 branch. In LIPO mode, when coverage_obj_init is called, cgraph_state is

Re: [GOOGLE] Change function naming to use context function assembler name to replace function id

2013-05-02 Thread Xinliang David Li
On Wed, May 1, 2013 at 9:57 AM, Xinliang David Li davi...@google.com wrote: On Tue, Apr 30, 2013 at 4:10 PM, Dehao Chen de...@google.com wrote: This patch changes to use context function name to replace function id, which is not available in AutoFDO builds. Why isn't func_id not available

Re: [GOOGLE] Change function naming to use context function assembler name to replace function id

2013-05-01 Thread Xinliang David Li
On Tue, Apr 30, 2013 at 4:10 PM, Dehao Chen de...@google.com wrote: This patch changes to use context function name to replace function id, which is not available in AutoFDO builds. Why isn't func_id not available in autofdo builds? The func-id for the the same function should remain the same

Re: [google] Add function name to function_patch_* sections (issue9025045)

2013-04-30 Thread Xinliang David Li
ok. David On Tue, Apr 30, 2013 at 1:34 PM, Harshit Chopra hars...@google.com wrote: Adding function name to the function_patch_* sections when -ffunction-sections is provided. Helps in garbage collecting dead functions with the help of linker. Tested: Tested using 'make -k check-gcc

Re: Backport r185150 to google-4_7 and google-4_8(save --std flag as cl_args)

2013-04-26 Thread Xinliang David Li
Ok. David On Fri, Apr 26, 2013 at 6:42 PM, Dehao Chen de...@google.com wrote: Bootstrapped and passed regression tests. Okay for google-4_7 and google-4_7 branches? Thanks, Dehao 2012-03-09 Rong Xu x...@google.com * opts-global.c (lipo_save_cl_args): save -std option.

Re: [GOOGLE] Disallow importing modules with different --std

2013-04-26 Thread Xinliang David Li
ok with benchmark testing. Need to be in all google branches (47, 48 and main) David On Fri, Apr 26, 2013 at 7:57 PM, Dehao Chen de...@google.com wrote: This patch forbids modules to be imported as aux module if its --std is different with the primary module. Bootstrapped and passed

Re: [GOOGLE] backport r188371 to google-4_8

2013-04-25 Thread Xinliang David Li
ok. David On Thu, Apr 25, 2013 at 4:37 PM, Dehao Chen de...@google.com wrote: The ported patch: r188371 | dehao | 2012-06-09 18:44:58 -0700 (Sat, 09 Jun 2012) | 13 lines 2012-06-10 Dehao Chen de...@google.com Backport r188303 from google-4_7 * gcc/cgraph.c (cgraph_node): Add attribute

Re: [google][4.7] Generate a label for the split cold function while using -freorder-blocks-and-partition

2013-04-23 Thread Xinliang David Li
It might be better to submit this to trunk first. thanks, David On Sat, Apr 20, 2013 at 5:09 PM, Sriraman Tallam tmsri...@google.com wrote: Fixed a bug in the previous patch sent, where I did not check if the switch section was actually to the cold function part. Updated patch attached.

Re: Simple change in dot dumper -- Display profile count and branch probability

2013-04-22 Thread Xinliang David Li
Hi, this is a follow up simple patch to support 'slim' graph dump: when -slim option is specified (e.g, -fdump-tree-optimized-graph-slim), do not dump the boby. 2013-04-22 Xinliang David Li davi...@google.com * cfghhooks.c (dump_bb_for_graph): Support 'slim' graph dump. Index

Re: Simple change in dot dumper -- Display profile count and branch probability

2013-04-21 Thread Xinliang David Li
Thanks. The patch is revised. David 2013-04-20 Xinliang David Li davi...@google.com * graph.c (draw_cfg_node_succ_edges): Add branch probility as label. * cfghhooks.c (dump_bb_for_graph): Dump profile count and frquency. * Makefile.in: New dependency. Index

Simple change in dot dumper -- Display profile count and branch probability

2013-04-20 Thread Xinliang David Li
Hi, the graph dump file currently does not show any profile information. The following simple patch fixed that. Ok for trunk? thanks, David 2013-04-20 Xinliang David Li davi...@google.com * graph.c (draw_cfg_node): Add count and frequency info. (draw_cfg_node_succ_edges

Re: [google] Add libgcov interface for accessing profile directory (issue8726046)

2013-04-17 Thread Xinliang David Li
looks ok. David On Wed, Apr 17, 2013 at 9:00 AM, Teresa Johnson tejohn...@google.com wrote: Patch to add interface for querying the profile directory prefix specified to the -fprofile-generate= option. Google ref b/8629045. Tested with regression tests and internal test. Ok for google

Re: [GOOGLE] Add AutoFDO based indirect call value profiling to GCC

2013-04-17 Thread Xinliang David Li
https://codereview.appspot.com/8814043/diff/1/gcc/auto-profile.c File gcc/auto-profile.c (right): https://codereview.appspot.com/8814043/diff/1/gcc/auto-profile.c#newcode161 gcc/auto-profile.c:161: }; Why not sharing the same hist_type enum in value-prof.h?

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

2013-04-12 Thread Xinliang David Li
On Fri, Apr 12, 2013 at 1:22 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Apr 11, 2013 at 10:18 PM, Xinliang David Li davi...@google.com wrote: Great that it is already covered. I expect that with more convoluted code you'll ICE eventually. Yes, those are bugs that need

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

2013-04-12 Thread Xinliang David Li
On Fri, Apr 12, 2013 at 1:58 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Apr 11, 2013 at 12:05:41PM -0700, Sriraman Tallam wrote: I have attached a patch that fixes this. I have added an option -mgenerate-builtins that will do two things. It will define a macro __ALL_ISA__ which will

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

2013-04-11 Thread Xinliang David Li
What is the compile time impact for turning it on? Code not including the intrinsic headers should not be affected too much. If the impact is small, why not turning on this option by default -- which seems to be the behavior of ICC. With this option, all functions without the appropriate target

Re: [Google] Use line offset instead of absolute lineno to represent AutoFDO profile

2013-04-11 Thread Xinliang David Li
Ok. As followup, the profile generation tool should be moved into compiler space to avoid format mismatch. David On Wed, Apr 10, 2013 at 4:47 PM, Dehao Chen de...@google.com wrote: Hi, This patch 1. Uses relative line offset (lineno - start_lineno_of_function) to represent AutoFDO profile.

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

2013-04-11 Thread Xinliang David Li
Great that it is already covered. David On Thu, Apr 11, 2013 at 1:09 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, Apr 11, 2013 at 1:05 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, Apr 11, 2013 at 12:43 PM, Xinliang David Li davi...@google.com wrote: What is the compile

Re: [Google] Use line offset instead of absolute lineno to represent AutoFDO profile

2013-04-11 Thread Xinliang David Li
yes -- Dehao first needs to rip out some internal dependencies for the profile generation tool before it can be pushed upstream. David On Thu, Apr 11, 2013 at 2:04 PM, Steven Bosscher stevenb@gmail.com wrote: On Thu, Apr 11, 2013 at 1:47 AM, Dehao Chen wrote: Hi, This patch 1. Uses

Re: [Google] Fix the bug in calculating sum_all

2013-04-11 Thread Xinliang David Li
ok. David On Thu, Apr 11, 2013 at 1:56 PM, Dehao Chen de...@google.com wrote: Hi, This patch fix the bug of sum_all, which is used in loop unroll. The fix will suppress unrolling loops when the program is hot instruction footprint is large. Bootstrapped and passed regression tests. Is

Re: [google gcc-4_7] offline profile merge (patchset 2) (issue8508048)

2013-04-09 Thread Xinliang David Li
Ok for google branches. thanks, David On Mon, Apr 8, 2013 at 3:44 PM, Rong Xu x...@google.com wrote: Revised copyright info. -Rong 2013-04-08 Rong Xu x...@google.com * contrib/profile_merge.py: An offline profile merge tool. Index: contrib/profile_merge.py

Re: [google] Avoid warning when unused attribute applied to C++ member variables (issue8580044)

2013-04-09 Thread Xinliang David Li
Ok -- there are legitimate use cases for this. David On Tue, Apr 9, 2013 at 11:01 AM, Teresa Johnson tejohn...@google.com wrote: This patch is pending on trunk, but I would like to get this into google branches now as it is causing spurious warnings. Google ref b/8496800. This patch allows

Re: [Google] Recompute function frequency after calculating branch probability

2013-04-08 Thread Xinliang David Li
Ok. thanks, David On Sun, Apr 7, 2013 at 8:07 PM, Dehao Chen de...@google.com wrote: Hi, This patch updates the function frequency after calculating branch probability. This is important because cold function could be promoted to hot after ipa-inline. Bootstrapped and passed gcc

Re: [google gcc-4_7] offline profile merge tool (issue8508048)

2013-04-08 Thread Xinliang David Li
The copyright header is wrong. Please use the standard one for GCC. David On Mon, Apr 8, 2013 at 2:57 PM, Rong Xu x...@google.com wrote: Hi, This is a offline profile merge program. Usage: profile_merge.py [options] arg1 arg2 ... Options: -h, --helpshow this help message

Re: [google] Add option to emit mapping between module/function id and function name (issue8211043)

2013-03-31 Thread Xinliang David Li
ok. thanks, David On Sat, Mar 30, 2013 at 11:44 PM, Teresa Johnson tejohn...@google.com wrote: This patch restores part of r196176, which was subsequently reverted due to issues with the other part of that patch that dealt with module info updates. This patch restores the option

Re: [GOOGLE] Fix the error when backporting r193857 from trunk

2013-03-22 Thread Xinliang David Li
ok. David On Fri, Mar 22, 2013 at 3:58 PM, Dehao Chen de...@google.com wrote: forgot to attach the patch... Index: gcc/ipa-prop.c === --- gcc/ipa-prop.c (revision 196984) +++ gcc/ipa-prop.c (working copy) @@ -2473,7 +2473,6

Re: [google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-18 Thread Xinliang David Li
Interesting idea about lazy IFUNC relocation. David On Mon, Mar 18, 2013 at 2:02 AM, Richard Biener richard.guent...@gmail.com wrote: On Fri, Mar 15, 2013 at 10:55 PM, Sriraman Tallam tmsri...@google.com wrote: Hi, This patch is meant for google/gcc-4_7 but I want this to be considered

Re: [google/gcc-4_7]Mark expected failures

2013-03-15 Thread Xinliang David Li
ok. David On Fri, Mar 15, 2013 at 10:53 AM, Jing Yu jin...@google.com wrote: Got new regression failures when using gold to run gcc regression tests. The failures are related to LIPO (b/8397853). Since LIPO won't be available for Powerpc64 target until the end of 2013Q2, mark these tests

Re: [google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-15 Thread Xinliang David Li
On Fri, Mar 15, 2013 at 2:55 PM, Sriraman Tallam tmsri...@google.com wrote: Hi, This patch is meant for google/gcc-4_7 but I want this to be considered for trunk when it opens again. This patch makes it easy to test for code coverage of multiversioned functions. Here is a motivating

Re: [google][4.7]Using CPU mocks to test code coverage of multiversioned functions

2013-03-15 Thread Xinliang David Li
...@google.com wrote: On Fri, Mar 15, 2013 at 3:37 PM, Xinliang David Li davi...@google.com wrote: On Fri, Mar 15, 2013 at 2:55 PM, Sriraman Tallam tmsri...@google.com wrote: Hi, This patch is meant for google/gcc-4_7 but I want this to be considered for trunk when it opens again. This patch makes

Re: [cxx-conversion] RFC - Helper types for building GIMPLE

2013-03-14 Thread Xinliang David Li
I am with you for simple cases where straightline code is generated. Helper class will be very useful when control flow manipulation is involved. People can simply just write 'straight line like code' using gimple_label, goto_label etc without worrying about how split blocks and create new cfg

Re: [cxx-conversion] RFC - Helper types for building GIMPLE

2013-03-14 Thread Xinliang David Li
On Thu, Mar 14, 2013 at 7:55 AM, Marc Glisse marc.gli...@inria.fr wrote: On Wed, 13 Mar 2013, Diego Novillo wrote: This patch adds an initial implementation for a new helper type for generating GIMPLE statements. I hope you'll forgive the naive newbie question: why is the gimplifier used

Re: [cxx-conversion] RFC - Helper types for building GIMPLE

2013-03-14 Thread Xinliang David Li
On Thu, Mar 14, 2013 at 10:54 AM, Richard Biener rguent...@suse.de wrote: Xinliang David Li davi...@google.com wrote: I am with you for simple cases where straightline code is generated. Helper class will be very useful when control flow manipulation is involved. People can simply just write

Re: [cxx-conversion] RFC - Helper types for building GIMPLE

2013-03-13 Thread Xinliang David Li
Nice -- GCC LOC will be significantly reduced with these interfaces. Using 'add' as interface name can be confusing -- new, or new_stmt, or new_assignment/new_call etc might be better -- but we can delay the bike shedding later. David On Wed, Mar 13, 2013 at 2:55 PM, Diego Novillo

Re: [GOOGLE] Fix incorrect dependency in Makefile.in

2013-03-08 Thread Xinliang David Li
ok. David On Thu, Mar 7, 2013 at 5:36 PM, Dehao Chen de...@google.com wrote: This patch fixes the incorrect dependency in Makefile.in. Bootstrapped and passed regression test. Okay for google-4_7 branch? Thanks, DehaoIndex: gcc/Makefile.in

Re: [google gcc-4_7] change LIPO default module grouping algorithm (issue7490043)

2013-03-05 Thread Xinliang David Li
Looks good. thanks, David On Tue, Mar 5, 2013 at 11:06 AM, Rong Xu x...@google.com wrote: Hi, This patch changes the default lipo module grouping algorithm from algoritm 0 (eager propagation algorithm) to algorith 1 (inclusion_based priority algorithm). It also changes the name

Fix PR/56490

2013-03-01 Thread Xinliang David Li
The following patch limit the depth for post-dom walk in the analysis -- in the presence of complicated control flow, the analysis should bail out sooner. Bootstrapped on x86-64/linux. No regressions found. OK for trunk? thanks, David 2013-03-01 Xinliang David Li davi...@google.com

Re: [google gcc-4_7] new module grouping method (issue 7393058)

2013-02-26 Thread Xinliang David Li
Can you upload the new patch set? David On Tue, Feb 26, 2013 at 1:50 PM, x...@google.com wrote: https://codereview.appspot.com/7393058/diff/1/libgcc/dyn-ipa.c File libgcc/dyn-ipa.c (right): https://codereview.appspot.com/7393058/diff/1/libgcc/dyn-ipa.c#newcode77 libgcc/dyn-ipa.c:77: /*

Re:

2013-02-14 Thread Xinliang David Li
On Thu, Feb 14, 2013 at 10:18 AM, Matt m...@use.net wrote: The attached patches do two things: 1. Backports a fix from trunk that eliminates bogus warning traces. On my current codebase which links ~40MB of C++ with LTO, the bogus warning traces are literally hundreds of lines. What is the

Re:

2013-02-14 Thread Xinliang David Li
Ok for the google branch -- please provide the patch details in svn commit message (note that ChangeLog is not needed any more for the branch). David On Thu, Feb 14, 2013 at 11:53 AM, Matt Hargett m...@use.net wrote: On Feb 14, 2013, at 10:40 AM, Xinliang David Li davi...@google.com wrote

Re: [google][4.7] Minor Function reordering plugin enhancements.

2013-02-13 Thread Xinliang David Li
when split_segment is specified but the API does not exist, why not making it fatal ? Will it crash at some point when the null pointer is referenced later? David On Wed, Feb 13, 2013 at 4:19 PM, Sriraman Tallam tmsri...@google.com wrote: Hi, I have attached a patch for the reordering

Re: [google][4.7] Minor Function reordering plugin enhancements.

2013-02-13 Thread Xinliang David Li
ok. thanks, David On Wed, Feb 13, 2013 at 4:41 PM, Sriraman Tallam tmsri...@google.com wrote: Updated patch attached. Thanks Sri On Wed, Feb 13, 2013 at 4:39 PM, Sriraman Tallam tmsri...@google.com wrote: On Wed, Feb 13, 2013 at 4:32 PM, Xinliang David Li davi...@google.com wrote

Re: [google 4_7] Fix bad merge into coverage_init (issue7322063)

2013-02-12 Thread Xinliang David Li
ok. The same problem exists in google/main too. David On Tue, Feb 12, 2013 at 1:38 PM, Teresa Johnson tejohn...@google.com wrote: This patch fixes a bad merge from google/integration to google/4_7. Passes regression tests. Ok for google/4_7? Thanks, Teresa 2013-02-12 Teresa Johnson

Re: [google] Port revisions for -mpatch-functions-for-instrumentation option back to google-main. (issue7301068)

2013-02-08 Thread Xinliang David Li
ok. thanks, David On Fri, Feb 8, 2013 at 6:57 PM, Harshit Chopra hars...@google.com wrote: 2013-02-08 Harshit Chopra hars...@google.com Porting revisions r183548, r183888, r186118, r192231, r193381. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index

Re: [google gcc-4_7] Inlining and devirtualization tests

2013-01-15 Thread Xinliang David Li
Looks fine. Why adding tests that are expected to fail? Are these tests passing with trunk? David On Tue, Jan 15, 2013 at 9:33 PM, Maxim Kuvyrkov maxim.kuvyr...@gmail.com wrote: David, This patch adds tests for inlining and devirtualization optimizations, some of which are already in

Re: [cxx-conversion] Change uses of htab_t in gcc/config to hash_table.

2013-01-05 Thread Xinliang David Li
I noticed that the traverse and traverse_noresize method takes Argument as the first template parameter. It should be moved to be the second after the callback. In most of the cases, the type of the Argument can be deduced from the callsite, so that the user only need to specify the callback:

Re: [google 4_7] Backport r194909 (:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
ok. thanks, David On Fri, Jan 4, 2013 at 9:32 AM, Paul Pluzhnikov ppluzhni...@google.com wrote: Back-port revision 194909 to google/gcc-4_7 branch: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194909 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54526 Google ref: b/7427993 Index:

Re: [google][4.7] Allow function reordering linker plugin to separate hot and cold code into different ELF segments

2013-01-04 Thread Xinliang David Li
, Rong Xu x...@google.com wrote: The code looks fine to me. Please consider David's comments about the option name. -Rong On Thu, Jan 3, 2013 at 9:14 PM, Xinliang David Li davi...@google.com wrote: Is it better to change the option to something like: split_segment|nosplit-segment

Re: [google 4_7] Backport r194909 (:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
I saw only one test case fix patch from Paolo in trunk. Does this patch include more local fixes? David On Fri, Jan 4, 2013 at 3:03 PM, Paul Pluzhnikov ppluzhni...@google.com wrote: On Fri, Jan 4, 2013 at 9:41 AM, Xinliang David Li davi...@google.com wrote: ok. The patch as sent caused some

Re: [google 4_7] Backport r194909 (:: is incorrectly treated as digraph ...) to google/gcc-4_7 branch (issue7028052)

2013-01-04 Thread Xinliang David Li
ok. thanks, David On Fri, Jan 4, 2013 at 3:38 PM, Paul Pluzhnikov ppluzhni...@google.com wrote: On Fri, Jan 4, 2013 at 3:27 PM, Xinliang David Li davi...@google.com wrote: I saw only one test case fix patch from Paolo in trunk. Does this patch include more local fixes? There was an earlier

Re: [google 4-7] adjust single target i-call heursitic (issue7059044)

2013-01-04 Thread Xinliang David Li
Need to document the parameter in doc/invoke.texi. Ok with that change. David On Fri, Jan 4, 2013 at 5:28 PM, Rong Xu x...@google.com wrote: Hi, This patch adjusts the single target indirect call promotion heuristics. (1) it uses bb counts (bb_all), instead of count all which only counts

Re: [google][4.7] Allow function reordering linker plugin to separate hot and cold code into different ELF segments

2013-01-03 Thread Xinliang David Li
Is it better to change the option to something like: split_segment|nosplit-segment or split_segment=yes|no David On Thu, Jan 3, 2013 at 5:41 PM, Sriraman Tallam tmsri...@google.com wrote: Hi Rong, The following patch modifies the behaviour of the linker plugin to not create a separate

Re: [google 4_7] fix unsat for target w/o atomic builtins (issue7031051)

2013-01-02 Thread Xinliang David Li
Ok for google branch, but it might be better to warn this at compile time (more discussion needed for the trunk version). David On Wed, Jan 2, 2013 at 4:58 PM, Rong Xu x...@google.com wrote: Hi, This patch fixes an issue in r194725. The call to atmoic builtin is emmitted regardless of

Re: FDO patch -- make ic related vars TLS if target allows

2012-12-28 Thread Xinliang David Li
Is there a way to tell if the program is going to be multi-threaded? If not, it might be useful to introduce a compiler option such as -fmt which also enables -lpthread. Using tricks like weakrefs can introduce unnecessary runtime overhead. David On Fri, Dec 28, 2012 at 8:26 AM, David Edelsohn

Re: atomic update of profile counters (issue7000044)

2012-12-28 Thread Xinliang David Li
It would be great if this can make into gcc4.8. The patch has close to 0 impact on code stability. David On Fri, Dec 28, 2012 at 11:32 AM, Rong Xu x...@google.com wrote: Hi Honza, In the other thread of discussion (similar patch in google-4_7 branch), you said you were thinking if to let

Re: [google 4.7] fdo build for linux kernel (issue6968046)

2012-12-21 Thread Xinliang David Li
Kernel build does not link in libgcc, which defines the function. David On Fri, Dec 21, 2012 at 8:31 AM, Teresa Johnson tejohn...@google.com wrote: On Wed, Dec 19, 2012 at 12:11 PM, Rong Xu x...@google.com wrote: Hi, This patch updates the support for FDO build in linux kernel for gcc 4.7.

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