diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-12 20:21:59 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-12 20:21:59 +0000 |
commit | 925e86094f7ee4aa04dd04cd04f7deb2348b392f (patch) | |
tree | e07507a7438788aa1e87722aa4308905bc85b8d3 /gcc/df-scan.c | |
parent | 7ff5a76f7e49a8bcd9451912ee8ed4b0dafd15ee (diff) | |
download | gcc-925e86094f7ee4aa04dd04cd04f7deb2348b392f.tar.gz |
gcc/
PR rtl-optimization/51447
* df-scan.c (df_get_entry_block_def_set): Add global regs to the set.
* df-problems.c (df_lr_local_compute): Make global regs always live.
* dce.c (deletable_insn_p): Make insns setting a global reg
inherently necessary.
testsuite/
PR rtl-optimization/51447
* gcc.c-torture/execute/pr51447.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193453 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 23da115f178..566f2375be5 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3790,8 +3790,12 @@ df_get_entry_block_def_set (bitmap entry_block_defs) bitmap_clear (entry_block_defs); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (FUNCTION_ARG_REGNO_P (i)) - bitmap_set_bit (entry_block_defs, INCOMING_REGNO (i)); + { + if (global_regs[i]) + bitmap_set_bit (entry_block_defs, i); + if (FUNCTION_ARG_REGNO_P (i)) + bitmap_set_bit (entry_block_defs, INCOMING_REGNO (i)); + } /* The always important stack pointer. */ bitmap_set_bit (entry_block_defs, STACK_POINTER_REGNUM); |