summaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-27 08:20:39 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-27 08:20:39 +0000
commit63f88450d46e1453137aa58c1808134fe68a8f18 (patch)
tree27999109f6865e3cf09cab56d6dcff63b98e5594 /gcc/tree-pretty-print.c
parent8d91a9b7a1b6b01a0a1b8c4321274f9fbed7cff6 (diff)
downloadgcc-63f88450d46e1453137aa58c1808134fe68a8f18.tar.gz
* tree-ssa-loop-im.c (determine_invariantness_stmt): Attempt to
transform only GIMPLE_MODIFY_STMTs. * tree-complex.c (expand_complex_operations_1): Ditto. (expand_complex_div_wide): Do not create gotos in COND_EXPR branches. * tree-ssa-loop-manip.c (build_if_stmt): Removed. (tree_transform_and_unroll_loop): Do not create gotos in COND_EXPR branches. * value-prof.c (tree_divmod_fixed_value, tree_mod_pow2, tree_mod_subtract, tree_ic, tree_stringop_fixed_value): Ditto. * omp-low.c (expand_parallel_call, expand_omp_for_generic, expand_omp_for_static_chunk, expand_omp_for_static_nochunk): Ditto. * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes, slpeel_add_loop_guard): Ditto. * tree-mudflap.c (mf_build_check_statement_for): Ditto. * lambda-code.c (perfect_nestify): Ditto. * tree-iterator.c (tsi_split_statement_list_before): Fix splitting before the first statement. * tree-optimize.c (execute_free_datastructures): Fix comments. (execute_free_cfg_annotations): Do not call disband_implicit_edges. * tree-flow.h (disband_implicit_edges): Declaration removed. * tree-cfg.c (make_cond_expr_edges): Remove gotos from COND_EXPR branches. (cleanup_dead_labels, tree_redirect_edge_and_branch): Handle COND_EXPRs without gotos. (disband_implicit_edges, has_label_p): Removed. (tree_verify_flow_info): Verify that COND_EXPR branches are empty. (tree_lv_add_condition_to_bb): Do not create gotos in COND_EXPR branches. * tree.c (build3_stat): Mark COND_EXPRs used as statements as having side effects. * tree-pretty-print.c (dump_implicit_edges): Dump implicit edges also for COND_EXPRs. * cfgexpand.c (label_rtx_for_bb): New function. (expand_gimple_cond_expr): Do not expect gotos in COND_EXPR branches. Use label_rtx_for_bb to find the labels. (expand_gimple_basic_block): Remove RETURN_EXPR at the end of the last block. Detect fallthru edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124214 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 32f8ac00d37..09d203fa29b 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -2958,6 +2958,29 @@ dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent,
{
edge e;
edge_iterator ei;
+ tree stmt;
+
+ stmt = last_stmt (bb);
+ if (stmt && TREE_CODE (stmt) == COND_EXPR)
+ {
+ edge true_edge, false_edge;
+
+ /* When we are emitting the code or changing CFG, it is possible that
+ the edges are not yet created. When we are using debug_bb in such
+ a situation, we do not want it to crash. */
+ if (EDGE_COUNT (bb->succs) != 2)
+ return;
+ extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
+
+ INDENT (indent + 2);
+ pp_cfg_jump (buffer, true_edge->dest);
+ newline_and_indent (buffer, indent);
+ pp_string (buffer, "else");
+ newline_and_indent (buffer, indent + 2);
+ pp_cfg_jump (buffer, false_edge->dest);
+ pp_newline (buffer);
+ return;
+ }
/* If there is a fallthru edge, we may need to add an artificial goto to the
dump. */