-
Notifications
You must be signed in to change notification settings - Fork 1
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
Henrik/mlir linkage b and c #19
Conversation
This ensures that the linkage-b test pass. There is still some work to be done with respect to DataLayout. The current approach uses attributes directly. Moving forward, this should probably use either the DataLayout interfaces or a custom DataLayout structure.
/*methodName=*/ "setLinkage", | ||
/*args=*/(ins "::mlir::link::Linkage":$linkage), | ||
/*methodBody=*/"", | ||
/*defaultImplementation=*/[{ }] |
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.
I would like this not to stay empty. As it might be source of bugs if you forget to implement it.
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.
Good catch! That's an oversight of me. I'll fix it.
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.
I'm struggling a bit to get this working. To clarify, did you intend for me to implement either of these scenarios?
/*defaultImplementation=*/""
/*defaultImplementation=*/[{ actual default implementation }]
Right now, no matter how I do this (seemingly) I get redeclaration errors. I think this might have something to do:
def LLVM_GlobalOp : LLVM_Op<"mlir.global",
[IsolatedFromAbove, SingleBlockImplicitTerminator<"ReturnOp">, Symbol,
GlobalVariableLinkageOpInterface,
DeclareOpInterfaceMethods<GlobalValueLinkageOpInterface>,
DeclareOpInterfaceMethods<GlobalVariableLinkageOpInterface>]> {
Any hints?
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.
I wanted you to drop
/*methodBody=*/"",
/*defaultImplementation=*/[{ }]
and only add definition on missing classes
This allows both
linkage-b.mlir
andlinkage-c.mlir
to pass.