Mercurial > hg > CbC > CbC_gcc
diff gcc/tree-into-ssa.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
line wrap: on
line diff
--- a/gcc/tree-into-ssa.c Fri Feb 12 23:41:23 2010 +0900 +++ b/gcc/tree-into-ssa.c Mon May 24 12:47:05 2010 +0900 @@ -1,5 +1,5 @@ /* Rewrite a program in Normal form into SSA. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@redhat.com> @@ -25,27 +25,25 @@ #include "tm.h" #include "tree.h" #include "flags.h" -#include "rtl.h" #include "tm_p.h" #include "langhooks.h" -#include "hard-reg-set.h" #include "basic-block.h" #include "output.h" #include "expr.h" #include "function.h" #include "diagnostic.h" +#include "tree-pretty-print.h" +#include "gimple-pretty-print.h" #include "bitmap.h" #include "tree-flow.h" #include "gimple.h" #include "tree-inline.h" -#include "varray.h" #include "timevar.h" #include "hashtab.h" #include "tree-dump.h" #include "tree-pass.h" #include "cfgloop.h" #include "domwalk.h" -#include "ggc.h" #include "params.h" #include "vecprim.h" @@ -1475,7 +1473,15 @@ EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi) { - print_generic_expr (file, referenced_var (i), 0); + struct tree_decl_minimal in; + tree var; + in.uid = i; + var = (tree) htab_find_with_hash (gimple_referenced_vars (cfun), + &in, i); + if (var) + print_generic_expr (file, var, 0); + else + fprintf (file, "D.%u", i); fprintf (file, " "); } @@ -1858,7 +1864,27 @@ if (tracked_var) { gimple note = gimple_build_debug_bind (tracked_var, def, stmt); - gsi_insert_after (&gsi, note, GSI_SAME_STMT); + /* If stmt ends the bb, insert the debug stmt on the single + non-EH edge from the stmt. */ + if (gsi_one_before_end_p (gsi) && stmt_ends_bb_p (stmt)) + { + basic_block bb = gsi_bb (gsi); + edge_iterator ei; + edge e, ef = NULL; + FOR_EACH_EDGE (e, ei, bb->succs) + if (!(e->flags & EDGE_EH)) + { + gcc_assert (!ef); + ef = e; + } + gcc_assert (ef + && single_pred_p (ef->dest) + && !phi_nodes (ef->dest) + && ef->dest != EXIT_BLOCK_PTR); + gsi_insert_on_edge_immediate (ef, note); + } + else + gsi_insert_after (&gsi, note, GSI_SAME_STMT); } }