[PATCH] D103514: [LV] Support sinking recipe in replicate region after another region.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 12 06:13:28 PDT 2021
fhahn marked 4 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9200
+ assert(Target->getParent()->size() == 1 &&
+ "Target must be in a replicator with a single recipe");
+
----------------
Ayal wrote:
> These asserts are better placed inside the lambda?
I moved the SESE one. The other one would be a bit more work, because currently the lambda does not have access to Target's/Sink's parents. A general helper to check for replicate regions in the future may be helpful.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9235
// directly.
if (!SinkRegion) {
Sink->moveAfter(Target);
----------------
Ayal wrote:
> Have this simplest and most common (!SinkRegion && !TargetRegion) case early-exit first?
> Followed by the next simple (!SinkRegion && TargetRegion) case; both move the Sink recipe via Sink->move*();
> Last deal with SinkRegion by first disconnecting it and then placing it between an AfterBlock and its single successor, where AfterBlock is produced by splitting the Target block if !TargetRegion.
I restructured the code to handle the simplest case first, then `SinkRegion` and then `TargetRegion`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103514/new/
https://reviews.llvm.org/D103514
More information about the llvm-commits
mailing list