diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:58:36 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:58:36 +0000 |
commit | cfea6514a4b6ced0930593ebb48d0037e9716d87 (patch) | |
tree | eeccf866e18463f7dc7ea882ea944247d4ed1010 /gcc/tree-ssa-live.c | |
parent | 9456798d72d0e81a2a553287f436dcb05cff175a (diff) | |
download | gcc-cfea6514a4b6ced0930593ebb48d0037e9716d87.tar.gz |
[./]
2013-11-22 Basile Starynkevitch <basile@starynkevitch.net>
{{merge with trunk GCC 4.9 svn rev 205247 now in stage 3}}
[gcc/]
2013-11-22 Basile Starynkevitch <basile@starynkevitch.net>
{{merge with trunk GCC 4.9 svn rev 205247 now in stage 3}}
* Makefile.in (MELT_GCC_VERSION_NUM): New make variable.
(melt-run-md5.h, melt-run.h): Use it.
* melt-runtime.cc: With GCC 4.9 include print-tree.h,
gimple-iterator.h, gimple-walk.h.
(meltgc_start_all_new_modules, meltgc_start_flavored_module)
(meltgc_do_initial_mode, meltgc_set_user_options)
(meltgc_load_modules_and_do_mode): Improve debugprintf...
(melt_gt_ggc_mx_gimple_seq_d): Handle GCC 4.9 specifically.
* melt-runtime.h (gt_ggc_mx_gimple_statement_d): Temporarily
define this macro.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@205264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index 17849a21159..e46f20af0af 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -28,10 +28,13 @@ along with GCC; see the file COPYING3. If not see #include "bitmap.h" #include "sbitmap.h" #include "gimple.h" +#include "gimple-iterator.h" #include "gimple-ssa.h" #include "tree-phinodes.h" #include "ssa-iterators.h" +#include "stringpool.h" #include "tree-ssanames.h" +#include "expr.h" #include "tree-dfa.h" #include "timevar.h" #include "dumpfile.h" @@ -596,11 +599,11 @@ remove_unused_scope_block_p (tree scope) eliminated. */ else if (!nsubblocks) ; - /* For terse debug info we can eliminate info on unused variables. */ - else if (debug_info_level == DINFO_LEVEL_NONE - || debug_info_level == DINFO_LEVEL_TERSE) + /* When not generating debug info we can eliminate info on unused + variables. */ + else if (debug_info_level == DINFO_LEVEL_NONE) { - /* Even for -g0/-g1 don't prune outer scopes from artificial + /* Even for -g0 don't prune outer scopes from artificial functions, otherwise diagnostics using tree_nonartificial_location will not be emitted properly. */ if (inlined_function_outer_scope_p (scope)) @@ -1006,7 +1009,7 @@ loe_visit_block (tree_live_info_p live, basic_block bb, sbitmap visited, FOR_EACH_EDGE (e, ei, bb->preds) { pred_bb = e->src; - if (pred_bb == ENTRY_BLOCK_PTR) + if (pred_bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)) continue; /* TMP is variables live-on-entry from BB that aren't defined in the predecessor block. This should be the live on entry vars to pred. @@ -1084,7 +1087,7 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live) bitmap_set_bit (&live->liveout[def_bb->index], p); } else - def_bb = ENTRY_BLOCK_PTR; + def_bb = ENTRY_BLOCK_PTR_FOR_FN (cfun); /* Visit each use of SSA_NAME and if it isn't in the same block as the def, add it to the list of live on entry blocks. */ @@ -1100,7 +1103,7 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live) defined in that block, or whether its live on entry. */ int index = PHI_ARG_INDEX_FROM_USE (use); edge e = gimple_phi_arg_edge (use_stmt, index); - if (e->src != ENTRY_BLOCK_PTR) + if (e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun)) { if (e->src != def_bb) add_block = e->src; @@ -1166,14 +1169,14 @@ calculate_live_on_exit (tree_live_info_p liveinfo) if (p == NO_PARTITION) continue; e = gimple_phi_arg_edge (phi, i); - if (e->src != ENTRY_BLOCK_PTR) + if (e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun)) bitmap_set_bit (&liveinfo->liveout[e->src->index], p); } } /* Add each successors live on entry to this bock live on exit. */ FOR_EACH_EDGE (e, ei, bb->succs) - if (e->dest != EXIT_BLOCK_PTR) + if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)) bitmap_ior_into (&liveinfo->liveout[bb->index], live_on_entry (liveinfo, e->dest)); } @@ -1366,12 +1369,12 @@ verify_live_on_entry (tree_live_info_p live) /* Check for live on entry partitions and report those with a DEF in the program. This will typically mean an optimization has done something wrong. */ - bb = ENTRY_BLOCK_PTR; + bb = ENTRY_BLOCK_PTR_FOR_FN (cfun); num = 0; FOR_EACH_EDGE (e, ei, bb->succs) { int entry_block = e->dest->index; - if (e->dest == EXIT_BLOCK_PTR) + if (e->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)) continue; for (i = 0; i < (unsigned)num_var_partitions (map); i++) { |