This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking][23/*] Account for assignment tracking in SLP Vectorizer
ClosedPublic

Authored by Orlando on Sep 5 2022, 8:49 AM.

Details

Summary

The SLP-Vectorizer can merge a set of scalar stores into a single vectorized store. Merge DIAssignID intrinsics from the scalar stores onto the new vectorized store.


The test currently requires x86 - if anyone knows any command line options to tell opt to enable the vectorization in the test without the triple please let me know.

Diff Detail

Event Timeline

Orlando created this revision.Sep 5 2022, 8:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 8:49 AM
Orlando requested review of this revision.Sep 5 2022, 8:49 AM
jmorse accepted this revision.Sep 13 2022, 3:16 AM
jmorse added a subscriber: jmorse.

LGTM with one question.

The test currently requires x86 - if anyone knows any command line options to tell opt to enable the vectorization in the test without the triple please let me know.

I suspect there are numerous target hooks that have to be called to determine whether or not the vectorization is profitable, chances of getting a fully generic test that works is low.

llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll
29–30

This raises the tantalising question of why the store goes in the middle of the dbg.assigns, and whether that's going to mean we generate a different location list.

(Not a big deal IMO).

This revision is now accepted and ready to land.Sep 13 2022, 3:16 AM
This revision was landed with ongoing or failed builds.Nov 15 2022, 7:20 AM
This revision was automatically updated to reflect the committed changes.
Orlando added inline comments.Nov 15 2022, 7:23 AM
llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll
29–30

This is a good point. I think the importance of the changes to a loclist probably depend on the instructions linenos / relationship to stepping. I had similar thoughts and questions when working on SROA, which are explained in the large comment in D133296 that starts "We could use more precision".