[Mlir-commits] [mlir] 13090ec - [mlir] Remove tabs from predecessor comments

Mehdi Amini llvmlistbot at llvm.org
Mon May 4 19:15:32 PDT 2020


Author: Geoffrey Martin-Noble
Date: 2020-05-05T02:15:23Z
New Revision: 13090ec7dd4cbd54d42fe6f9f7ce7ab88c7c3c6d

URL: https://github.com/llvm/llvm-project/commit/13090ec7dd4cbd54d42fe6f9f7ce7ab88c7c3c6d
DIFF: https://github.com/llvm/llvm-project/commit/13090ec7dd4cbd54d42fe6f9f7ce7ab88c7c3c6d.diff

LOG: [mlir] Remove tabs from predecessor comments

This change removes tabs from the comments printed by the asmprinter after basic
block declarations in favor of two spaces. This is currently the only place in
the printed IR that uses tabs.

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

Added: 
    

Modified: 
    mlir/lib/IR/AsmPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index f17d8fde6a82..005571afb59a 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -2302,11 +2302,11 @@ void OperationPrinter::print(Block *block, bool printBlockArgs,
 
     // Print out some context information about the predecessors of this block.
     if (!block->getParent()) {
-      os << "\t// block is not in a region!";
+      os << "  // block is not in a region!";
     } else if (block->hasNoPredecessors()) {
-      os << "\t// no predecessors";
+      os << "  // no predecessors";
     } else if (auto *pred = block->getSinglePredecessor()) {
-      os << "\t// pred: ";
+      os << "  // pred: ";
       printBlockName(pred);
     } else {
       // We want to print the predecessors in increasing numeric order, not in
@@ -2316,7 +2316,7 @@ void OperationPrinter::print(Block *block, bool printBlockArgs,
         predIDs.push_back({state->getSSANameState().getBlockID(pred), pred});
       llvm::array_pod_sort(predIDs.begin(), predIDs.end());
 
-      os << "\t// " << predIDs.size() << " preds: ";
+      os << "  // " << predIDs.size() << " preds: ";
 
       interleaveComma(predIDs, [&](std::pair<unsigned, Block *> pred) {
         printBlockName(pred.second);


        


More information about the Mlir-commits mailing list