summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-23 12:53:36 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-23 12:53:36 +0000
commit65cbf05437b8a57ff08846beb19407c9e0dd2553 (patch)
tree0b0bd391a56275bab5bf67e4094d9b7a24ade79c /gcc/except.c
parent381399a9fee786a047529a0f7de787de475ab97c (diff)
downloadgcc-65cbf05437b8a57ff08846beb19407c9e0dd2553.tar.gz
2012-04-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 186692 using svnmerge [gcc/] 2012-04-23 Basile Starynkevitch <basile@starynkevitch.net> {{improvements for merging with GCC 4.8 trunk svn rev 186692}} * melt-run.proto.h (MELT_GCC_VERSION): Define, if unknown, in the generated melt-run.h * melt-runtime.c (melt_val2passflag): TODO_dump_func & TODO_dump_cgraph don't exist in GCC 4.8. * melt-build.tpl: Say flavor, not variant! Build first the quicklybuilt application modules, to catch error in macro C strings... * melt-build.mk: Regenerate. * melt/warmelt-base.melt (valdesc_strbuf): Check for MELT_GCC_VERSION also. * melt/warmelt-genobj.melt (compilobj_nrep_citeration): Use meltcit prefix in generated citerator names.. * melt/warmelt-outobj.melt (syntestgen_citerator): Use meltcitstate prefix. * melt/xtramelt-ana-base.melt (each_cgraph_fun_body) (each_cgraph_fun_entryblock, each_cgraph_fun_call_flow_graph) (each_bb_cfun, with_cfun_decl): Adapt to GCC 4.8, add documentation. (each_cgraph_decl): Only for GCC 4.6 & 4.7 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@186705 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c49
1 files changed, 41 insertions, 8 deletions
diff --git a/gcc/except.c b/gcc/except.c
index e3a9ef07422..254dd8c32ae 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1344,6 +1344,28 @@ sjlj_emit_dispatch_table (rtx dispatch_label, int num_dispatch)
e = make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
e->count = bb->count;
e->probability = REG_BR_PROB_BASE;
+ if (current_loops)
+ {
+ struct loop *loop = bb->next_bb->loop_father;
+ /* If we created a pre-header block, add the new block to the
+ outer loop, otherwise to the loop itself. */
+ if (bb->next_bb == loop->header)
+ add_bb_to_loop (bb, loop_outer (loop));
+ else
+ add_bb_to_loop (bb, loop);
+ /* ??? For multiple dispatches we will end up with edges
+ from the loop tree root into this loop, making it a
+ multiple-entry loop. Discard all affected loops. */
+ if (num_dispatch > 1)
+ {
+ for (loop = bb->loop_father;
+ loop_outer (loop); loop = loop_outer (loop))
+ {
+ loop->header = NULL;
+ loop->latch = NULL;
+ }
+ }
+ }
disp_index++;
}
@@ -1364,6 +1386,24 @@ sjlj_emit_dispatch_table (rtx dispatch_label, int num_dispatch)
e = make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
e->count = bb->count;
e->probability = REG_BR_PROB_BASE;
+ if (current_loops)
+ {
+ struct loop *loop = bb->next_bb->loop_father;
+ /* If we created a pre-header block, add the new block to the
+ outer loop, otherwise to the loop itself. */
+ if (bb->next_bb == loop->header)
+ add_bb_to_loop (bb, loop_outer (loop));
+ else
+ add_bb_to_loop (bb, loop);
+ }
+ }
+ else
+ {
+ /* We are not wiring up edges here, but as the dispatcher call
+ is at function begin simply associate the block with the
+ outermost (non-)loop. */
+ if (current_loops)
+ add_bb_to_loop (bb, current_loops->tree_root);
}
}
@@ -2774,8 +2814,6 @@ output_ttype (tree type, int tt_format, int tt_format_size)
value = const0_rtx;
else
{
- struct varpool_node *node;
-
/* FIXME lto. pass_ipa_free_lang_data changes all types to
runtime types so TYPE should already be a runtime type
reference. When pass_ipa_free_lang data is made a default
@@ -2794,12 +2832,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
{
type = TREE_OPERAND (type, 0);
if (TREE_CODE (type) == VAR_DECL)
- {
- node = varpool_node (type);
- if (node)
- varpool_mark_needed_node (node);
- is_public = TREE_PUBLIC (type);
- }
+ is_public = TREE_PUBLIC (type);
}
else
gcc_assert (TREE_CODE (type) == INTEGER_CST);