[PATCH] D40422: [CodeGen] Unify MBB reference format in both MIR and debug output
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 11:24:41 PST 2017
MatzeB added a comment.
One thing I always found odd with the MIR format is that all the MBB references repeated the IR name of the basic block. Even though it would be perfectly fine to only print the IR reference once where the block is defined and not for every reference.
How about changing `printMBBReference()` to never print the `.name` suffix and change the MI parser to optionally accept it to accomodate old .mir files, but new .mir files would not print it anymore in MBB references?
================
Comment at: lib/CodeGen/BranchFolding.cpp:616-617
return false;
- DEBUG(dbgs() << "Common tail length of BB#" << MBB1->getNumber()
- << " and BB#" << MBB2->getNumber() << " is " << CommonTailLen
+ DEBUG(dbgs() << "Common tail length of %bb." << MBB1->getNumber()
+ << " and %bb." << MBB2->getNumber() << " is " << CommonTailLen
<< '\n');
----------------
Use `printMBBReference()`? The same applies to various other debug printers below.
https://reviews.llvm.org/D40422
More information about the llvm-commits
mailing list