]>
Commit | Line | Data |
---|---|---|
2df80c7b PS |
1 | --- gcc-4.0.0-20050417/gcc/reload.c.orig 2005-04-19 18:30:49.000000000 +0200 |
2 | +++ gcc-4.0.0-20050417/gcc/reload.c 2005-04-19 18:30:52.000000000 +0200 | |
3 | @@ -1520,7 +1520,7 @@ push_reload (rtx in, rtx out, rtx *inloc | |
4 | But if there is no spilling in this block, that is OK. | |
5 | An explicitly used hard reg cannot be a spill reg. */ | |
6 | ||
7 | - if (rld[i].reg_rtx == 0 && in != 0) | |
8 | + if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known) | |
9 | { | |
10 | rtx note; | |
11 | int regno; | |
12 | @@ -1534,6 +1534,9 @@ push_reload (rtx in, rtx out, rtx *inloc | |
13 | && REG_P (XEXP (note, 0)) | |
14 | && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER | |
15 | && reg_mentioned_p (XEXP (note, 0), in) | |
16 | + && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER | |
17 | + || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end, | |
18 | + ORIGINAL_REGNO (XEXP (note, 0)))) | |
19 | && ! refers_to_regno_for_reload_p (regno, | |
20 | (regno | |
21 | + hard_regno_nregs[regno] | |
22 | @@ -1997,7 +2000,16 @@ find_dummy_reload (rtx real_in, rtx real | |
23 | is a subreg, and in that case, out | |
24 | has a real mode. */ | |
25 | (GET_MODE (out) != VOIDmode | |
26 | - ? GET_MODE (out) : outmode))) | |
27 | + ? GET_MODE (out) : outmode)) | |
28 | + /* But only do all this if we can be sure, that this input | |
29 | + operand doesn't correspond with an uninitialized pseudoreg. | |
30 | + global can assign some hardreg to it, which is the same as | |
31 | + a different pseudo also currently live (as it can ignore the | |
32 | + conflict). So we never must introduce writes to such hardregs, | |
33 | + as they would clobber the other live pseudo using the same. */ | |
34 | + && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER | |
35 | + || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end, | |
36 | + ORIGINAL_REGNO (in)))) | |
37 | { | |
38 | unsigned int regno = REGNO (in) + in_offset; | |
39 | unsigned int nwords = hard_regno_nregs[regno][inmode]; |