AnyDSL / MimIR

MimIR is my Intermediate Representation
https://anydsl.github.io/MimIR/
MIT License
46 stars 9 forks source link

Higher order codegen #181

Closed NeuralCoder3 closed 1 year ago

NeuralCoder3 commented 1 year ago

This branch contains fixes for higher-order code generation. The fixes regard the llvm backend, memory dialect, and closure conversion dialect.

This branch is the base of the current state of automatic differentiation and the matrix dialect.

Summary

Miscellaneous:

Core

Dialects

Tests

leissa commented 1 year ago

On a more stylistic note, I think we should remove the space just in front of the @ when dumping filters. Say, we have a curried function:

.con foo(a: T)@(.tt)(b: U) = /*...*/

With the current logic, it would look like this:

.con foo(a: T) @(.tt)(b: U) = /*...*/

And now it looks as if the filter belongs to the second curried function.

NeuralCoder3 commented 1 year ago

On a more stylistic note, I think we should remove the space just in front of the @ when dumping filters. Say, we have a curried function:

.con foo(a: T)@(.tt)(b: U) = /*...*/

With the current logic, it would look like this:

.con foo(a: T) @(.tt)(b: U) = /*...*/

And now it looks as if the filter belongs to the second curried function.

Do curried functions still exist at the dumping stage? I would expect them to be syntactic sugar that is resolved at parsing.

leissa commented 1 year ago

On a more stylistic note, I think we should remove the space just in front of the @ when dumping filters. Say, we have a curried function:

.con foo(a: T)@(.tt)(b: U) = /*...*/

With the current logic, it would look like this:

.con foo(a: T) @(.tt)(b: U) = /*...*/

And now it looks as if the filter belongs to the second curried function.

Do curried functions still exist at the dumping stage? I would expect them to be syntactic sugar that is resolved at parsing.

correct. But I still find it better for the sake of consistency to remove the space.