1 diff -durN gcc-4.4.0.orig/gcc/Makefile.in gcc-4.4.0/gcc/Makefile.in
2 --- gcc-4.4.0.orig/gcc/Makefile.in 2009-03-25 13:00:32.000000000 +0100
3 +++ gcc-4.4.0/gcc/Makefile.in 2009-05-27 21:38:50.000000000 +0200
5 value-prof.h $(TREE_INLINE_H) $(TARGET_H)
6 cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
7 $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
8 - output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \
9 + output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) $(INSN_ATTR_H) \
10 + insn-config.h $(EXPR_H) \
11 $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
12 tree-pass.h $(DF_H) $(GGC_H)
13 cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
14 diff -durN gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c
15 --- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 22:16:09.000000000 +0100
16 +++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-27 21:38:50.000000000 +0200
21 +#include "insn-attr.h"
22 #include "insn-config.h"
23 #include "cfglayout.h"
30 +rest_of_pass_free_cfg (void)
33 + /* The resource.c machinery uses DF but the CFG isn't guaranteed to be
34 + valid at that point so it would be too late to call df_analyze. */
35 + if (optimize > 0 && flag_delayed_branch)
39 + free_bb_for_insn ();
43 struct rtl_opt_pass pass_free_cfg =
49 - free_bb_for_insn, /* execute */
50 + rest_of_pass_free_cfg, /* execute */
53 0, /* static_pass_number */
54 diff -durN gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c
55 --- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 16:20:38.000000000 +0100
56 +++ gcc-4.4.0/gcc/resource.c 2009-05-27 21:38:50.000000000 +0200
59 find_basic_block (rtx insn, int search_limit)
63 /* Scan backwards to the previous BARRIER. Then see if we can find a
64 label that starts a basic block. Return the basic block number. */
65 for (insn = prev_nonnote_insn (insn);
67 for (insn = next_nonnote_insn (insn);
68 insn && LABEL_P (insn);
69 insn = next_nonnote_insn (insn))
72 - if (insn == BB_HEAD (bb))
75 + if (BLOCK_FOR_INSN (insn))
76 + return BLOCK_FOR_INSN (insn)->index;
81 (with no intervening active insns) to see if any of them start a basic
82 block. If we hit the start of the function first, we use block 0.
84 - Once we have found a basic block and a corresponding first insns, we can
85 - accurately compute the live status from basic_block_live_regs and
86 - reg_renumber. (By starting at a label following a BARRIER, we are immune
87 - to actions taken by reload and jump.) Then we scan all insns between
88 - that point and our target. For each CLOBBER (or for call-clobbered regs
89 - when we pass a CALL_INSN), mark the appropriate registers are dead. For
90 - a SET, mark them as live.
91 + Once we have found a basic block and a corresponding first insn, we can
92 + accurately compute the live status (by starting at a label following a
93 + BARRIER, we are immune to actions taken by reload and jump.) Then we
94 + scan all insns between that point and our target. For each CLOBBER (or
95 + for call-clobbered regs when we pass a CALL_INSN), mark the appropriate
96 + registers are dead. For a SET, mark them as live.
98 We have to be careful when using REG_DEAD notes because they are not
99 updated by such things as find_equiv_reg. So keep track of registers
100 @@ -954,13 +948,10 @@
101 TARGET. Otherwise, we must assume everything is live. */
104 - regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
105 + regset regs_live = df_get_live_in (BASIC_BLOCK (b));
106 rtx start_insn, stop_insn;
108 - /* Compute hard regs live at start of block -- this is the real hard regs
109 - marked live, plus live pseudo regs that have been renumbered to
112 + /* Compute hard regs live at start of block. */
113 REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
115 /* Get starting and ending insn, handling the case where each might
116 @@ -1046,10 +1037,24 @@
118 else if (LABEL_P (real_insn))
122 /* A label clobbers the pending dead registers since neither
123 reload nor jump will propagate a value across a label. */
124 AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs);
125 CLEAR_HARD_REG_SET (pending_dead_regs);
127 + /* We must conservatively assume that all registers that used
128 + to be live here still are. The fallthrough edge may have
129 + left a live register uninitialized. */
130 + bb = BLOCK_FOR_INSN (real_insn);
133 + HARD_REG_SET extra_live;
135 + REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
136 + IOR_HARD_REG_SET (current_live_regs, extra_live);
140 /* The beginning of the epilogue corresponds to the end of the
141 @@ -1121,6 +1126,7 @@
142 init_resource_info (rtx epilogue_insn)
147 /* Indicate what resources are required to be valid at the end of the current
148 function. The condition code never is and memory always is. If the
149 @@ -1189,6 +1195,11 @@
150 /* Allocate and initialize the tables used by mark_target_live_regs. */
151 target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME);
152 bb_ticks = XCNEWVEC (int, last_basic_block);
154 + /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */
156 + if (LABEL_P (BB_HEAD (bb)))
157 + BLOCK_FOR_INSN (BB_HEAD (bb)) = bb;
160 /* Free up the resources allocated to mark_target_live_regs (). This
161 @@ -1197,6 +1208,8 @@
163 free_resource_info (void)
167 if (target_hash_table != NULL)
170 @@ -1222,6 +1235,10 @@
176 + if (LABEL_P (BB_HEAD (bb)))
177 + BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL;
180 /* Clear any hashed information that we have stored for INSN. */