This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed, gomp4] Fix release_dangling_ssa_names
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 5 Aug 2015 10:47:43 +0200
- Subject: Re: [committed, gomp4] Fix release_dangling_ssa_names
- Authentication-results: sourceware.org; auth=none
- References: <546743BC dot 5070804 at mentor dot com> <54678B3D dot 8020009 at mentor dot com> <54730EE7 dot 40000 at mentor dot com> <5474665A dot 4070101 at mentor dot com> <87iocp1d8o dot fsf at kepler dot schwinge dot homeip dot net> <alpine dot LSU dot 2 dot 11 dot 1504220932150 dot 20496 at zhemvz dot fhfr dot qr> <557076A5 dot 7050207 at mentor dot com> <55C1BA11 dot 70008 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1508050928320 dot 19642 at zhemvz dot fhfr dot qr>
On 05/08/15 09:29, Richard Biener wrote:
This patch fixes that by making sure we reset the def stmt to NULL. This means
>we can simplify release_dangling_ssa_names to just test for NULL def stmts.
Not sure if I understand the problem correctly but why are you not simply
releasing the SSA name when you remove its definition?
In move_sese_region_to_fn we move a region of blocks from one function
to another, bit by bit.
When we encounter an ssa_name as def or use in the region, we:
- generate a new ssa_name,
- set the def stmt of the old name as def stmt of the new name, and
- add a mapping from the old to the new name.
The next time we encounter the same ssa_name in another statement, we
find it in the map.
If we release the old ssa name, we effectively create statements with
operands in the free-list. The first point where that cause breakage, is
in walk_gimple_op, which expects the TREE_TYPE of the lhs of an assign
to be defined, which is not the case if it's in the free-list:
...
case GIMPLE_ASSIGN:
/* Walk the RHS operands. If the LHS is of a non-renamable type or
is a register variable, we may use a COMPONENT_REF on the RHS.*/
if (wi)
{
tree lhs = gimple_assign_lhs (stmt);
wi->val_only
= (is_gimple_reg_type (TREE_TYPE (lhs)) && !is_gimple_reg (lhs))
|| gimple_assign_rhs_class (stmt) != GIMPLE_SINGLE_RHS;
}
...
Thanks,
- Tom