diff options
Diffstat (limited to 'mlir')
| -rw-r--r-- | mlir/include/mlir/Interfaces/TilingInterface.td | 4 | ||||
| -rw-r--r-- | mlir/include/mlir/Support/Timing.h | 2 | ||||
| -rw-r--r-- | mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp | 8 | ||||
| -rw-r--r-- | mlir/lib/Support/Timing.cpp | 3 | ||||
| -rw-r--r-- | mlir/test/mlir-tblgen/op-properties.td | 14 | ||||
| -rw-r--r-- | mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | 16 |
6 files changed, 25 insertions, 22 deletions
diff --git a/mlir/include/mlir/Interfaces/TilingInterface.td b/mlir/include/mlir/Interfaces/TilingInterface.td index 0c0fc88..e0516ab 100644 --- a/mlir/include/mlir/Interfaces/TilingInterface.td +++ b/mlir/include/mlir/Interfaces/TilingInterface.td @@ -57,8 +57,8 @@ def TilingInterface : OpInterface<"TilingInterface"> { For an operation to be "tiled and fused" with its (already tiled) producer, an operation has to implement the following additional methods (see description below): - - `getTiledImplementationFromOperandTile` - - `getIterationDomainTileFromOperandTile`. + - `getTiledImplementationFromOperandTiles` + - `getIterationDomainTileFromOperandTiles`. }]; let cppNamespace = "::mlir"; let methods = [ diff --git a/mlir/include/mlir/Support/Timing.h b/mlir/include/mlir/Support/Timing.h index a8a4bfd..3d61a0a 100644 --- a/mlir/include/mlir/Support/Timing.h +++ b/mlir/include/mlir/Support/Timing.h @@ -44,7 +44,7 @@ class DefaultTimingManagerImpl; /// This is a POD type with pointer size, so it should be passed around by /// value. The underlying data is owned by the `TimingManager`. class TimingIdentifier { - using EntryType = llvm::StringMapEntry<std::nullopt_t>; + using EntryType = llvm::StringMapEntry<llvm::EmptyStringSetTag>; public: TimingIdentifier(const TimingIdentifier &) = default; diff --git a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp index 3c44733..95d5cad 100644 --- a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp +++ b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp @@ -39,10 +39,10 @@ void GpuModuleToBinaryPass::runOnOperation() { RewritePatternSet patterns(&getContext()); auto targetFormat = llvm::StringSwitch<std::optional<CompilationTarget>>(compilationTarget) - .Cases("offloading", "llvm", CompilationTarget::Offload) - .Cases("assembly", "isa", CompilationTarget::Assembly) - .Cases("binary", "bin", CompilationTarget::Binary) - .Cases("fatbinary", "fatbin", CompilationTarget::Fatbin) + .Cases({"offloading", "llvm"}, CompilationTarget::Offload) + .Cases({"assembly", "isa"}, CompilationTarget::Assembly) + .Cases({"binary", "bin"}, CompilationTarget::Binary) + .Cases({"fatbinary", "fatbin"}, CompilationTarget::Fatbin) .Default(std::nullopt); if (!targetFormat) getOperation()->emitError() << "Invalid format specified."; diff --git a/mlir/lib/Support/Timing.cpp b/mlir/lib/Support/Timing.cpp index 16306d7..2e92d9c 100644 --- a/mlir/lib/Support/Timing.cpp +++ b/mlir/lib/Support/Timing.cpp @@ -50,7 +50,8 @@ public: llvm::sys::SmartRWMutex<true> identifierMutex; /// A thread local cache of identifiers to reduce lock contention. - ThreadLocalCache<llvm::StringMap<llvm::StringMapEntry<std::nullopt_t> *>> + ThreadLocalCache< + llvm::StringMap<llvm::StringMapEntry<llvm::EmptyStringSetTag> *>> localIdentifierCache; TimingManagerImpl() : identifiers(identifierAllocator) {} diff --git a/mlir/test/mlir-tblgen/op-properties.td b/mlir/test/mlir-tblgen/op-properties.td index a9c784c..cb9bd3d 100644 --- a/mlir/test/mlir-tblgen/op-properties.td +++ b/mlir/test/mlir-tblgen/op-properties.td @@ -32,7 +32,7 @@ def OpWithProps : NS_Op<"op_with_props"> { ArrayProp<StringProp>:$strings, DefaultValuedProp<I32Prop, "0">:$default_int, OptionalProp<I64Prop>:$optional, - DefaultI64Array:$intArray + DefaultI64Array:$value ); } @@ -94,10 +94,10 @@ def OpWithOptionalPropsAndAttrs : // DECL: ::llvm::ArrayRef<std::string> getStrings() // DECL: using default_intTy = int32_t; // DECL: default_intTy default_int = 0; -// DECL: intArrayTy intArray = ::llvm::SmallVector<int64_t>{}; -// DECL: ::llvm::ArrayRef<int64_t> getIntArray() +// DECL: valueTy value = ::llvm::SmallVector<int64_t>{}; +// DECL: ::llvm::ArrayRef<int64_t> getValue() // DECL: return ::llvm::ArrayRef<int64_t>{propStorage} -// DECL: void setIntArray(::llvm::ArrayRef<int64_t> propValue) +// DECL: void setValue(::llvm::ArrayRef<int64_t> propValue) // DECL: propStorage.assign // DECL-LABEL: class OpWithProps : // DECL: setString(::llvm::StringRef newString) @@ -111,14 +111,14 @@ def OpWithOptionalPropsAndAttrs : // DECL-SAME: ::llvm::ArrayRef<std::string> strings, // DECL-SAME: /*optional*/int32_t default_int = 0, // DECL-SAME: /*optional*/std::optional<int64_t> optional = std::nullopt, -// DECL-SAME: /*optional*/::llvm::ArrayRef<int64_t> intArray = ::llvm::ArrayRef<int64_t>{}); +// DECL-SAME: /*optional*/::llvm::ArrayRef<int64_t> value = ::llvm::ArrayRef<int64_t>{}); // DEFS-LABEL: OpWithProps::computePropertiesHash -// DEFS: hash_intArray +// DEFS: hash_value_ // DEFS: using ::llvm::hash_value; // DEFS-NEXT: return hash_value(::llvm::ArrayRef<int64_t>{propStorage}) // DEFS: hash_value(prop.optional) -// DEFS: hash_intArray(prop.intArray) +// DEFS: hash_value_(prop.value) // ----- diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp index 3718648..4d9b1b2 100644 --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -1629,7 +1629,7 @@ void OpEmitter::genPropertiesSupport() { // Hashing for the property const char *propHashFmt = R"decl( - auto hash_{0} = [] (const auto &propStorage) -> llvm::hash_code { + auto hash_{0}_ = [] (const auto &propStorage) -> llvm::hash_code { using ::llvm::hash_value; return {1}; }; @@ -1655,7 +1655,7 @@ void OpEmitter::genPropertiesSupport() { if (const auto *namedProperty = llvm::dyn_cast_if_present<const NamedProperty *>(attrOrProp)) { if (!namedProperty->prop.getHashPropertyCall().empty()) { - hashMethod << "\n hash_" << namedProperty->name << "(prop." + hashMethod << "\n hash_" << namedProperty->name << "_(prop." << namedProperty->name << ")"; } else { hashMethod << "\n hash_value(prop." << namedProperty->name @@ -2632,11 +2632,13 @@ void OpEmitter::genInlineCreateBody( interleaveComma(nonBuilderStateArgsList, nonBuilderStateArgsOS); nonBuilderStateArgs = ", " + nonBuilderStateArgs; } - cWithLoc->body() << llvm::formatv(inlineCreateBody, locParamName, - nonBuilderStateArgs, - opClass.getClassName()); - cImplicitLoc->body() << llvm::formatv(inlineCreateBodyImplicitLoc, - nonBuilderStateArgs); + if (cWithLoc) + cWithLoc->body() << llvm::formatv(inlineCreateBody, locParamName, + nonBuilderStateArgs, + opClass.getClassName()); + if (cImplicitLoc) + cImplicitLoc->body() << llvm::formatv(inlineCreateBodyImplicitLoc, + nonBuilderStateArgs); } void OpEmitter::genSeparateArgParamBuilder() { |
