[Mlir-commits] [mlir] [MLIR][DLTI] Introduce DLTIQueryInterface and impl for DLTI attrs (PR #104595)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Aug 16 07:32:58 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 397bcfef741315a68e75d174b8f746a11b42c0e2 8234b2914e53a57842768f6fa40073aefdb5755e --extensions cpp,h -- mlir/include/mlir/Dialect/DLTI/DLTI.h mlir/include/mlir/Dialect/Transform/Utils/DiagnosedSilenceableFailure.h mlir/include/mlir/Interfaces/DataLayoutInterfaces.h mlir/lib/Dialect/DLTI/DLTI.cpp mlir/lib/Dialect/DLTI/TransformOps/DLTITransformOps.cpp mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/DLTI/DLTI.cpp b/mlir/lib/Dialect/DLTI/DLTI.cpp
index a849d2b240..852c220c18 100644
--- a/mlir/lib/Dialect/DLTI/DLTI.cpp
+++ b/mlir/lib/Dialect/DLTI/DLTI.cpp
@@ -112,9 +112,8 @@ void DataLayoutEntryAttr::print(AsmPrinter &os) const {
// DLTIMapAttr
//===----------------------------------------------------------------------===//
-static LogicalResult
-verifyEntries(function_ref<InFlightDiagnostic()> emitError,
- ArrayRef<DataLayoutEntryInterface> entries) {
+static LogicalResult verifyEntries(function_ref<InFlightDiagnostic()> emitError,
+ ArrayRef<DataLayoutEntryInterface> entries) {
DenseSet<Type> types;
DenseSet<StringAttr> ids;
for (DataLayoutEntryInterface entry : entries) {
@@ -130,9 +129,8 @@ verifyEntries(function_ref<InFlightDiagnostic()> emitError,
return success();
}
-LogicalResult
-MapAttr::verify(function_ref<InFlightDiagnostic()> emitError,
- ArrayRef<DataLayoutEntryInterface> entries) {
+LogicalResult MapAttr::verify(function_ref<InFlightDiagnostic()> emitError,
+ ArrayRef<DataLayoutEntryInterface> entries) {
return verifyEntries(emitError, entries);
}
diff --git a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
index fcaa9275b9..b667785c16 100644
--- a/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
+++ b/mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
@@ -58,10 +58,9 @@ public:
/// Simple data layout spec containing a list of entries that always verifies
/// as valid.
struct CustomDataLayoutSpec
- : public Attribute::AttrBase<CustomDataLayoutSpec, Attribute,
- DataLayoutSpecStorage,
- DLTIQueryInterface::Trait,
- DataLayoutSpecInterface::Trait> {
+ : public Attribute::AttrBase<
+ CustomDataLayoutSpec, Attribute, DataLayoutSpecStorage,
+ DLTIQueryInterface::Trait, DataLayoutSpecInterface::Trait> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CustomDataLayoutSpec)
using Base::Base;
@@ -117,10 +116,9 @@ public:
};
struct CustomTargetSystemSpec
- : public Attribute::AttrBase<CustomTargetSystemSpec, Attribute,
- TargetSystemSpecStorage,
- DLTIQueryInterface::Trait,
- TargetSystemSpecInterface::Trait> {
+ : public Attribute::AttrBase<
+ CustomTargetSystemSpec, Attribute, TargetSystemSpecStorage,
+ DLTIQueryInterface::Trait, TargetSystemSpecInterface::Trait> {
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CustomDataLayoutSpec)
using Base::Base;
``````````
</details>
https://github.com/llvm/llvm-project/pull/104595
More information about the Mlir-commits
mailing list