This is the mail archive of the 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: [PATCH] Fix pb in nested function decomposition pass

> I'd prefer to not use this approach.  We already have reachability
> code at the cgraph level.  It's not being applied in this case, but
> simply argues that things be rearranged such that it does.

I personally think that this would be less clean than what we currently have, 
i.e. a self-contained pass that runs very early so that all functions are 
equal when the cgraph machinery kicks in.  We would need to delay the pass 
until after the cgraph reachability stuff has been run, which IMHO is asking 
for future troubles.  But I do see the merits of your position.

Thanks for the quick review.

> You may apply a locallized TREE_ADDRESSABLE fix to the frame object
> for 4.1.

Bootstrapped/regtested on i586-suse-linux.

2005-09-14  Eric Botcazou  <>

        * tree-nested.c (get_frame_type): Mark the "non-local frame structure"
        as addressable.

Eric Botcazou
Index: tree-nested.c
RCS file: /cvs/gcc/gcc/gcc/tree-nested.c,v
retrieving revision 2.30
diff -u -p -r2.30 tree-nested.c
--- tree-nested.c	2 Sep 2005 12:40:52 -0000	2.30
+++ tree-nested.c	14 Sep 2005 21:09:51 -0000
@@ -220,6 +220,14 @@ get_frame_type (struct nesting_info *inf
       info->frame_type = type;
       info->frame_decl = create_tmp_var_for (info, type, "FRAME");
+      /* ??? Always make it addressable for now, since it is meant to
+	 be pointed to by the static chain pointer.  This pessimizes
+	 when it turns out that no static chains are needed because
+	 the nested functions referencing non-local variables are not
+	 reachable, but the true pessimization is to create the non-
+	 local frame structure in the first place.  */
+      TREE_ADDRESSABLE (info->frame_decl) = 1;
   return type;

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