[vta, vta4.4] merged with trunk and 4.4 @149247, updated VTA patchset
Alexandre Oliva
aoliva@redhat.com
Fri Jul 10 19:08:00 GMT 2009
On Jul 8, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Wed, Jul 8, 2009 at 11:50 PM, Alexandre Oliva<aoliva@redhat.com> wrote:
>> On Jul 8, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
>>> What you do in the hunk I complained about is completely unsafe
>>> if you ever hit dead SSA names.
>>
>> We shouldn't hit dead SSA names. All known cases were ones of *dying*
>> SSA names. Can you think of others?
> The interesting NULL type checks?
Those were precisely for dying SSA names.
>> For the known cases, reverting the order of removal of SSA names works.
>> (just tested)
> Ok. Comments for that code will be appreciated.
Here's what I added to tree-ssa-dce.c:
/* Walking basic blocks and statements in reverse order avoids
releasing SSA names before any other DEFs that refer to them are
released. This helps avoid loss of debug information, as we get
a chance to propagate all RHSs of removed SSAs into debug uses,
rather than only the latest ones. E.g., consider:
x_3 = y_1 + z_2;
a_5 = x_3 - b_4;
# DEBUG a => a_5
If we were to release x_3 before a_5, when we reached a_5 and
tried to substitute it into the debug stmt, we'd see x_3 there,
but x_3's DEF, type, etc would have already been disconnected.
By going backwards, the debug stmt first changes to:
# DEBUG a => x_3 - b_4
and then to:
# DEBUG a => y_1 + z_2 - b_4
as desired. */
tree-cfg.c also required changes in and remove_bb() and
remove_edge_and_dominated_blocks():
/* Walk backwards so as to get a chance to substitute all
released DEFs into debug stmts. See
eliminate_unnecessary_stmts() in tree-ssa-dce.c for more
details. */
for (i = VEC_length (basic_block, bbs_to_remove); i-- > 0; )
delete_basic_block (VEC_index (basic_block, bbs_to_remove, i));
That's all I caught so far.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
More information about the Gcc-patches
mailing list