This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reload bug & SRA oddness


On 4/29/07, Richard Guenther <richard.guenther@gmail.com> wrote:
On 4/29/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> Now the problem with DSE seems to be that for
>
> (gdb) call debug_generic_expr (stmt)
> # SFT.84_24 = VDEF <SFT.84_10(D)> { SFT.84 }
> y.k = y$k_23(D)
> (gdb) call debug_generic_expr (use_stmt)
> # VUSE <sD_9(D)> { sD }
> # SFT.84_14 = VDEF <SFT.84_24>
> # SFT.85_15 = VDEF <SFT.85_11(D)>
> # SFT.86_16 = VDEF <SFT.86_12(D)>
> # SFT.87_17 = VDEF <SFT.87_13(D)> { SFT.84 SFT.85 SFT.86 SFT.87 }
> y = sD
>
> at tree-ssa-dse.c:604 (the call to dse_partial_kill_p):
>
>       /* If we have precisely one immediate use at this point, then we may
>          have found redundant store.  Make sure that the stores are to
>          the same memory location.  This includes checking that any
>          SSA-form variables in the address will have the same values.  */
>       if (use_p != NULL_USE_OPERAND_P
>           && bitmap_bit_p (dse_gd->stores, get_stmt_uid (use_stmt))
>           && (operand_equal_p (GIMPLE_STMT_OPERAND (stmt, 0),
>                                GIMPLE_STMT_OPERAND (use_stmt, 0), 0)
>               || dse_partial_kill_p (stmt, dse_gd))
>           && memory_address_same (stmt, use_stmt))
>
> dse_partial_kill_p does not do what its same suggests, but first asserts
> that stmt stores to all of the aggregate (which it of course does not).
> It _looks_ like that maybe dse_partial_kill_p (use_stmt, dse_gd) was
> intended here.  Otherwise DSE detects stmt as possible dead store.

Oh, and that doesn't work because we don't visit

  # SFT.84D.1820_19 = VDEF <SFT.84D.1820_28>
  # SFT.85D.1821_20 = VDEF <SFT.85D.1821_15>
  # SFT.86D.1822_21 = VDEF <SFT.86D.1822_16>
  # SFT.87D.1823_22 = VDEF <SFT.87D.1823_17>
  yD.1648 = retmeD (yD.1648) [return slot optimization];

and thus don't record y as dse_whole_aggregate_clobbered_p.

We don't record whole-aggregate sets in that bitmap anyway.


Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]