re PR debug/43593 (Var-tracking unnecessarily flushes all call used registers on calls instead of regs invalidated by call)
PR debug/43593 * var-tracking.c (dataflow_set_clear_at_call): Invalidate just regs_invalidated_by_call instead all call_used_reg_set registers. * gcc.dg/guality/pr43593.c: New test. From-SVN: r157834
This commit is contained in:
parent
8533c9d8ac
commit
03a5f060b9
4 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-03-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/43593
|
||||
* var-tracking.c (dataflow_set_clear_at_call): Invalidate
|
||||
just regs_invalidated_by_call instead all call_used_reg_set
|
||||
registers.
|
||||
|
||||
2010-03-30 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR middle-end/43430
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-03-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/43593
|
||||
* gcc.dg/guality/pr43593.c: New test.
|
||||
|
||||
2010-03-30 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR middle-end/43430
|
||||
|
|
24
gcc/testsuite/gcc.dg/guality/pr43593.c
Normal file
24
gcc/testsuite/gcc.dg/guality/pr43593.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* PR debug/43593 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-g" } */
|
||||
|
||||
void __attribute__((noinline))
|
||||
bar (int *p)
|
||||
{
|
||||
asm volatile ("" : : "r" (p) : "memory");
|
||||
}
|
||||
|
||||
int __attribute__((noinline))
|
||||
foo (void)
|
||||
{
|
||||
int i, *j = &i;
|
||||
bar (j);
|
||||
return 6 + i; /* { dg-final { gdb-test 16 "j" "&i" } } */
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
foo ();
|
||||
return 0;
|
||||
}
|
|
@ -4170,7 +4170,7 @@ dataflow_set_clear_at_call (dataflow_set *set)
|
|||
int r;
|
||||
|
||||
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
|
||||
if (TEST_HARD_REG_BIT (call_used_reg_set, r))
|
||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, r))
|
||||
var_regno_delete (set, r);
|
||||
|
||||
if (MAY_HAVE_DEBUG_INSNS)
|
||||
|
|
Loading…
Add table
Reference in a new issue