[PATCH] D117951: [SLP] Optimize reschedule of previously scheduled bundle member [NFC]

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 22 08:17:57 PST 2022


reames created this revision.
reames added reviewers: ABataev, nikic, fhahn.
Herald added subscribers: asbirlea, george.burgess.iv, bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

The case being handled is when we are trying to form a bundle from a set of instructions where at least one is a transitive use of another existing tree node (i.e. has already been scheduled).

For context, the effect of bundling is effectively to add an extra scheduling dependency that all instructions within the bundle can be scheduled together.  This means that all nodes making up the bundle will be scheduled at the point that *all* instructions making up the bundle are ready.  This dependency is implicit and not explicitly materialized in the dependency sets.

The old code handled this by blowing away the entire schedule and all dependency information.  This patch follows from the observations that a) bundling doesn't change (explicitly tracked) dependencies at all, and b) since we have a strictly bottom up scheduler the scheduling of users of the new bundle is not effected by the exact placement of the bundle instructions.

As such, we can parallel the upwards def walk that schedule does to remove dependencies, and unschedule only nodes reachable through the upwards def chain.

(For anyone aware of my MSSA patch, this change is completely unrelated - other than it cleans up some of the same code.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117951

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117951.402219.patch
Type: text/x-patch
Size: 5612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220122/0506f3f1/attachment.bin>


More information about the llvm-commits mailing list