[Mlir-commits] [mlir] 1d75f00 - [MLIR][NFC] Fix clang-tidy warnings in std to llvm conversion
Uday Bondhugula
llvmlistbot at llvm.org
Wed Aug 5 09:46:34 PDT 2020
Author: Uday Bondhugula
Date: 2020-08-05T22:12:05+05:30
New Revision: 1d75f004ab069a0de6ff0622a9cf937e8b54f6ba
URL: https://github.com/llvm/llvm-project/commit/1d75f004ab069a0de6ff0622a9cf937e8b54f6ba
DIFF: https://github.com/llvm/llvm-project/commit/1d75f004ab069a0de6ff0622a9cf937e8b54f6ba.diff
LOG: [MLIR][NFC] Fix clang-tidy warnings in std to llvm conversion
Fix clang-tidy warnings in std to llvm conversion.
Added:
Modified:
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
index ac19924e96e86..5fa3f36e57938 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -1872,7 +1872,7 @@ struct AllocLikeOpLowering : public ConvertOpToLLVMPattern<AllocLikeOp> {
bool useAlignedAlloc = allocationAlignment.hasValue();
// Insert the malloc/aligned_alloc declaration if it is not already present.
- auto allocFuncName = useAlignedAlloc ? "aligned_alloc" : "malloc";
+ const auto *allocFuncName = useAlignedAlloc ? "aligned_alloc" : "malloc";
auto module = allocOp.getParentOfType<ModuleOp>();
auto allocFunc = module.lookupSymbol<LLVM::LLVMFuncOp>(allocFuncName);
if (!allocFunc) {
@@ -3190,7 +3190,7 @@ struct GenericAtomicRMWOpLowering
loopBlock, newLoaded);
rewriter.setInsertionPointToEnd(endBlock);
- MoveOpsRange(atomicOp.getResult(), newLoaded, std::next(opsToMoveStart),
+ moveOpsRange(atomicOp.getResult(), newLoaded, std::next(opsToMoveStart),
std::next(opsToMoveEnd), rewriter);
// The 'result' of the atomic_rmw op is the newly loaded value.
@@ -3201,7 +3201,7 @@ struct GenericAtomicRMWOpLowering
private:
// Clones a segment of ops [start, end) and erases the original.
- void MoveOpsRange(ValueRange oldResult, ValueRange newResult,
+ void moveOpsRange(ValueRange oldResult, ValueRange newResult,
Block::iterator start, Block::iterator end,
ConversionPatternRewriter &rewriter) const {
BlockAndValueMapping mapping;
More information about the Mlir-commits
mailing list