[Mlir-commits] [mlir] 37c5dbb - Fully qualify some more namespace in MLIR ODS to be more friendly to dialects not defined under the mlir namespace (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Sep 15 20:41:45 PDT 2020


Author: Mehdi Amini
Date: 2020-09-16T03:40:36Z
New Revision: 37c5dbb31a2fa9aa6618efe56ab0d6cd8f358957

URL: https://github.com/llvm/llvm-project/commit/37c5dbb31a2fa9aa6618efe56ab0d6cd8f358957
DIFF: https://github.com/llvm/llvm-project/commit/37c5dbb31a2fa9aa6618efe56ab0d6cd8f358957.diff

LOG: Fully qualify some more namespace in MLIR ODS to be more friendly to dialects not defined under the mlir namespace (NFC)

Added: 
    

Modified: 
    mlir/include/mlir/Interfaces/SideEffectInterfaces.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td
index 1ee623b61365..0f189fa8164b 100644
--- a/mlir/include/mlir/Interfaces/SideEffectInterfaces.td
+++ b/mlir/include/mlir/Interfaces/SideEffectInterfaces.td
@@ -51,7 +51,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
         Collects all of the operation's effects into `effects`.
       }],
       "void", "getEffects",
-         (ins "SmallVectorImpl<SideEffects::EffectInstance<"
+         (ins "SmallVectorImpl<::mlir::SideEffects::EffectInstance<"
               # baseEffect # ">> &":$effects)
     >,
     InterfaceMethod<[{
@@ -59,7 +59,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
       }],
       "void", "getEffectsOnValue",
          (ins "Value":$value,
-              "SmallVectorImpl<SideEffects::EffectInstance<"
+              "SmallVectorImpl<::mlir::SideEffects::EffectInstance<"
               # baseEffect # ">> &":$effects), [{
           $_op.getEffects(effects);
           llvm::erase_if(effects, [&](auto &it) {
@@ -73,7 +73,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
       }],
       "void", "getEffectsOnResource",
          (ins "SideEffects::Resource *":$resource,
-              "SmallVectorImpl<SideEffects::EffectInstance<"
+              "SmallVectorImpl<::mlir::SideEffects::EffectInstance<"
               # baseEffect # ">> &":$effects), [{
           $_op.getEffects(effects);
           llvm::erase_if(effects, [&](auto &it) {
@@ -87,7 +87,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
     /// Collect all of the effect instances that correspond to the given
     /// `Effect` and place them in 'effects'.
     template <typename Effect> void getEffects(
-      SmallVectorImpl<SideEffects::EffectInstance<
+      SmallVectorImpl<::mlir::SideEffects::EffectInstance<
                                               }] # baseEffect # [{>> &effects) {
       getEffects(effects);
       llvm::erase_if(effects, [&](auto &it) {
@@ -115,7 +115,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
 
     /// Returns true if this operation has no effects.
     bool hasNoEffect() {
-      SmallVector<SideEffects::EffectInstance<}] # baseEffect # [{>, 4> effects;
+      SmallVector<::mlir::SideEffects::EffectInstance<}] # baseEffect # [{>, 4> effects;
       getEffects(effects);
       return effects.empty();
     }
@@ -124,7 +124,7 @@ class EffectOpInterfaceBase<string name, string baseEffect>
     static bool hasNoEffect(Operation *op) {
       if (auto interface = dyn_cast<}] # name # [{>(op))
         return interface.hasNoEffect();
-      return op->hasTrait<OpTrait::HasRecursiveSideEffects>();
+      return op->hasTrait<::mlir::OpTrait::HasRecursiveSideEffects>();
     }
   }];
 
@@ -178,7 +178,7 @@ class SideEffectsTraitBase<EffectOpInterfaceBase parentInterface,
 // `MemoryEffects`.
 def MemoryEffectsOpInterface
     : EffectOpInterfaceBase<"MemoryEffectOpInterface",
-                            "MemoryEffects::Effect"> {
+                            "::mlir::MemoryEffects::Effect"> {
   let description = [{
     An interface used to query information about the memory effects applied by
     an operation.


        


More information about the Mlir-commits mailing list