re PR rtl-optimization/44194 (struct returned by value generates useless stores)
authorEaswaran Raman <eraman@google.com>
Tue, 14 Jun 2011 22:58:20 +0000 (22:58 +0000)
committerEaswaran Raman <eraman@gcc.gnu.org>
Tue, 14 Jun 2011 22:58:20 +0000 (22:58 +0000)
commitd26c70902d9b43da2a717acae8046c63fc0ab0ae
tree662b41a9892d0c4bf66e9033dbc6f4d7251dc841
parentd2393b3adbf064b100eab5050278d71302ce7d1d
re PR rtl-optimization/44194 (struct returned by value generates useless stores)

2011-06-14  Easwaran Raman  <eraman@google.com>

       PR rtl-optimization/44194
       * dse.c: Include tree-flow.h
       (insn_info): Add new field non_frame_wild_read.
       (group_info): Add new fields escaped_n and escaped_p.
       (kill_on_calls): New variable.
       (get_group_info): Initialize gi->escaped_n and gi->escaped_p.
       (dse_step0): Initialize kill_on_calls.
       (can_escape): New function.
       (set_usage_bits): Add additional parameter; record information
       about escaped locations.
       (record_store): Pass EXPR corresponding to MEM to
       set_usage_bits.
       (dse_step2_nospill): Set kill_on_calls based on
       group->escaped_n and group->escaped_n.
       (add_wild_read): Refactor into...
       (reset_active_stores): ... New method, and
       (free_read_records): ... New method.
       (add_non_frame_wild_read): New method.
       (scan_insn): Call add_non_frame_wild_read on non-const calls.
       (scan_reads_nospill): Handle instructions with
       non_frame_wild_read.
       (dse_step5_nospill): Call scan_reads_nospill for instructions
       marked as non_frame_wild_read.
       (dse_step7): Free escaped_n, escaped_p and kill_on_calls
       bitmaps.

testsuite/ChangeLog

2011-06-14  Easwaran Raman  <eraman@google.com>

       PR rtl-optimization/44194
       * gcc.dg/pr44194-1.c: New test.
       * gcc.dg/pr44194-2.c: New test.

From-SVN: r175063
gcc/ChangeLog
gcc/dse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr44194-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr44194-2.c [new file with mode: 0644]