[Mlir-commits] [mlir] 9b974df - [MLIR] [NFC] Buffer placement pass - clang tidy warnings

Uday Bondhugula llvmlistbot at llvm.org
Tue Jul 14 11:19:56 PDT 2020


Author: Uday Bondhugula
Date: 2020-07-14T23:49:24+05:30
New Revision: 9b974dfa720854d17df0911fdf2a55ad75052b78

URL: https://github.com/llvm/llvm-project/commit/9b974dfa720854d17df0911fdf2a55ad75052b78
DIFF: https://github.com/llvm/llvm-project/commit/9b974dfa720854d17df0911fdf2a55ad75052b78.diff

LOG: [MLIR] [NFC] Buffer placement pass - clang tidy warnings

Add missing const - addresses clang tidy warnings.

Differential Revision: https://reviews.llvm.org/D83794

Added: 
    

Modified: 
    mlir/lib/Transforms/BufferPlacement.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/BufferPlacement.cpp b/mlir/lib/Transforms/BufferPlacement.cpp
index 87b2687b6982..0c24621c3666 100644
--- a/mlir/lib/Transforms/BufferPlacement.cpp
+++ b/mlir/lib/Transforms/BufferPlacement.cpp
@@ -311,7 +311,7 @@ class BufferPlacement {
   /// the top of the file for all alloc nodes that can be handled by this
   /// analysis.
   void placeAllocs() const {
-    for (auto &entry : allocs) {
+    for (const AllocEntry &entry : allocs) {
       Value alloc = entry.allocValue;
       // Get the actual block to place the alloc and get liveness information
       // for the placement block.
@@ -572,7 +572,7 @@ class BufferPlacement {
     // These deallocations will be linked to their associated allocation nodes
     // since they don't have any aliases that can (potentially) increase their
     // liveness.
-    for (auto &entry : allocs) {
+    for (const AllocEntry &entry : allocs) {
       Value alloc = entry.allocValue;
       auto aliasesSet = aliases.resolve(alloc);
       assert(aliasesSet.size() > 0 && "must contain at least one alias");


        


More information about the Mlir-commits mailing list