Commit b5d7770c by Alexandre Oliva Committed by Alexandre Oliva

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
parent da88b352
2000-09-11 Alexandre Oliva <aoliva@redhat.com>
* 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.
2000-09-11 Jakub Jelinek <jakub@redhat.com>
* c-decl.c (do_case): Fix a typo.
......
......@@ -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)
{
......
......@@ -63,6 +63,9 @@ int flag_dump_unnumbered = 0;
/* Nonzero if we are dumping graphical description. */
int dump_for_graph;
/* Nonzero to dump all call_placeholder alternatives. */
static int debug_call_placeholder_verbose;
/* Print IN_RTX onto OUTFILE. This is the recursive part of printing. */
static void
......@@ -421,6 +424,37 @@ print_rtx (in_rtx)
break;
case CALL_PLACEHOLDER:
if (debug_call_placeholder_verbose)
{
fputs (" (cond [\n (const_string \"normal\") (sequence [", outfile);
for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
{
fputs ("\n ", outfile);
print_inline_rtx (outfile, tem, 4);
}
tem = XEXP (in_rtx, 1);
if (tem)
fputs ("\n ])\n (const_string \"tail_call\") (sequence [", outfile);
for (; tem != 0; tem = NEXT_INSN (tem))
{
fputs ("\n ", outfile);
print_inline_rtx (outfile, tem, 4);
}
tem = XEXP (in_rtx, 2);
if (tem)
fputs ("\n ])\n (const_string \"tail_recursion\") (sequence [", outfile);
for (; tem != 0; tem = NEXT_INSN (tem))
{
fputs ("\n ", outfile);
print_inline_rtx (outfile, tem, 4);
}
fputs ("\n ])\n ])", outfile);
break;
}
for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
if (GET_CODE (tem) == CALL_INSN)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment