Integrate LLVM at llvm/llvm-project@f0d997c47232

Updates LLVM usage to match
[f0d997c47232](https://github.com/llvm/llvm-project/commit/f0d997c47232)

PiperOrigin-RevId: 408846535
diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt
index b763c70..492caf7 100644
--- a/SUBMODULE_VERSIONS.txt
+++ b/SUBMODULE_VERSIONS.txt
@@ -4,7 +4,7 @@
 aa533abfd4232b01f9e57041d70114d5a77e6de0 third_party/googletest
 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing
 acd6f6f014c25e46363e718381e0b35205df2d83 third_party/libyaml
-3bdf738d1b7e22921137dc4492f09064d683f8a2 third_party/llvm-project
+f0d997c4723214f5bc098b0acd2e61f3215d4a49 third_party/llvm-project
 839b119938b493ca2dc51597d2c11fb081d24c9c third_party/mlir-hlo
 3f701faace7addc75d16dea8a6cd769fa5b3f260 third_party/musl
 4c7697dbe973ed01ae6fbec37d186ebd05982e1f third_party/pybind11
diff --git a/iree/compiler/Codegen/Dialect/LoweringConfig.cpp b/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
index 79990d6..74a7951 100644
--- a/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
+++ b/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
@@ -186,10 +186,9 @@
   return success();
 }
 
-::mlir::Attribute TranslationInfoAttr::parse(::mlir::DialectAsmParser &parser,
-                                             ::mlir::Type attrType) {
-  ::mlir::FailureOr<StringAttr> _result_passPipeline;
-  ::mlir::FailureOr<ArrayAttr> _result_workloadPerWorkgroup;
+Attribute TranslationInfoAttr::parse(DialectAsmParser &parser, Type attrType) {
+  FailureOr<StringAttr> _result_passPipeline;
+  FailureOr<ArrayAttr> _result_workloadPerWorkgroup;
   // Parse literal '<'
   if (parser.parseLess()) return {};
   // Parse variable 'passPipeline'
@@ -222,8 +221,7 @@
                                   _result_workloadPerWorkgroup.getValue());
 }
 
-void TranslationInfoAttr::print(::mlir::DialectAsmPrinter &printer) const {
-  printer << "translation.info";
+void TranslationInfoAttr::print(DialectAsmPrinter &printer) const {
   printer << "<";
   printer << getPassPipeline();
   printer << ",";
@@ -299,10 +297,9 @@
   return success();
 }
 
-::mlir::Attribute LoweringConfigAttr::parse(::mlir::DialectAsmParser &parser,
-                                            ::mlir::Type attrType) {
-  ::mlir::FailureOr<ArrayAttr> _result_tileSizes;
-  ::mlir::FailureOr<ArrayAttr> _result_nativeVectorSize;
+Attribute LoweringConfigAttr::parse(DialectAsmParser &parser, Type attrType) {
+  FailureOr<ArrayAttr> _result_tileSizes;
+  FailureOr<ArrayAttr> _result_nativeVectorSize;
   // Parse literal '<'
   if (parser.parseLess()) return {};
   // Parse literal 'tile_sizes'
@@ -338,8 +335,7 @@
                                  _result_nativeVectorSize.getValue());
 }
 
-void LoweringConfigAttr::print(::mlir::DialectAsmPrinter &printer) const {
-  printer << "lowering.config";
+void LoweringConfigAttr::print(DialectAsmPrinter &printer) const {
   printer << "<";
   printer << "tile_sizes";
   printer << ' ' << "=";
@@ -414,11 +410,10 @@
 
 /// Parser method that is copied from the auto-generated using `assemblyFormat`
 /// available with patch D111594. Replace after that change is in IREE.
-::mlir::Attribute CompilationInfoAttr::parse(::mlir::DialectAsmParser &parser,
-                                             ::mlir::Type attrType) {
-  ::mlir::FailureOr<LoweringConfigAttr> _result_loweringConfig;
-  ::mlir::FailureOr<TranslationInfoAttr> _result_translationInfo;
-  ::mlir::FailureOr<ArrayAttr> _result_workgroupSize;
+Attribute CompilationInfoAttr::parse(DialectAsmParser &parser, Type attrType) {
+  FailureOr<LoweringConfigAttr> _result_loweringConfig;
+  FailureOr<TranslationInfoAttr> _result_translationInfo;
+  FailureOr<ArrayAttr> _result_workgroupSize;
   // Parse literal '<'
   if (parser.parseLess()) return {};
   // Parse variable 'loweringConfig'
@@ -464,8 +459,7 @@
 
 /// Printer method that is copied from the auto-generated using `assemblyFormat`
 /// available with patch D111594. Replace after that change is in IREE.
-void CompilationInfoAttr::print(::mlir::DialectAsmPrinter &printer) const {
-  printer << "compilation.info";
+void CompilationInfoAttr::print(DialectAsmPrinter &printer) const {
   printer << "<";
   printer << getLoweringConfig();
   printer << ",";
diff --git a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
index e78444d..03400a5 100644
--- a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
@@ -479,7 +479,7 @@
 
 void BufferConstraintsAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   os << "max_allocation_size = " << max_allocation_size() << ", ";
   os << "min_buffer_offset_alignment = " << min_buffer_offset_alignment()
      << ", ";
@@ -506,7 +506,7 @@
 
 void DescriptorSetLayoutBindingAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   os << binding() << ", ";
   os << "\"" << stringifyDescriptorType(type()) << "\", ";
   printMemoryAccess(p, access());
@@ -547,7 +547,7 @@
 
 void DeviceTargetAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getDeviceID());
   auto configAttr = getConfiguration();
   if (configAttr && !configAttr.empty()) {
@@ -691,7 +691,7 @@
 
 void ExecutableTargetAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getBackend());
   os << ", ";
   p.printAttribute(getFormat());
@@ -758,7 +758,6 @@
 }
 
 void MatchAnyAttr::print(DialectAsmPrinter &p) const {
-  p << getMnemonic();
   printMultiMatchAttrList(getConditions(), p);
 }
 
@@ -788,7 +787,6 @@
 }
 
 void MatchAllAttr::print(DialectAsmPrinter &p) const {
-  p << getMnemonic();
   printMultiMatchAttrList(getConditions(), p);
 }
 
@@ -824,7 +822,7 @@
 
 void DeviceMatchIDAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getPattern());
   os << ">";
 }
@@ -851,7 +849,7 @@
 
 void DeviceMatchFeatureAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getPattern());
   os << ">";
 }
@@ -879,7 +877,7 @@
 
 void DeviceMatchArchitectureAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getPattern());
   os << ">";
 }
@@ -908,7 +906,7 @@
 
 void DeviceMatchExecutableFormatAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "<";
+  os << "<";
   p.printAttribute(getPattern());
   os << ">";
 }
@@ -946,7 +944,7 @@
 
 void ExConstantStorageAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   p.printAttribute(bindingAttr());
   os << ", ";
   p.printAttribute(storageAttr());
@@ -971,7 +969,7 @@
 
 void ExPushConstantAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   p.printAttribute(ordinalAttr());
   os << ", ";
   p.printAttribute(operandAttr());
@@ -992,7 +990,7 @@
 
 void ExOperandBufferAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   p.printAttribute(bindingAttr());
   os << ", ";
   p.printAttribute(operandAttr());
@@ -1013,7 +1011,7 @@
 
 void ExResultBufferAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   p.printAttribute(bindingAttr());
   os << ", ";
   p.printAttribute(resultAttr());
@@ -1081,7 +1079,10 @@
       .Case<BufferConstraintsAttr, DescriptorSetLayoutBindingAttr,
             // Experimental:
             ExConstantStorageAttr, ExPushConstantAttr, ExOperandBufferAttr,
-            ExResultBufferAttr>([&](auto typedAttr) { typedAttr.print(p); })
+            ExResultBufferAttr>([&](auto typedAttr) {
+        p << typedAttr.getKindName();
+        typedAttr.print(p);
+      })
       .Default([&](Attribute) {
         if (failed(generatedAttributePrinter(attr, p))) {
           llvm_unreachable("unhandled HAL attribute kind");
diff --git a/iree/compiler/Dialect/Stream/IR/StreamTypes.cpp b/iree/compiler/Dialect/Stream/IR/StreamTypes.cpp
index 011ad85..93bae2e 100644
--- a/iree/compiler/Dialect/Stream/IR/StreamTypes.cpp
+++ b/iree/compiler/Dialect/Stream/IR/StreamTypes.cpp
@@ -28,8 +28,7 @@
 //===----------------------------------------------------------------------===//
 
 // static
-Attribute ResourceConfigAttr::parse(mlir::DialectAsmParser &p,
-                                    mlir::Type type) {
+Attribute ResourceConfigAttr::parse(DialectAsmParser &p, Type type) {
   if (failed(p.parseLBrace())) return {};
 
   int64_t maxAllocationSize = 0;
@@ -60,9 +59,9 @@
                                  minBufferRangeAlignment);
 }
 
-void ResourceConfigAttr::print(mlir::DialectAsmPrinter &p) const {
+void ResourceConfigAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic() << "{";
+  os << "{";
   os << "max_allocation_size = " << getMaxAllocationSize() << ", ";
   os << "min_buffer_offset_alignment = " << getMinBufferOffsetAlignment()
      << ", ";
@@ -110,7 +109,7 @@
 // static
 ResourceConfigAttr ResourceConfigAttr::lookup(Operation *op) {
   auto *context = op->getContext();
-  auto attrId = mlir::Identifier::get("stream.resources", context);
+  auto attrId = Identifier::get("stream.resources", context);
   while (op) {
     if (auto affinityOp = llvm::dyn_cast<AffinityOpInterface>(op)) {
       auto affinityAttr = affinityOp.getAffinity();
@@ -131,7 +130,7 @@
 // #stream.timepoint<...>
 //===----------------------------------------------------------------------===//
 
-Attribute TimepointAttr::parse(mlir::DialectAsmParser &p, mlir::Type type) {
+Attribute TimepointAttr::parse(DialectAsmParser &p, Type type) {
   StringRef timeStr;
   if (failed(p.parseLess())) return {};
   if (failed(p.parseKeyword(&timeStr))) {
@@ -146,8 +145,8 @@
   return TimepointAttr::get(p.getContext(), TimepointType::get(p.getContext()));
 }
 
-void TimepointAttr::print(mlir::DialectAsmPrinter &p) const {
-  p << getMnemonic() << "<";
+void TimepointAttr::print(DialectAsmPrinter &p) const {
+  p << "<";
   p << "immediate";
   p << ">";
 }
@@ -157,7 +156,7 @@
 //===----------------------------------------------------------------------===//
 
 AffinityAttr AffinityAttr::lookup(Operation *op) {
-  auto attrId = mlir::Identifier::get("stream.affinity", op->getContext());
+  auto attrId = Identifier::get("stream.affinity", op->getContext());
   while (op) {
     if (auto affinityOp = llvm::dyn_cast<AffinityOpInterface>(op)) {
       auto affinity = affinityOp.getAffinity();
@@ -187,8 +186,7 @@
   walkAttrsFn(getFavor());
 }
 
-Attribute PartitioningConfigAttr::parse(mlir::DialectAsmParser &p,
-                                        mlir::Type type) {
+Attribute PartitioningConfigAttr::parse(DialectAsmParser &p, Type type) {
   std::string favorStr;
   if (failed(p.parseLess())) return {};
   if (succeeded(p.parseOptionalStar())) {
@@ -206,15 +204,15 @@
       FavorAttr::get(p.getContext(), favor.getValue()));
 }
 
-void PartitioningConfigAttr::print(mlir::DialectAsmPrinter &p) const {
-  p << getMnemonic() << "<";
+void PartitioningConfigAttr::print(DialectAsmPrinter &p) const {
+  p << "<";
   p << "favor-";
   p << stringifyFavor(getFavor().getValue());
   p << ">";
 }
 
 PartitioningConfigAttr PartitioningConfigAttr::lookup(Operation *op) {
-  auto attrId = mlir::Identifier::get("stream.partitioning", op->getContext());
+  auto attrId = Identifier::get("stream.partitioning", op->getContext());
   while (op) {
     auto attr = op->getAttrOfType<PartitioningConfigAttr>(attrId);
     if (attr) return attr;
@@ -253,7 +251,7 @@
   }
 }
 
-Type ResourceType::parse(mlir::DialectAsmParser &p) {
+Type ResourceType::parse(DialectAsmParser &p) {
   StringRef lifetimeStr;
   if (failed(p.parseLess())) return {};
   if (succeeded(p.parseOptionalStar())) {
@@ -270,8 +268,8 @@
   return ResourceType::get(p.getContext(), lifetime.getValue());
 }
 
-void ResourceType::print(mlir::DialectAsmPrinter &p) const {
-  p << getMnemonic() << "<";
+void ResourceType::print(DialectAsmPrinter &p) const {
+  p << "<";
   printLifetime(getLifetime(), p.getStream());
   p << ">";
 }
diff --git a/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp b/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
index bc7a6d8..93433d1 100644
--- a/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
+++ b/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
@@ -331,7 +331,6 @@
 
 void ByteRangeAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic();
   os << "<";
   os << getOffset();
   os << ", ";
@@ -421,7 +420,6 @@
 
 void CompositeAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getMnemonic();
   os << "<" << getTotalLength() << "xi8, [";
   if (getTotalLength() > 0) {
     os << "\n";
diff --git a/iree/compiler/Dialect/VM/IR/VMDialect.cpp b/iree/compiler/Dialect/VM/IR/VMDialect.cpp
index 48c4bc7..1272b52 100644
--- a/iree/compiler/Dialect/VM/IR/VMDialect.cpp
+++ b/iree/compiler/Dialect/VM/IR/VMDialect.cpp
@@ -220,7 +220,10 @@
 
 void VMDialect::printAttribute(Attribute attr, DialectAsmPrinter &p) const {
   TypeSwitch<Attribute>(attr)
-      .Case<OrdinalCountsAttr>([&](auto typedAttr) { typedAttr.print(p); })
+      .Case<OrdinalCountsAttr>([&](auto typedAttr) {
+        p << typedAttr.getKindName();
+        typedAttr.print(p);
+      })
       .Default(
           [](Attribute) { llvm_unreachable("unhandled VM attribute kind"); });
 }
diff --git a/iree/compiler/Dialect/VM/IR/VMTypes.cpp b/iree/compiler/Dialect/VM/IR/VMTypes.cpp
index da0abf7..7b3e13e 100644
--- a/iree/compiler/Dialect/VM/IR/VMTypes.cpp
+++ b/iree/compiler/Dialect/VM/IR/VMTypes.cpp
@@ -170,7 +170,7 @@
 
 void OrdinalCountsAttr::print(DialectAsmPrinter &p) const {
   auto &os = p.getStream();
-  os << getKindName() << "<";
+  os << "<";
   os << "import_funcs = " << import_funcs() << ", ";
   os << "export_funcs = " << export_funcs() << ", ";
   os << "internal_funcs = " << internal_funcs() << ", ";
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 3bdf738..f0d997c 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 3bdf738d1b7e22921137dc4492f09064d683f8a2
+Subproject commit f0d997c4723214f5bc098b0acd2e61f3215d4a49