-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bugfix: Change Syntax so that Parentheses are Required for llvm.mlir.constant
#443
Conversation
change from llvm.mlir.constant 8 to llvm.mlir.constant(8) : i64
llvm.mlir.constant
llvm.mlir.constant
llvm.mlir.constant
Nice. There are some build failures, but this looks overall great. @alexkeizer might be able to comment on the lean code more. |
Alive Statistics: 58 / 93 (35 failed) |
Like you say, we should stick with the official grammar, so that's something we should probably address too (at some point, not necessarily in this PR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build fails because there is another file, AliveAutoGenerated
, which has a collection of mlir programs in the DSL too.
It's a bit slow, so we don't build it by default, you have to run lake build AliveExamples
to explicitly build them.
As the name suggests, though, these examples are (mostly) automatically generated. Let's talk a bit more about how to fix this tomorrow
I like this direction. @AtticusKuhn, it might be nice to close this on Monday. |
I realised that I don't actually need this PR to do |
Finishing this PR would be great, but don't hesitate to just close it if this is not relevant anymore. |
Alive Statistics: 63 / 93 (30 failed) |
Alive Statistics: 63 / 93 (30 failed) |
I'm a bit hesitant to change |
That's probably a good idea. I could change the script that generates |
Alive Statistics: 63 / 93 (30 failed) |
Anyway, I've made the parentheses syntax optional, so both %c0 = llvm.mlir.constant 0 and %c0 = llvm.mlir.constant(0 : i32) : i32 are allowed |
parenthesis syntax.
Alive Statistics: 63 / 93 (30 failed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a few minor comments left. Please address those and feel free to merge
Alive Statistics: 59 / 93 (34 failed) |
Alive Statistics: 59 / 93 (34 failed) |
Here is a reference in the LLVM manual:
llvm.mlir.constant (LLVM::ConstantOp)
In the llvm reference manual, parentheses are required after
llvm.mlir.constant
, but the syntax did not require parentheses. Thus, I changed the syntax.It's my intuition that the Lean version of LLVM should stay as close to the real version of LLVM as possible.
This closes #440