]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-pr26209.patch
- updated to 4.1.0-20060216r111126, pr26209 fixed.
[packages/gcc.git] / gcc-pr26209.patch
CommitLineData
6173ed7e
PS
1--- gcc-4_1-branch/gcc/Makefile.in.orig 2006-02-16 08:20:14.000000000 +0000
2+++ gcc-4_1-branch/gcc/Makefile.in 2006-02-16 08:24:15.000000000 +0000
3@@ -1842,7 +1842,7 @@
4 $(DIAGNOSTIC_H) errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h \
5 $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \
6 $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) toplev.h \
7- tree-ssa-propagate.h
8+ tree-ssa-propagate.h $(SCEV_H)
9 tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
10 $(RTL_H) $(TREE_H) $(TM_P_H) function.h $(TM_H) coretypes.h \
11 $(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h tree-pass.h $(FLAGS_H) langhooks.h \
12--- gcc-4_1-branch/gcc/tree-cfg.c.orig 2006-02-10 08:46:43.000000000 +0000
13+++ gcc-4_1-branch/gcc/tree-cfg.c 2006-02-16 08:23:29.000000000 +0000
14@@ -1274,10 +1274,7 @@
15 if (TREE_CODE (rhs) == ADDR_EXPR)
16 recompute_tree_invarant_for_addr_expr (rhs);
17
18- /* If the statement could throw and now cannot, we need to prune cfg. */
19- if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
20- tree_purge_dead_eh_edges (bb_for_stmt (stmt));
21-
22+ maybe_clean_or_replace_eh_stmt (stmt, stmt);
23 mark_new_vars_to_rename (stmt);
24 }
25
26--- gcc-4_1-branch/gcc/tree-cfgcleanup.c.orig 2006-02-16 08:23:15.000000000 +0000
27+++ gcc-4_1-branch/gcc/tree-cfgcleanup.c 2006-02-16 08:24:15.000000000 +0000
28@@ -45,6 +45,7 @@
29 #include "cfglayout.h"
30 #include "hashtab.h"
31 #include "tree-ssa-propagate.h"
32+#include "tree-scalar-evolution.h"
33
34 /* Remove any fallthru edge from EV. Return true if an edge was removed. */
35
36@@ -157,19 +158,24 @@
37 {
38 bsi = bsi_last (bb);
39
40+ /* If the last statement of the block could throw and now cannot,
41+ we need to prune cfg. */
42+ tree_purge_dead_eh_edges (bb);
43+
44 if (bsi_end_p (bsi))
45 continue;
46
47 stmt = bsi_stmt (bsi);
48+
49 if (TREE_CODE (stmt) == COND_EXPR
50 || TREE_CODE (stmt) == SWITCH_EXPR)
51 retval |= cleanup_control_expr_graph (bb, bsi);
52-
53 /* If we had a computed goto which has a compile-time determinable
54 destination, then we can eliminate the goto. */
55- if (TREE_CODE (stmt) == GOTO_EXPR
56- && TREE_CODE (GOTO_DESTINATION (stmt)) == ADDR_EXPR
57- && TREE_CODE (TREE_OPERAND (GOTO_DESTINATION (stmt), 0)) == LABEL_DECL)
58+ else if (TREE_CODE (stmt) == GOTO_EXPR
59+ && TREE_CODE (GOTO_DESTINATION (stmt)) == ADDR_EXPR
60+ && (TREE_CODE (TREE_OPERAND (GOTO_DESTINATION (stmt), 0))
61+ == LABEL_DECL))
62 {
63 edge e;
64 tree label;
65@@ -213,7 +219,7 @@
66
67 /* Check for indirect calls that have been turned into
68 noreturn calls. */
69- if (noreturn_call_p (stmt) && remove_fallthru_edge (bb->succs))
70+ else if (noreturn_call_p (stmt) && remove_fallthru_edge (bb->succs))
71 {
72 free_dominance_info (CDI_DOMINATORS);
73 retval = true;
74@@ -570,23 +576,26 @@
75 void
76 cleanup_tree_cfg_loop (void)
77 {
78- bitmap changed_bbs = BITMAP_ALLOC (NULL);
79-
80- cleanup_tree_cfg ();
81+ bool changed = cleanup_tree_cfg ();
82
83- fix_loop_structure (current_loops, changed_bbs);
84- calculate_dominance_info (CDI_DOMINATORS);
85+ if (changed)
86+ {
87+ bitmap changed_bbs = BITMAP_ALLOC (NULL);
88+ fix_loop_structure (current_loops, changed_bbs);
89+ calculate_dominance_info (CDI_DOMINATORS);
90
91- /* This usually does nothing. But sometimes parts of cfg that originally
92- were inside a loop get out of it due to edge removal (since they
93- become unreachable by back edges from latch). */
94- rewrite_into_loop_closed_ssa (changed_bbs, TODO_update_ssa);
95+ /* This usually does nothing. But sometimes parts of cfg that originally
96+ were inside a loop get out of it due to edge removal (since they
97+ become unreachable by back edges from latch). */
98+ rewrite_into_loop_closed_ssa (changed_bbs, TODO_update_ssa);
99
100- BITMAP_FREE (changed_bbs);
101+ BITMAP_FREE (changed_bbs);
102
103 #ifdef ENABLE_CHECKING
104- verify_loop_structure (current_loops);
105+ verify_loop_structure (current_loops);
106 #endif
107+ scev_reset ();
108+ }
109 }
110
111 /* Merge the PHI nodes at BB into those at BB's sole successor. */
112--- gcc-4_1-branch/gcc/tree-ssa-loop.c.orig 2005-11-30 11:16:27.000000000 +0000
113+++ gcc-4_1-branch/gcc/tree-ssa-loop.c 2006-02-16 08:23:29.000000000 +0000
114@@ -303,7 +303,8 @@
115 0, /* properties_provided */
116 0, /* properties_destroyed */
117 0, /* todo_flags_start */
118- TODO_dump_func | TODO_update_ssa_only_virtuals,
119+ TODO_dump_func | TODO_cleanup_cfg
120+ | TODO_update_ssa_only_virtuals,
121 /* todo_flags_finish */
122 0 /* letter */
123 };
This page took 0.053158 seconds and 4 git commands to generate.