[PATCH] D154779: [NFC] make TypeInfer::MergeInTypeInfo const
Tomas Matheson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 8 16:15:13 PDT 2023
tmatheson created this revision.
tmatheson added a reviewer: craig.topper.
Herald added a project: All.
tmatheson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154779
Files:
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.h
Index: llvm/utils/TableGen/CodeGenDAGPatterns.h
===================================================================
--- llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -272,11 +272,11 @@
/// expand*) is to return "true" if a change has been made, "false"
/// otherwise.
- bool MergeInTypeInfo(TypeSetByHwMode &Out, const TypeSetByHwMode &In);
- bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT::SimpleValueType InVT) {
+ bool MergeInTypeInfo(TypeSetByHwMode &Out, const TypeSetByHwMode &In) const;
+ bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT::SimpleValueType InVT) const {
return MergeInTypeInfo(Out, TypeSetByHwMode(InVT));
}
- bool MergeInTypeInfo(TypeSetByHwMode &Out, ValueTypeByHwMode InVT) {
+ bool MergeInTypeInfo(TypeSetByHwMode &Out, ValueTypeByHwMode InVT) const {
return MergeInTypeInfo(Out, TypeSetByHwMode(InVT));
}
@@ -335,10 +335,11 @@
const TypeSetByHwMode::SetType &Legal);
struct ValidateOnExit {
- ValidateOnExit(TypeSetByHwMode &T, TypeInfer &TI) : Infer(TI), VTS(T) {}
+ ValidateOnExit(const TypeSetByHwMode &T, const TypeInfer &TI)
+ : Infer(TI), VTS(T) {}
~ValidateOnExit();
- TypeInfer &Infer;
- TypeSetByHwMode &VTS;
+ const TypeInfer &Infer;
+ const TypeSetByHwMode &VTS;
};
struct SuppressValidation {
Index: llvm/utils/TableGen/CodeGenDAGPatterns.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -366,7 +366,7 @@
// --- TypeInfer
bool TypeInfer::MergeInTypeInfo(TypeSetByHwMode &Out,
- const TypeSetByHwMode &In) {
+ const TypeSetByHwMode &In) const {
ValidateOnExit _1(Out, *this);
In.validate();
if (In.empty() || Out == In || TP.hasError())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154779.538394.patch
Type: text/x-patch
Size: 1910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230708/0d86b6cb/attachment.bin>
More information about the llvm-commits
mailing list