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: [patch] Fix PR43464: update loop closed SSA form once copy prop is done


On Thu, Apr 1, 2010 at 08:46, Sebastian Pop <sebpop@gmail.com> wrote:
> Hi,
>
> On Thu, Apr 1, 2010 at 05:28, Michael Matz <matz@suse.de> wrote:
>>> Michael, do you see other places in graphite-sese-to-poly.c that
>>> may still have similar problems?
>>
>> No, that's the one I meant. ?1) Are you sure BB->loop structure is current
>> when that function is called, so that loop_exit_edge_p works?
>
> yes.
>
> I found another problem a few lines below that point: in
> rewrite_close_phi_out_of_ssa we assume that the phi node has
> only one argument:
>
> ?tree arg = gimple_phi_arg_def (phi, 0);
>
> I am working on correcting this.

Actually there is no problem with all these assumptions in Graphite,
as we transform the loop closed ssa form in a canonical form:

/* Converts the current loop closed SSA form to a canonical form
   expected by the Graphite code generation.

   The loop closed SSA form has the following invariant: a variable
   defined in a loop that is used outside the loop appears only in the
   phi nodes in the destination of the loop exit.  These phi nodes are
   called close phi nodes.

   The canonical loop closed SSA form contains the extra invariants:

   - when the loop contains only one exit, the close phi nodes contain
   only one argument.  That implies that the basic block that contains
   the close phi nodes has only one predecessor, that is a basic block
   in the loop.

   - the basic block containing the close phi nodes does not contain
   other statements.
*/

static void
canonicalize_loop_closed_ssa_form (void)

Sebastian


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