This is the mail archive of the gcc@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] RFC: Making control flow more explicit


Hello,

> >>>>>>And what happened to tree/block statement iterators?  You said you
> >>>>>>don't
> >>>>>>like them,
> >>>>>
> >>>>>I don't like the purpose for that block statement iterators were
> >>>>>created
> >>>>>and their internals; otherwise I like the idea.
> >>>>>
> >>>>Have you actually tested the insert (both edge and non) iterators, 
> >>>>for
> >>>>instance?
> >>>
> >>>yes, to some amount (they are also used in ordinary un-ssa).
> >>
> >>But un-ssa has actually not, to my knowledge, every exposed a bug in
> >>the iterators, while PRE has done it frequently.
> >>
> >>>Given that
> >>>now they are trivial, I don't fear there would be any major problems
> >>>with them.
> >>>
> >>I'd be happy to test them if you sent me the huge patch.
> >
> >here is the patch; it should bootstrap at least c and c++.
> >
> 
> It appears you broke walk_tree on GIMPLE'd trees.
> Points-to uses it.
> If you'd really like me to switch it to use tsi's, i will, but it was 
> written before tsi's existed.
> :)

as far as I understand the code, this should fix the problem.

Zdenek

Index: tree-alias-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-alias-common.c,v
retrieving revision 1.1.2.33
diff -c -3 -p -r1.1.2.33 tree-alias-common.c
*** tree-alias-common.c	29 Jul 2003 15:19:49 -0000	1.1.2.33
--- tree-alias-common.c	9 Aug 2003 08:47:57 -0000
*************** create_alias_vars (tree fndecl)
*** 935,941 ****
--- 935,944 ----
    tree fnbody;
  #endif
    size_t i;
+   basic_block bb;
+   block_stmt_iterator bsi;
    currptadecl = fndecl;
+ 
    if (!global_var)
      {
        create_global_var ();
*************** create_alias_vars (tree fndecl)
*** 970,981 ****
      DECL_PTA_TYPEVAR (fndecl) = NULL;
    get_alias_var (fndecl);
  
!   /* For debugging, disable the on-the-fly variable creation,
!      and reenable this. */
!   /*  walk_tree_without_duplicates (&DECL_SAVED_TREE (fndecl),
!       find_func_decls, NULL);*/
!   walk_tree_without_duplicates (&DECL_SAVED_TREE (fndecl),
! 				find_func_aliases, NULL);
    if (we_created_global_var)
      global_var = NULL_TREE;
  
--- 973,990 ----
      DECL_PTA_TYPEVAR (fndecl) = NULL;
    get_alias_var (fndecl);
  
!   FOR_EACH_BB (bb)
!     {
!       for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
! 	{
! 	  /* For debugging, disable the on-the-fly variable creation,
! 	     and reenable this. */
! 	  /*  walk_tree_without_duplicates (bsi_stmt_ptr (bsi),
! 	      find_func_decls, NULL);*/
! 	  walk_tree_without_duplicates (bsi_stmt_ptr (bsi),
! 					find_func_aliases, NULL);
! 	}
!     }
    if (we_created_global_var)
      global_var = NULL_TREE;
  


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