This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Simplify extendSchedulingRegion
ClosedPublic

Authored by reames on Feb 22 2022, 3:20 PM.

Details

Summary

This change uses instruction's comesBefore method to simplify the code significantly. There's little compile time concern here because getSpillCost already calls comesBefore on every basic block which contains a vectorization candidate. The only additional times we'll build basic block ordering is when we can't schedule a vector candidate anywhere in the containing block.

Diff Detail

Event Timeline

reames created this revision.Feb 22 2022, 3:20 PM
reames requested review of this revision.Feb 22 2022, 3:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2022, 3:20 PM

It would be good to have a test, may be useful in future.

reames updated this revision to Diff 410835.Feb 23 2022, 8:51 AM
reames retitled this revision from [SLP] Simplify extendSchedulingRegion and fix a bug in region cap handling to [SLP] Simplify extendSchedulingRegion.
reames edited the summary of this revision. (Show Details)

Rebase and simplify patch after removing cap mechanism entirely. Remaining review should be quick provided I'd not missing some algorithmic detail.

This revision is now accepted and ready to land.Feb 23 2022, 9:37 AM
This revision was landed with ongoing or failed builds.Feb 23 2022, 11:23 AM
This revision was automatically updated to reflect the committed changes.