This is an archive of the discontinued LLVM Phabricator instance.

[LSV] Use make_range, and reformat a DEBUG message. NFC
ClosedPublic

Authored by jlebar on Jul 19 2016, 2:17 PM.

Details

Summary

The DEBUG message was hard to read because two Values were being printed
on the same line with only the delimiter "aliases". This change makes
us print each Value on its own line.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 64562.Jul 19 2016, 2:17 PM
jlebar retitled this revision from to [LSV] Use make_range, and reformat a DEBUG message. NFC.
jlebar updated this object.
jlebar added a reviewer: asbirlea.
jlebar added subscribers: arsenm, llvm-commits.
asbirlea added inline comments.Jul 19 2016, 2:35 PM
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
482 ↗(On Diff #64562)

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.

asbirlea accepted this revision.Jul 19 2016, 2:35 PM
asbirlea edited edge metadata.
This revision is now accepted and ready to land.Jul 19 2016, 2:35 PM
jlebar updated this revision to Diff 64568.Jul 19 2016, 2:42 PM
jlebar marked an inline comment as done.
jlebar edited edge metadata.

Add indentation.

lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
482 ↗(On Diff #64562)

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.

This revision was automatically updated to reflect the committed changes.