This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Make tail-call work on SSA form


In message <20031118205610.GZ11681@kam.mff.cuni.cz>, Jan Hubicka writes:
 >> On Tue, 18 Nov 2003 19:41:34 +0100, Jan Hubicka <hubicka@ucw.cz> wrote:
 >> 
 >> > It is still needed because when we do not set TREE_ADDRESABLE, we end up
 >> > putting arrays/structures into registers
 >> 
 >> Why?
 >
 >This is how expanders work:
 >    {
 >      /* Automatic variable that can go in a register.  */
 >      int unsignedp = TREE_UNSIGNED (type);
 >      enum machine_mode reg_mode
 >	= promote_mode (type, DECL_MODE (decl), &unsignedp, 0);
 >
 >      SET_DECL_RTL (decl, gen_reg_rtx (reg_mode));
 >
 >      if (!DECL_ARTIFICIAL (decl))
 >	mark_user_reg (DECL_RTL (decl));
 >
 >      if (POINTER_TYPE_P (type))
 >	mark_reg_pointer (DECL_RTL (decl),
 >			  TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))));
 >
 >      maybe_set_unchanging (DECL_RTL (decl), decl);
 >
 >      /* If something wants our address, try to use ADDRESSOF.  */
 >      if (TREE_ADDRESSABLE (decl))
 >	put_var_into_stack (decl, /*rescan=*/false);
 >    }
 >We still attempt to put addressable variable into register via addressof
 >code but that beast should go away.
Yes, that's one of the cleanups we need to make.  The tree-ssa optimizers
(in theory) only leave TREE_ADDRESSABLE set if the object really needs to
be addressable.

ie, by the time we get to the expanders we know if an object must be in 
memory or not.  So the whole mess with ADDRESSOF is pointless.


Jeff





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]