This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] CleanupVSETVLI: Add phase to remove redundant VSETVLI instructions across basic blocks
AbandonedPublic

Authored by arcbbb on Apr 21 2021, 1:06 AM.

Details

Summary

This is a rework from @fpallares's and @rogfer01's patches from BSC.

This patch removes the first VSET[I]VLI from a basic block
when its config is equal to the VL & VType of predecessors.

Authored-by: Ferran Pallarès <ferran.pallares@bsc.es>
Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>

Diff Detail

Unit TestsFailed

Event Timeline

arcbbb created this revision.Apr 21 2021, 1:06 AM
arcbbb requested review of this revision.Apr 21 2021, 1:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2021, 1:06 AM
arcbbb edited the summary of this revision. (Show Details)Apr 29 2021, 12:15 AM

I'd suggest to add some specific tests showing what this improvement is doing (in addition to the other test changes).

arcbbb updated this revision to Diff 342319.May 2 2021, 11:57 PM

address Roger's comment

i. add MIR tests.
arcbbb updated this revision to Diff 342625.May 3 2021, 8:16 PM

rebased to pass unit tests.

Sorry I haven't had time to look at this in depth yet. I'll try to get round to it soon.

arcbbb planned changes to this revision.May 5 2021, 7:42 PM

Thank you for reading this.
Because there is an alternative approach proposed by Craig https://reviews.llvm.org/D101938,
I'll check that first and then abandon this when we are in favor of that way.

arcbbb abandoned this revision.May 21 2021, 9:22 AM

D102739 is the preferred approach.