This is an archive of the discontinued LLVM Phabricator instance.

[LV] Add debug output to print interleaved groups
Needs ReviewPublic

Authored by anna on Aug 9 2023, 2:17 PM.

Details

Reviewers
Ayal
fhahn
Summary

Add interleaved groups available after interleave analysis is done.
See updated tests.

Diff Detail

Event Timeline

anna created this revision.Aug 9 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 2:17 PM
anna requested review of this revision.Aug 9 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 2:17 PM
anna added a comment.Sep 8 2023, 9:13 AM

shall I go ahead and land this? Simple enough change.

fhahn added inline comments.Sep 8 2023, 9:21 AM
llvm/lib/Analysis/VectorUtils.cpp
31

IMO it would be fine to print this with general debug?

llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll
1

unrelated change?

anna added a comment.EditedSep 8 2023, 9:26 AM
llvm/lib/Analysis/VectorUtils.cpp
31

Sure, it would update many tests, but that would be better I suppose to see what happens.

llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll
1

With the -debug flag it was printing out the interleaved groups as well, which I felt takes away focus from the main check lines.

Ayal added inline comments.Sep 18 2023, 4:12 AM
llvm/include/llvm/Analysis/VectorUtils.h
654

Would it be better to have InterleaveGroup::print(raw_ostream &OS) take care of dumping its members, possibly along with their indices, designated InsertPos, and IG's Factor/Reverse/Alignment attributes?
Under #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)