Re: new patches using -fopt-info (issue5294043)

2011-10-24 Thread Xinliang David Li
Well, you seem to keep not reading what I write.  I am not opposed to adding -fopt-info/report nor to funnel messages to stdout/err.  What I am opposed is the way you want to introduce them.  I want you to fix what we dump into dump files, so that both -fopt-report and -fopt-info can be

Re: new patches using -fopt-info (issue5294043)

2011-10-23 Thread Xinliang David Li
On Sun, Oct 23, 2011 at 3:18 AM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Oct 21, 2011 at 6:48 PM, Xinliang David Li davi...@google.com wrote: There are two proposals here. One is -fopt-info which prints out informational notes to stderr, and the other is -fopt-report which

Re: new patches using -fopt-info (issue5294043)

2011-10-21 Thread Xinliang David Li
There are two proposals here. One is -fopt-info which prints out informational notes to stderr, and the other is -fopt-report which is more elaborate form of dump files. Are you object to both or just the opt-report one? The former is no different from any other informational notes we already

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
On Thu, Oct 20, 2011 at 1:21 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Oct 20, 2011 at 1:33 AM, Andi Kleen a...@firstfloor.org wrote: x...@google.com (Rong Xu) writes: After some off-line discussion, we decided to use a more general approach to control the printing of

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
While discussion for trunk version is still going, it is ok for google branches. thanks, David On Wed, Oct 19, 2011 at 4:28 PM, Rong Xu x...@google.com wrote: After some off-line discussion, we decided to use a more general approach to control the printing of optimization messages/warnings.

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Xinliang David Li
On Thu, Oct 20, 2011 at 12:53 PM, Andi Kleen a...@firstfloor.org wrote: This warnings/notes are caused by inconsistent profile due to data race (which is currently common in multi-thread programs), I never quite understood why the gcov counters are not simply marked __thread. This would make

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-19 Thread Xinliang David Li
On Wed, Oct 19, 2011 at 12:02 PM, konstantin.s.serebry...@gmail.com wrote: Minimized the crash to this: struct Foo {  unsigned bf1:1;  unsigned bf2:1;  unsigned bf3:1; }; void foo (struct Foo *ob) {  ob-bf2 = 1; } D.2731_4 = ob_1(D)-bf2; __asan_base_addr.2 = (long unsigned int)

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-19 Thread Xinliang David Li
what kind of failures? David On Wed, Oct 19, 2011 at 2:04 PM, konstantin.s.serebry...@gmail.com wrote: On 2011/10/19 20:38:35, kcc wrote: Added code to avoid bitfields. Is there anything I should know about splitting basic blocks in the presence of EH? Currently, asan fails on

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-18 Thread Xinliang David Li
On Tue, Oct 18, 2011 at 3:56 PM, konstantin.s.serebry...@gmail.com wrote: On 2011/10/18 22:52:33, davidxl wrote: http://codereview.appspot.com/5272048/diff/18001/tree-asan.c File tree-asan.c (right): http://codereview.appspot.com/5272048/diff/18001/tree-asan.c#newcode325 tree-asan.c:325:

Re: [google] AddressSanitizer for gcc, first attempt. (issue 5272048)

2011-10-18 Thread Xinliang David Li
It will be weird to put the instrumentation pass inside loop opt, besides memory loads which are loop invariants and redundant stores in loop should be handled by pre/pde. +cc Richard Guenther You may want to ask the middle-end maintainer to review your code at this point if you want it to be in

Re: [google] Suppress FDO-use related notes/warnings (issue5294043)

2011-10-18 Thread Xinliang David Li
On Tue, Oct 18, 2011 at 3:48 PM, Rong Xu x...@google.com wrote: Suppress verbose notes/warnings printed in FDO-use compilation. (1) Add option -fprofile-use-verbose. Gcc currently does not emit informational messages on high level transformations such as inlining, value profiling

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

2011-10-13 Thread Xinliang David Li
This patch is for google/main which is 4.7 based, but the validated version is in google_46 branch (which is based on 4.6). By the way (given that you are from intel), do you know if linux kernel can be built with icc with PGO turned on? Our intern Xiaotian has tried to use icc (12.0) to built

Re: [google] record compiler options to .note sections

2011-10-11 Thread Xinliang David Li
ok. David On Tue, Oct 11, 2011 at 9:51 PM, Dehao Chen de...@google.com wrote: Attached is the new patch. Bootstrapped on x86_64, no regressions. gcc/ChangeLog.google-4_6: 2011-10-08  Dehao Chen  de...@google.com       Add a flag (-frecord-gcc-switches-in-elf) to record compiler      

Re: [google] record compiler options to .note sections

2011-10-10 Thread Xinliang David Li
Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug section), and with -frecord-gcc-switches? 2) may be better to use option name: -frecord-gcc-switches-in-object thanks, David On Sun,

Re: patch ping: Dump the degree of overlap to compare static profile with instrumentation profile

2011-10-07 Thread Xinliang David Li
Yes, this is useful for static prediction tuning. David On Fri, Oct 7, 2011 at 6:40 PM, Dehao Chen de...@google.com wrote: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01293.html

Re: Disable early inlining while compiling for coverage (issue5173042)

2011-10-01 Thread Xinliang David Li
On Sat, Oct 1, 2011 at 5:17 AM, Jan Hubicka hubi...@ucw.cz wrote: Yes, this will improve test coverage option's usability, but please provide the example to explain the issues. David On Fri, Sep 30, 2011 at 6:12 PM, Sharad Singhai sing...@google.com wrote: This patch disables early

Re: [google] Fix bugs in sampled profile collection

2011-09-30 Thread Xinliang David Li
ok. David On Fri, Sep 30, 2011 at 6:54 PM, Easwaran Raman era...@google.com wrote: This fixes two issues with sampled profile collection. It delays cleanup of instrumentation_to_be_sampled after all callgraph nodes have been instrumented and prevents  gcov_sample_counter_decl and

Re: Disable early inlining while compiling for coverage (issue5173042)

2011-09-30 Thread Xinliang David Li
Yes, this will improve test coverage option's usability, but please provide the example to explain the issues. David On Fri, Sep 30, 2011 at 6:12 PM, Sharad Singhai sing...@google.com wrote: This patch disables early inlining when --coverage option is specified. This improves coverage data in

Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-28 Thread Xinliang David Li
Sri, please add a new api to do cpu_indicator initialization on demand to be used in IFUNC context. Perhaps also add some debug check to make sure no conflicting cpu model is set. Ok for google branches for now while the discussion continues. thanks, David On Thu, Aug 25, 2011 at 5:37 PM,

Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-26 Thread Xinliang David Li
Is there a standard way to force this init function to be called before all ctors? Adding a ctor in one crtx.o ? David On Fri, Aug 26, 2011 at 10:45 AM, H.J. Lu hjl.to...@gmail.com wrote: On Fri, Aug 26, 2011 at 10:37 AM, Sriraman Tallam tmsri...@google.com wrote: On Fri, Aug 26, 2011 at

Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-26 Thread Xinliang David Li
IFUNC selector will need to call get_cpu_indicator (as proposed by HJ or something similar), while in other contexts, the implementation should find a way to make sure the indicator is already initialized such that the builtins accessing the features can be directly used (See also Michael and

Re: [google] Increase hotness count fraction

2011-08-24 Thread Xinliang David Li
Good for google branches. Need to measure the performance and size impact on SPEC2k/06 with this patch and the previous hotcaller patch for trunk. thanks, David On Wed, Aug 24, 2011 at 2:43 PM, Mark Heffernan meh...@google.com wrote: This patch bumps up the parameter 'hot-bb-count-fraction'

Re: [4.7][google]Support for getting CPU type and feature information at run-time. (issue4893046)

2011-08-18 Thread Xinliang David Li
On Thu, Aug 18, 2011 at 6:10 AM, Michael Matz m...@suse.de wrote: Hi, On Thu, 18 Aug 2011, Richard Guenther wrote: CPUID to get target features and set global vars corresponding to the features. So, the builtin should be folded by into the appropriate variable in libgcc. Hm, but then

primary vtable not initialized properly

2011-08-11 Thread Xinliang David Li
Compile the following program using 4.6 or trunk compiler and run it, the program will seg fault. The problem is that the D3_Spec's primary vtable has a null entry for virtual function id which it overrides. The root cause is that the base class's virtual function list for the derived class is

Re: primary vtable not initialized properly

2011-08-11 Thread Xinliang David Li
A new patch with lightly modified the test case. David On Thu, Aug 11, 2011 at 5:02 PM, Xinliang David Li davi...@google.com wrote: Compile the following program using 4.6 or trunk compiler and run it, the program will seg fault. The problem is that the D3_Spec's primary vtable has a null

cfg fixup bug fix

2011-08-01 Thread Xinliang David Li
The attached patch fixed a minor bug in cfg fixup -- the outgoing edge profile count is not scaled after inlining leading to warnings printed in IR dump -- 'Invalid sum of ...'. Bootstrap and tested on x86-64/linux, ok for trunk? Thanks, David p2 Description: Binary data

-freorder-function is broken

2011-07-29 Thread Xinliang David Li
The attached patch fixed the problem. The root cause of the problem is due to the ordering change of profile_estimation and tree_profile pass. In trunk, the function/node frequency is not computed after profile annotation is done leading to missing information. Another side effect of this breakage

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Xinliang David Li
On Thu, Jul 21, 2011 at 11:32 AM, Rong Xu x...@google.com wrote: On Thu, Jul 21, 2011 at 11:09 AM,  davi...@google.com wrote: http://codereview.appspot.com/4798045/diff/1/ipa.c File ipa.c (right): http://codereview.appspot.com/4798045/diff/1/ipa.c#newcode1034 ipa.c:1034: { Has varpool node

Re: [google] fix global vars incorrectly marked as read-only in LIPO mode (issue4798045)

2011-07-21 Thread Xinliang David Li
original change, the visibility analysis change won't kick in). we also need to change varpool_node_link() to merge the local attribute. -Rong On Thu, Jul 21, 2011 at 12:35 PM, Xinliang David Li davi...@google.com wrote: On Thu, Jul 21, 2011 at 12:27 PM, Rong Xu x...@google.com wrote

Re: [testsuite] Remove dg-extra-errors in gcc.dg/inline_[12].c etc.

2011-06-28 Thread Xinliang David Li
Your fix works ok for me (on x86-64/linux) too. Thanks, David On Tue, Jun 28, 2011 at 10:09 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: Three new testcases seem to XPASS everywhere, at least on all of my targets: XPASS: gcc.dg/inline_1.c (test for excess errors) XPASS:

Re: SRA generates uninitialized var use

2011-06-21 Thread Xinliang David Li
On Tue, Jun 21, 2011 at 1:42 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Jun 21, 2011 at 1:28 AM, Xinliang David Li davi...@google.com wrote: Good point -- but why does SRA have to be so complicated? If it just do structure expansion and let subsequent phases to clean it up

Re: SRA generates uninitialized var use

2011-06-20 Thread Xinliang David Li
, 2011 at 10:56 AM, Xinliang David Li davi...@google.com wrote: Compiling the test case in the patch with -O2 -m32 without the fix, the program will abort. The problem is a var decl whose address is taken is not marked as addressable leading to bad SSA update (missing VUSE).  (the triaging used

Re: SRA generates uninitialized var use

2011-06-20 Thread Xinliang David Li
, Jun 20, 2011 at 6:15 PM, Xinliang David Li davi...@google.com wrote: It is used to indicate the fact the var decl needs to have a memory home (addressable) -- is there another way to do this? this is to avoid the following situation: 1) after SRA before update SSA, the IR looks like:   MEM

Re: SRA generates uninitialized var use

2011-06-19 Thread Xinliang David Li
Bootstrap and tested on linux/x86_64. Ok for trunk? David On Sat, Jun 18, 2011 at 1:56 AM, Xinliang David Li davi...@google.com wrote: Compiling the test case in the patch with -O2 -m32 without the fix, the program will abort. The problem is a var decl whose address is taken is not marked

SRA generates uninitialized var use

2011-06-18 Thread Xinliang David Li
Compiling the test case in the patch with -O2 -m32 without the fix, the program will abort. The problem is a var decl whose address is taken is not marked as addressable leading to bad SSA update (missing VUSE). (the triaging used the the .after and .after_cleanup dump diff and found the

Re: [google] Add intermediate text format for gcov (issue4595053)

2011-06-15 Thread Xinliang David Li
Ok for google/main. David On Tue, Jun 14, 2011 at 1:50 PM, Sharad Singhai (शरद सिंघई) sing...@google.com wrote: Sorry, Rietveld didn't send out the updated patch along with my mail. Here it is. Sharad 2011-06-14   Sharad Singhai  sing...@google.com        Google Ref 3        *

[google] backport r174930 to google/main

2011-06-14 Thread Xinliang David Li
Backported r174930 to google/main. David

Re: Dump before flag

2011-06-14 Thread Xinliang David Li
Committed after Bootstrapping and regression testing on x86-64/linux. The follow up patch will come soon. Thanks, David On Tue, Jun 14, 2011 at 8:57 AM, Xinliang David Li davi...@google.com wrote: On Tue, Jun 14, 2011 at 6:58 AM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Jun

Re: Dump only functions with name matching patterns

2011-06-14 Thread Xinliang David Li
Attached the patch. David On Tue, Jun 14, 2011 at 4:21 PM, Xinliang David Li davi...@google.com wrote: This is the second (hopefully the last in the series of dumper changes) follow-up patch. It adds a control so that verbosity of the dump can be greatly reduced (and hopefully simplify gcc

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-10 Thread Xinliang David Li
On Fri, Jun 10, 2011 at 2:03 AM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Jun 10, 2011 at 12:51 AM, Xinliang David Li davi...@google.com wrote: Patch is temporally rolled back. Richard, looks like deeper pass manager cleanup is needed -- I would like to delay that. For now

Re: Dump before flag

2011-06-10 Thread Xinliang David Li
On Fri, Jun 10, 2011 at 1:52 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Jun 9, 2011 at 5:47 PM, Xinliang David Li davi...@google.com wrote: See attached. Hmm.  I don't like how you still wire dumping in the TODO routines. Doesn't it work to just dump the body from

[google] backport 174848, 174849 to google/main

2011-06-09 Thread Xinliang David Li
Backported -fdump-passes option impl. David

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-09 Thread Xinliang David Li
Can you send me a trace? I can not reproduce the problem. David On Thu, Jun 9, 2011 at 3:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Jun 7, 2011 at 11:54 AM, Xinliang David Li davi...@google.com wrote: Please review the attached two patches. In the first patch, gate functions

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-09 Thread Xinliang David Li
7, 2011 at 11:54 AM, Xinliang David Li davi...@google.com wrote: Please review the attached two patches. In the first patch, gate functions are cleaned up. All the per function legality checks are moved into the executor and the optimization heuristic checks (optimize for size) remain

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-09 Thread Xinliang David Li
at 3:32 PM, Xinliang David Li davi...@google.com wrote: Though I can not reproduce it, it might be related to what Richard mentioned in the review -- The TODO's are executed though the pass is not. This opened up a can of worm -- I will revert the patches for now. David On Thu, Jun 9, 2011

Re: Dump before flag

2011-06-08 Thread Xinliang David Li
On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li davi...@google.com wrote: The following is the patch that does the job. Most of the changes are just  removing TODO_dump_func. The major change is in passes.c

Re: Dump before flag

2011-06-08 Thread Xinliang David Li
, Jun 8, 2011 at 9:52 AM, Xinliang David Li davi...@google.com wrote: On Wed, Jun 8, 2011 at 2:06 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 8, 2011 at 1:08 AM, Xinliang David Li davi...@google.com wrote: The following is the patch that does the job. Most of the changes

Re: Dump before flag

2011-06-07 Thread Xinliang David Li
On Tue, Jun 7, 2011 at 2:36 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Jun 6, 2011 at 6:20 PM, Xinliang David Li davi...@google.com wrote: Your patch doesn't really improve this but adds to the confusion. +  /* Override dump TODOs.  */ +  if (dump_file (pass

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-07 Thread Xinliang David Li
Ok -- that sounds good. David On Tue, Jun 7, 2011 at 3:10 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Jun 6, 2011 at 6:00 PM, Xinliang David Li davi...@google.com wrote: On Mon, Jun 6, 2011 at 4:38 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Jun 2, 2011

Re: Dump before flag

2011-06-07 Thread Xinliang David Li
Any suggestions on the dump position specification string, before and after is not enough. How about start, before, after, and finish? I.e. -fdump-tree-pre-start -- dump IR before TODO_start of PRE pass -fdump-tree-pre-before -- dump IR just before PRE after its TODO start finishes

Re: Dump before flag

2011-06-07 Thread Xinliang David Li
On Tue, Jun 7, 2011 at 10:01 AM, Diego Novillo dnovi...@google.com wrote: On Tue, Jun 7, 2011 at 09:51, Xinliang David Li davi...@google.com wrote: Any suggestions on the dump position specification string, before and after is not enough. How about start, before, after, and finish? I.e

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-07 Thread Xinliang David Li
flags (O2, -ftree-vrp, -fgcse etc) --- compiler heuristic (optimize for size/speed) --- -fdisable/enable forcing pass options --- legality check Testing under going. Ok for trunk? Thanks, David On Tue, Jun 7, 2011 at 9:24 AM, Xinliang David Li davi...@google.com wrote: Ok -- that sounds good

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-07 Thread Xinliang David Li
The dump-pass patch with test case. David On Tue, Jun 7, 2011 at 11:54 AM, Xinliang David Li davi...@google.com wrote: Please review the attached two patches. In the first patch, gate functions are cleaned up. All the per function legality checks are moved into the executor

Re: Dump before flag

2011-06-07 Thread Xinliang David Li
name. By default, the IR dump and debug dump will be dumped into the same file which is the current behavior. David On Tue, Jun 7, 2011 at 4:08 PM, Xinliang David Li davi...@google.com wrote: The following is the patch that does the job. Most of the changes are just  removing TODO_dump_func

Re: [google] pessimize stack accounting during inlining

2011-06-07 Thread Xinliang David Li
Ok for google/main. A good candidate patch for trunk too. Thanks, David On Tue, Jun 7, 2011 at 4:29 PM, Mark Heffernan meh...@google.com wrote: This patch pessimizes stack accounting during inlining.  This enables setting a firm stack size limit (via parameters large-stack-frame and

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-06 Thread Xinliang David Li
On Mon, Jun 6, 2011 at 4:22 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 7:24 PM, Xinliang David Li davi...@google.com wrote: The attached is the split #1 patch that enhances -fenable/disable. Ok after testing? I expect the testcases will be quite fragile, so

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-06 Thread Xinliang David Li
On Mon, Jun 6, 2011 at 4:38 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Jun 2, 2011 at 9:12 AM, Xinliang David Li davi...@google.com wrote: This is the version of the patch that walks through pass lists. Ok with this one? +/* Dump all optimization passes.  */ + +void

Re: Dump before flag

2011-06-06 Thread Xinliang David Li
Your patch doesn't really improve this but adds to the confusion. +  /* Override dump TODOs.  */ +  if (dump_file (pass-todo_flags_finish TODO_dump_func) +       (dump_flags TDF_BEFORE)) +    { +      pass-todo_flags_finish = ~TODO_dump_func; +      pass-todo_flags_start |=

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-06 Thread Xinliang David Li
Please take a look at the revised one. Thanks, David On Mon, Jun 6, 2011 at 4:22 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 7:24 PM, Xinliang David Li davi...@google.com wrote: The attached is the split #1 patch that enhances -fenable/disable. Ok after

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-06 Thread Xinliang David Li
This is the patch with max id removed. Thanks, David On Mon, Jun 6, 2011 at 9:00 AM, Xinliang David Li davi...@google.com wrote: On Mon, Jun 6, 2011 at 4:38 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Jun 2, 2011 at 9:12 AM, Xinliang David Li davi...@google.com wrote

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-05 Thread Xinliang David Li
Is this patch ok? Thanks, David On Wed, Jun 1, 2011 at 10:24 AM, Xinliang David Li davi...@google.com wrote: The attached is the split #1 patch that enhances -fenable/disable. Ok after testing? Thanks, David On Wed, Jun 1, 2011 at 9:16 AM, Xinliang David Li davi...@google.com wrote

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-05 Thread Xinliang David Li
Is this one ok? Thanks, David On Thu, Jun 2, 2011 at 12:12 AM, Xinliang David Li davi...@google.com wrote: This is the version of the patch that walks through pass lists. Ok with this one? David On Wed, Jun 1, 2011 at 12:45 PM, Xinliang David Li davi...@google.com wrote: On Wed, Jun 1

Re: don't dump decl_uid with TDF_NOUID

2011-06-03 Thread Xinliang David Li
Looks good to me, but you need an OK from a maintainer. Thanks, David On Fri, Jun 3, 2011 at 7:17 AM, Alexandre Oliva aol...@redhat.com wrote: A recent change introduced decl_uid in the “;; Function ” header in dump files.  This breaks -fcompare-debug (and bootstrap-debug-lean), because decl

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-02 Thread Xinliang David Li
This is the version of the patch that walks through pass lists. Ok with this one? David On Wed, Jun 1, 2011 at 12:45 PM, Xinliang David Li davi...@google.com wrote: On Wed, Jun 1, 2011 at 12:29 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 6:16 PM, Xinliang

Re: [google] Use minimum cost circulation, not minimum cost flow to smooth profiles other minor fixes. (issue4536106)

2011-06-02 Thread Xinliang David Li
ok for google/main. David On Thu, Jun 2, 2011 at 11:00 AM, Martin Thuresson mart...@google.com wrote: This patch from Neil Vachharajani and Dehao Chen improves mcf by using minimum cost circulation instead of minimum cost flow to smooth profiles. It also introduces a parameter for controlling

Re: [google] Use minimum cost circulation, not minimum cost flow to smooth profiles other minor fixes. (issue4536106)

2011-06-02 Thread Xinliang David Li
Counter overflow? David On Thu, Jun 2, 2011 at 11:12 AM, Martin Thuresson mart...@google.com wrote: On Thu, Jun 2, 2011 at 11:05 AM, Xinliang David Li davi...@google.com wrote: Smoothing works for sample FDO and profile data from multi-threaded programs. You won't see any difference in SPEC

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-01 Thread Xinliang David Li
On Wed, Jun 1, 2011 at 1:51 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 1:34 AM, Xinliang David Li davi...@google.com wrote: The following patch implements the a new option that dumps gcc PASS configuration. The sample output is attached.  There is one

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-01 Thread Xinliang David Li
The attached is the split #1 patch that enhances -fenable/disable. Ok after testing? Thanks, David On Wed, Jun 1, 2011 at 9:16 AM, Xinliang David Li davi...@google.com wrote: On Wed, Jun 1, 2011 at 1:51 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 1:34 AM

Re: -fdump-passes -fenable-xxx=func_name_list

2011-06-01 Thread Xinliang David Li
The attached is patch-2 (-fdump-passes) and a sample output: Ok for trunk? David On Wed, Jun 1, 2011 at 9:16 AM, Xinliang David Li davi...@google.com wrote: On Wed, Jun 1, 2011 at 1:51 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 1:34 AM, Xinliang David Li

Dump before flag

2011-06-01 Thread Xinliang David Li
Hi, this is a simple patch that support dump_before flag. E.g, -fdump-tree-pre-before This is useful for diffing the the IR before and after a pass. Gcc dumping needs more cleanups -- such as allowing IR only dump, allowing IR dumping for a particular function etc. The exposure of 'dumpfile'

Re: Dump before flag

2011-06-01 Thread Xinliang David Li
Sorry about it. Here it is. David On Wed, Jun 1, 2011 at 1:36 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Jun 1, 2011 at 10:26 PM, Xinliang David Li davi...@google.com wrote: Hi, this is a simple patch that support dump_before flag. E.g, -fdump-tree-pre-before

Re: Dump before flag

2011-06-01 Thread Xinliang David Li
On Wed, Jun 1, 2011 at 2:12 PM, Basile Starynkevitch bas...@starynkevitch.net wrote: On Wed, 1 Jun 2011 13:26:24 -0700 Xinliang David Li davi...@google.com wrote: Hi, this is a simple patch that support dump_before flag. E.g, -fdump-tree-pre-before This is useful for diffing the the IR

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

2011-05-31 Thread Xinliang David Li
On Tue, May 31, 2011 at 2:05 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 30, 2011 at 10:16 PM, Xinliang David Li davi...@google.com wrote: The attached are two simple follow up patches 1) the first patch does some refactorization on function header dumping (with more

-fdump-passes -fenable-xxx=func_name_list

2011-05-31 Thread Xinliang David Li
The following patch implements the a new option that dumps gcc PASS configuration. The sample output is attached. There is one limitation: some placeholder passes that are named with '*xxx' are note registered thus they are not listed. They are not important as they can not be turned on/off

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

2011-05-31 Thread Xinliang David Li
The new patch is attached. The test (c,c++,fortran, java, ada) is on going. Thanks, David On Tue, May 31, 2011 at 9:06 AM, Xinliang David Li davi...@google.com wrote: On Tue, May 31, 2011 at 2:05 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 30, 2011 at 10:16 PM

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

2011-05-31 Thread Xinliang David Li
Honza, are you ok with the pass name change? David On Tue, May 31, 2011 at 2:07 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 30, 2011 at 11:44 PM, Xinliang David Li davi...@google.com wrote: This is the complete patch for pass name fixes (with test case changes

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

2011-05-31 Thread Xinliang David Li
Please discard the previous one. This is the right one: David On Tue, May 31, 2011 at 5:01 PM, Xinliang David Li davi...@google.com wrote: The new patch is attached. The test (c,c++,fortran, java, ada) is on going. Thanks, David On Tue, May 31, 2011 at 9:06 AM, Xinliang David Li davi

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

2011-05-30 Thread Xinliang David Li
, Xinliang David Li davi...@google.com wrote: The latest version that only exports 2 functions from passes.c. Ok with ... @@ -637,4 +637,8 @@ extern bool first_pass_instance;  /* Declare for plugins.  */  extern void do_per_function_toporder (void (*) (void *), void *); +extern void

[google] backport 174423, 174424 to google/main

2011-05-30 Thread Xinliang David Li
Committed. David

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

2011-05-30 Thread Xinliang David Li
This is the complete patch for pass name fixes (with test case changes). David On Mon, May 30, 2011 at 1:16 PM, Xinliang David Li davi...@google.com wrote: The attached are two simple follow up patches 1) the first patch does some refactorization on function header dumping (with more

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

2011-05-26 Thread Xinliang David Li
The latest version that only exports 2 functions from passes.c. David On Thu, May 26, 2011 at 2:04 PM, Xinliang David Li davi...@google.com wrote: On Thu, May 26, 2011 at 2:04 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, May 25, 2011 at 6:53 PM, Joseph S. Myers jos

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

2011-05-25 Thread Xinliang David Li
Ping. The link to the message: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01303.html Thanks, David On Sun, May 22, 2011 at 4:17 PM, Xinliang David Li davi...@google.com wrote: Ping. David On Fri, May 20, 2011 at 9:06 AM, Xinliang David Li davi...@google.com wrote: Ok to check

Fix for PR 48988

2011-05-22 Thread Xinliang David Li
Hi, the following trial patch fixed PR 48988 which is a regression. Bootstrap and tested on x86/linux. Verified the reported failure is fixed. Ok for trunk? David 2011-05-22 David Li davi...@google.com PR tree-optimization/48988 * tree-ssa-uninit.c

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

2011-05-22 Thread Xinliang David Li
Ping. David On Fri, May 20, 2011 at 9:06 AM, Xinliang David Li davi...@google.com wrote: Ok to check in this one? Thanks, David On Wed, May 18, 2011 at 12:30 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Wed, 18 May 2011, David Li wrote: +      error (Unrecognized option %s

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

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

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

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

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

2011-05-20 Thread Xinliang David Li
: Size Before: 1,175,509 After: 1,568,135 Change: +33.4% Time Before: 5.3s After: 12.9s Change: +143% On Fri, May 20, 2011 at 8:53 AM, Xinliang David Li davi...@google.com wrote: On Fri, May 20, 2011 at 2:12 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, May 19, 2011 at 8:26

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

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

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

2011-05-19 Thread Xinliang David Li
% 179.art29792884 -3.18% On Wed, May 18, 2011 at 12:53 PM, Mark Heffernan meh...@google.com wrote: Verified identical binaries created and submitted. Mark On Wed, May 18, 2011 at 11:37 AM, Xinliang David Li davi...@google.com wrote: Ok

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

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

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

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

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

2011-05-18 Thread Xinliang David Li
, Mark Heffernan meh...@google.com wrote: On Tue, May 17, 2011 at 11:34 PM, Xinliang David Li davi...@google.com wrote: To make consistent inline decisions between profile-gen and profile-use, probably better to check these two: flag_profile_arcs and flag_branch_probabilities.  -fprofile-use

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

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

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

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

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

2011-05-18 Thread Xinliang David Li
Will fix the Changelog, and add documentation. Thanks, David On Wed, May 18, 2011 at 1:26 PM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, May 18, 2011 at 8:37 PM, David Li davi...@google.com wrote: In gcc, not all passes have user level control to turn it on/off, and there

Re: [google] Parameterize function overhead estimate for inlining

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

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

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

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

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

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

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

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

2011-05-07 Thread Xinliang David Li
On Sat, May 7, 2011 at 5:46 AM, Richard Guenther richard.guent...@gmail.com wrote: On Fri, May 6, 2011 at 7:57 PM, Xinliang David Li davi...@google.com wrote: I want propose a more general solution. 1) Generic Annotation Support for gcc IR -- it is used attach to application/optimization

<    4   5   6   7   8   9   10   >