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

2011-06-10 Thread Richard Guenther
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, this leaves us two choices -- 1) do cfunc push/pop, or 2) do pass dump while

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

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

2011-06-09 Thread H.J. Lu
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 and the optimization heuristic checks (optimize for size)

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

2011-06-09 Thread Carrot Wei
It also breaks arm backend. ../trunk/configure '--build=x86_64-build_pc-linux-gnu' '--host=x86_64-build_pc-linux-gnu' '--target=arm-unknown-linux-gnueabi' '--with-sysroot=/home/carrot/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root' '--disable-multilib' '--with-float=soft'

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 are

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

2011-06-09 Thread Xinliang David Li
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 at 3:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Jun

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

2011-06-09 Thread Xinliang David Li
Patch is temporally rolled back. Richard, looks like deeper pass manager cleanup is needed -- I would like to delay that. For now, this leaves us two choices -- 1) do cfunc push/pop, or 2) do pass dump while executing. None of them is ideal, but safe enough. Thanks, David On Thu, Jun 9, 2011

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

2011-06-08 Thread Richard Guenther
On Tue, Jun 7, 2011 at 8:54 PM, 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)

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

2011-06-08 Thread Richard Guenther
On Tue, Jun 7, 2011 at 10:20 PM, Xinliang David Li davi...@google.com wrote: The dump-pass patch with test case. Ok. Thanks, Richard. 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

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

2011-06-07 Thread Richard Guenther
On Mon, Jun 6, 2011 at 9:20 PM, Xinliang David Li davi...@google.com wrote: Please take a look at the revised one. Ok. Thanks, Richard. 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

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: -fdump-passes -fenable-xxx=func_name_list

2011-06-07 Thread Xinliang David Li
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 in the gators. These allow the the following overriding order: common

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 and the

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

2011-06-06 Thread Richard Guenther
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 while I appreciate test coverage for new options I think we should go without those

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

2011-06-06 Thread Richard Guenther
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 +dump_passes (void) +{ + struct cgraph_node *n, *node = NULL; + tree save_fndecl =

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 Richard Guenther
On Mon, Jun 6, 2011 at 5:53 PM, Xinliang David Li davi...@google.com wrote: 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

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

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