Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate llvm-project at 07a8ebed56cfa223d1587903e4de0d5788b5f777 #19334

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions compiler/src/iree/compiler/Dialect/HAL/IR/HALTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,91 +190,6 @@ struct StaticRange {

} // namespace mlir::iree_compiler::IREE::HAL

// It's unfortunate this is required.
namespace mlir {

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>> {
static FailureOr<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>(value);
if (!result.has_value())
return failure();
return result.value();
}
};
static inline AsmPrinter &
operator<<(AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>
param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::HAL::stringifyEnum(param.value())
: StringRef{""});
return printer;
}

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>> {
static FailureOr<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>(value);
if (!result.has_value())
return failure();
return result.value();
}
};
static inline AsmPrinter &operator<<(
AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags> param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::HAL::stringifyEnum(param.value())
: StringRef{""});
return printer;
}

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::HAL::DescriptorFlags>> {
static FailureOr<mlir::iree_compiler::IREE::HAL::DescriptorFlags>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
mlir::iree_compiler::IREE::HAL::DescriptorFlags>(value);
if (!result.has_value())
return failure();
return result.value();
}
};
static inline AsmPrinter &operator<<(
AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::HAL::DescriptorFlags> param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::HAL::stringifyEnum(param.value())
: StringRef{""});
return printer;
}

static inline AsmPrinter &
operator<<(AsmPrinter &printer,
mlir::iree_compiler::IREE::HAL::DescriptorType param) {
printer << mlir::iree_compiler::IREE::HAL::stringifyEnum(param);
return printer;
}

} // namespace mlir

// clang-format off: must be included after all LLVM/MLIR headers.
#define GET_ATTRDEF_CLASSES
#include "iree/compiler/Dialect/HAL/IR/HALAttrs.h.inc" // IWYU pragma: keep
Expand Down
31 changes: 0 additions & 31 deletions compiler/src/iree/compiler/Dialect/Stream/IR/StreamTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,6 @@
#include "iree/compiler/Dialect/Stream/IR/StreamEnums.h.inc" // IWYU pragma: export
// clang-format on

// It's unfortunate this is required.
namespace mlir {

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::Stream::CollectiveReductionOp>> {
static FailureOr<mlir::iree_compiler::IREE::Stream::CollectiveReductionOp>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::Stream::symbolizeEnum<
mlir::iree_compiler::IREE::Stream::CollectiveReductionOp>(value);
if (!result.has_value())
return failure();
return result.value();
}
};
static inline AsmPrinter &operator<<(
AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::Stream::CollectiveReductionOp>
param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::Stream::stringifyEnum(
param.value())
: StringRef{""});
return printer;
}

} // namespace mlir

namespace mlir::iree_compiler::IREE::Stream {
class AffinityAttr;
} // namespace mlir::iree_compiler::IREE::Stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,72 +40,4 @@ std::optional<int32_t> getEncodingTypeValue(Attribute attr);

} // namespace mlir::iree_compiler::IREE::Input

//===----------------------------------------------------------------------===//
// Specialize templates in mlir namespace to support enum attributes
//===----------------------------------------------------------------------===//

namespace mlir {

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::Input::PipelineLayoutFlags>> {
static FailureOr<mlir::iree_compiler::IREE::Input::PipelineLayoutFlags>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::Input::symbolizeEnum<
mlir::iree_compiler::IREE::Input::PipelineLayoutFlags>(value);
if (!result.has_value())
return failure();
return result.value();
}
};

static inline AsmPrinter &
operator<<(AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::Input::PipelineLayoutFlags>
param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::Input::stringifyEnum(
param.value())
: StringRef{""});
return printer;
}

template <>
struct FieldParser<
std::optional<mlir::iree_compiler::IREE::Input::DescriptorFlags>> {
static FailureOr<mlir::iree_compiler::IREE::Input::DescriptorFlags>
parse(AsmParser &parser) {
std::string value;
if (parser.parseKeywordOrString(&value))
return failure();
auto result = mlir::iree_compiler::IREE::Input::symbolizeEnum<
mlir::iree_compiler::IREE::Input::DescriptorFlags>(value);
if (!result.has_value())
return failure();
return result.value();
}
};

static inline AsmPrinter &operator<<(
AsmPrinter &printer,
std::optional<mlir::iree_compiler::IREE::Input::DescriptorFlags> param) {
printer << (param.has_value()
? mlir::iree_compiler::IREE::Input::stringifyEnum(
param.value())
: StringRef{""});
return printer;
}

static inline AsmPrinter &
operator<<(AsmPrinter &printer,
mlir::iree_compiler::IREE::Input::DescriptorType param) {
printer << mlir::iree_compiler::IREE::Input::stringifyEnum(param);
return printer;
}

} // namespace mlir

#endif // IREE_DIALECTS_DIALECT_INPUT_DIALECT_H
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 624 files
Loading