[PATCH] D22533: [LSV] Use make_range, and reformat a DEBUG message. NFC

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 14:42:39 PDT 2016


jlebar added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:482
@@ +481,3 @@
+          dbgs() << "LSV: Found alias:\n"
+                    "Aliasing instruction and pointer:\n"
+                 << *MemInstrValue << '\n'
----------------
asbirlea wrote:
> I'd like to have some indentation for all lines following this, it looks easier to follow that this is a single message. 
> I find the previous message clearer (explicitly adding "aliases"), but I guess having the instruction and pointer on different lines is also ok with some indentation.
> This is more a personal preference, so leaving it up to you.
The way I've been reading it is looking for lines that start with "LSV".  It's not great, but it sort of works.

I just remembered, the reason I did this with no indentation is to match the "LSV: Stores to vectorize:" message.  This one calls V->dump(), and we can't directly add indentation to that.  I suppose we could do `dbgs() << "  " <<  *V << "\n"`, though...

In practice the instructions will almost always have indentation because we (apparently) carry the indentation from the original ir.  But it would be nice to be able to indent the strings in this message, so I went ahead and added the indentation everywhere.


https://reviews.llvm.org/D22533





More information about the llvm-commits mailing list