diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-09-11 21:03:26 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-09-11 21:03:26 +0000 |
commit | b5d7770c3e686d58e4ce1e1b49c35eec2c0475bb (patch) | |
tree | 1d26f3ff7a587dc7f37d23724c0dac8615974381 /gcc/integrate.c | |
parent | da88b352787b53926ba3038983289a59ddaea887 (diff) | |
download | gcc-b5d7770c3e686d58e4ce1e1b49c35eec2c0475bb.zip gcc-b5d7770c3e686d58e4ce1e1b49c35eec2c0475bb.tar.gz gcc-b5d7770c3e686d58e4ce1e1b49c35eec2c0475bb.tar.bz2 |
print-rtl.c (debug_call_placeholder_verbose): New variable.
* print-rtl.c (debug_call_placeholder_verbose): New variable.
(print_rtx) [CALL_PLACEHOLDER]: Dump all call sequences if it is
set.
* integrate.c (copy_rtx_and_substitute): Don't share
LEAF_REG_REMAPpable registers with the inlined function. Don't
share the function value with calling sequences.
From-SVN: r36329
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 7066675..6128aaf 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1746,7 +1746,15 @@ copy_rtx_and_substitute (orig, map, for_lhs) { /* Some hard registers are also mapped, but others are not translated. */ - if (map->reg_map[regno] != 0) + if (map->reg_map[regno] != 0 + /* We shouldn't usually have reg_map set for return + register, but it may happen if we have leaf-register + remapping and the return register is used in one of + the calling sequences of a call_placeholer. In this + case, we'll end up with a reg_map set for this + register, but we don't want to use for registers + marked as return values. */ + && ! REG_FUNCTION_VALUE_P (orig)) return map->reg_map[regno]; /* If this is the virtual frame pointer, make space in current @@ -1757,7 +1765,7 @@ copy_rtx_and_substitute (orig, map, for_lhs) equivalence for it to be the address. This will substitute the address into insns where it can be substituted and use the new pseudo where it can't. */ - if (regno == VIRTUAL_STACK_VARS_REGNUM) + else if (regno == VIRTUAL_STACK_VARS_REGNUM) { rtx loc, seq; int size = get_func_frame_size (DECL_SAVED_INSNS (map->fndecl)); @@ -1844,7 +1852,26 @@ copy_rtx_and_substitute (orig, map, for_lhs) else return map->inline_target; } - return orig; +#if defined (LEAF_REGISTERS) && defined (LEAF_REG_REMAP) + /* If leaf_renumber_regs_insn() might remap this register to + some other number, make sure we don't share it with the + inlined function, otherwise delayed optimization of the + inlined function may change it in place, breaking our + reference to it. We may still shared it within the + function, so create an entry for this register in the + reg_map. */ + if (map->integrating && regno < FIRST_PSEUDO_REGISTER + && LEAF_REGISTERS[regno] && LEAF_REG_REMAP (regno) != regno) + { + temp = gen_rtx_REG (mode, regno); + map->reg_map[regno] = temp; + return temp; + } +#endif + else + return orig; + + abort (); } if (map->reg_map[regno] == NULL) { |