Integrate llvm-project at 07a8ebed56cfa223d1587903e4de0d5788b5f777 (#19334)

Still carrying a revert for 1004865f1ca41a9581da8747f34b29862d3ebc3d and
a cherry pick for https://github.com/llvm/llvm-project/pull/116650.

Removed `FieldParser`s for optional enums that get autogenerated as of
https://github.com/llvm/llvm-project/pull/117719.
diff --git a/compiler/src/iree/compiler/Dialect/HAL/IR/HALTypes.h b/compiler/src/iree/compiler/Dialect/HAL/IR/HALTypes.h
index fefe68f..d716806 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/IR/HALTypes.h
+++ b/compiler/src/iree/compiler/Dialect/HAL/IR/HALTypes.h
@@ -190,91 +190,6 @@
 
 } // 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
diff --git a/compiler/src/iree/compiler/Dialect/Stream/IR/StreamTypes.h b/compiler/src/iree/compiler/Dialect/Stream/IR/StreamTypes.h
index d69e226..75cc00e 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/IR/StreamTypes.h
+++ b/compiler/src/iree/compiler/Dialect/Stream/IR/StreamTypes.h
@@ -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
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input/InputDialect.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input/InputDialect.h
index 0ae1d30..032dbd0 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input/InputDialect.h
+++ b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/Input/InputDialect.h
@@ -40,72 +40,4 @@
 
 } // 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
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 3833fdc..dfbfc05 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 3833fdcdb01b69c2815db08388e0e092a79cbc58
+Subproject commit dfbfc059488770ac1b96a8074739c605475166f9