Skip to content

[mlir] Fix CallOpInterface extraClassDeclaration #81258

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

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

RIscRIpt
Copy link
Member

@RIscRIpt RIscRIpt commented Feb 9, 2024

extraClassDeclaration of CallOpInterface can be inherited by other OpInterfaces into foreign namespaces, thus types must be fully qualified to prevent compiler errors, for example:

def MyCaller : OpInterface<"MyCaller", [CallOpInterface]> {
    let cppNamespace = "::MyNamespace";
}

extraClassDeclaration of CallOpInterface can be inherited by other
OpInterfaces into foreign namespaces, thus types must be fully qualified
to prevent compiler errors, for example:

    def MyCaller : OpInterface<"MyCaller", [CallOpInterface]> {
        let cppNamespace = "::MyNamespace";
    }
@llvmbot llvmbot added the mlir label Feb 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 9, 2024

@llvm/pr-subscribers-mlir

Author: Richard Dzenis (RIscRIpt)

Changes

extraClassDeclaration of CallOpInterface can be inherited by other OpInterfaces into foreign namespaces, thus types must be fully qualified to prevent compiler errors, for example:

def MyCaller : OpInterface&lt;"MyCaller", [CallOpInterface]&gt; {
    let cppNamespace = "::MyNamespace";
}

Full diff: https://github.com/llvm/llvm-project/pull/81258.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Interfaces/CallInterfaces.td (+1-1)
diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.td b/mlir/include/mlir/Interfaces/CallInterfaces.td
index 3e9c002b22ed69..752de74e6e4d7e 100644
--- a/mlir/include/mlir/Interfaces/CallInterfaces.td
+++ b/mlir/include/mlir/Interfaces/CallInterfaces.td
@@ -68,7 +68,7 @@ def CallOpInterface : OpInterface<"CallOpInterface"> {
     /// `symbolTable` is an optional parameter that will allow for using a
     /// cached symbol table for symbol lookups instead of performing an O(N)
     /// scan.
-    Operation *resolveCallable(SymbolTableCollection *symbolTable = nullptr);
+    ::mlir::Operation *resolveCallable(::mlir::SymbolTableCollection *symbolTable = nullptr);
   }];
 }
 

@RIscRIpt
Copy link
Member Author

RIscRIpt commented Feb 9, 2024

Thanks! I don't have write access, but I believe it is ready to be merged.

@joker-eph joker-eph merged commit 7fd1466 into llvm:main Feb 9, 2024
@RIscRIpt RIscRIpt deleted the mlir-fix-callopint branch February 9, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants