================
@@ -47,6 +47,63 @@ class CIRDialectLLVMIRTranslationInterface
 
     return mlir::success();
   }
+
+  /// Any named attribute in the CIR dialect, i.e, with name started with
+  /// "cir.", will be handled here.
+  virtual mlir::LogicalResult amendOperation(
+      mlir::Operation *op, llvm::ArrayRef<llvm::Instruction *> instructions,
+      mlir::NamedAttribute attribute,
+      mlir::LLVM::ModuleTranslation &moduleTranslation) const override {
+    if (auto func = dyn_cast<mlir::LLVM::LLVMFuncOp>(op)) {
+      if (mlir::failed(
+              amendFunction(func, instructions, attribute, moduleTranslation)))
----------------
skc7 wrote:

@andykaylor 
My follow-up PR is actually to add support for `extra_attrs`, draft PR: 
https://github.com/llvm/llvm-project/pull/186331 

My understanding is targets add their attributes to `extra_attrs` on cir.func 
as in incubator
Could you please let me know if that is still needed in upstream ?

https://github.com/llvm/llvm-project/pull/186073
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to