Integrate LLVM at llvm/llvm-project@fad14a17a490
Updates LLVM usage to match
[fad14a17a490](https://github.com/llvm/llvm-project/commit/fad14a17a490)
PiperOrigin-RevId: 399926378
diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt
index 60085e7..1e1405a 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
-3310e0020cf1bc4c17acf9d404274325007af326 third_party/llvm-project
+fad14a17a490b1825b0c7c40ace7e83c91af4b8a third_party/llvm-project
2a1db8ebce63d1ee715a1cb07c028abc7c4ed839 third_party/mlir-hlo
3f701faace7addc75d16dea8a6cd769fa5b3f260 third_party/musl
4c7697dbe973ed01ae6fbec37d186ebd05982e1f third_party/pybind11
diff --git a/iree/compiler/Dialect/Flow/IR/FlowTypes.cpp b/iree/compiler/Dialect/Flow/IR/FlowTypes.cpp
index 4fdc6ad..a7a35d7 100644
--- a/iree/compiler/Dialect/Flow/IR/FlowTypes.cpp
+++ b/iree/compiler/Dialect/Flow/IR/FlowTypes.cpp
@@ -199,8 +199,7 @@
StringRef mnemonic;
if (failed(parser.parseKeyword(&mnemonic))) return {};
Attribute attr;
- auto parseResult =
- generatedAttributeParser(getContext(), parser, mnemonic, type, attr);
+ auto parseResult = generatedAttributeParser(parser, mnemonic, type, attr);
if (parseResult.hasValue()) return attr;
parser.emitError(parser.getCurrentLocation())
<< "unknown Flow attribute: " << mnemonic;
@@ -217,8 +216,7 @@
StringRef mnemonic;
if (failed(parser.parseKeyword(&mnemonic))) return {};
Type type;
- OptionalParseResult parseResult =
- generatedTypeParser(getContext(), parser, mnemonic, type);
+ OptionalParseResult parseResult = generatedTypeParser(parser, mnemonic, type);
if (parseResult.hasValue()) return type;
if (mnemonic == "dispatch.tensor") {
return DispatchTensorType::parse(parser);
diff --git a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
index 0800baa..17afd26 100644
--- a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
@@ -567,9 +567,7 @@
}
// static
-Attribute DeviceTargetAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
- auto b = p.getBuilder();
+Attribute DeviceTargetAttr::parse(DialectAsmParser &p, Type type) {
StringAttr deviceIDAttr;
DictionaryAttr configAttr;
// `<"device-id"`
@@ -585,7 +583,7 @@
if (failed(p.parseGreater())) {
return {};
}
- return get(b.getContext(), deviceIDAttr, configAttr);
+ return get(p.getContext(), deviceIDAttr, configAttr);
}
void DeviceTargetAttr::print(DialectAsmPrinter &p) const {
@@ -711,9 +709,7 @@
}
// static
-Attribute ExecutableTargetAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
- auto b = p.getBuilder();
+Attribute ExecutableTargetAttr::parse(DialectAsmParser &p, Type type) {
StringAttr backendAttr;
StringAttr formatAttr;
DictionaryAttr configurationAttr;
@@ -731,7 +727,7 @@
if (failed(p.parseGreater())) {
return {};
}
- return get(b.getContext(), backendAttr, formatAttr, configurationAttr);
+ return get(p.getContext(), backendAttr, formatAttr, configurationAttr);
}
void ExecutableTargetAttr::print(DialectAsmPrinter &p) const {
@@ -797,9 +793,8 @@
}
// static
-Attribute MatchAnyAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
- return get(context, parseMultiMatchAttrArray(p));
+Attribute MatchAnyAttr::parse(DialectAsmParser &p, Type type) {
+ return get(p.getContext(), parseMultiMatchAttrArray(p));
}
void MatchAnyAttr::print(DialectAsmPrinter &p) const {
@@ -828,9 +823,8 @@
}
// static
-Attribute MatchAllAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
- return get(context, parseMultiMatchAttrArray(p));
+Attribute MatchAllAttr::parse(DialectAsmParser &p, Type type) {
+ return get(p.getContext(), parseMultiMatchAttrArray(p));
}
void MatchAllAttr::print(DialectAsmPrinter &p) const {
@@ -859,14 +853,13 @@
}
// static
-Attribute DeviceMatchIDAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
+Attribute DeviceMatchIDAttr::parse(DialectAsmParser &p, Type type) {
StringAttr patternAttr;
if (failed(p.parseLess()) || failed(p.parseAttribute(patternAttr)) ||
failed(p.parseGreater())) {
return {};
}
- return get(context, patternAttr);
+ return get(p.getContext(), patternAttr);
}
void DeviceMatchIDAttr::print(DialectAsmPrinter &p) const {
@@ -887,14 +880,13 @@
}
// static
-Attribute DeviceMatchFeatureAttr::parse(MLIRContext *context,
- DialectAsmParser &p, Type type) {
+Attribute DeviceMatchFeatureAttr::parse(DialectAsmParser &p, Type type) {
StringAttr patternAttr;
if (failed(p.parseLess()) || failed(p.parseAttribute(patternAttr)) ||
failed(p.parseGreater())) {
return {};
}
- return get(context, patternAttr);
+ return get(p.getContext(), patternAttr);
}
void DeviceMatchFeatureAttr::print(DialectAsmPrinter &p) const {
@@ -916,14 +908,13 @@
}
// static
-Attribute DeviceMatchArchitectureAttr::parse(MLIRContext *context,
- DialectAsmParser &p, Type type) {
+Attribute DeviceMatchArchitectureAttr::parse(DialectAsmParser &p, Type type) {
StringAttr patternAttr;
if (failed(p.parseLess()) || failed(p.parseAttribute(patternAttr)) ||
failed(p.parseGreater())) {
return {};
}
- return get(context, patternAttr);
+ return get(p.getContext(), patternAttr);
}
void DeviceMatchArchitectureAttr::print(DialectAsmPrinter &p) const {
@@ -945,15 +936,14 @@
}
// static
-Attribute DeviceMatchExecutableFormatAttr::parse(MLIRContext *context,
- DialectAsmParser &p,
+Attribute DeviceMatchExecutableFormatAttr::parse(DialectAsmParser &p,
Type type) {
StringAttr patternAttr;
if (failed(p.parseLess()) || failed(p.parseAttribute(patternAttr)) ||
failed(p.parseGreater())) {
return {};
}
- return get(context, patternAttr);
+ return get(p.getContext(), patternAttr);
}
void DeviceMatchExecutableFormatAttr::print(DialectAsmPrinter &p) const {
@@ -1106,7 +1096,7 @@
if (failed(parser.parseKeyword(&mnemonic))) return {};
Attribute genAttr;
OptionalParseResult parseResult =
- generatedAttributeParser(getContext(), parser, mnemonic, type, genAttr);
+ generatedAttributeParser(parser, mnemonic, type, genAttr);
if (parseResult.hasValue()) return genAttr;
if (mnemonic == BufferConstraintsAttr::getKindName()) {
return BufferConstraintsAttr::parse(parser);
diff --git a/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp b/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
index 4448bc4..f85c30d 100644
--- a/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
+++ b/iree/compiler/Dialect/Util/IR/UtilAttrs.cpp
@@ -279,8 +279,7 @@
// Buffer attributes
//===----------------------------------------------------------------------===//
-Attribute ByteRangeAttr::parse(MLIRContext *context, DialectAsmParser &p,
- Type type) {
+Attribute ByteRangeAttr::parse(DialectAsmParser &p, Type type) {
if (failed(p.parseLess())) return {};
// TODO(benvanik): support the range syntax; the dialect asm parser fights
@@ -300,7 +299,7 @@
failed(p.parseInteger(length)) || failed(p.parseGreater())) {
return {};
}
- return get(context, offset, length);
+ return get(p.getContext(), offset, length);
}
int64_t start;
@@ -327,7 +326,7 @@
int64_t offset = start;
int64_t length = end - start;
- return get(context, offset, length);
+ return get(p.getContext(), offset, length);
}
void ByteRangeAttr::print(DialectAsmPrinter &p) const {
@@ -377,8 +376,7 @@
return success();
}
-Attribute CompositeAttr::parse(MLIRContext *context, DialectAsmParser &parser,
- Type type) {
+Attribute CompositeAttr::parse(DialectAsmParser &parser, Type type) {
SmallVector<int64_t> dims;
if (failed(parser.parseLess()) ||
failed(parser.parseDimensionList(dims, /*allowDynamic=*/false)) ||
@@ -417,7 +415,8 @@
parser.emitError(parser.getCurrentLocation(), "unterminated value list");
return {};
}
- return get(context, totalLength, ArrayAttr::get(context, valueAttrs));
+ return get(parser.getContext(), totalLength,
+ ArrayAttr::get(parser.getContext(), valueAttrs));
}
void CompositeAttr::print(DialectAsmPrinter &p) const {
@@ -546,7 +545,7 @@
if (failed(parser.parseKeyword(&mnemonic))) return {};
Attribute genAttr;
OptionalParseResult parseResult =
- generatedAttributeParser(getContext(), parser, mnemonic, type, genAttr);
+ generatedAttributeParser(parser, mnemonic, type, genAttr);
if (parseResult.hasValue()) return genAttr;
parser.emitError(parser.getNameLoc())
<< "unknown util attribute: " << mnemonic;
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/IREE/IREEDialect.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/IREE/IREEDialect.cpp
index ce82241..6b2ab7f 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/IREE/IREEDialect.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/IREE/IREEDialect.cpp
@@ -34,7 +34,7 @@
StringRef typeTag;
Type genType;
if (succeeded(parser.parseKeyword(&typeTag)))
- generatedTypeParser(getContext(), parser, typeTag, genType);
+ generatedTypeParser(parser, typeTag, genType);
return genType;
}
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/IREEPyDM/IR/Dialect.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/IREEPyDM/IR/Dialect.cpp
index 4b6870d..f52fdd5 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/IREEPyDM/IR/Dialect.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/IREEPyDM/IR/Dialect.cpp
@@ -70,8 +70,7 @@
StringRef typeTag;
if (succeeded(parser.parseKeyword(&typeTag))) {
Type genType;
- auto parseResult =
- generatedTypeParser(getContext(), parser, typeTag, genType);
+ auto parseResult = generatedTypeParser(parser, typeTag, genType);
if (parseResult.hasValue()) {
if (*parseResult) {
return Type();
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 3310e00..fad14a1 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 3310e0020cf1bc4c17acf9d404274325007af326
+Subproject commit fad14a17a490b1825b0c7c40ace7e83c91af4b8a