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]

[GSoC] generation of Gimple code from isl_ast_node_if


I've attached the patch, which contains generation of Gimple code from
isl_ast_node_if.

However, I've found out a problem. When I'm trying to generate Gimple
code from, for example, the following ISL AST:

{
  for (int c1 = 0; c1 <= 49; c1 += 1) {
    S_6(c1);
    if (c1 <= 48) {
      S_3(c1);
      if (c1 >= 24)
        S_4(c1);
      S_5(c1);
    }
  }
  S_7();
}

the pointer to Gimple basic block of S_3's poly basic block is NULL.

Could you please advise me possible reasons of this issue?

The source code of the example:

int
foo ()
{
  int i, res = 0;

  for (i = 0; i < 50; i++)
    {
      if (i >= 25)
        res += i;
    }

  return res;
}

extern void abort ();

int
main (void)
{
  int res = foo ();

  if (res != 1225)
    abort ();

  return 0;
}

--
                                   Cheers, Roman Gareev.

Attachment: patch.txt
Description: Text document


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