Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement while/for loops in MLIR #203

Closed
rengolin opened this issue Jul 23, 2020 · 1 comment · Fixed by #256
Closed

Implement while/for loops in MLIR #203

rengolin opened this issue Jul 23, 2020 · 1 comment · Fixed by #256
Assignees

Comments

@rengolin
Copy link
Contributor

With the dialect effort starting up, it's the right time to start using Verona dialect on the MLIR lowering, at least for the high level structure.

In Verona, for loops are syntactic sugar for while loops in the following way:

for (a in x) {
   foo(a);
}

equals:

{
  var $iter = x;
  while ($iter.has_value())
  {
    a = $iter.apply();
    $iter.next();
    foo(a);
  }
}
@rengolin
Copy link
Contributor Author

In the end, this did not bring the benefits we were expecting, so I'll revert the patch creating loop regions, and continue working on loops as control flow. This will remove the new operations (loop_exit, loop_return, continue, break) and the region based approach.

@rengolin rengolin changed the title Implement while/for loops as a dialect construct Implement while/for loops in MLIR Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant