Re: Problem with recompute_tree_invarant_for_addr_expr

2005-06-14 Thread Zdenek Dvorak
Hello, > On Mon, Jun 13, 2005 at 10:54:23PM +0200, Zdenek Dvorak wrote: > > OK, I remembered. I put > > > > if (is_gimple_min_invariant (t)) > > > > or > > > > if (is_gimple_val (t)) > > { > > shortcut; > > } > > > > type constructs on some places in gimplification. > > With an aim t

Re: Problem with recompute_tree_invarant_for_addr_expr

2005-06-13 Thread Richard Henderson
On Mon, Jun 13, 2005 at 10:54:23PM +0200, Zdenek Dvorak wrote: > OK, I remembered. I put > > if (is_gimple_min_invariant (t)) > > or > > if (is_gimple_val (t)) > { > shortcut; > } > > type constructs on some places in gimplification. With an aim toward speeding up gimplification, I gu

Re: Problem with recompute_tree_invarant_for_addr_expr

2005-06-13 Thread Zdenek Dvorak
Hello, > On Mon, Jun 13, 2005 at 07:39:33PM +0200, Zdenek Dvorak wrote: > > This has a small flaw -- in case NODE has variable size, it gets > > allocated on stack dynamically, it may be allocated and deallocated > > several times, and its address is no longer an invariant. > > > > So I tried to

Re: Problem with recompute_tree_invarant_for_addr_expr

2005-06-13 Thread Zdenek Dvorak
Hello, > On Mon, Jun 13, 2005 at 07:39:33PM +0200, Zdenek Dvorak wrote: > > This has a small flaw -- in case NODE has variable size, it gets > > allocated on stack dynamically, it may be allocated and deallocated > > several times, and its address is no longer an invariant. > > > > So I tried to

Re: Problem with recompute_tree_invarant_for_addr_expr

2005-06-13 Thread Richard Henderson
On Mon, Jun 13, 2005 at 07:39:33PM +0200, Zdenek Dvorak wrote: > This has a small flaw -- in case NODE has variable size, it gets > allocated on stack dynamically, it may be allocated and deallocated > several times, and its address is no longer an invariant. > > So I tried to fix the code as foll

Problem with recompute_tree_invarant_for_addr_expr

2005-06-13 Thread Zdenek Dvorak
Hello, I have run into the following problem: recompute_tree_invarant_for_addr_expr says that address of a decl is invariant if it is a decl in the current function: if (decl_function_context (node) == current_function_decl) ... /* set TREE_INVARIANT */ This has a small flaw -- in case NODE