[PATCH] D22817: Utility to print all the basic blocks of a loop.
Aditya Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 11:15:38 PDT 2016
hiraditya added inline comments.
================
Comment at: llvm/include/llvm/Analysis/LoopInfoImpl.h:339
@@ +338,3 @@
+template<class BlockT, class LoopT>
+void LoopBase<BlockT, LoopT>::printVerbose(raw_ostream &OS,
+ unsigned Depth) const {
----------------
sanjoy wrote:
> Not sure if this needs to be a completely separate method -- why not just pass in a `verbose` flag to `print`?
Okay, I'll push the patch with just another parameter to print.
================
Comment at: llvm/include/llvm/Analysis/LoopInfoImpl.h:349
@@ +348,3 @@
+ if (BB == H) OS << "<header>\n";
+ if (BB == L) OS << "<latch>\n";
+ if (isLoopExiting(BB)) OS << "<exiting>\n";
----------------
sanjoy wrote:
> Hm, just noticed that this is misleading both here and in the print method above -- if the loop has multiple latches, we won't tag any blocks as `<latch>`. This should be fixed (we need a `isLoopLatch` helper like we have `isLoopExiting`). @hiraditya - do you mind fixing this in a later change? If you won't be able to get to it, please let me know and I'll do it.
I can do that in a separate patch. Thanks for the pointer.
https://reviews.llvm.org/D22817
More information about the llvm-commits
mailing list