@@ -22,7 +22,6 @@ include "mlir/IR/SymbolInterfaces.td"
2222include "mlir/Interfaces/CallInterfaces.td"
2323include "mlir/Interfaces/ControlFlowInterfaces.td"
2424include "mlir/Interfaces/InferTypeOpInterface.td"
25- include "mlir/Interfaces/LinkageInterfaces.td"
2625include "mlir/Interfaces/MemorySlotInterfaces.td"
2726include "mlir/Interfaces/SideEffectInterfaces.td"
2827include "mlir/Interfaces/ViewLikeInterface.td"
@@ -1227,10 +1226,7 @@ def LLVM_AddressOfOp : LLVM_Op<"mlir.addressof",
12271226}
12281227
12291228def LLVM_GlobalOp : LLVM_Op<"mlir.global",
1230- [IsolatedFromAbove, SingleBlockImplicitTerminator<"ReturnOp">, Symbol,
1231- GlobalVariableLinkageOpInterface,
1232- DeclareOpInterfaceMethods<GlobalValueLinkageOpInterface>,
1233- DeclareOpInterfaceMethods<GlobalVariableLinkageOpInterface>]> {
1229+ [IsolatedFromAbove, SingleBlockImplicitTerminator<"ReturnOp">, Symbol]> {
12341230 let arguments = (ins
12351231 TypeAttr:$global_type,
12361232 UnitAttr:$constant,
@@ -1382,9 +1378,6 @@ def LLVM_GlobalOp : LLVM_Op<"mlir.global",
13821378 }
13831379 }];
13841380
1385- let extraClassDefinition = [{
1386- bool $cppClass::isDeclarationForLinkage() { return getInitializerRegion().empty() && !getValue(); }
1387- }];
13881381 let hasCustomAssemblyFormat = 1;
13891382 let hasVerifier = 1;
13901383 let hasRegionVerifier = 1;
@@ -1500,9 +1493,7 @@ def LLVM_ComdatOp : LLVM_Op<"comdat", [NoTerminator, NoRegionArguments, SymbolTa
15001493}
15011494
15021495def LLVM_LLVMFuncOp : LLVM_Op<"func", [
1503- AutomaticAllocationScope, IsolatedFromAbove, FunctionOpInterface,
1504- FunctionLinkageOpInterface,
1505- DeclareOpInterfaceMethods<GlobalValueLinkageOpInterface>]> {
1496+ AutomaticAllocationScope, IsolatedFromAbove, FunctionOpInterface]> {
15061497 let summary = "LLVM dialect function.";
15071498
15081499 let description = [{
@@ -1629,11 +1620,6 @@ def LLVM_LLVMFuncOp : LLVM_Op<"func", [
16291620
16301621 /// Returns true if the `optimize_none` attribute is set, false otherwise.
16311622 bool isOptimizeNone() { return bool(getOptimizeNoneAttr()); }
1632-
1633- }];
1634-
1635- let extraClassDefinition = [{
1636- bool $cppClass::isDeclarationForLinkage() { return getBody().empty(); }
16371623 }];
16381624
16391625 let hasCustomAssemblyFormat = 1;
0 commit comments