From: Kazu Hirata Date: Sun, 16 Oct 2022 04:07:03 +0000 (-0700) Subject: [mlir] Remove redundaunt typename (NFC) X-Git-Tag: upstream/17.0.6~30421 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de49627d9d293652590556e77129176de88eb9b3;p=platform%2Fupstream%2Fllvm.git [mlir] Remove redundaunt typename (NFC) --- diff --git a/mlir/include/mlir/Analysis/DataFlowFramework.h b/mlir/include/mlir/Analysis/DataFlowFramework.h index 7028117..68f3db7 100644 --- a/mlir/include/mlir/Analysis/DataFlowFramework.h +++ b/mlir/include/mlir/Analysis/DataFlowFramework.h @@ -159,7 +159,7 @@ struct ProgramPoint ProgramPoint(ParentTy point = nullptr) : ParentTy(point) {} /// Allow implicit conversions from operation wrappers. /// TODO: For Windows only. Find a better solution. - template ::value && !std::is_same::value>> ProgramPoint(OpT op) : ParentTy(op) {} diff --git a/mlir/include/mlir/IR/AttributeSupport.h b/mlir/include/mlir/IR/AttributeSupport.h index 58e37f0..69105576 100644 --- a/mlir/include/mlir/IR/AttributeSupport.h +++ b/mlir/include/mlir/IR/AttributeSupport.h @@ -182,7 +182,7 @@ public: /// The use of this method is in general discouraged in favor of /// 'get(ctx, args)'. template - static typename std::enable_if_t< + static std::enable_if_t< !std::is_same::value, T> getWithTypeID(MLIRContext *ctx, TypeID typeID, Args &&...args) { #ifndef NDEBUG @@ -207,7 +207,7 @@ public: /// The use of this method is in general discouraged in favor of /// 'get(ctx, args)'. template - static typename std::enable_if_t< + static std::enable_if_t< std::is_same::value, T> getWithTypeID(MLIRContext *ctx, TypeID typeID) { #ifndef NDEBUG @@ -239,7 +239,7 @@ public: /// The use of this method is in general discouraged in favor of /// 'registerAttribute(ctx)'. template - static typename std::enable_if_t< + static std::enable_if_t< !std::is_same::value> registerAttribute(MLIRContext *ctx, TypeID typeID) { ctx->getAttributeUniquer() @@ -249,7 +249,7 @@ public: /// The use of this method is in general discouraged in favor of /// 'registerAttribute(ctx)'. template - static typename std::enable_if_t< + static std::enable_if_t< std::is_same::value> registerAttribute(MLIRContext *ctx, TypeID typeID) { ctx->getAttributeUniquer() diff --git a/mlir/include/mlir/IR/BlockSupport.h b/mlir/include/mlir/IR/BlockSupport.h index dafe75e..00401bd 100644 --- a/mlir/include/mlir/IR/BlockSupport.h +++ b/mlir/include/mlir/IR/BlockSupport.h @@ -108,9 +108,8 @@ public: using RangeBaseT::RangeBaseT; BlockRange(ArrayRef blocks = llvm::None); BlockRange(SuccessorRange successors); - template , Arg>::value>> + template , Arg>::value>> BlockRange(Arg &&arg) : BlockRange(ArrayRef(std::forward(arg))) {} BlockRange(std::initializer_list blocks) diff --git a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td b/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td index a9e6e0e..eb60977 100644 --- a/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td +++ b/mlir/include/mlir/IR/BuiltinAttributeInterfaces.td @@ -338,13 +338,13 @@ def ElementsAttrInterface : AttrInterface<"ElementsAttr"> { template using DerivedAttrValueCheckT = - typename std::enable_if_t::value && - !std::is_same::value>; + std::enable_if_t::value && + !std::is_same::value>; template using DefaultValueCheckT = - typename std::enable_if_t::value || - !std::is_base_of::value, - ResultT>; + std::enable_if_t::value || + !std::is_base_of::value, + ResultT>; /// Return the splat value for this attribute. This asserts that the /// attribute corresponds to a splat. diff --git a/mlir/include/mlir/IR/Matchers.h b/mlir/include/mlir/IR/Matchers.h index ae8cef4..b2edcab 100644 --- a/mlir/include/mlir/IR/Matchers.h +++ b/mlir/include/mlir/IR/Matchers.h @@ -178,20 +178,18 @@ using has_operation_or_value_matcher_t = /// Statically switch to a Value matcher. template -typename std::enable_if_t< - llvm::is_detected::value, - bool> +std::enable_if_t::value, + bool> matchOperandOrValueAtIndex(Operation *op, unsigned idx, MatcherClass &matcher) { return matcher.match(op->getOperand(idx)); } /// Statically switch to an Operation matcher. template -typename std::enable_if_t< - llvm::is_detected::value, - bool> +std::enable_if_t::value, + bool> matchOperandOrValueAtIndex(Operation *op, unsigned idx, MatcherClass &matcher) { if (auto *defOp = op->getOperand(idx).getDefiningOp()) return matcher.match(defOp); diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h index 6d28752..10bb720 100644 --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -854,7 +854,7 @@ public: /// can use SFINAE to disable the methods for non-single region operations. template using enable_if_single_region = - typename std::enable_if_t(), T>; + std::enable_if_t(), T>; template enable_if_single_region begin() { @@ -957,7 +957,7 @@ struct SingleBlockImplicitTerminator { template using enable_if_single_region = - typename std::enable_if_t(), T>; + std::enable_if_t(), T>; /// Insert the operation into the back of the body, before the terminator. template diff --git a/mlir/include/mlir/IR/Region.h b/mlir/include/mlir/IR/Region.h index d726d93..25080fa 100644 --- a/mlir/include/mlir/IR/Region.h +++ b/mlir/include/mlir/IR/Region.h @@ -340,17 +340,16 @@ public: RegionRange(MutableArrayRef regions = llvm::None); - template >, Arg>::value>> + template >, Arg>::value>> RegionRange(Arg &&arg) : RegionRange(ArrayRef>(std::forward(arg))) { } template RegionRange( Arg &&arg, - typename std::enable_if_t< - std::is_constructible, Arg>::value> * = nullptr) + std::enable_if_t, Arg>::value> + * = nullptr) : RegionRange(ArrayRef(std::forward(arg))) {} RegionRange(ArrayRef> regions); RegionRange(ArrayRef regions); diff --git a/mlir/include/mlir/IR/TypeRange.h b/mlir/include/mlir/IR/TypeRange.h index 8b2959d..5bbab1f 100644 --- a/mlir/include/mlir/IR/TypeRange.h +++ b/mlir/include/mlir/IR/TypeRange.h @@ -44,9 +44,8 @@ public: TypeRange(ValueTypeRange values) : TypeRange(ValueRange(ValueRangeT(values.begin().getCurrent(), values.end().getCurrent()))) {} - template , Arg>::value>> + template , Arg>::value>> TypeRange(Arg &&arg) : TypeRange(ArrayRef(std::forward(arg))) {} TypeRange(std::initializer_list types) : TypeRange(ArrayRef(types)) {} diff --git a/mlir/include/mlir/IR/TypeSupport.h b/mlir/include/mlir/IR/TypeSupport.h index b111687..2bb28fd 100644 --- a/mlir/include/mlir/IR/TypeSupport.h +++ b/mlir/include/mlir/IR/TypeSupport.h @@ -175,7 +175,7 @@ struct TypeUniquer { /// The use of this method is in general discouraged in favor of /// 'get(ctx, args)'. template - static typename std::enable_if_t< + static std::enable_if_t< !std::is_same::value, T> getWithTypeID(MLIRContext *ctx, TypeID typeID, Args &&...args) { #ifndef NDEBUG @@ -196,7 +196,7 @@ struct TypeUniquer { /// The use of this method is in general discouraged in favor of /// 'get(ctx, args)'. template - static typename std::enable_if_t< + static std::enable_if_t< std::is_same::value, T> getWithTypeID(MLIRContext *ctx, TypeID typeID) { #ifndef NDEBUG @@ -230,7 +230,7 @@ struct TypeUniquer { /// The use of this method is in general discouraged in favor of /// 'registerType(ctx)'. template - static typename std::enable_if_t< + static std::enable_if_t< !std::is_same::value> registerType(MLIRContext *ctx, TypeID typeID) { ctx->getTypeUniquer().registerParametricStorageType( @@ -240,7 +240,7 @@ struct TypeUniquer { /// The use of this method is in general discouraged in favor of /// 'registerType(ctx)'. template - static typename std::enable_if_t< + static std::enable_if_t< std::is_same::value> registerType(MLIRContext *ctx, TypeID typeID) { ctx->getTypeUniquer().registerSingletonStorageType( diff --git a/mlir/include/mlir/IR/ValueRange.h b/mlir/include/mlir/IR/ValueRange.h index 64b816f..081c0d2 100644 --- a/mlir/include/mlir/IR/ValueRange.h +++ b/mlir/include/mlir/IR/ValueRange.h @@ -356,7 +356,7 @@ public: using RangeBaseT::RangeBaseT; template , Arg>::value && !std::is_convertible::value>> ValueRange(Arg &&arg) : ValueRange(ArrayRef(std::forward(arg))) {} diff --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h index eaf1f6c..89bc251 100644 --- a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h +++ b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h @@ -119,7 +119,7 @@ public: if (ranked) adaptor.getDims(*this); } - template ::value>> ShapedTypeComponents(Arg &&arg, Type elementType = nullptr, Attribute attr = nullptr) diff --git a/mlir/include/mlir/Support/InterfaceSupport.h b/mlir/include/mlir/Support/InterfaceSupport.h index 5a56682..73a4387 100644 --- a/mlir/include/mlir/Support/InterfaceSupport.h +++ b/mlir/include/mlir/Support/InterfaceSupport.h @@ -99,8 +99,8 @@ public: /// Construct an interface instance from a type that implements this /// interface's trait. - template , T>::value> * = nullptr> + template , T>::value> * = nullptr> Interface(T t) : BaseType(t), impl(t ? ConcreteType::getInterfaceFor(t) : nullptr) { assert((!t || impl) && "expected value to provide interface instance"); diff --git a/mlir/include/mlir/TableGen/Class.h b/mlir/include/mlir/TableGen/Class.h index efcd73a..896880b 100644 --- a/mlir/include/mlir/TableGen/Class.h +++ b/mlir/include/mlir/TableGen/Class.h @@ -573,8 +573,8 @@ public: /// Create a class with a name, and whether it should be declared as a `class` /// or `struct`. Also, prevent this from being mistaken as a move constructor /// candidate. - template ::value>> + template ::value>> Class(NameT &&name, bool isStruct = false) : className(stringify(std::forward(name))), isStruct(isStruct) {} diff --git a/mlir/lib/IR/SymbolTable.cpp b/mlir/lib/IR/SymbolTable.cpp index 669f538..1acaea7c 100644 --- a/mlir/lib/IR/SymbolTable.cpp +++ b/mlir/lib/IR/SymbolTable.cpp @@ -596,7 +596,7 @@ struct SymbolScope { /// This variant is used when the callback type matches that expected by /// 'walkSymbolUses'. template ::result_t, void>::value> * = nullptr> Optional walk(CallbackT cback) { @@ -607,7 +607,7 @@ struct SymbolScope { /// This variant is used when the callback type matches a stripped down type: /// void(SymbolTable::SymbolUse use) template ::result_t, void>::value> * = nullptr> Optional walk(CallbackT cback) {