OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / cfglayout.c
index c350883..0885af7 100644 (file)
@@ -1,12 +1,12 @@
 /* Basic block reordering routines for the GNU compiler.
-   Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007
+   Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -15,9 +15,8 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -256,13 +255,8 @@ insn_locators_alloc (void)
   locations_locators_locs = VEC_alloc (int, heap, 32);
   locations_locators_vals = VEC_alloc (location_t, heap, 32);
 
-#ifdef USE_MAPPED_LOCATION
   last_location = -1;
   curr_location = -1;
-#else
-  last_location.line = -1;
-  curr_location.line = -1;
-#endif
   curr_block = NULL;
   last_block = NULL;
   curr_rtl_loc = 0;
@@ -285,15 +279,8 @@ set_curr_insn_source_location (location_t location)
      time locators are not initialized.  */
   if (curr_rtl_loc == -1)
     return;
-#ifdef USE_MAPPED_LOCATION
   if (location == last_location)
     return;
-#else
-  if (location.file && last_location.file
-      && !strcmp (location.file, last_location.file)
-      && location.line == last_location.line)
-    return;
-#endif
   curr_location = location;
 }
 
@@ -322,12 +309,7 @@ curr_insn_locator (void)
       VEC_safe_push (tree, gc, block_locators_blocks, curr_block);
       last_block = curr_block;
     }
-#ifdef USE_MAPPED_LOCATION
   if (last_location != curr_location)
-#else
-  if (last_location.file != curr_location.file
-      || last_location.line != curr_location.line)
-#endif
     {
       curr_rtl_loc++;
       VEC_safe_push (int, heap, locations_locators_locs, curr_rtl_loc);
@@ -358,8 +340,10 @@ outof_cfg_layout_mode (void)
   return 0;
 }
 
-struct tree_opt_pass pass_into_cfg_layout_mode =
+struct rtl_opt_pass pass_into_cfg_layout_mode =
 {
+ {
+  RTL_PASS,
   "into_cfglayout",                     /* name */
   NULL,                                 /* gate */
   into_cfg_layout_mode,                 /* execute */
@@ -372,11 +356,13 @@ struct tree_opt_pass pass_into_cfg_layout_mode =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_dump_func,                       /* todo_flags_finish */
-  0                                     /* letter */
+ }
 };
 
-struct tree_opt_pass pass_outof_cfg_layout_mode =
+struct rtl_opt_pass pass_outof_cfg_layout_mode =
 {
+ {
+  RTL_PASS,
   "outof_cfglayout",                    /* name */
   NULL,                                 /* gate */
   outof_cfg_layout_mode,                /* execute */
@@ -389,7 +375,7 @@ struct tree_opt_pass pass_outof_cfg_layout_mode =
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
   TODO_dump_func,                       /* todo_flags_finish */
-  0                                     /* letter */
+ }
 };
 \f
 /* Return sope resulting from combination of S1 and S2.  */
@@ -1002,7 +988,7 @@ force_one_exit_fallthru (void)
        redirect_edge_and_branch_force (e, forwarder);
     }
 
-  /* Fix up the chain of blocks -- make FORWARDER immediately preceed the
+  /* Fix up the chain of blocks -- make FORWARDER immediately precede the
      exit block.  */
   FOR_EACH_BB (bb)
     {
@@ -1020,10 +1006,10 @@ force_one_exit_fallthru (void)
    only be used through the cfghooks interface, and we do not want to move
    it to cfgrtl.c since it would require also moving quite a lot of related
    code.  */
-extern bool cfg_layout_can_duplicate_bb_p (basic_block);
+extern bool cfg_layout_can_duplicate_bb_p (const_basic_block);
 
 bool
-cfg_layout_can_duplicate_bb_p (basic_block bb)
+cfg_layout_can_duplicate_bb_p (const_basic_block bb)
 {
   /* Do not attempt to duplicate tablejumps, as we need to unshare
      the dispatch table.  This is difficult to do, as the instructions