This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Start merging demanded reasoning - starting with load/stores [nfc]
ClosedPublic

Authored by reames on Jun 16 2022, 10:03 AM.

Details

Summary

This change merges the logic for reasoning about demanded portions of the VTYPE register between the main dataflow algorithm and the backwards mutation post pass. In the process, we get to delete a bunch of now redundant code.

This should be entirely NFC. I included a slight hack (see TODO) to avoid changing behavior in the post pass while being able to use the generalized logic in the prepass. I will fix the TODO in a separate change once this lands.

@reviewers - Main reason for posting this for review is for a sanity check on the code added to handle the pre-lowering form. I think I got that right; the existing forward direction code is basically only ever called on instructions with SEW or explicit vsetvlis.

Diff Detail

Event Timeline

reames created this revision.Jun 16 2022, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2022, 10:03 AM
reames requested review of this revision.Jun 16 2022, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2022, 10:03 AM
craig.topper accepted this revision.Jun 16 2022, 2:08 PM

LGTM

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
353–354

Maybe a helper method in DemandedFields to set all VTYPE related fields could make sense here?

371

nit: You can drop the curly braces here

This revision is now accepted and ready to land.Jun 16 2022, 2:08 PM
This revision was landed with ongoing or failed builds.Jun 16 2022, 2:40 PM
This revision was automatically updated to reflect the committed changes.