Skip to content

Commit 89cceaf

Browse files
HEIR Teamcopybara-github
authored andcommitted
Updates LLVM usage to match [d33e33fde770](llvm/llvm-project@d33e33fde770) PiperOrigin-RevId: 718414171
1 parent 80d0055 commit 89cceaf

File tree

5 files changed

+81
-53
lines changed

5 files changed

+81
-53
lines changed

bazel/import_llvm.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load(
77

88
def import_llvm(name):
99
"""Imports LLVM."""
10-
LLVM_COMMIT = "7084110518f904192c2935327b884b17de00bee0"
10+
LLVM_COMMIT = "d33e33fde770214e134ed58f992a5a95a522f7ff"
1111

1212
new_git_repository(
1313
name = name,

lib/Dialect/Secret/Conversions/SecretToCGGI/SecretToCGGI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ struct ConvertSecretCastOp : public OpConversionPattern<secret::CastOp> {
528528
// In other cases, use a reinterpret cast to resolve the memref shapes.
529529
int64_t offset;
530530
SmallVector<int64_t> strides;
531-
if (failed(getStridesAndOffset(outRhsType, strides, offset)))
531+
if (failed(outRhsType.getStridesAndOffset(strides, offset)))
532532
return rewriter.notifyMatchFailure(
533533
op, "failed to get stride and offset exprs");
534534
auto castOp = rewriter.create<memref::ReinterpretCastOp>(

lib/Transforms/MemrefToArith/UnrollAndForward.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static FailureOr<int64_t> materializeAndFlatten(MemRefAccess access,
153153
for (auto ndx : materialized) {
154154
castIndices.push_back((int64_t)ndx);
155155
}
156-
auto [strides, offset] = getStridesAndOffset(type);
156+
auto [strides, offset] = type.getStridesAndOffset();
157157
return flattenIndex(castIndices, strides, offset);
158158
}
159159

@@ -285,7 +285,8 @@ static LogicalResult forwardFullyUnrolledStoreToLoad(
285285
// In this case, the load cannot be completely removed, but instead can be
286286
// replaced with a load from the original memref at the appropriate index.
287287
const auto [endingStrides, endingOffset] =
288-
getStridesAndOffset(llvm::cast<MemRefType>(loadSourceMemref.getType()));
288+
llvm::cast<MemRefType>(loadSourceMemref.getType())
289+
.getStridesAndOffset();
289290

290291
ImplicitLocOpBuilder b(loadOp->getLoc(), loadOp);
291292
llvm::SmallVector<Value> indexValues;

lib/Utils/TargetUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::string flattenIndexExpression(
7373
std::string flattenIndexExpressionSOP(
7474
MemRefType memRefType, ValueRange indices,
7575
std::function<std::string(Value)> valueToString) {
76-
const auto [strides, offset] = getStridesAndOffset(memRefType);
76+
const auto [strides, offset] = memRefType.getStridesAndOffset();
7777
std::string accum = std::to_string(offset);
7878
for (size_t i = 0; i < indices.size(); ++i) {
7979
accum = llvm::formatv("{2} + {0} * {1}", valueToString(indices[i]),

patches/llvm.patch

Lines changed: 75 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,76 @@
11
Auto generated patch. Do not edit or delete it, even if empty.
2-
diff -ruN --strip-trailing-cr a/mlir/include/mlir/IR/CommonTypeConstraints.td b/mlir/include/mlir/IR/CommonTypeConstraints.td
3-
--- a/mlir/include/mlir/IR/CommonTypeConstraints.td
4-
+++ b/mlir/include/mlir/IR/CommonTypeConstraints.td
5-
@@ -329,31 +329,31 @@
6-
def F80 : F<80>;
7-
def F128 : F<128>;
8-
9-
-def BF16 : Type<CPred<"::llvm::isa<BFloat16Type>($_self)">, "bfloat16 type">,
10-
+def BF16 : Type<CPred<"::llvm::isa<::mlir::BFloat16Type>($_self)">, "bfloat16 type">,
11-
BuildableType<"$_builder.getType<BFloat16Type>()">;
12-
-def TF32 : Type<CPred<"::llvm::isa<FloatTF32Type>($_self)">, "tf32 type">,
13-
+def TF32 : Type<CPred<"::llvm::isa<::mlir::FloatTF32Type>($_self)">, "tf32 type">,
14-
BuildableType<"$_builder.getType<FloatTF32Type>()">;
15-
-def F8E4M3FN : Type<CPred<"::llvm::isa<Float8E4M3FNType>($_self)">, "f8E4M3FN type">,
16-
+def F8E4M3FN : Type<CPred<"::llvm::isa<::mlir::Float8E4M3FNType>($_self)">, "f8E4M3FN type">,
17-
BuildableType<"$_builder.getType<Float8E4M3FNType>()">;
18-
-def F8E5M2 : Type<CPred<"::llvm::isa<Float8E5M2Type>($_self)">, "f8E5M2 type">,
19-
+def F8E5M2 : Type<CPred<"::llvm::isa<::mlir::Float8E5M2Type>($_self)">, "f8E5M2 type">,
20-
BuildableType<"$_builder.getType<Float8E5M2Type>()">;
21-
-def F8E4M3 : Type<CPred<"::llvm::isa<Float8E4M3Type>($_self)">, "f8E4M3 type">,
22-
+def F8E4M3 : Type<CPred<"::llvm::isa<::mlir::Float8E4M3Type>($_self)">, "f8E4M3 type">,
23-
BuildableType<"$_builder.getType<Float8E4M3Type>()">;
24-
-def F8E4M3FNUZ : Type<CPred<"::llvm::isa<Float8E4M3FNUZType>($_self)">, "f8E4M3FNUZ type">,
25-
+def F8E4M3FNUZ : Type<CPred<"::llvm::isa<::mlir::Float8E4M3FNUZType>($_self)">, "f8E4M3FNUZ type">,
26-
BuildableType<"$_builder.getType<Float8E4M3FNUZType>()">;
27-
-def F8E4M3B11FNUZ : Type<CPred<"::llvm::isa<Float8E4M3B11FNUZType>($_self)">, "f8E4M3B11FNUZ type">,
28-
+def F8E4M3B11FNUZ : Type<CPred<"::llvm::isa<::mlir::Float8E4M3B11FNUZType>($_self)">, "f8E4M3B11FNUZ type">,
29-
BuildableType<"$_builder.getType<Float8E4M3B11FNUZType>()">;
30-
-def F8E5M2FNUZ : Type<CPred<"::llvm::isa<Float8E5M2FNUZType>($_self)">, "f8E5M2FNUZ type">,
31-
+def F8E5M2FNUZ : Type<CPred<"::llvm::isa<::mlir::Float8E5M2FNUZType>($_self)">, "f8E5M2FNUZ type">,
32-
BuildableType<"$_builder.getType<Float8E5M2FNUZType>()">;
33-
-def F8E3M4 : Type<CPred<"::llvm::isa<Float8E3M4Type>($_self)">, "f8E3M4 type">,
34-
+def F8E3M4 : Type<CPred<"::llvm::isa<::mlir::Float8E3M4Type>($_self)">, "f8E3M4 type">,
35-
BuildableType<"$_builder.getType<Float8E3M4Type>()">;
36-
-def F4E2M1FN : Type<CPred<"::llvm::isa<Float4E2M1FNType>($_self)">, "f4E2M1FN type">,
37-
+def F4E2M1FN : Type<CPred<"::llvm::isa<::mlir::Float4E2M1FNType>($_self)">, "f4E2M1FN type">,
38-
BuildableType<"$_builder.getType<Float4E2M1FNType>()">;
39-
-def F6E2M3FN : Type<CPred<"::llvm::isa<Float6E2M3FNType>($_self)">, "f6E2M3FN type">,
40-
+def F6E2M3FN : Type<CPred<"::llvm::isa<::mlir::Float6E2M3FNType>($_self)">, "f6E2M3FN type">,
41-
BuildableType<"$_builder.getType<Float6E2M3FNType>()">;
42-
-def F6E3M2FN : Type<CPred<"::llvm::isa<Float6E3M2FNType($_self)">, "f6E3M2FN type">,
43-
+def F6E3M2FN : Type<CPred<"::llvm::isa<::mlir::Float6E3M2FNType>($_self)">, "f6E3M2FN type">,
44-
BuildableType<"$_builder.getType<Float6E3M2FNType>()">;
45-
-def F8E8M0FNU : Type<CPred<"::llvm::isa<Float8E8M0FNUType>($_self)">, "f8E8M0FNU type">,
46-
+def F8E8M0FNU : Type<CPred<"::llvm::isa<::mlir::Float8E8M0FNUType>($_self)">, "f8E8M0FNU type">,
47-
BuildableType<"$_builder.getType<Float8E8M0FNUType>()">;
48-
49-
def AnyComplex : Type<CPred<"::llvm::isa<::mlir::ComplexType>($_self)">,
2+
diff -ruN --strip-trailing-cr a/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i b/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i
3+
--- a/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i
4+
+++ b/lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i
5+
@@ -1,71 +0,0 @@
6+
-%feature("docstring",
7+
-"A container to specify how to save a core file.
8+
-
9+
-SBSaveCoreOptions includes API's to specify the memory regions and threads to include
10+
-when generating a core file. It extends the existing SaveCoreStyle option.
11+
-
12+
-* eSaveCoreFull will save off all thread and memory regions, ignoring the memory regions and threads in
13+
-the options object.
14+
-
15+
-* eSaveCoreDirtyOnly pages will capture all threads and all rw- memory regions, in addition to the regions specified
16+
-in the options object if they are not already captured.
17+
-
18+
-* eSaveCoreStackOnly will capture all threads, but no memory regions unless specified.
19+
-
20+
-* eSaveCoreCustomOnly Custom defers entirely to the SBSaveCoreOptions object and will only save what is specified.
21+
- Picking custom and specifying nothing will result in an error being returned.
22+
-
23+
-Note that currently ELF Core files are not supported.
24+
-")
25+
-
26+
-%feature("docstring", "
27+
- Set the plugin name to save a Core file with. Only plugins registered with Plugin manager will be accepted
28+
- Examples are Minidump and Mach-O."
29+
-) lldb::SBSaveCoreOptions::SetPluginName
30+
-
31+
-%feature("docstring", "
32+
- Get the specified plugin name, or None if the name is not set."
33+
-) lldb::SBSaveCoreOptions::GetPluginName
34+
-
35+
-%feature("docstring", "
36+
- Set the lldb.SaveCoreStyle."
37+
-) lldb::SBSaveCoreOptions::SetStyle
38+
-
39+
-%feature("docstring", "
40+
- Get the specified lldb.SaveCoreStyle, or eSaveCoreUnspecified if not set."
41+
-) lldb::SBSaveCoreOptions::GetStyle
42+
-
43+
-%feature("docstring", "
44+
- Set the file path to save the Core file at."
45+
-) lldb::SBSaveCoreOptions::SetOutputFile
46+
-
47+
-%feature("docstring", "
48+
- Get an SBFileSpec corresponding to the specified output path, or none if not set."
49+
-) lldb::SBSaveCoreOptions::GetOutputFile
50+
-
51+
-%feature("docstring", "
52+
- Set the process to save, or unset a process by providing a default SBProcess.
53+
- Resetting will result in the reset of all process specific options, such as Threads to save."
54+
-) lldb::SBSaveCoreOptions::SetProcess
55+
-
56+
-%feature("docstring", "
57+
- Add an SBThread to be saved, an error will be returned if an SBThread from a different process is specified.
58+
- The process is set either by the first SBThread added to the options container, or explicitly by the SetProcess call."
59+
-) lldb::SBSaveCoreOptions::AddThread
60+
-
61+
-%feature("docstring", "
62+
- Remove an SBthread if present in the container, returns true if a matching thread was found and removed."
63+
-) lldb::SBSaveCoreOptions::RemoveThread
64+
-
65+
-%feature("docstring", "
66+
- Add a memory region to save, an error will be returned in the region is invalid.
67+
- Ranges that overlap will be unioned into a single region."
68+
-) lldb::SBSaveCoreOptions::AddMemoryRegionToSave
69+
-
70+
-%feature("docstring", "
71+
- Get an SBThreadCollection of all threads marked to be saved. This collection is not sorted according to insertion order."
72+
-) lldb::SBSaveCoreOptions::GetThreadsToSave
73+
-
74+
-%feature("docstring", "
75+
- Unset all options."
76+
-) lldb::SBSaveCoreOptions::Clear

0 commit comments

Comments
 (0)