mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Make LoopInfo::print() identify header, exit, and latch blocks,
and print the loop depth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efc783951c
commit
927793b6a1
@ -592,11 +592,16 @@ public:
|
||||
}
|
||||
|
||||
void print(std::ostream &OS, unsigned Depth = 0) const {
|
||||
OS << std::string(Depth*2, ' ') << "Loop Containing: ";
|
||||
OS << std::string(Depth*2, ' ') << "Loop at depth " << getLoopDepth()
|
||||
<< " containing: ";
|
||||
|
||||
for (unsigned i = 0; i < getBlocks().size(); ++i) {
|
||||
if (i) OS << ",";
|
||||
WriteAsOperand(OS, getBlocks()[i], false);
|
||||
BlockT *BB = getBlocks()[i];
|
||||
WriteAsOperand(OS, BB, false);
|
||||
if (BB == getHeader()) OS << "<header>";
|
||||
if (BB == getLoopLatch()) OS << "<latch>";
|
||||
if (isLoopExit(BB)) OS << "<exit>";
|
||||
}
|
||||
OS << "\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user