[Mlir-commits] [mlir] 7dad59f - Apply clang-tidy fixes for llvm-qualified-auto in DialectConversion.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 16 18:07:37 PST 2024
Author: Mehdi Amini
Date: 2024-02-16T18:07:11-08:00
New Revision: 7dad59f0a980b5bb8e76db1755d76aabf2a940fc
URL: https://github.com/llvm/llvm-project/commit/7dad59f0a980b5bb8e76db1755d76aabf2a940fc
DIFF: https://github.com/llvm/llvm-project/commit/7dad59f0a980b5bb8e76db1755d76aabf2a940fc.diff
LOG: Apply clang-tidy fixes for llvm-qualified-auto in DialectConversion.cpp (NFC)
Added:
Modified:
mlir/lib/Transforms/Utils/DialectConversion.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index 84597fb7986b07..c58b856faefb62 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -490,7 +490,7 @@ void ArgConverter::notifyOpRemoved(Operation *op) {
notifyOpRemoved(&nestedOp);
// Check if this block was converted.
- auto it = conversionInfo.find(&block);
+ auto *it = conversionInfo.find(&block);
if (it == conversionInfo.end())
continue;
@@ -504,7 +504,7 @@ void ArgConverter::notifyOpRemoved(Operation *op) {
}
void ArgConverter::discardRewrites(Block *block) {
- auto it = conversionInfo.find(block);
+ auto *it = conversionInfo.find(block);
if (it == conversionInfo.end())
return;
Block *origBlock = it->second.origBlock;
@@ -3402,7 +3402,7 @@ static ConversionTarget::DynamicLegalityCallbackFn composeLegalityCallbacks(
void ConversionTarget::setLegalityCallback(
OperationName name, const DynamicLegalityCallbackFn &callback) {
assert(callback && "expected valid legality callback");
- auto infoIt = legalOperations.find(name);
+ auto *infoIt = legalOperations.find(name);
assert(infoIt != legalOperations.end() &&
infoIt->second.action == LegalizationAction::Dynamic &&
"expected operation to already be marked as dynamically legal");
@@ -3412,7 +3412,7 @@ void ConversionTarget::setLegalityCallback(
void ConversionTarget::markOpRecursivelyLegal(
OperationName name, const DynamicLegalityCallbackFn &callback) {
- auto infoIt = legalOperations.find(name);
+ auto *infoIt = legalOperations.find(name);
assert(infoIt != legalOperations.end() &&
infoIt->second.action != LegalizationAction::Illegal &&
"expected operation to already be marked as legal");
@@ -3441,7 +3441,7 @@ void ConversionTarget::setLegalityCallback(
auto ConversionTarget::getOpInfo(OperationName op) const
-> std::optional<LegalizationInfo> {
// Check for info for this specific operation.
- auto it = legalOperations.find(op);
+ const auto *it = legalOperations.find(op);
if (it != legalOperations.end())
return it->second;
// Check for info for the parent dialect.
More information about the Mlir-commits
mailing list