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]

[tree-ssa] kill -fdisable-gimple


As discussed.


r~


        * common.opt (fdisable-gimple): Remove.
        * flags.h (flag_disable_gimple): Remove.
        * toplev.c (flag_disable_gimple): Remove.
        (process_options): Don't check it.
        (lang_independent_options): Don't set it.
        * opts.c (common_handle_option): Likewise.
        * gimplify.c (keep_function_tree_in_gimple_form): Don't check it.
        * c-semantics.c (expand_stmt_toplev): Likewise.
        * tree-optimize.c (tree_rest_of_compilation): Likewise.
        * doc/invoke.texi: Don't document it.
cp/
        * decl.c (finish_function): Don't check flag_disable_gimple.
fortran/
        * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.

Index: c-semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-semantics.c,v
retrieving revision 1.43.2.22
diff -c -p -d -r1.43.2.22 c-semantics.c
*** c-semantics.c	6 Oct 2003 17:36:13 -0000	1.43.2.22
--- c-semantics.c	17 Oct 2003 06:33:02 -0000
*************** expand_stmt (tree t)
*** 893,906 ****
  void
  expand_stmt_toplev (tree t)
  {
    if (STATEMENT_CODE_P (TREE_CODE (t)))
!     {
!       if (!flag_disable_gimple)
! 	abort ();
!       expand_stmt (t);
!     }
!   else
!     expand_expr_stmt_value (t, 0, 0);
  }
  
  /* Determine whether expression EXP contains a potentially
--- 893,902 ----
  void
  expand_stmt_toplev (tree t)
  {
+   /* Gimplification didn't happen, for some reason.  */
    if (STATEMENT_CODE_P (TREE_CODE (t)))
!     abort ();
!   expand_expr_stmt_value (t, 0, 0);
  }
  
  /* Determine whether expression EXP contains a potentially
Index: common.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/common.opt,v
retrieving revision 1.14.2.5
diff -c -p -d -r1.14.2.5 common.opt
*** common.opt	28 Sep 2003 06:06:08 -0000	1.14.2.5
--- common.opt	17 Oct 2003 06:33:02 -0000
*************** fdiagnostics-show-location=
*** 295,304 ****
  Common Joined RejectNegative
  -fdiagnostics-show-location=[once|every-line]	How often to emit source location at the beginning of line-wrapped diagnostics
  
- fdisable-gimple
- Common RejectNegative
- Do not re-write trees into GIMPLE form
- 
  fdisable-tree-ssa
  Common RejectNegative
  Disable SSA optimizations on trees
--- 295,300 ----
Index: flags.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flags.h,v
retrieving revision 1.86.2.34
diff -c -p -d -r1.86.2.34 flags.h
*** flags.h	6 Oct 2003 17:36:31 -0000	1.86.2.34
--- flags.h	17 Oct 2003 06:33:02 -0000
*************** extern int flag_non_call_exceptions;
*** 691,699 ****
     >1 means also to include multithreading locks.  */
  extern int flag_mudflap;
  
- /* Disable tree gimplification.  */
- extern int flag_disable_gimple;
- 
  /* Disable SSA optimizations on trees.  */
  extern int flag_disable_tree_ssa;
  
--- 691,696 ----
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/gimplify.c,v
retrieving revision 1.1.2.96
diff -c -p -d -r1.1.2.96 gimplify.c
*** gimplify.c	16 Oct 2003 18:39:45 -0000	1.1.2.96
--- gimplify.c	17 Oct 2003 06:33:03 -0000
*************** keep_function_tree_in_gimple_form (tree 
*** 188,197 ****
  {
    tree fnbody;
  
-   /* If we were asked explicitly not to use gimple form, then return zero.  */
-   if (flag_disable_gimple)
-     return 0;
- 
    /* If the program has had errors, then keeping gimple form is not
       necessary.  */
    if (errorcount || sorrycount)
--- 188,193 ----
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.31.2.11
diff -c -p -d -r1.31.2.11 opts.c
*** opts.c	28 Sep 2003 06:06:31 -0000	1.31.2.11
--- opts.c	17 Oct 2003 06:33:03 -0000
*************** common_handle_option (size_t scode, cons
*** 956,965 ****
  	return 0;
        break;
  
-     case OPT_fdisable_gimple:
-       flag_disable_gimple = value;
-       break;
- 
      case OPT_fdisable_tree_ssa:
        flag_disable_tree_ssa = value;
        break;
--- 956,961 ----
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.654.2.67
diff -c -p -d -r1.654.2.67 toplev.c
*** toplev.c	6 Oct 2003 17:36:39 -0000	1.654.2.67
--- toplev.c	17 Oct 2003 06:33:03 -0000
*************** int flag_renumber_insns = 1;
*** 949,957 ****
  /* If nonzero, use the graph coloring register allocator.  */
  int flag_new_regalloc = 0;
  
- /* Disable tree gimplification.  */
- int flag_disable_gimple = 0;
- 
  /* Disable SSA on trees optimizations.  */
  int flag_disable_tree_ssa = 0;
  
--- 949,954 ----
*************** static const lang_independent_options f_
*** 1166,1172 ****
    { "new-ra", &flag_new_regalloc, 1 },
    { "mudflap", &flag_mudflap, 1 },
    { "mudflapth", &flag_mudflap, 2 },
-   { "disable-gimple", &flag_disable_gimple, 1 },
    { "disable-tree-ssa", &flag_disable_tree_ssa, 1 },
    { "tree-pre", &flag_tree_pre, 1 },
    { "tree-ccp", &flag_tree_ccp, 1 },
--- 1163,1168 ----
*************** process_options (void)
*** 4370,4385 ****
      warning ("-ffunction-sections may affect debugging on some targets");
  #endif
  
!     /* The presence of IEEE signaling NaNs, implies all math can trap.  */
!     if (flag_signaling_nans)
!       flag_trapping_math = 1;
! 
!   /* -fdisable-gimple also disables the tree optimizers.  */
!   if (optimize >= 1 && flag_disable_gimple)
!     warning ("-fdisable-gimple also disables optimizations on trees");
! 
!   if (flag_disable_gimple && flag_mudflap)
!     warning ("-fdisable-gimple also disables mudflap instrumentation");
  }
  
  /* Initialize the compiler back end.  */
--- 4366,4374 ----
      warning ("-ffunction-sections may affect debugging on some targets");
  #endif
  
!   /* The presence of IEEE signaling NaNs, implies all math can trap.  */
!   if (flag_signaling_nans)
!     flag_trapping_math = 1;
  }
  
  /* Initialize the compiler back end.  */
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.55
diff -c -p -d -r1.1.4.55 tree-optimize.c
*** tree-optimize.c	8 Oct 2003 23:35:08 -0000	1.1.4.55
--- tree-optimize.c	17 Oct 2003 06:33:03 -0000
*************** tree_rest_of_compilation (tree fndecl, b
*** 275,283 ****
  
    /* Gimplify the function.  Don't try to optimize the function if
       gimplification failed.  */
!   if (!flag_disable_gimple
!       && (keep_function_tree_in_gimple_form (fndecl)
!           || gimplify_function_tree (fndecl)))
      {
        /* Debugging dump after gimplification.  */
        dump_function (TDI_gimple, fndecl);
--- 275,282 ----
  
    /* Gimplify the function.  Don't try to optimize the function if
       gimplification failed.  */
!   if (keep_function_tree_in_gimple_form (fndecl)
!       || gimplify_function_tree (fndecl))
      {
        /* Debugging dump after gimplification.  */
        dump_function (TDI_gimple, fndecl);
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.911.2.50
diff -c -p -d -r1.911.2.50 decl.c
*** cp/decl.c	14 Oct 2003 22:24:05 -0000	1.911.2.50
--- cp/decl.c	17 Oct 2003 06:33:04 -0000
*************** finish_function (int flags)
*** 13834,13842 ****
  	  && (outer = BLOCK_SUBBLOCKS (BLOCK_SUBBLOCKS (DECL_INITIAL (fndecl))),
  	      chain_member (r, BLOCK_VARS (outer))))
  	{
! 	  
! 	  if (!flag_disable_gimple)
! 	    set_has_hidden_use (r);
  	  DECL_ALIGN (r) = DECL_ALIGN (DECL_RESULT (fndecl));
  	  walk_tree_without_duplicates (&DECL_SAVED_TREE (fndecl),
  					nullify_returns_r, r);
--- 13834,13840 ----
  	  && (outer = BLOCK_SUBBLOCKS (BLOCK_SUBBLOCKS (DECL_INITIAL (fndecl))),
  	      chain_member (r, BLOCK_VARS (outer))))
  	{
! 	  set_has_hidden_use (r);
  	  DECL_ALIGN (r) = DECL_ALIGN (DECL_RESULT (fndecl));
  	  walk_tree_without_duplicates (&DECL_SAVED_TREE (fndecl),
  					nullify_returns_r, r);
Index: fortran/f95-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/Attic/f95-lang.c,v
retrieving revision 1.1.2.11
diff -c -p -d -r1.1.2.11 f95-lang.c
*** fortran/f95-lang.c	13 Oct 2003 01:31:55 -0000	1.1.2.11
--- fortran/f95-lang.c	17 Oct 2003 06:33:04 -0000
*************** expand_function_body (tree fndecl, int n
*** 203,210 ****
    if (nested)
      push_function_context ();
  
!   if (!flag_disable_gimple)
!     gimplify_function_tree (fndecl);
  
    tree_rest_of_compilation (fndecl, nested);
  
--- 203,209 ----
    if (nested)
      push_function_context ();
  
!   gimplify_function_tree (fndecl);
  
    tree_rest_of_compilation (fndecl, nested);
  
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.152.2.54
diff -c -p -d -r1.152.2.54 invoke.texi
*** doc/invoke.texi	6 Oct 2003 17:38:09 -0000	1.152.2.54
--- doc/invoke.texi	17 Oct 2003 06:42:52 -0000
*************** in the following sections.
*** 300,306 ****
  -fstrength-reduce  -fstrict-aliasing  -ftracer  -fthread-jumps @gol
  -funroll-all-loops  -funroll-loops  -fpeel-loops @gol
  -funswitch-loops  -fold-unroll-loops  -fold-unroll-all-loops @gol
! -fdisable-gimple  -ftree-pre  -ftree-ccp  -ftree-dce  -ftree-copyprop  @gol
  -fdisable-tree-ssa -ftree-dominator-opts -ftree-must-alias @gol
  --param @var{name}=@var{value}
  -O  -O0  -O1  -O2  -O3  -Os}
--- 300,306 ----
  -fstrength-reduce  -fstrict-aliasing  -ftracer  -fthread-jumps @gol
  -funroll-all-loops  -funroll-loops  -fpeel-loops @gol
  -funswitch-loops  -fold-unroll-loops  -fold-unroll-all-loops @gol
! -ftree-pre  -ftree-ccp  -ftree-dce  -ftree-copyprop  @gol
  -fdisable-tree-ssa -ftree-dominator-opts -ftree-must-alias @gol
  --param @var{name}=@var{value}
  -O  -O0  -O1  -O2  -O3  -Os}
*************** This option is always enabled by default
*** 4267,4277 ****
  those which have no call-preserved registers to use instead.
  
  Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
- 
- @item -fdisable-gimple
- Do not re-write trees into GIMPLE form.  This switch also disables
- tree-based optimizations.  @emph{Note:} This option is only useful when
- debugging the tree gimplification pass in GCC.
  
  @item -fdisable-tree-ssa
  Do not apply SSA optimizations to the tree representation.  @emph{Note:}
--- 4267,4272 ----


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